Hello,
I'm coming back to the topic because I get an error when I move the spine project and the image folder from one folder to another. The initial relative path in the spine project becomes absolute without changing anything.
I have the problem only when I create the project from the spine CLI with the python script below:
def CreateSpineProject(jsonPath, verbose=False):
# http://fr.esotericsoftware.com/spine-command-line-interface#Import
outSpinePath = jsonPath.with_suffix('.spine')
exportProcess = subprocess.run([
"Spine",
"-i", jsonPath.as_posix(),
"-o", outSpinePath.as_posix(),
"
---
import"
], capture_output=True)
if verbose: print(exportProcess.stdout.decode("utf-8"))
return outSpinePath
The relativity doesn't seem to be related to the position of the project or I'm miss something.
When I create the spine project from the spine GUI by doing:
- import from data (with the json file)
- save it next to the image folder to make the relativity work
With this process, moving the spine project and the image folder works well.
I don't really explain this difference with the CLI but it's a real problem for me.
Thanks in avance.