Welcome to WSL!

New to the forum? Please read this and this.

Attribute Spreadsheet  [SUBMITTED]

Moderator: SecondMan

User avatar
Movalex
Sir Requestalot
Posts: 316
Joined: Fri Nov 03, 2017 5:36 am
Answers: 4
Real name: Alexey Bogomolov
Been thanked: 17 times
Contact:

Attribute Spreadsheet

#1

Post by Movalex »

One of my favorite tools, Attribute Spreadsheet, was written by @svenneve in 2013. I did not find any traces of it to be updated to support the latest Fusion and Resolve versions, and it looks like to be abandoned for 7 years now. This is my attempt of reviving this tool while adding new features to it.

Screenshot 2020-12-08 004653.png

AttributeSpreadsheet is a spreadsheet script to edit the input parameters of multiple Fusion tools at once. It is extremely useful for batch tool changes, and a great help for any motion graphics tasks. The most amazing part that it works with any native or third party Fusion tool, such as OFX plugins, macros, Krokodove tools and so on. Any available input is accessible from a very convenient table view. You can link any input to another with expression by a middle mouse drag. Some tools, such at Text+ Font or Style, does not even allow setting expression manually. With Attribute Spreadsheet you can do that too. As far as I know, this is the fastest, and the most reliable tool for a batch changing parameters or linking multiple Fusion inputs.

Requirements:
  • Python 3.6
  • Fusion Standalone v.9 and v.16+, Davinci Resolve v.16+
  • PySide2 (can be installed automatically)
Usage:
  • Select one or more tools in Fusion flow and start the script or press "Refresh" button if already started.
  • Select multiple values in a single column, say, "Blend".
  • Start typing new numeric value and hit Enter. All Blend values for selected tools will be changed accordingly. That's the basic functionality.
  • To link multiple tool's inputs to another tool with expression, select the column and drag with middle-click towards the cell you are linking to.
  • Enter -x to discard the expression on single or multiple inputs. Once the expression is set, you cannot change the values in the table unless the expression is cleared.
  • Use +=, -=, *=, /= and %= to do mathematical expressions with current numerical values. for example: enter +=0.2123 to default Transform Size value, and it will become 1.2123
  • Use search bar to find inputs. You can search for multiple inputs, separated by spaces, like size angle to search both Size and Angle inputs.
  • Enter numerical values or expression to point values, such as Pivot or Center. For instance, enter =time in the Transform Angle cell will create =time expression, adding =time and 0.35 in Center X and Y values will create Point(time, 0.35) expression.
  • Enter p in any table cell and all corresponding input attributes will be listed in Console.
  • Click on the row header (tool name) to activate the tool.
  • Click on column header to sort inputs alphabetically. Click on the corner button to reset sorting to default state.
The current version has quite large changelog in comparison to the last known version of hos_AttributeSpreadsheet. You can find full list of new features and fixes inside a script file. The most significant improvements:
  • Point data with X and Y elements are both adjustable and now work with mathematical modifiers.
  • You can add expressions to Point data values, such as Point(Pivot.X, 0.5)
  • Corner button will reset sorting to default state
  • Tool name and ID is added to a table to improve sorting abilities
  • Added logging, most errors are caught with Console feedback
  • Set active tool by clicking on row header
  • Use this script as a standalone tool (Fusion Studio feature). Provide a remote machine IP as an argument to a script to do remote management
Automatic PySide2 installation

My intention was to make this script as straightforward and easy to use as possible. Usually installing third party package to Python is a painless task. But we can go further and strip this step, offering automatic PySide2 installation on a first launch.
If Pyside2 is not found on the computer, the script will show a dialogue, whether you want to install the package automatically. If clicked Ok, it attempts to install Pyside2 using standard pip tools. Otherwise, the command for manual installation will be shown in Console. Python modules manager pip should be already installed on the computer. Pip is a part of standard Python3 installation, thus the script will require Python3 (also for maintenance purposes). Automatic PySide2 installation process will be visible in Fusion console. If you don't want automatic installation or the installation process fails for some reason, try installing manually by typing python -m pip install Pyside2 in Command prompt on Windows or python3 -m pip install Pyside2 in Terminal on Mac. Once Pyside2 is installed, launch the script again and UI will appear.

Known issues:
  • You should avoid linking inputs to each other. This is a known bug: if you link Transform1.Size to Transform2.Size and then try to link expression from Transform2.Size back to Transform1.Size, Fusion will crash immediately. The same will happen if you try to do that with a script. Just don't.
