Hi,
I’ve converted a load of v5 based general scripts over to v6.x and discovered a few things in my travels:
latest beta release - scripting API chm is missing sections: “FranticX”, “ScriptControl” & “ScriptDialog”…strange…
Tooltips. I assume it’s an overloaded option when defining a control now? ie: doesn’t matter if you do or don’t, add an additional [, “”] at the end of defining a UI control element? Also, I notice there is a setTooltip function now. Does that mean the referenced tooltips txt file is deprecated?
“ProgressBar.refresh()” - to ensure the dotNET progress bar was refreshed within a loop, you used to have to force a refresh of its graphic. This function isn’t available in the QT based control? Deprecated? no longer necessary?
“MultilineTextControl” - this got me for a minute or 2! Is now with a capital “L” - “MultiLineTextControl”. No backwards support for lowercase “l”?
dotNET treeView isn’t possible anymore? Possible via QT? Example, please!
Yes, the tooltips txt file is deprecated. The function is defined for backwards compatibility, but it currently doesn’t do anything. The tooltip parameter for the AddControl function defaults to “”, so if you don’t include it, it will just be set to its default value.
As long as you’re updating the progress in a proper thread or event handler, you don’t need to manually refresh the control (see the Shotgun UI code in \your\repo\events\Shotgun\ShotgunUI.py for an example). However, Qt has a similar function called update(): qt-project.org/doc/qt-5.0/qtwidg … tml#update
Yeah, we renamed it to make it consistent with the the other controls that had “Multi” in the name. No backwards compatibility unfortunately.
Cool.
Ah, sorry, I may have misread your previous comment. Are you saying that backwards compatibility support has been added to the tooltips function or the addcontrol function?
(I assumed you were referring to the tooltips function).
Essentially, the only way in v6.x+ to get tooltips for UI elements is to define them when you create them and any legacy tooltips.txt files that may exist, will be ignored?
Yes, that’s correct. Sorry, when I mentioned backward compatibility for the LoadTooltips function, I should have said that this function definition only exists so that calls to it don’t error out. The function itself does nothing in 6.x.