Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jetelain
Copy link
Owner

Some objects like decals cannot be edited using Eden Editor (in-game editor).
Provides a way to remove such objects

@jetelain jetelain requested a review from Copilot March 26, 2025 21:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces a mechanism for removing certain objects (like decals) in the GRM editor that cannot be edited in the in-game Eden Editor. Key changes include:

  • Enhancements to TerrainObjectVM to support a removal flag and dynamic geometry calculation.
  • The addition of RemoveObjectAction to manage undo/redo for object removal.
  • Updates to various map editor view models and control layers to properly integrate object removal and update rendering.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/TerrainObjectVM.cs Adds properties/methods to support object removal and generates corner points.
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/RemoveObjectAction.cs Implements undoable removal actions for terrain objects.
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/EditRoadEditablePointCollection.cs Updates to point collection editing behavior.
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldMapViewModel.cs Refreshes object caching and history clearing logic upon world invalidation.
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldEditorViewModel.cs Integrates object edit flushing and invalidation in world updates.
GameRealisticMap.Studio/Controls/IEditablePointCollection.cs Expands the editable point collection interface with new members.
GameRealisticMap.Studio/Controls/GrmMapEditLayerOverlay.cs Adjusts outline rendering logic for square objects.
GameRealisticMap.Studio/Controls/GrmMapEditLayer.cs Modifies context menu and selection behavior based on object removal.
GameRealisticMap.Studio/Controls/GrmMapArma3.cs Updates rendering logic to exclude removed objects and adjusts ellipse dimensions for improved scaling.
.github/workflows/dotnet-linux.yml & dotnet-desktop.yml Upgrades workflow actions to the latest artifact upload version.
Comments suppressed due to low confidence (3)

GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/TerrainObjectVM.cs:134

  • The corners list is generated only once. If the object's transform or model info changes, consider clearing and regenerating the corners to ensure the geometric representation stays up to date.
if (corners.Count == 0)

GameRealisticMap.Studio/Controls/GrmMapArma3.cs:141

  • [nitpick] The ellipse dimensions for tree (and similarly for bush) have been halved. Verify that this change is intentional to maintain the desired visual scaling and clarity.
dc.DrawEllipse(null, new Pen(tree, 0.2), new Point(), obj.Rectangle.Width / 2, obj.Rectangle.Height / 2);

GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldMapViewModel.cs:373

  • [nitpick] Resetting UndoCountLimit by first setting it to 0 and then to null may be confusing. Consider clarifying or encapsulating this logic to ensure its purpose and behavior are clear.
UndoRedoManager.UndoCountLimit = 0;
UndoRedoManager.UndoCountLimit = null;

@jetelain jetelain requested a review from Copilot March 26, 2025 21:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enables the removal of objects from the GRM editor that cannot be edited in the Eden Editor. The changes include adding support for object removal (with corresponding UI and undo/redo integration), updating the TerrainObject view model and related classes for removal state and rendering, and updating build workflow actions.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
GameRealisticMap.Studio/UndoRedo/UndoRedoManagerExtensions.cs Introduces a Clear extension method for resetting the undo/redo manager
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/TerrainObjectVM.cs Updates the view model for terrain objects to support removal and inspection
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/RemoveObjectAction.cs Adds an undoable action for object removal
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/EditRoadEditablePointCollection.cs Adjusts point collection behavior by enabling point deletion
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldMapViewModel.cs Integrates object caching, selection, and invalidation logic
GameRealisticMap.Studio/Modules/Arma3WorldEditor/ViewModels/Arma3WorldEditorViewModel.cs Updates world property handling and flushes object edits on save
GameRealisticMap.Studio/Controls/* Introduces supporting changes for new object removal features in editing and rendering
.github/workflows/* Upgrades the GitHub Actions upload-artifact action from v3 to v4

@jetelain jetelain marked this pull request as ready for review March 26, 2025 21:52
@jetelain jetelain added enhancement New feature or request GRM Studio User Interface GRM Arma3 Arma 3 specific generator labels Mar 26, 2025
@jetelain jetelain merged commit e80fd4f into master Mar 26, 2025
2 checks passed
@jetelain jetelain deleted the feat/remove-objects-from-editor branch March 26, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request GRM Arma3 Arma 3 specific generator GRM Studio User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants