Custom Properties not loading from .json

Report problems here (or use the built-in feedback dialog in the editor)
Post Reply
starmaker
Posts: 2
Joined: Sun Sep 14, 2014 10:11 am

Custom Properties not loading from .json

Post by starmaker »

Hi, all,

I have noticed that the Rube editor does not show custom properties when a scene is loaded from .json file; though I can see that it is capable saving these.


To rectreate:
1. create a scene with a body + fixture.
2. add custom String property on the body.
3. save as .json by going File -> Export Scene -> Save Raw Info
4. close the scene
5. open the saved file

The custom property we have added is not shown on the body properties. if we edit the scene and save/overwrite the file, the property still remains in JSON. This makes me think that either I am doing something silly or there is a bug. I fit's a bug, and since the overwriting the opened file does not remove the property, then the property gets loaded into the model when JSON is opened, but this is not reflected in GUI.


Rube version: 1.6.1
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Custom Properties not loading from .json

Post by iforce2d »

The exported .json is not intended to be re-opened to continue editing. You should use the .rube file to edit and save your scene, and the .json should be a one-way (export only) file.

The main reason that the editor is able to re-open the .json files is because the old (free) version of the editor saved in that format, and I wanted RUBE to be backward-compatible with existing scene files. I also find it handy every now and then to open a .json file to quickly check something.

See also:
viewtopic.php?f=6&t=360
viewtopic.php?f=7&t=74
starmaker
Posts: 2
Joined: Sun Sep 14, 2014 10:11 am

Re: Custom Properties not loading from .json

Post by starmaker »

Oh, I see, thanks :)
Post Reply