Improvement in CPP SCENE EXPORT
Posted: Sat Feb 15, 2014 9:47 pm
Hello,
I think about improvement for option: File->Export Scene->Save as source code.
Exporting scene to *.cpp file is quite nice, however, objects are exported in their own scope, that is, between "{}". I know that this was the easiest way to generate objects tree, but each object has the same name, for example:
etc..
However, if you want to find something or extract any object, you can't really say where your object is looking at cpp code.
But, in RUBE each object has a NAME property.
Why not include this NAME (and other properties) in object's scope? For example as a comment:
or even better, as some kind of mapping name->object:
or advanced version with property table:
Is it possible to make such improvement?
I think about improvement for option: File->Export Scene->Save as source code.
Exporting scene to *.cpp file is quite nice, however, objects are exported in their own scope, that is, between "{}". I know that this was the easiest way to generate objects tree, but each object has the same name, for example:
Code: Select all
b2BodyDef bd;
b2FixtureDef fd;
However, if you want to find something or extract any object, you can't really say where your object is looking at cpp code.
But, in RUBE each object has a NAME property.
Why not include this NAME (and other properties) in object's scope? For example as a comment:
Code: Select all
{
//name: small_box
b2BodyDef bd;
bd.type = b2BodyType(2);
....
}
Code: Select all
{
b2BodyDef bd;
bd.type = b2BodyType(2);
....
bodies["small_box"] = &bd;
}
Code: Select all
{
b2BodyDef bd;
bd.type = b2BodyType(2);
....
ObjectProperties *objProp = new ObjectProperties();
objProp.name = "small_box"
bodies["small_box"] = objProp;
}