mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 15:20:08 +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,
|
RenderableModelEntityItem::RenderableModelEntityItem(const EntityItemID& entityItemID,
|
||||||
const EntityItemProperties& properties) :
|
const EntityItemProperties& properties) :
|
||||||
ModelEntityItem(entityItemID, properties),
|
ModelEntityItem(entityItemID, properties),
|
||||||
_dimensionsInitialized { properties.dimensionsChanged() }
|
_dimensionsInitialized(properties.getDimensionsInitialized())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -254,7 +254,10 @@ public:
|
||||||
void setActionDataDirty() { _actionDataChanged = true; }
|
void setActionDataDirty() { _actionDataChanged = true; }
|
||||||
|
|
||||||
QList<QString> listChangedProperties();
|
QList<QString> listChangedProperties();
|
||||||
|
|
||||||
|
bool getDimensionsInitialized() const { return _dimensionsInitialized; }
|
||||||
|
void setDimensionsInitialized(bool dimensionsInitialized) { _dimensionsInitialized = dimensionsInitialized; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QUuid _id;
|
QUuid _id;
|
||||||
bool _idSet;
|
bool _idSet;
|
||||||
|
@ -267,6 +270,7 @@ private:
|
||||||
bool _glowLevelChanged;
|
bool _glowLevelChanged;
|
||||||
bool _localRenderAlphaChanged;
|
bool _localRenderAlphaChanged;
|
||||||
bool _defaultSettings;
|
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
|
// 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.
|
// 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) {
|
QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties) {
|
||||||
|
|
||||||
EntityItemProperties propertiesWithSimID = properties;
|
EntityItemProperties propertiesWithSimID = properties;
|
||||||
|
propertiesWithSimID.setDimensionsInitialized(properties.dimensionsChanged());
|
||||||
|
|
||||||
EntityItemID id = EntityItemID(QUuid::createUuid());
|
EntityItemID id = EntityItemID(QUuid::createUuid());
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,9 @@ EntityItemPointer EntityTypes::constructEntityItem(EntityType entityType, const
|
||||||
factory = _factories[entityType];
|
factory = _factories[entityType];
|
||||||
}
|
}
|
||||||
if (factory) {
|
if (factory) {
|
||||||
newEntityItem = factory(entityID, properties);
|
auto mutableProperties = properties;
|
||||||
|
mutableProperties.markAllChanged();
|
||||||
|
newEntityItem = factory(entityID, mutableProperties);
|
||||||
}
|
}
|
||||||
return newEntityItem;
|
return newEntityItem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue