Show and Hide Commands

User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Show and Hide Commands

Post by clintonman »

trueBlue wrote: 07 Aug 2022, 16:57 Sorry to be a pain in the (insert preferred word here) :oops:
You are a gentle man and scholar! :bananathumb:
What will the RMB command do?
I had another idea if you were to setup an option for Slow|Fast
Instead of showing an options panel, just toggle the Slow|Fast option with a Status Message: "Fast incomplete mode enabled" | "Slow complete mode enabled"
The same as most other RMB, open a panel. The panel will have a checkbox to control fast slow and maybe the original Show Object Attribs button along with the UU Show Object Attribs button.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Show and Hide Commands

Post by trueBlue »

clintonman wrote: 07 Aug 2022, 17:13
trueBlue wrote: 07 Aug 2022, 16:57 Sorry to be a pain in the (insert preferred word here) :oops:
You are a gentle man and scholar! :bananathumb:
What will the RMB command do?
I had another idea if you were to setup an option for Slow|Fast
Instead of showing an options panel, just toggle the Slow|Fast option with a Status Message: "Fast incomplete mode enabled" | "Slow complete mode enabled"
The same as most other RMB, open a panel. The panel will have a checkbox to control fast slow and maybe the original Show Object Attribs button along with the UU Show Object Attribs button.
Any changes to the Scene panel in Settings are complex meaning that all of the Layouts have to be changed
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Show and Hide Commands

Post by trueBlue »

I just tried your RsApp.RunScriptBuffer commands
cmd='visFS = Node.AccessFnSet("Widgets/Visibility Function Set");visFS.SetInvisible(false);';RsApp.RunScriptBuffer(cmd);
cmd='visFS = Node.AccessFnSet("Widgets/Visibility Function Set");visFS.SetInvisible(true);';RsApp.RunScriptBuffer(cmd);
Can you share additional RsApp.RunScriptBuffer commands?
Is it possible to run all of the different variations, Show, Hide, ShowAll, HideAll, Show Camera and Lights, Fast, Slow, etc...?
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Show and Hide Commands

Post by trueBlue »

Cool!
I figured out how to run Hide & Show in intensive mode with Zero Undoes
Hide

Code: Select all

cmd='visFS = Node.AccessFnSet("Widgets/Visibility Function Set");visFS.IntensiveRun = true;visFS.SetInvisible(true);';RsApp.RunScriptBuffer(cmd);
RsApp.Undo();
RsApp.Undo()
Show

Code: Select all

cmd='visFS = Node.AccessFnSet("Widgets/Visibility Function Set");visFS.IntensiveRun = true;visFS.SetInvisible(false);';RsApp.RunScriptBuffer(cmd);
RsApp.Undo();
RsApp.Undo()
I do not know what I am doing, but it looks like an option panel is not necessary
LMB runs quick mode
RMB runs slow mode
User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Show and Hide Commands

Post by clintonman »

VisibilityPrefs.jpg
VisibilityPrefs.jpg (35.93 KiB) Viewed 912 times
This is what I came up with. It has an options panel for the show/hide buttons and moved UUFunctionSet into a new UUCommands.

replace Command nodes CycleCameras and EyeCam
remove Hide, Show, etc from Commands
add "Custom preferences" to Preferences
remove UUFunctionSet from Widgets
add UUCommands to Scripts
run "Modify Buttons" script with "Change Buttons" checked to update toolbar buttons to use new UUFunctionSet location


full install not sure of the details?
update buttons for all layouts and project and default_layout
replace init.js and reset.js for full or std, loads the UUCommands and new Custom preferences
export files for the 2 command nodes CycleCameras and EyeCam
Attachments
UURestructureShare.zip
(64.27 KiB) Downloaded 62 times
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Show and Hide Commands

Post by clintonman »

trueBlue wrote: 07 Aug 2022, 22:14 Cool!
I figured out how to run Hide & Show in intensive mode with Zero Undoes
Hide

Code: Select all

cmd='visFS = Node.AccessFnSet("Widgets/Visibility Function Set");visFS.IntensiveRun = true;visFS.SetInvisible(true);';RsApp.RunScriptBuffer(cmd);
RsApp.Undo();
RsApp.Undo()
Show

Code: Select all

cmd='visFS = Node.AccessFnSet("Widgets/Visibility Function Set");visFS.IntensiveRun = true;visFS.SetInvisible(false);';RsApp.RunScriptBuffer(cmd);
RsApp.Undo();
RsApp.Undo()
I do not know what I am doing, but it looks like an option panel is not necessary
LMB runs quick mode
RMB runs slow mode
You should double check those commands by restarting tS and trying them again. Unless you combined the 2 function sets into one giant function set.

Here is the show from the most recent upload. It requires 2 function set accesses. You can replace "Scripts/UUCommands" with "Widgets" to compare one to one.

Code: Select all

cmd='visFnSet = Node.AccessFnSet("/Scripts/UUCommands/Visibility Function Set");VisuFS = Node.AccessFnSet("/Scripts/UUCommands/VisUtility Function Set");visFnSet.VisuFS = VisuFS;visFnSet.SetAllInvisible(false);';RsApp.RunScriptBuffer(cmd);
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Show and Hide Commands

Post by trueBlue »

Thank you!
Lots to digest...
Thank you for making the toolbars script, that's the biggest part
Still need to change the Desktop panels in all of the Layouts. because the Display Toolbars button script uses the current UUFunctionSet in Widgets
Need to check the Widgets for any scripts that call the current UUFunctionSet in Widgets and any unknowns too
Ugh...
User avatar
clintonman
Captain
Posts: 5428
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Show and Hide Commands

Post by clintonman »

trueBlue wrote: 08 Aug 2022, 02:32 Thank you!
Lots to digest...
Thank you for making the toolbars script, that's the biggest part
Still need to change the Desktop panels in all of the Layouts. because the Display Toolbars button script uses the current UUFunctionSet in Widgets
Need to check the Widgets for any scripts that call the current UUFunctionSet in Widgets and any unknowns too
Ugh...
I already did a fresh install and search of the Widgets using the Mass Export Scripts and only Command nodes CycleCameras and EyeCam were affected. I think a lot of the Widget stuff ended up inside WidgetScripts.
the tool is here
http://clintons3d.com/plugins/truespace ... riptexport

unfortunately, buttons on panels is the only thing that can't be searched and replaced
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Show and Hide Commands

Post by trueBlue »

clintonman wrote: 08 Aug 2022, 02:44
trueBlue wrote: 08 Aug 2022, 02:32 Thank you!
Lots to digest...
Thank you for making the toolbars script, that's the biggest part
Still need to change the Desktop panels in all of the Layouts. because the Display Toolbars button script uses the current UUFunctionSet in Widgets
Need to check the Widgets for any scripts that call the current UUFunctionSet in Widgets and any unknowns too
Ugh...
I already did a fresh install and search of the Widgets using the Mass Export Scripts and only Command nodes CycleCameras and EyeCam were affected. I think a lot of the Widget stuff ended up inside WidgetScripts.
the tool is here
http://clintons3d.com/plugins/truespace ... riptexport

unfortunately, buttons on panels is the only thing that can't be searched and replaced
Thanks!

I am assuming that the Widgets do not have these scripts, they just open the CycleCameras and EyeCam in Commands?

Looks like I should add a CloseORASettings.RsObj script to the Scripts/UUCommands and change the path(s):
Activity.Run("Scripts/Commands/CloseORASettings");
in the Visibility Function Set
User avatar
trueBlue
Captain
Posts: 5214
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Show and Hide Commands

Post by trueBlue »

The LMB Show ORA button in the Visibility preferences panel gives an error (Wrong path)

ERR Source object: /Scripts/Commands/Show Object Attribs Error: Microsoft JScript runtime error Description: Invalid procedure call or argument Error code: 0x800a0005 - (null) Line: 29, Char: 1 Script text: var visFnSet = Node.AccessFnSet("/Widgets/Visibility Function Set"); IMPORTANT - if the above mentioned command is accessing any function set, the error line above may refer to the function set code, instead of command code!
VisibilityPrefs.jpg
VisibilityPrefs.jpg (35.93 KiB) Viewed 897 times
I have moved all of the visibility scripts to Scripts/UUCommands/
UUCommands Update.png
I have also moved the (original) Show Object Attributes button to an Advance aspect
Visibility preferences.png
I have removed the LMB & RMB Show ORA buttons because they are awkward to use from this panel's Default aspect

I am really concerned if a user uses this command on NURBS and or whatever else this command destroys
Can you suggest additional code or a modal Question warning of the consequences before running this command?
Post Reply