Jump to content


Photo

Save Viewers Status In To Composition


  • Please log in to reply
6 replies to this topic

#1 Unaided

Unaided

    Member Pig

  • Adv Members
  • PipPip
  • 15 posts

Posted 10 January 2014 - 11:25 AM

Is possible store with composition the state of viewers or the main viewer when saves?

Ex.: Saving comp with a specific merge showing in viewer 1, then when I load again this comp, automatically render in viewer these merge node.

#2 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 10 January 2014 - 01:03 PM

Maybe that can be faked using an event script. Save the tool that's being viewed when you close the comp and reconnect it when the comp is opened.

#3 Unaided

Unaided

    Member Pig

  • Adv Members
  • PipPip
  • 15 posts

Posted 10 January 2014 - 02:24 PM

I don't thought to use event sctipt. Good idea!

Thanks Tilt!

#4 Unaided

Unaided

    Member Pig

  • Adv Members
  • PipPip
  • 15 posts

Posted 13 January 2014 - 07:44 AM

Well, I solved this with a simple event script with a tool in the composition will be present always, called 'show'.
a_view = comp:GetPreviewList()["Left"]
a_view:ViewOn(show)

However event script method have requirement put a script file into a /Scripts/ or /Scripts/Comp/ folder.
Would be possible use the event script but store in composition file?

#5 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 14 January 2014 - 10:15 AM

Contact tech support about the specifics, but I vaguely remember there being a way to automatically execute a script when a comp loads that is separate from an event script. It involves storing the script alongside the .comp file in your filesystem and using a specific naming convention.

#6 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 14 January 2014 - 10:46 AM

Ha yes that's true. Fusion will run a script automatically when loading a comp, when that script has the same name and resides in the same dir, i.e. mycomp.comp and mycomp.eyeonscript...

I guess you'll have to come up with a clever way to deal with versioning and storing which node was last viewed. Probably use a script for saving your comp, or adjust the save-new-version script a little.

#7 Tilt

Tilt

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 2,137 posts

Posted 14 January 2014 - 10:49 AM

you can save the tool in the comp's user data using comp:SetData()




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users