reuse and scripting

reuse and scripting

louisVottero
Contributor Contributor
868 Views
3 Replies
Message 1 of 4

reuse and scripting

louisVottero
Contributor
Contributor

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.



0 Likes
869 Views
3 Replies
Replies (3)
Message 2 of 4

syracoj
Autodesk
Autodesk

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
Contributor
Contributor

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

0 Likes
Message 4 of 4

WindXu
Alumni
Alumni

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.

0 Likes