void TexturePropertyInitialisator::initialise(PropertyPtr _property) { if (SettingsManager::getInstance().getValue<bool>("Settings/SaveLastTexture")) { std::string texture = SettingsManager::getInstance().getValue("Resources/LastTextureName"); _property->setValue(texture); } }
void UniqueNamePropertyInitialisator::initialise(PropertyPtr _property) { DataPtr parent = DataUtility::getSelectedParentDataByType(_property->getOwner()->getType()->getName()); if (parent == nullptr) return; std::string name = DataUtility::getUniqueName(parent, "unnamed_"); _property->setValue(name); }