Page 1 of 1

Quick export : JSON to same dir as rube

Posted: Mon Jul 27, 2015 12:37 pm
by rileyrg
I would like to request an export facility, preferably a setting, that allows the immediate export of a json file when I save my rube file. I've been caught a few times saving the rube but forgetting to export the json which the libgdx rube loader uses. Ideally when I set my json output path and file name then each save of the .rube file would also see the json exported as part of the save process. This would be a per scene export too so if I swap scenese in the editor then the save updates or exports to the correct json file and not the previously exported one from the other scene.

Re: Quick export : JSON to same dir as rube

Posted: Mon Jul 27, 2015 7:41 pm
by iforce2d
Yes, that could be arranged. Is this to avoid the hassle of selecting the output folder again if you have closed the document and re-opened it? You might be interested in the command-line interface which can export files as a batch process without needing to have RUBE open at all (search for "command line" in the built-in help).

Re: Quick export : JSON to same dir as rube

Posted: Wed Jul 29, 2015 4:23 pm
by rileyrg
Its to ensure that per opened file the export json goes to the same place as you originally exported it (or defaults to the dir for that scene's rube file) as opposed to possibly overwriting another scene's. If you open two scenes and edit them and save them then export you'll see that export doesn't go where the rube is if you'd exported from another opened filed previously. e.g I open level1/rube.rube and save it and then export rube.json to the same dir. If i then open loading/rube.rube and select export json then it'll be pointing at the level1 dir for the export instead of the loading dir. This has hit me a few times and resulted in me overwriting the wrong export json.

Linked : it would be be nice if hover over the scene title tab showed the full path of an opened rube scene. eg its quite normal to have rube.json in level1/ another in level2/ andother in level3/ etc. Currently you cant tell which is which without opening the save as dialog. Or can you?