TODO:
  • All fields except numerical or point data inputs are treated as text values. This prevents unexpected behavior when changing cells values. However it is possible to add combobox (dropdown menu) to the inputs with list data, such as INPIDT_ComboControl_ID or INPIDT_MultiButtonControl_ID, so you could choose the appropriate values from a dropdown list instead of typing values manually. This can be tricky, because some Fusion inputs addressed by key ('1.0', '2.0') and some - by value ('Red', 'XYZ' etc). Also, this should probably exclude Fonts.
  • Add a completer with the most commonly used search commands. For instance, if you've already been searching red green blue, this query will be suggested once you type r in search area.
  • Add an option for partial middle-drag/linking Point data, such as link only X values, or only Y, so the expression would be like Point(Transform1.Center.X, 0.5). Currently, it is possible by typing expression text to a Point X cell.
  • Add Select by ID button to quickly select and load to the table all tools with the same ID as the active tool. However, this can be done with ToolManager script, so questionable.
  • Please suggest any other improvements.
Take a look at this feature review made by the author of the original script. Please note that some of mentioned in the video bugs and/or features are fixed/implemented in this release. And yes, this last sentence implies that new bugs could have been implemented as well, although I did my best to avoid them. Please report any issues here.





Version: 0.2.5 - [2021/2/7]

Copyright: 2011-2013, Sven Neve (House of Secrets), 2019-2020 additions by Alexey Bogomolov (mail@abogomolov.com)

License: MIT

Donations: PayPal.me


https://gitlab.com/WeSuckLess/Reactor/- ... preadsheet
com.AlexBogomolov.AttributeSpreadsheet.zip
You do not have the required permissions to view the files attached to this post.
Last edited by Movalex on Sat Feb 20, 2021 11:37 am, edited 7 times in total.

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

Re: Attribute Spreadsheet

#2

Post by SecondMan »

Boom, that's a BIG one @Movalex!

Available in Reactor now - please check if all works well.

And thank you! :cheer:

User avatar
svenneve
Fusioneer
Posts: 105
Joined: Fri Sep 12, 2014 1:47 am
Contact:

Re: Attribute Spreadsheet

#3

Post by svenneve »

Hey, nice work.
Yeah, most of my tools are very much on a backburner...of a couple of years. We switched to mostly using Fusion for creating textures and quick cleanups these days (content for realtime interactive applications), so the spreadsheet tool was used less and less as we used it mostly for heavy vfx comp work back in the day.
Nice to see it being picked up by others though.

User avatar
maximronkin
Posts: 22
Joined: Wed Feb 14, 2018 9:32 am

Re: Attribute Spreadsheet

#4

Post by maximronkin »

Hey guys,

Would really love to give the script a try but get the following error when I run it:

running
Done
File "C:\ProgramData\Blackmagic Design\Fusion\Reactor\Deploy\Scripts\Comp\AttributeSpreadsheet\AttributeSpreadsheet.py", line 99
print(f"\nAttribute Spreadsheet version 0.{__VERSION__}")
^
SyntaxError: invalid syntax

I'm not big on python. Can you please tell me what should I do to make it work? I run Fusion 9.

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

Re: Attribute Spreadsheet

#5

Post by SecondMan »

Looks like you're running Python 2.7 - this script requires Python 3.6 and you need to set that as your preferred version in Fusion's preferences:

image.png

Not sure if there's a way to make Fusion switch between Python versions at the script level, and I haven't looked or tried - but that would be nice.
You do not have the required permissions to view the files attached to this post.

User avatar
Movalex
Sir Requestalot
Posts: 316
Joined: Fri Nov 03, 2017 5:36 am
Answers: 4
Real name: Alexey Bogomolov
Been thanked: 17 times
Contact:

Re: Attribute Spreadsheet

#6

Post by Movalex »

Hey, @maximronkin
Sorry for that, I forgot to catch Python version on the early stage. Hopefully new version will handle this nicely:

Image

Thanks, @svenneve!

Unfortunately, scrolling in the app with more than 30 tools loaded is still a bit laggy. TableModel data is being read 8 times on each table movement, and it seems hardly possible to avoid that. Also I wonder if it is possible to make progress bar work on initial launch. Currently we have to wait a bit until the data is loaded and then the UI shows. I will probably make a splash screen for that.

Here's the new version of Attribute Spreadsheet:
V.0.2.4:
  • set empty value to Text inputs, such as Comments
  • cache is enabled by default
  • catch wrong Python version early
