ndee85 / coa_tools

COA Tools is a 2D Animation Suite for blender. It offers a 2D cutout animation workflow similar to programs like spine or spriter.
GNU General Public License v3.0
908 stars 139 forks source link

Batch Render writing to incorrect location #43

Open teroparvinen opened 8 years ago

teroparvinen commented 8 years ago

I am on OS X. When rendering an animation called "Idle", the render output setting gets populated with a value of "/tmp/Idle_". I'm trying this out with the skip sample files, so I have the project saved as skip.blend.

When I hit Batch Render, the files get placed in /tmp, i.e. under the filesystem root, in the tmp directory, when they apparently should be placed in the directory the .blend file is in, in a subdirectory called tmp.

I have no reference system so I can't confirm if the issue only happens on Macs, but I'd be happy to try and track this down with instructions.

teroparvinen commented 8 years ago

A little more info on this after some investigation.

When I use a path without a leading slash at all (e.g. tmp), the files get placed into a directory relative to where Blender was started. If I run it from the command line from my home directory, they go into ~/tmp, if I run it the usual way as a system application, they get placed into /tmp. If I use the Blender relative paths syntax (https://www.blender.org/manual/data_system/files/relative_paths.html) e.g. //tmp, everything works as expected and the files go to the tmp directory under the directory where my skip.blend is.

The bit of code at animation_handling.py line 405 that opens the file system window is the one that causes problems in some cases, and I suspect this is the operating system specific bit. If I use an absolute path in the render output input, this line causes an error and the export fails. If I use something other than a relative path (one without the double slash), the files go into an invalid location.

I can now work with this, which is nice. I hope this info helps someone.