Update UV Transfrom from script?

Forums: Update UV Transfrom from script?
Forum for OctaneRender Lua scripting examples, discussion and support.

Update UV Transfrom from script?

Postby bmustata » Fri Mar 16, 2018 8:25 am

bmustata Fri Mar 16, 2018 8:25 am
Hi,

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

Image

Thanks
bmustata
 
Posts: 7
Joined: Sat Feb 10, 2018 10:07 am

Re: Update UV Transfrom from script?

Postby mojave » Sun Mar 18, 2018 11:48 pm

mojave Sun Mar 18, 2018 11:48 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.
User avatar
mojave
OctaneRender Team
OctaneRender Team
 
Posts: 797
Joined: Sun Feb 08, 2015 10:35 pm

Re: Update UV Transfrom from script?

Postby bmustata » Mon Mar 19, 2018 11:28 am

bmustata Mon Mar 19, 2018 11:28 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

Re: Update UV Transfrom from script?

Postby bmustata » Tue Mar 27, 2018 8:16 pm

bmustata Tue Mar 27, 2018 8:16 pm
Any more help on how to update the rotateZ and scaleX & Y for a texture (NT_TEXT_IMAGE)?
bmustata
 
Posts: 7
Joined: Sat Feb 10, 2018 10:07 am

Re: Update UV Transfrom from script?

Postby mojave » Fri Apr 06, 2018 3:20 am

mojave Fri Apr 06, 2018 3:20 am
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.
User avatar
mojave
OctaneRender Team
OctaneRender Team
 
Posts: 797
Joined: Sun Feb 08, 2015 10:35 pm

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 1 guest

Wed Dec 12, 2018 11:21 pm [ UTC ]
cron