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-e03cc46cb475master
parent
55a2000ad1
commit
b337ae06b7
|
@ -1,6 +1,7 @@
|
|||
--------------------------
|
||||
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
|
||||
- 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).
|
||||
|
|
|
@ -730,23 +730,26 @@ namespace scene
|
|||
{
|
||||
if (!in)
|
||||
return;
|
||||
Name = in->getAttributeAsString("Name");
|
||||
ID = in->getAttributeAsInt("Id");
|
||||
Name = in->getAttributeAsString("Name", Name);
|
||||
ID = in->getAttributeAsInt("Id", ID);
|
||||
|
||||
setPosition(in->getAttributeAsVector3d("Position"));
|
||||
setRotation(in->getAttributeAsVector3d("Rotation"));
|
||||
setScale(in->getAttributeAsVector3d("Scale"));
|
||||
setPosition(in->getAttributeAsVector3d("Position", RelativeTranslation));
|
||||
setRotation(in->getAttributeAsVector3d("Rotation", RelativeRotation));
|
||||
setScale(in->getAttributeAsVector3d("Scale", RelativeRotation));
|
||||
|
||||
IsVisible = in->getAttributeAsBool("Visible");
|
||||
s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling",
|
||||
scene::AutomaticCullingNames);
|
||||
if (tmpState != -1)
|
||||
AutomaticCullingState = (u32)tmpState;
|
||||
else
|
||||
AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling");
|
||||
IsVisible = in->getAttributeAsBool("Visible", IsVisible);
|
||||
if (in->existsAttribute("AutomaticCulling"))
|
||||
{
|
||||
s32 tmpState = in->getAttributeAsEnumeration("AutomaticCulling",
|
||||
scene::AutomaticCullingNames);
|
||||
if (tmpState != -1)
|
||||
AutomaticCullingState = (u32)tmpState;
|
||||
else
|
||||
AutomaticCullingState = in->getAttributeAsInt("AutomaticCulling");
|
||||
}
|
||||
|
||||
DebugDataVisible = in->getAttributeAsInt("DebugDataVisible");
|
||||
IsDebugObject = in->getAttributeAsBool("IsDebugObject");
|
||||
DebugDataVisible = in->getAttributeAsInt("DebugDataVisible", DebugDataVisible);
|
||||
IsDebugObject = in->getAttributeAsBool("IsDebugObject", IsDebugObject);
|
||||
|
||||
updateAbsolutePosition();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue