environment variables in blender path
It could be great to use environment variables inside blender path : texture, linked file, etc... The main idea is to set an environment variable pointing to your project root, and then describe path like this :
$myProject/textures/mytextures.png
Blender relative path is very convenient when you begin, but you can't move a file around when you use them. And if you use absolute path, you can't easily work with someone who have not the same drive configuration.
Maya or Nuke uses this kind of variables, it's also useful to share projects between windows and linux.
7 Comments
I'm facing the same problem. We are working with a lot of freelances. This is actually a big issue for us. the $varible is at first view stupid but when you know how to use it it's extremely flexible. And can solve almost all situations when you refer to (link) files. And relative paths are not so OK as you cant reorganize the folders if you need to.
Is there anything like that in blender ?
Actuallu best place to watch as example is houdini. There you could use variables in any input fields. Actually it gives ability to setup any project structure you want. So ++++ from me.
I personally would prefer path aliases which could be set up in the preferences and they should be stored in the local settings. So e.g. [MyTextures] may reference to /some/path. Opening file /some/path/bricks/nice-bricks.jpg should than be automatically replaced by [MyTextures]/bricks/nice-bricks.jpg.
Until a feature like this is available, you may use OS features to virtually link paths to a specific, unique location, like /media/assets/textures or c:\assets\textures using ln -s or mklink, on Linux/OSX and Windows respectively.
yes please. I'm building a project management tool for houdini and would love to support blender.
I've always used // for the project root (Location of the Blend file) so //textures/myTextures.png in the example above.
Is this what you are looking for, of am I missing something?
@ammusionist: simple relative paths as you describe is the best way to work for illustration, I agree. But when you work for animations with hundred of assets, shots, etc... you can't just rely on the blend file location. You need to set a project root, and assign a variable to this. In this directory you will find some folders like : assets, shots, etc...
@dddjef: Thanks for the clarification. Makes good sense!