Page 2 of 2

Re: Text-based save file format

Posted: 14 Jul 2015, 20:52
by mfloyd
I agree that a text-based file save format would be very useful. I have wanted it for reasons already stated: better use with version control tools, checking what changed between files, etc.
I had a thought recently though, that perhaps a diff/merge tool could be made that works with the binary files. Maybe such a tool could read the parameters of the binary files and display the parameters that changed between them. This would be useful if a text based file format isn't feasible, or couldn't be ready as quickly as the diff tool would be. I imagine it would also be useful for comparing the files that are already saved in the current file format even if a textual file save format is made later. It could also be written such that the binary files still always remain consistent when saved, which was one of the concerns about a textual file format.
I realize that creating such a tool might actually be more work than changing the file save format, but thought I'd add the suggestion since it would at least partially address some of the issues that motivate the need for a textual file save format.

Re: Text-based save file format

Posted: 15 Jul 2015, 13:11
by coppelia
A binary diff/merge tool can only work on the V-REP binary files, if you disable compression. You can do this in the system/usrset.txt file: set compressFiles to false.

Cheers

Re: Text-based save file format

Posted: 21 Oct 2016, 08:25
by mdam
Does the newer versions of V-REP have the text-based save file format? I saw in this format that Coppelia started the implementation last year. I was wondering where to get started and which ones are the configuration text files. Thanks in advance.

Re: Text-based save file format

Posted: 24 Oct 2016, 08:34
by coppelia
Hello,

this is unfortunately not yet supported, we started development but put this on hold for a while (the task is not as straightforward as expected, and priorities change from time to time). But we recognize that this will eventually be needed.

Cheers

Re: Text-based save file format

Posted: 08 Apr 2017, 08:00
by Justus
Hi,
Just a little bump ("upvote") for this feature, it would be a great help during development!
regards,
Justus

Re: Text-based save file format

Posted: 03 Jan 2019, 21:23
by nex
Adding my "vote" as well. It really would be very helpful to track changes in version control.

Re: Text-based save file format

Posted: 25 Oct 2022, 10:24
by yale.lee
Same here, I could definitely use a text-based format! Any chance you planned it in your backlog?

Re: Text-based save file format

Posted: 26 Oct 2022, 14:48
by coppelia
Hello,

There are two ways of doing this:
1. The recommended way of doing would be to use the binary format (*.ttt or *.ttm files), and to keep the scripts separate (i.e. included from an external file). All you have to do is write your Lua or Python code in a *.lua or *.py file, in the same folder as your scene file. Then, include your external code via one of following directives:

Lua:

Code: Select all

require('myExternalFile') -- i.e. without the extension
Python:

Code: Select all

#python
include myExternalFile

# myExternalFile is the pythonScript name or path (absolute or relative), without quotes nor the ending '.py'
# searched paths include:
# <CoppeliaSim executable path>/ 
# <CoppeliaSim executable path>/python 
# <current scene path>/ 
# <additional path>/ (see system/usrset.txt and value 'additionalPythonPath')
# additional include paths passed via #luaExec additionalIncludePaths={'c:/Python38'}
2. Additionally, you can also import/export CoppeliaSim scenes and models via an XML format.

Cheers