How do I refresh render after adding mesh from script

Forums: How do I refresh render after adding mesh from script
Forum for OctaneRender Lua scripting examples, discussion and support.

How do I refresh render after adding mesh from script

Postby Wallan » Fri Jan 22, 2016 9:32 pm

Wallan Fri Jan 22, 2016 9:32 pm
I have written a script that connects and deconnects meshes to a mesh group from a GUI.

When I run the scrip and activates a mesh (a checkbox in my gui) I can see the connection being created between the nodes but the connected mesh does not show up in the render.

I have tried
octane.render.restart().
It restarts the render but the mesh does not show up.

I tried
renderingNode = octane.render.getRenderTargetNode()
renderingNode:evaluate()
But that did not help either.

I also tried to do
MyMeshGroup:evaluate()
but that did not help either.

What do I have to do to get the render to update and show the connected meshes.
Windows 7 Ultimate 64bit 32Gb RAM. Intel Core i7-5820K [email protected] GHZ. Display uses a Gigabyte GTX 460 1Gb VRAM. Octane uses an EVGA GTX 970 4Gb VRAM.
Wallan
Licensed Customer
Licensed Customer
 
Posts: 47
Joined: Fri Jan 23, 2015 6:13 pm

Re: How do I refresh render after adding mesh from script

Postby abstrax » Fri Jan 22, 2016 9:55 pm

abstrax Fri Jan 22, 2016 9:55 pm
Wallan wrote:I have written a script that connects and deconnects meshes to a mesh group from a GUI.

When I run the scrip and activates a mesh (a checkbox in my gui) I can see the connection being created between the nodes but the connected mesh does not show up in the render.

I have tried
octane.render.restart().
It restarts the render but the mesh does not show up.

I tried
renderingNode = octane.render.getRenderTargetNode()
renderingNode:evaluate()
But that did not help either.

I also tried to do
MyMeshGroup:evaluate()
but that did not help either.

What do I have to do to get the render to update and show the connected meshes.

Did you call octane.changemanager.update()?
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5483
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: How do I refresh render after adding mesh from script

Postby Wallan » Fri Jan 22, 2016 10:20 pm

Wallan Fri Jan 22, 2016 10:20 pm
Ahhh, that's the thing to use. :)

Totally missed that.

Thanks.
Really grateful for your help.
Windows 7 Ultimate 64bit 32Gb RAM. Intel Core i7-5820K [email protected] GHZ. Display uses a Gigabyte GTX 460 1Gb VRAM. Octane uses an EVGA GTX 970 4Gb VRAM.
Wallan
Licensed Customer
Licensed Customer
 
Posts: 47
Joined: Fri Jan 23, 2015 6:13 pm

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 7 guests

Thu Mar 28, 2024 2:11 pm [ UTC ]