Jump to: Board index » General » Fusion

How to script the animation of tools ?

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

Richard Wulveryck

  • Posts: 10
  • Joined: Fri Feb 17, 2017 7:11 pm

How to script the animation of tools ?

PostMon Feb 20, 2017 12:06 pm

Hi experienced Fusion Users
I need your help to define an animation from "composition script".

From command line in the Fusion/Console
From Composition script


In FUSION, one can select a tool in the FlowView and define a property to animate.
This done, it is possible :
- to define the initial and final value of the sequence,
- to associate a spline curve to modulate the value change,
- to act on tangent Bezier vector.

Question 1 : How can I do that scripting ?
1 - a : define property to animate
1 - b : define initial value, final value
1 - c : modify the spline curve

For example, let's say animate a cube to make it goes far away on Z axis :
cube3D1 = Cube3D1() --correct
cube1.Z(0) = 10 --pseudo code unknown
cube1.Z(30) = 50 --pseudo code unknown
cube1.Z(0).Tangent = (1,0) --pseudo code unknown
cube1.Z(30).Tangent = (-1,0) --pseudo code unknown


Question 2 : is it possible to load values of the properties from an array, where columns are properties and value are regular time intervals, not necessary synchronized with each rendering shooting (24, 25, or 30 times per second, but 1 per second for example) ?


a = load("c:\\temp\\animation.csv") --pseudo code unknown
for i=0 to a.lines.count do --pseudo code unknown
cube1.Z(i) = a(1, i) --pseudo code unknown
end
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: How to script the animation of tools ?

PostThu Mar 02, 2017 11:28 pm

both is possible

the concept is that you need to attach a animation curve to the value you want to animate (BezierCurve)
this Curve then gets the values for the keyframes

Code: Select all
myTool = BrightnessContrast
myTool.Gain = BezierSpline{}
myTool.Gain[5] = 5 --first is the frame and set it to value

Return to Fusion

Who is online

Users browsing this forum: No registered users and 19 guests