Community
Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Relative path for a string value.

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
theo7R7XM
634 Views, 3 Replies

Relative path for a string value.

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.

3 REPLIES 3
Message 2 of 4

 

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

 

Message 3 of 4
mjcg91
in reply to: theo7R7XM

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.

expend_env_vars.jpg

Maxime Jeanmougin - Technical Artist
https://maximejeanmougin.com

Join the Bifrost Addicts community on Discord:
https://discord.gg/bifrost-addicts
Message 4 of 4
theo7R7XM
in reply to: theo7R7XM

nice, thanks !

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report