JCPalmer Posted February 3, 2016 Share Posted February 3, 2016 A small release of the Blender exporter has occurred. It now supports saving textures in a sub-directory from the main file. The sub-directory path MUST exist, or the export will terminate without writing anything besides the very short log file. The image in the documentation shows writing textures to the sub-directory 'materials/desktop'. For windows use '\' instead of '/' FYI, version 4.3 only existed on Tower of Babel. Typescript output was dropped for a .d.ts, which always written instead. Vousk-prod. and Dal 2 Quote Link to comment Share on other sites More sharing options...
Dal Posted February 4, 2016 Share Posted February 4, 2016 Nice! Is there no way to auto-create that directory from your script if it doesn't exist? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 4, 2016 Author Share Posted February 4, 2016 Ok, 4.4.1 PR in progress A search of "python create path" returned an os.makedirs() library call. You still must use the correct directory separator for your OS, since not OS independent. A wraning message is now placed in the log file, instead of throwing exception per: # assign texture location, purely temporary if inlining self.textureDir = os.path.dirname(self.filepath) if not scene.inlineTextures: self.textureDir = os.path.join(self.textureDir, scene.textureDir) if not os.path.isdir(self.textureDir): os.makedirs(self.textureDir) Main.warn("Texture sub-directory did not already exist, created: " + self.textureDir) monkeyface 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.