sverchok
sverchok copied to clipboard
boolean activation/deactivation (show/hide) of mesh viewer
I try to do an animation with sverchok. I have some Meshes that will appear and dissapear during the animation. I would like to know if there is a way of activating and deactivating the mesh viewer node or the polyline node? if i just switch the vertex list to a 0 / false value, the viwere node gives an error (logical behaviour). To say it simple i would like to have a boolean input node for the viewer nodes to simply parametrically activate and deactivate them. Thank you
I tried to use get set property but i think this might not be the best way and it doesnt seem to work in blender 3.1
A visibility input socket, is one way to do this - arguably the tidiest! but the nodes don't have this feature. If more people are using sverchok for animations, it's something we should consider adding.
There are potential workarounds, which rely on the Object socket output of the Object Viewer nodes. You can pass the objects
output from the Viewer to an Object ID Set
node. and use the object's hide_render
attribute.
The Object ID Set node will set the hide_render
property for each of the objects it finds in the socketdata, to the desired value. If you just pass it a single False/True (from logic node) it will affect all of the objects the same way. You can also pass a list of values to selectively set the visibility for individual objects. (using 0 and 1, or lists like.. [[0 0 0 0 1 1 1 0 0 1]]
if you wanted to hide just those four objects)
or hide_viewport
thanks a lot for the answer! Ill try that out. I would still apreciate a lot if that function would be integrated to the mesh viewer nodes. Maybe in a similar way like it is done for the Viewer node (with the attribute node)
In the name of simplicity i'd like to avoid adding an attr node to obj viewer nodes - in the short term. The Object ID Set
node provides adequate access to features, albeit more low level than the vd attr
node. The downside is that you need to know how to find which properties (and their names) you can control. We could think about offering a nicer way to show available properties.