Show and Hide Commands

User avatar
clintonman
Captain
Posts: 5430
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: 04 Nov 2021, 19:55 I just ran Hide All & Show All in a scene with 595 nodes
Quick Hide All does not hide Cameras, Spot, not Projector lights
I confirmed that their Object hider nodes are disconnected

Have you tried the Switch Workspace Main toolbar script in the Objects - tS7.61 Update objects library?
Screenshot 2021-11-04 123425.png
Must be a bug. The QuickShow and QuickHide work with cameras, spotlights etc.

Switch Workspace Main toolbar, that's great. Just have to get rid of the little toolbar.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5430
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: 04 Nov 2021, 20:03 This is why it is not working
!Node.Exists(curNode + "/Object hider")
Yep, that's the ticket.
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 »

I thought I was able to show a status message in the Quick Show All & Quick Hide All, if there were objects in the scene with no ORA
Now it is not working :cry:
Is there a why to do that with all four Quick scripts?

Code: Select all

if(!Node.Exists(item +  "/Object Render Attributes")) {
var util = System.CreateDO("Clintons3D Package/Utility functions");
util.SetStatusMessage("Alert...There is one or more Objects in your scene that does not have Object Render Attributes", 5000)
User avatar
clintonman
Captain
Posts: 5430
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: 04 Nov 2021, 22:31 I thought I was able to show a status message in the Quick Show All & Quick Hide All, if there were objects in the scene with no ORA
Now it is not working :cry:
Is there a why to do that with all four Quick scripts?

Code: Select all

if(!Node.Exists(item +  "/Object Render Attributes")) {
var util = System.CreateDO("Clintons3D Package/Utility functions");
util.SetStatusMessage("Alert...There is one or more Objects in your scene that does not have Object Render Attributes", 5000)
I'll see what I can do.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5430
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 »

Here is a version of the switch main toolbar script.
It works in 4View, Default, floating and yafaray layouts and it closes and opens the small main toolbar. It doesn't open it in place so it would have to be dragged back into place.
Attachments
Switch Workspace Main toolbar.RsObj
(16.21 KiB) Downloaded 104 times
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5430
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 »

Added your check to QuickHideAll
I don't think it's needed for QuickShowAll because you don't need an ORA to show something you can already see.
Attachments
QuickHideAll.RsObj
(8.07 KiB) Downloaded 106 times
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 »

Interesting new way!
Thanks!
I tried the same for the QuickHide, but it does not work


Suggestion...
Line 41
Add

Code: Select all

if(Node.Exists(curNode + "/Object hider") && Node.Exists(curNode + "/Object Render Attributes")) {
util.SetNodeValueInt(curNode + "/Object hider", "Invisible", true)
util.SetNodeValueInt(curNode + "/Object hider", "Invisible", false)
util.SetNodeValueInt(curNode +  "/Object Render Attributes", "Cast shadows", 0)
util.SetNodeValueInt(curNode +  "/Object Render Attributes", "Receive shadows", 0)
Node.Disconnect(curNode + "/Object hider", "Invisible", curNode + "/Object Render Attributes", "Invisible")
util.SetNodeValueInt(curNode +  "/Object Render Attributes", "Invisible", -1);
}
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: 04 Nov 2021, 22:57 Here is a version of the switch main toolbar script.
It works in 4View, Default, floating and yafaray layouts and it closes and opens the small main toolbar. It doesn't open it in place so it would have to be dragged back into place.
You never cease to amaze me!
One thing though, all though you can Ctrl + Drag the Main2 toolbar back into place, it is different in how I set up the layouts
Here is a different version that Only works in the 4View, Default, Floating, and Yafaray layouts
New:
Opens in a floating panel
If you are in one of the above layouts, it loads that layout, else the installer is removed with an Alert
Modal questions to remove the Main2 toolbar and remove the installer
Cancel button

Edit: Updated 11/5/2021 10:30AM
Attachments
Switch Workspace Main toolbar.RsObj
(71.93 KiB) Downloaded 101 times
User avatar
clintonman
Captain
Posts: 5430
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: 05 Nov 2021, 14:28
clintonman wrote: 04 Nov 2021, 22:57 Here is a version of the switch main toolbar script.
It works in 4View, Default, floating and yafaray layouts and it closes and opens the small main toolbar. It doesn't open it in place so it would have to be dragged back into place.
You never cease to amaze me!
One thing though, all though you can Ctrl + Drag the Main2 toolbar back into place, it is different in how I set up the layouts
Here is a different version that Only works in the 4View, Default, Floating, and Yafaray layouts
New:
Opens in a floating panel
If you are in one of the above layouts, it loads that layout, else the installer is removed with an Alert
Modal questions to remove the Main2 toolbar and remove the installer
Cancel button
ToolbarResultsWeird.jpg
my confusing result before I figured out what was happening


The dialog is confusing. Maybe the "Save your Layout Remove the installer?" should be 2 dialogs. It looks like it's asking to save the layout and remove the installer. or maybe it can be something wordier like "Remove the installer? Save your Layout after choosing yes or no".

Maybe it should also say that the toolbar will update after the selection is made since it's asking to remove the installer when the toolbar looks like it hasn't changed.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5430
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: 04 Nov 2021, 23:36 Interesting new way!
Thanks!
I tried the same for the QuickHide, but it does not work


Suggestion...
Line 41
Add

Code: Select all

if(Node.Exists(curNode + "/Object hider") && Node.Exists(curNode + "/Object Render Attributes")) {
util.SetNodeValueInt(curNode + "/Object hider", "Invisible", true)
util.SetNodeValueInt(curNode + "/Object hider", "Invisible", false)
util.SetNodeValueInt(curNode +  "/Object Render Attributes", "Cast shadows", 0)
util.SetNodeValueInt(curNode +  "/Object Render Attributes", "Receive shadows", 0)
Node.Disconnect(curNode + "/Object hider", "Invisible", curNode + "/Object Render Attributes", "Invisible")
util.SetNodeValueInt(curNode +  "/Object Render Attributes", "Invisible", -1);
}
Here's a quick hide with the status message.

Don't know what all that code is for but if it doesn't slow it down go for it.
Attachments
QuickHide.RsObj
(7.4 KiB) Downloaded 101 times
Clinton Reese

http://clintons3d.com
Post Reply