![]() |
NDEVR
API Documentation
|
A DesignCommand that assigns a specific material to one or more target objects. More...
Public Member Functions | |
| SetMaterialCommand () | |
| Default constructor. | |
| virtual | ~SetMaterialCommand () |
| Default virtual destructor. | |
| virtual bool | addTarget (UUID target_id) override |
| Adds a target object to receive the material assignment. | |
| virtual void | execute (DesignObjectLookup *lookup) override |
| Executes the command, assigning the material to all target objects. | |
| virtual StringView | icon () const override |
| Returns the icon identifier for this command. | |
| virtual TranslatedString | name () const override |
| Returns the translated display name of this command. | |
| Public Member Functions inherited from DesignCommand | |
| DesignCommand () | |
| Default constructor. | |
| DesignCommand (const DesignCommand &command)=default | |
| Default copy constructor. | |
| virtual | ~DesignCommand () |
| Virtual destructor. | |
| virtual bool | canCombineWith (const DynamicPointer< DesignCommand > &) |
| Checks whether this command can be combined with another command into a single operation. | |
| virtual bool | canGroupWith (const DynamicPointer< DesignCommand > &) |
| Checks whether this command can be grouped with another command for batch execution. | |
| virtual void | combineWith (const DynamicPointer< DesignCommand > &command) |
| Combines this command with another compatible command, merging their operations. | |
| virtual bool | isAsyncExecution () const |
| Whether this command should be executed asynchronously. | |
| void | setUndoRedoID (UUID undo_redo_group) |
| Sets the undo-redo group identifier for this command. | |
| UUID | undoRedoID () const |
| Gets the undo-redo group identifier for this command. | |
Public Attributes | |
| UUID | material_id = Constant<UUID>::Invalid |
| UUID of the material to assign to each target. | |
| Public Attributes inherited from DesignCommand | |
| bool | can_undo = true |
| Whether this command supports being undone. | |
| bool | has_executed = false |
| Whether this command has already been executed. | |
| UUID | id |
| Unique identifier for this command instance. | |
| bool | is_undo = false |
| Whether this command represents an undo operation. | |
| LogPtr | log |
| Log pipe for reporting command progress and errors. | |
| Time | time = Constant<Time>::Invalid |
| Timestamp of when the command was created or executed. | |
| bool | update_project_modified = true |
| Whether executing this command should mark the project as modified. | |
Additional Inherited Members | |
| Protected Attributes inherited from DesignCommand | |
| UUID | m_undo_redo_group |
| The undo-redo group this command belongs to, for batch undo/redo. | |
A DesignCommand that assigns a specific material to one or more target objects.
When executed, each target object's material is set to the specified material_id. The previous material assignments are stored for undo support.
Definition at line 115 of file MaterialCommands.h.
|
inlineoverridevirtual |
Adds a target object to receive the material assignment.
| [in] | target_id | The UUID of the target design object. |
Reimplemented from DesignCommand.
Definition at line 147 of file MaterialCommands.h.
|
overridevirtual |
Executes the command, assigning the material to all target objects.
| [in] | lookup | The DesignObjectLookup containing the target objects. |
Reimplemented from DesignCommand.
|
overridevirtual |
Returns the icon identifier for this command.
Implements DesignCommand.
|
overridevirtual |
Returns the translated display name of this command.
Implements DesignCommand.