Welcome to WSL!

Make yourself at home, but before posting, please may I ask you to read the following topics.


Posting 101
Server space, screenshots, and you

Thank you!

PS. please pretty please:


Image

[Submission] /for console slash-command  [SUBMITTED]

Moderator: SecondMan

User avatar
Kristof
Fusionista
Posts: 776
Joined: Thu Aug 07, 2014 1:30 pm
Answers: 2
Been thanked: 22 times

Re: [Submission] /for console slash-command

#31

Post by Kristof » Wed Jan 15, 2020 7:49 am

Ah, thank you so much, @Movalex!

User avatar
SecondMan
Site Admin
Posts: 4486
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 27
Location: Vancouver, Canada
Been thanked: 115 times
Contact:

Re: [Submission] /for console slash-command

#32

Post by SecondMan » Wed Jan 15, 2020 10:58 am

@Movalex - very nice idea, thanks!

But it can be a touch simpler, and this works across platforms:
Code: [Select all] [Expand/Collapse] [Download] (Get Tool ID.lua)
  1. --[[
  2. tool script to get tool's ID. Useful if you do expressions
  3. or use a Reactor 'Slash For' script a lot
  4. and you don't want to keep in memory, that Resize tool is actually a 'BetterResize',
  5. and MaskPaint is actually a 'PaintMask'.
  6. Tool ID will be copied to the clipboard, and printed in the console
  7. ]]--
  8. tool_name = tool.ID
  9. bmd.setclipboard(tool_name)
  10. print(tool_name)

User avatar
danell
Fusioneer
Posts: 145
Joined: Mon Dec 12, 2016 6:32 am
Been thanked: 26 times

Re: [Submission] /for console slash-command

#33

Post by danell » Tue Mar 31, 2020 2:15 am

@SecondMan I tried to use your script in F16.1.1 but getting this error:
...ive\Program\Fusion\Settings\Scripts\Comp\Get Tool ID.lua:8: attempt to index global 'tool' (a nil value)
any idea why?

EDIT:
Adding tool = comp.ActiveTool first in the code made the script work again for me

User avatar
Midgardsormr
Fusionator
Posts: 1800
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 15
Location: Los Angeles, CA, USA
Been thanked: 106 times
Contact:

Re: [Submission] /for console slash-command

#34

Post by Midgardsormr » Tue Mar 31, 2020 7:37 am

It's a Tool script, not a Comp script. It must therefore be located in Scripts/tool and then run by right-clicking the tool in question and choosing it from the Script section of the context menu. Or you can do what you've done to run it as a Comp script. :)

User avatar
BrainSmashR
Posts: 27
Joined: Fri Jan 18, 2019 4:15 pm
Been thanked: 3 times

Re: [Submission] /for console slash-command

#35

Post by BrainSmashR » Mon May 18, 2020 2:53 pm

Does this script work in DaVinci?
I cannot for the life of me figure out how to get it to edit shading elements 2 and 3 (outline and shadow) for text+ clips....

User avatar
SecondMan
Site Admin
Posts: 4486
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 27
Location: Vancouver, Canada
Been thanked: 115 times
Contact:

Re: [Submission] /for console slash-command

#36

Post by SecondMan » Mon May 25, 2020 7:47 pm

Yup, works just fine in DaVinci Resolve. I'll answer this particular question in your Node editing topic.

User avatar
ShadowMaker SdR
Fusionista
Posts: 890
Joined: Sun Sep 21, 2014 6:17 am
Answers: 8
Been thanked: 35 times

Re: [Submission] /for console slash-command

#37

Post by ShadowMaker SdR » Tue May 26, 2020 12:09 am

SecondMan wrote:
Mon May 25, 2020 7:47 pm
Yup, works just fine in DaVinci Resolve
Do you mean on the timeline as well, or just in the Fusion page of Resolve?

User avatar
SecondMan
Site Admin
Posts: 4486
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 27
Location: Vancouver, Canada
Been thanked: 115 times
Contact:

Re: [Submission] /for console slash-command

#38

Post by SecondMan » Tue May 26, 2020 12:25 am

In the Fusion page. Timeline didn't even cross my mind. Not sure how that would work, but it's an interesting thought.

User avatar
ShadowMaker SdR
Fusionista
Posts: 890
Joined: Sun Sep 21, 2014 6:17 am
Answers: 8
Been thanked: 35 times

Re: [Submission] /for console slash-command

#39

Post by ShadowMaker SdR » Tue May 26, 2020 4:53 am

The timeline is a strange hybrid at the moment. You can right-click/animate, publish etc in Fusion clips, but they are all seperate compositions, so you cannot connect various attributes/values to each other. On the other hand, it appears that there are some timeline/clip related scripting options, so in theory you should be able to iterate through all the Fusion clips and collect a couple of values that could be manipulated. At least, that's what my layman's brain thinks.