3#include <NDEVR/DesignCommand.h>
4#include <NDEVR/Model.h>
5#include <NDEVR/Layer.h>
6#include <NDEVR/Buffer.h>
7#include <NDEVR/DesignObjectLookup.h>
50 return _t(
"Set Layer");
The equivelent of std::vector but with a bit more control.
DesignCommand()
Default constructor.
bool is_undo
Whether this command represents an undo operation.
A core class where all Design Objects including models, materials, and geometries are stored.
Model layer(const UUID &id, bool allow_deleted=false) const
Retrieves a layer by its UUID.
Model model(const UUID &id, bool allow_deleted=false) const
Retrieves a model by its UUID.
void ensureLayerExistsInScene(const UUID &layer_id, const UUID &scene_id)
Ensures a layer exists within a specific scene, creating it if necessary.
bool hasLayerID(const UUID &id, bool allow_deleted=false) const
Checks whether a layer with the given UUID exists in any scene.
WLock writeLock() const
Acquires an exclusive write lock on the design object store.
constexpr decltype(auto) get(t_property_type property) const
Retrieves a property value from the database, cast to the requested type.
Scene getScene() const
Retrieves the Scene that this design object belongs to.
bool isValid() const
Checks whether this design object has a valid index into the database.
A core class that represents a node on model hierarchy.
void updateModifiedTime(Time time=Time::SystemTime())
Updates the modified timestamp for this model.
void setLayer(Model layer)
Assigns this model to a specific layer.
void clearLayer()
Removes the layer assignment from this model.
Model directLayer() const
Returns the directly assigned layer model.
Buffer< UUID > m_original_layers
Original layer UUIDs for each model, stored for undo support.
UUID m_layer
The UUID of the destination layer. Invalid UUID means clear layer.
virtual TranslatedString name() const override
Returns the translated display name of this command.
virtual StringView icon() const override
Returns the icon identifier for this command.
virtual bool addTarget(UUID target_id) override
Adds a model to the set of targets for this layer command.
SetLayerCommand(UUID layer)
Constructs a SetLayerCommand targeting the given layer.
virtual void execute(DesignObjectLookup *lookup) override
Executes the layer assignment (or reverses it during undo).
Buffer< UUID > m_models_to_set
UUIDs of models to be assigned to the layer.
The core String View class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Used to lock a particular variable for writing.
The primary namespace for the NDEVR SDK.
static constexpr bool IsValid(const Angle< t_type > &value)
Checks whether the given Angle holds a valid value.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
static constexpr bool IsInvalid(const Angle< t_type > &value)
Checks whether the given Angle holds an invalid value.
@ guid
A 128-bit globally unique identifier for the object.