mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Fix export bug
This commit is contained in:
parent
26f82e899e
commit
a84fdecec9
4 changed files with 10 additions and 4 deletions
|
@ -29,7 +29,7 @@ EntityItemPointer RenderableModelEntityItem::factory(const EntityItemID& entityI
|
|||
RenderableModelEntityItem::RenderableModelEntityItem(const EntityItemID& entityItemID,
|
||||
const EntityItemProperties& properties) :
|
||||
ModelEntityItem(entityItemID, properties),
|
||||
_dimensionsInitialized { properties.dimensionsChanged() }
|
||||
_dimensionsInitialized(properties.getDimensionsInitialized())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,10 @@ public:
|
|||
void setActionDataDirty() { _actionDataChanged = true; }
|
||||
|
||||
QList<QString> listChangedProperties();
|
||||
|
||||
|
||||
bool getDimensionsInitialized() const { return _dimensionsInitialized; }
|
||||
void setDimensionsInitialized(bool dimensionsInitialized) { _dimensionsInitialized = dimensionsInitialized; }
|
||||
|
||||
private:
|
||||
QUuid _id;
|
||||
bool _idSet;
|
||||
|
@ -267,6 +270,7 @@ private:
|
|||
bool _glowLevelChanged;
|
||||
bool _localRenderAlphaChanged;
|
||||
bool _defaultSettings;
|
||||
bool _dimensionsInitialized = false; // Only true if creating an entity localy with no dimensions properties
|
||||
|
||||
// NOTE: The following are pseudo client only properties. They are only used in clients which can access
|
||||
// properties of model geometry. But these properties are not serialized like other properties.
|
||||
|
|
|
@ -65,8 +65,8 @@ void EntityScriptingInterface::setEntityTree(EntityTreePointer elementTree) {
|
|||
}
|
||||
|
||||
QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties) {
|
||||
|
||||
EntityItemProperties propertiesWithSimID = properties;
|
||||
propertiesWithSimID.setDimensionsInitialized(properties.dimensionsChanged());
|
||||
|
||||
EntityItemID id = EntityItemID(QUuid::createUuid());
|
||||
|
||||
|
|
|
@ -88,7 +88,9 @@ EntityItemPointer EntityTypes::constructEntityItem(EntityType entityType, const
|
|||
factory = _factories[entityType];
|
||||
}
|
||||
if (factory) {
|
||||
newEntityItem = factory(entityID, properties);
|
||||
auto mutableProperties = properties;
|
||||
mutableProperties.markAllChanged();
|
||||
newEntityItem = factory(entityID, mutableProperties);
|
||||
}
|
||||
return newEntityItem;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue