Workspace Layers v4

User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Workspace Layers v4

Post by trueBlue »

Every time I use "Add selected to layer"
ORA panels show in the Stack/Settings
Invisible is set to 0
Show hidden lines is set to -1
Show backfaces is set to -1

In this case, three Cubes were selected
Add selected to Layer.png
When I use "Remove the Layer"
The object's Object Render Attributes node(s) are deleted

Also, Lights and Cameras, in addition to the above, the ORA Default aspect is being exported out
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Layers v4

Post by clintonman »

trueBlue wrote: 06 May 2021, 12:24 Every time I use "Add selected to layer"
ORA panels show in the Stack/Settings
Invisible is set to 0
Show hidden lines is set to -1
Show backfaces is set to -1

In this case, three Cubes were selected
Add selected to Layer.png

When I use "Remove the Layer"
The object's Object Render Attributes node(s) are deleted

Also, Lights and Cameras, in addition to the above, the ORA Default aspect is being exported out
ORA panels show in Stack - must be missing your special commands from the CloseORASettings node that cleans it up, thanks.

I see the problem with Show hidden lines and backfaces. I check for a valid connector and then forgot to set it based on the layer setting.
The invisible should be set according to the layer settings.

Remove Layer ORA are deleted was the same way in workspace layers3. I based it on the fact that bare tS meshes don't have ORA nodes. Bare tS cameras and lights are in layer1 so they get moved to layer1 when the layer they occupy is removed.

I don't see the exported ORA as a problem for lights and cameras, could be some disadvantage I don't know about, but I think the RsStackView.SetPanelExportInfo command might be used to "un-export" it. I'll let you know what I find, thanks again.
Clinton Reese

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

Re: Workspace Layers v4

Post by trueBlue »

Remove Layer ORA are deleted was the same way in workspace layers3. I based it on the fact that bare tS meshes don't have ORA nodes. Bare tS cameras and lights are in layer1 so they get moved to layer1 when the layer they occupy is removed.
One disadvantage of deleting the ORA node would be when a user has set any of the options in the ORA node
Like Cast shadows and or Receive shadows

:idea: Maybe you could just set the Layer index to 0 :?:
I don't see the exported ORA as a problem for lights and cameras, could be some disadvantage I don't know about, but I think the RsStackView.SetPanelExportInfo command might be used to "un-export" it. I'll let you know what I find, thanks again.
:idea:
Add
&& (!Node.IsCamera(cursel) || !Node.IsLight(cursel)
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Workspace Layers v4

Post by trueBlue »

After reading your new UU Doc, I noticed where you mention that Booleans remove the ORA
I have a working Booleans widget that Saves the ORA to the RsData folder, runs the Boolean tool, then Loads the saved ORA back into the First Selected Object
Booleans mod.png
Save ORA

Code: Select all

if(Node.Exists(Node.FirstSelected() + '/Object Render Attributes')) {
var fSel = Node.FirstSelected()
Node.ConRemove(fSel, 'RenderAttributes')
RsFileIO.SaveObject(System.GetMainDir() + '\\RS Data\\Object Render Attributes.RsObj', fSel + '/Object Render Attributes')
Node.Delete(fSel + '/Object Render Attributes')
Load ORA

Code: Select all

var fSel = Node.FirstSelected()
RsFileIO.LoadObject(System.GetMainDir() + '\\RS Data\\Object Render Attributes.RsObj', fSel + '/')
Node.ExportConnector(fSel + "/Object Render Attributes", "RenderAttributes", "", 1, 1)
This is working great in Workspace Layers 4, but is limited to the First Selected Object
WL4.png
.
.
This is not going to work with Groups!

Do you think you could make it work for Groups and or whatever else is needed?

Edit: It looks like Booleans remove Group's ORA too, so this might Work!
Thoughts?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Workspace Layers v4

Post by clintonman »

Haven't had a chance to test it. Only thought is don't forget to test the other boolean option, "not flatten" or whatever it's called and test on Subdivision objects.
Clinton Reese

http://clintons3d.com
Post Reply