property system for editor

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
vroad
Posts: 18
Joined: Sun Jan 03, 2010 1:30 pm

property system for editor

Post by vroad »

Irrlicht has "IAttributeExchangingObject" interface. Document says that it can be used in editor.
But it serializes/deserializes ALL attributes of object. Editor can't modify only single property by this interface.

Another way to achieve this is storing name of properties and values in object's constructor. But, if may objects are created, this method requires external memory for storing strings.

Writing a serialization class for each class is too hard.

What is the best method?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

It shouldn't be too hard. If you deserialize the attributes into an io::IAttributes, you can get/set each attribute individually, and then you can serialize the attributes back to the object.

Travis
vroad
Posts: 18
Joined: Sun Jan 03, 2010 1:30 pm

Post by vroad »

Yes, all attribute values are saved in IAttributes, so other properties are not changed.
In the case of modifying single attribute, other class properties should be reset by "IAttributeExchangingObject::deserializeAttributes" call.

I might be worrying too much about it.
Post Reply