Commit b337ae06 authored by cutealien's avatar cutealien

ISceneNode::deserializeAttributes uses now old values for parameters which are...

ISceneNode::deserializeAttributes uses now old values for parameters which are not in the attributes (thx @entity for noticing).


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4872 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 55a2000a
-------------------------- --------------------------
Changes in 1.9 (not yet released) Changes in 1.9 (not yet released)
- ISceneNode::deserializeAttributes uses now old values for parameters which are not in the attributes (thx @entity for noticing).
- Add interface for easier access to scrollbars for IGUIListBox, IGUITreeView and IGUITable - Add interface for easier access to scrollbars for IGUIListBox, IGUITreeView and IGUITable
- Fix serializing colors as strings. Was previously mixing up strings with number-arrays and hex color values. Now using hex color values always, but also fixed the the handling when it get's number-array strings. - Fix serializing colors as strings. Was previously mixing up strings with number-arrays and hex color values. Now using hex color values always, but also fixed the the handling when it get's number-array strings.
- Fix IAttributes::setAttribute implementation for textures (did do nothing before). - Fix IAttributes::setAttribute implementation for textures (did do nothing before).
......
...@@ -730,23 +730,26 @@ namespace scene ...@@ -730,23 +730,26 @@ namespace scene
{ {
if (!in) if (!in)
return; return;
Name = in->getAttributeAsString("Name"); Name = in->getAttributeAsString("Name", Name);
ID = in->getAttributeAsInt("Id"); ID = in->getAttributeAsInt("Id", ID);
setPosition(in->getAttributeAsVector3d("Position")); setPosition(in->getAttributeAsVector3d("Position", RelativeTranslation));
setRotation(in->getAttributeAsVector3d("Rotation")); setRotation(in->getAttributeAsVector3d("Rotation", RelativeRotation));
setScale(in->getAttributeAsVector3d("Scale")); setScale(in->getAttributeAsVector3d("Scale", RelativeRotation));
IsVisible = in->getAttributeAsBool("Visible"); IsVisible = in->getAttributeAsBool("Visible", IsVisible);
s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling", if (in->existsAttribute("AutomaticCulling"))
scene::AutomaticCullingNames); {
if (tmpState != -1) s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling",
AutomaticCullingState = (u32)tmpState; scene::AutomaticCullingNames);
else if (tmpState != -1)
AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling"); AutomaticCullingState = (u32)tmpState;
else
AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling");
}
DebugDataVisible = in->getAttributeAsInt("DebugDataVisible"); DebugDataVisible = in->getAttributeAsInt("DebugDataVisible", DebugDataVisible);
IsDebugObject = in->getAttributeAsBool("IsDebugObject"); IsDebugObject = in->getAttributeAsBool("IsDebugObject", IsDebugObject);
updateAbsolutePosition(); updateAbsolutePosition();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment