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: 

reuse and scripting

3 REPLIES 3
Reply
Message 1 of 4
louisVottero
492 Views, 3 Replies

reuse and scripting

What is the best way to reuse a bifrost graph using scripting?

I've quickly looked at the vnn commands

Is there a script command to create a bifrost graph (in regular maya) from the exported json? 

I think with the vnn commands I can change the input path in the bifrost graph?

I tried exporting a bifrost graph and when reimporting it had a new mesh input not available before. However the graph didn't seem to evaluate properly.



3 REPLIES 3
Message 2 of 4
syracoj
in reply to: louisVottero

not sure if it will help but you can select the nodes in a bifrostGraph and do copy then paste into a text editor.

You can then take this markup and paste it into an empty bifrostGraph and it will create the network.

 

Message 3 of 4
louisVottero
in reply to: syracoj

maybe using vnnCopy and vnnPaste I could save the markup to a text file and load it in.    Will continue to investigate.

Message 4 of 4
WindXu
in reply to: louisVottero

I am not sure whether command "bifrostGraph" is what you are looking for.

This command can be used to import a published graph. For example, the command below will import the example graph "smoke_trail":

bifrostGraph -importGraph "Graphs::Aero::smoke_trail"

Full name is needed including namespace and graph name in the command.

 

If the exported graph requires some input mesh, before you import back the graph, make sure the input geometry is ready in Maya scene, otherwise the graph will have no input mesh and will not evaluate properly.

 

You can also import the graph first, but after importing you need to set input mesh for the graph through either dragging-dropping mesh to the graph or setting full "Path" for the input node in parameter editor.

 

Hope it helps.

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

Post to forums