Update UV Transfrom from script?

Forum for OctaneRender Lua scripting examples, discussion and support.
Post Reply
bmustata
Posts: 7
Joined: Sat Feb 10, 2018 10:07 am

Hi,

How can I update UV Transfrom (NT_TRANSFORM_VALUE) from code?

Image

Thanks
User avatar
mojave
OctaneRender Team
Posts: 1336
Joined: Sun Feb 08, 2015 10:35 pm

Hi bmustata,

There are several nodes types that make use of NT_TRANSFORM_VALUEso you'll need to find the actual pin within that node using the Lua API browser.

In either case, once you find the right pin to read or write, these are the attributes you can access to:
Capture.PNG
I hope that helps.
bmustata
Posts: 7
Joined: Sat Feb 10, 2018 10:07 am

Currently I'm trying something like this but it's not working right.

Code: Select all

node:setPinValue(octane.P_TRANSFORM, octane.matrix.make3dTransformation({0,0,rotate}, {repeatX,repeatY,0}, {0,0,0}, 2))
bmustata
Posts: 7
Joined: Sat Feb 10, 2018 10:07 am

Any more help on how to update the rotateZ and scaleX & Y for a texture (NT_TEXT_IMAGE)?
User avatar
mojave
OctaneRender Team
Posts: 1336
Joined: Sun Feb 08, 2015 10:35 pm

Nodes of the type NT_TEXT_IMAGE have a pin P_TRANSFORM of NT_TRANSFORM_VALUE type.

You need to set the attributes I showed you in my previous post to their individual values.
Post Reply

Return to “Lua Scripting”