Jump to: Board index » General » Fusion

Move the playhead 1 second forward/backward in Fusion

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

PourangKay

  • Posts: 13
  • Joined: Fri Dec 25, 2020 8:18 pm
  • Real Name: Pourang Kakouei

Move the playhead 1 second forward/backward in Fusion

PostSat Oct 09, 2021 11:22 am

Hello,
How can I move the playhead by one second instead of frame by frame?
Edit page controls won't work here. They move the playhead by second in Edit page, but in Fusion they move it to the end of the clip.

I tried to change the settings to Timecode (mine is set to frames), but nothing happened and Fusion timeline is still displaying frames.

Thanks.
But all things excellent are as difficult as they are rare
Offline
User avatar

Bryan Ray

  • Posts: 2591
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Move the playhead 1 second forward/backward in Fusion

PostSat Oct 09, 2021 5:57 pm

You'll need to change the Step Size. Normally you can do that by right-clicking on the shuttle controls and choosing the step size you want. Unfortunately, 1-second intervals aren't available for framerates other than 25 and 30, so if you need 24 or 60, you'll need a little script to change it:

Code: Select all
print("Set Step Value")

--==============================================================
-- Main()
--
-- Typical set-up for a script developed in an IDE. Sets globals
-- and connects to the active comp. Initializes UI Manger.
--==============================================================

function main()
   -- get fusion instance
   _fusion = getFusion()

   -- ensure a fusion instance was retrieved
   if not _fusion then
      error("Please open the Fusion GUI before running this tool.")
   end

   -- Set up aliases to the UI Manager framework
   ui = _fusion.UIManager
   disp = bmd.UIDispatcher(ui)
   
   -- get composition
   _comp = _fusion.CurrentComp
   SetActiveComp(_comp)

   -- ensure a composition is active
   if not _comp then
      error("Please open a composition before running this tool.")
   end

   x = composition:AskUser("Set Frame Step Value", {
   {"step", "Text", Name = "Frame Step Value: ", Default = 1, Lines = 1,},
   } )

   step = tonumber(x["step"])

   if step then
      comp:SetPrefs("Comp.Transport.FrameStep",step)
   end

end

--======================== ENVIRONMENT SETUP ============================--

------------------------------------------------------------------------
-- getFusion()
--
-- check if global fusion is set, meaning this script is being
-- executed from within fusion
--
-- Arguments: None
-- Returns: handle to the Fusion instance
------------------------------------------------------------------------
function getFusion()
   if fusion == nil then
      -- remotely get the fusion ui instance
      fusion = bmd.scriptapp("Fusion", "localhost")
   end
   return fusion
end -- end of getFusion()




main()


Save that as setStepValue.lua in your Scripts/Comp/ folder. When run, it will let you set the Step value to any number you like. Note it's not advisable to put a fractional framerate in there. If you're running at 23.976 or 29.97, just round it up and realize that you might have to manually correct for the drift occasionally.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

PourangKay

  • Posts: 13
  • Joined: Fri Dec 25, 2020 8:18 pm
  • Real Name: Pourang Kakouei

Re: Move the playhead 1 second forward/backward in Fusion

PostSat Oct 09, 2021 6:16 pm

Bryan Ray wrote:You'll need to change the Step Size. Normally you can do that by right-clicking on the shuttle controls and choosing the step size you want. Unfortunately, 1-second intervals aren't available for framerates other than 25 and 30, so if you need 24 or 60, you'll need a little script to change it:

Code: Select all
print("Set Step Value")

--==============================================================
-- Main()
--
-- Typical set-up for a script developed in an IDE. Sets globals
-- and connects to the active comp. Initializes UI Manger.
--==============================================================

function main()
   -- get fusion instance
   _fusion = getFusion()

   -- ensure a fusion instance was retrieved
   if not _fusion then
      error("Please open the Fusion GUI before running this tool.")
   end

   -- Set up aliases to the UI Manager framework
   ui = _fusion.UIManager
   disp = bmd.UIDispatcher(ui)
   
   -- get composition
   _comp = _fusion.CurrentComp
   SetActiveComp(_comp)

   -- ensure a composition is active
   if not _comp then
      error("Please open a composition before running this tool.")
   end

   x = composition:AskUser("Set Frame Step Value", {
   {"step", "Text", Name = "Frame Step Value: ", Default = 1, Lines = 1,},
   } )

   step = tonumber(x["step"])

   if step then
      comp:SetPrefs("Comp.Transport.FrameStep",step)
   end

end

--======================== ENVIRONMENT SETUP ============================--

------------------------------------------------------------------------
-- getFusion()
--
-- check if global fusion is set, meaning this script is being
-- executed from within fusion
--
-- Arguments: None
-- Returns: handle to the Fusion instance
------------------------------------------------------------------------
function getFusion()
   if fusion == nil then
      -- remotely get the fusion ui instance
      fusion = bmd.scriptapp("Fusion", "localhost")
   end
   return fusion
end -- end of getFusion()




main()


Save that as setStepValue.lua in your Scripts/Comp/ folder. When run, it will let you set the Step value to any number you like. Note it's not advisable to put a fractional framerate in there. If you're running at 23.976 or 29.97, just round it up and realize that you might have to manually correct for the drift occasionally.


Thank you so much.
But all things excellent are as difficult as they are rare
Offline
User avatar

Chad Capeland

  • Posts: 3212
  • Joined: Mon Nov 10, 2014 9:40 pm

Re: Move the playhead 1 second forward/backward in Fusion

PostSat Oct 09, 2021 8:17 pm

Note it's not advisable to put a fractional framerate in there. If you're running at 23.976 or 29.97, just round it up and realize that you might have to manually correct for the drift occasionally.


Why? Fusion deals with float time for keyframes and cache validity just fine. You can only render integer frames, but they'll be temporally correct for animated values.
Chad Capeland
Indicated, LLC
www.floweffects.com
Offline
User avatar

Bryan Ray

  • Posts: 2591
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Move the playhead 1 second forward/backward in Fusion

PostSun Oct 10, 2021 2:25 am

That's actually why I don't recommend it. I find it frustrating when I'm tweaking six keyframes on frame 30, only to later discover that one of the parameters actually has its keyframe on 29.6, creating an unexpected pop.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com

Return to Fusion

Who is online

Users browsing this forum: No registered users and 31 guests