Fix export bug

This commit is contained in:
Atlante45 2015-10-15 18:43:32 -07:00
parent 26f82e899e
commit a84fdecec9
4 changed files with 10 additions and 4 deletions

View file

@ -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())
{
}

View file

@ -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.

View file

@ -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());

View file

@ -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;
}