Hello all,
I'm working on an instancer with preset, and I would like to know the best practices on how to manage the geometry data and make it easily sharable.
Right now I use read alembic node but the directory path is fixed and "hard coded".
Is it possible to use a relative path? For example relative to where the JSON graph is, so I can just put the Alembic next to it?
Maybe there is an other better way to package geometry data?
Thanks.
Solved! Go to Solution.
Hello all,
I'm working on an instancer with preset, and I would like to know the best practices on how to manage the geometry data and make it easily sharable.
Right now I use read alembic node but the directory path is fixed and "hard coded".
Is it possible to use a relative path? For example relative to where the JSON graph is, so I can just put the Alembic next to it?
Maybe there is an other better way to package geometry data?
Thanks.
Solved! Go to Solution.
Solved by mjcg91. Go to Solution.
Solved by marcus.nordenstam. Go to Solution.
Hi Theo
You can use an environment variable to specify and shot or project root directory, like $SHOT or $PROJECT.
And then use the "expand_env_vars" node to expand the contents of that environment variable into a string. Strings fed to "expand_env_vars" may contains not just an environment variable but also other text, and it will only expand the environment variable part.
So for example, if you have set your system environment variable $SHOT to "C:/Users/Theo/Projects/CGMovie/Shot2" and you use the string "$SHOT/geo_caches/geo.####.bob" and feed it to expand_env_vars, you'd get:
"C:/Users/Theo/Projects/CGMovie/Shot2/geo_caches/geo.####.bob"
Hope that helps
Marcus
Hi Theo
You can use an environment variable to specify and shot or project root directory, like $SHOT or $PROJECT.
And then use the "expand_env_vars" node to expand the contents of that environment variable into a string. Strings fed to "expand_env_vars" may contains not just an environment variable but also other text, and it will only expand the environment variable part.
So for example, if you have set your system environment variable $SHOT to "C:/Users/Theo/Projects/CGMovie/Shot2" and you use the string "$SHOT/geo_caches/geo.####.bob" and feed it to expand_env_vars, you'd get:
"C:/Users/Theo/Projects/CGMovie/Shot2/geo_caches/geo.####.bob"
Hope that helps
Marcus
Hi,
You could use "expend_env_vars", but it will not work with maya's environment paths. I believe it only works with system variables.
Hi,
You could use "expend_env_vars", but it will not work with maya's environment paths. I believe it only works with system variables.
Can't find what you're looking for? Ask the community or share your knowledge.