https://gitlab.com/WeSuckLess/Reactor/- ... quests/237
Last edited by Movalex on Sun Feb 07, 2021 4:07 am, edited 1 time in total.

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

Re: Attribute Spreadsheet

#7

Post by SecondMan »

Also done! Thanks again :cheer:

User avatar
poppop
Posts: 7
Joined: Sat Aug 24, 2019 8:07 pm

Re: Attribute Spreadsheet

#8

Post by poppop »

In Davinci resolve 17 b8 and fusion 9
install python 3.6 and pyside2 but got this error

Attribute Spreadsheet version 0.2.4
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Roaming\Blackmagic Design\DaVinci Resolve\Support\Fusion\Scripts\Comp\AttributeSpreadsheet.py", line 134, in <module>
raise Exception("No instance of Fusion found!")
Exception: No instance of Fusion found!

User avatar
Movalex
Sir Requestalot
Posts: 316
Joined: Fri Nov 03, 2017 5:36 am
Answers: 4
Real name: Alexey Bogomolov
Been thanked: 17 times
Contact:

Re: Attribute Spreadsheet

#9

Post by Movalex »

@poppop Thats interesting. This is just an init message shown if the script did not found a running fusion app.
If you open Console on py3 page and run ==bmd do you have any output? It should show this: <module 'fusionscript' (built-in)>
Is it possible Fusion and Resolve are running simultaneously? Maybe any frozen Fusion processes in the Task manager?

User avatar
poppop
Posts: 7
Joined: Sat Aug 24, 2019 8:07 pm

Re: Attribute Spreadsheet

#10

Post by poppop »

yes it show
Py3> ==bmd
<module 'fusionscript' (built-in)>

It show in both fusion page and fusion standalone
ps. I'm use resolve 17 and fusion 9 free version

User avatar
Movalex
Sir Requestalot
Posts: 316
Joined: Fri Nov 03, 2017 5:36 am
Answers: 4
Real name: Alexey Bogomolov
Been thanked: 17 times
Contact:

Re: Attribute Spreadsheet

#11

Post by Movalex »

I just cant figure it out, how that can possibly be... Are you running it from the Workspace -- Scripts -- AttributeSpreadsheet menu in Resolve?
Last edited by Movalex on Sun Feb 07, 2021 4:00 am, edited 1 time in total.

User avatar
poppop
Posts: 7
Joined: Sat Aug 24, 2019 8:07 pm

Re: Attribute Spreadsheet

#12

Post by poppop »

Image 4.png
Yes I running it from the Workspace -- Scripts -- AttributeSpreadsheet menu
You do not have the required permissions to view the files attached to this post.

User avatar
Movalex
Sir Requestalot
Posts: 316
Joined: Fri Nov 03, 2017 5:36 am
Answers: 4
Real name: Alexey Bogomolov
Been thanked: 17 times
Contact:

Re: Attribute Spreadsheet

#13

Post by Movalex »

Did you check for any other fusion processes hung/running? Is the issue persist after the restart/logout? Do you have any other python scripts to test? If you open the script folder and drag the .py file directly to the console, will it launch? (It should).
I've just installed the latest resolve version and it works, so that's clearly not a compatibility issue.
Last edited by Movalex on Sun Feb 07, 2021 4:02 am, edited 1 time in total.

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

Re: Attribute Spreadsheet

#14

Post by Midgardsormr »

If the path were incorrect, it couldn't raise a Fusion-aware error at all.

I'm not sure of this, but it's possible that the way you're defining fu is the problem. Remember that the free version doesn't permit remote control. That's essentially what you're doing here by connecting to the Fusion instance through bmd.scriptapp("Fusion", "localhost").

poppop, if you're comfortable modifying the script, try removing the localhost argument on line 1118. It should read:
fu = bmd.scriptapp("Fusion")

User avatar
JiiPii
Fusioneer
Posts: 211
Joined: Tue Mar 03, 2020 8:34 am
Answers: 1
Been thanked: 24 times

Re: Attribute Spreadsheet

#15

Post by JiiPii »

Unfortunately, I can't get it to work either. So far, I haven't done anything with Python. I installed Python 3.6 and the Attribute Spreadsheet 0.24 from the Reactor. When running, the installation window to install PySide2 pops up, but this somehow fails. Unfortunately, I cannot change the default Python version either, because the selection is grayed out for me.

Image

Image

Then I read the post, where the PYHTONPATH is corrected. This entry was missing in my system. I added it but am getting this error:
image.png
You do not have the required permissions to view the files attached to this post.