Jump to: Board index » General » Fusion

Set value of Point() control via the console.

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

JBroadway

  • Posts: 25
  • Joined: Tue Mar 03, 2020 7:20 pm
  • Real Name: Jeremiah Broadway

Set value of Point() control via the console.

PostMon Jan 30, 2023 12:21 am

I'm trying to set the value of a Point() control via the console.

This code doesn't work though?
Code: Select all
Merge2.a.X = 0.1
Merge2.a.Y = 0.1

For whatever reason, this resets the value(s) back to default, but not to the specified values?
Code: Select all
Merge2.a = Point(0.1, 0.1)

EDIT - SOLVED
I figured out after a bunch of trial and error that you need to use curly brackets instead of square brackets.
This LUA code works:
Code: Select all
Merge2.a = {0.1, 0.1}

You can use the dump() function show the full table of values.
Code: Select all
-- Returns the X,Y,Z values of 'a' on frame 0
dump(Merge2.a[0])

If you'd like to return a specific value you just need specify the table index
Code: Select all
-- Returns X value of table 'a' on frame 0
print(Merge2.a[0][1])

-- You can also use the ".GetInput() method"
print(Merge2:GetInput("a", 0)[1])

Hope this helps anybody that stumbles across this post. There doesn't seem to be any documentation on this.

Return to Fusion

Who is online

Users browsing this forum: movalex and 35 guests