mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 03:59:19 +02:00
feat(editor): nodes placed with the brush and the area fill go without names; name of a model instance set in the node properties and written to its definition on save; redo of a deletion finds nodes which have no name
This commit is contained in:
@@ -557,6 +557,15 @@ void state_manager::delete_model(TAnimModel *model) {
|
||||
Instances.purge(model);
|
||||
}
|
||||
|
||||
bool state_manager::rename_model(TAnimModel *model, std::string const &name) {
|
||||
if (model == nullptr || false == Instances.rename(model, name)) {
|
||||
return false;
|
||||
}
|
||||
model->m_name = (name == "none" ? std::string{} : name);
|
||||
scene::Layers.renamed(model);
|
||||
return true;
|
||||
}
|
||||
|
||||
void state_manager::delete_eventlauncher(TEventLauncher *launcher) {
|
||||
launcher->dRadius = 0.0f; // disable it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user