Jump to content
Developer Wiki and Function Reference Links ×

Controlling whether a node is enabled within the object info palette of the Marionette Object


Recommended Posts

Dear All

Is it possible to control whether a node within a marionette network is enabled from within the object info palette of the marionette object?


I've got a network in which sometimes I want the symbol mirrored and sometimes I don't.

Can I achieve something like a 'Mirrored: Y/N' within the object info palette? 

Thanks all



Link to comment

In what I think is a similar vein... Is there a simple, or at least reliable, way to include or exclude specific geometry within a Marionette object via the OIP??  I've struggled with this pretty much since day one.  I've had limited success with the "If" node, and my few successes I can't seem to incorporate into other networks.  This morning I was yet again struggling with this when I stumbled across this thread; not sure I'd ever heard of the "Valve" node before.  After several attempts (different locations in the network) I was able to get it to work.  But when I wrapped the network and used it as a node in a larger network, I believe it killed the rest of that larger network.


Is there a simple True / False node that will either pass whatever's put into it if True, or just exclude / destroy / make nonexistent whatever's put into it if False?  (I.e., "pass this thing," or, "pass nothing"... without crippling the rest of the network and without the need to (confusingly and rarely successfully) delete unwanted duplicates).


As an example, I have a simple stair run Marionette, which includes geometry to indicate minimum head height (you know, super-sophisticated clash detection...).  It would be nice to make that geometry optional with a checkbox in the OIP.


Thanks for any thoughts!  

Link to comment

@willofmaine I think the only way I've found to reliably do what you are asking is to use either Valve or If nodes to block off input data.  A Symbol node won't place a symbol if it doesn't have the string symbol name input, a Circle node won't produce a circle if it doesn't have a a radius input.  But if a geometry-creating node exists and has enough of its parameters filled, it will generate geometry regardless of its placement within the network.

  • Like 1
Link to comment

@KingChaos You would block off input data to prevent geometry from being drawn.  Let's say that you have a Marionette object that can either be a circle or a rectangle based off of a drop-down or radio button in the OIP.  You would need a Circle node and a Rectangle node in the network to achieve this, but if you supply enough input data into either node (radius for Circle, width and height for Rectangle) both objects would be drawn.  So you would use some way of preventing the input data from reaching the nodes to ensure that only the desired object is drawn using either Valve or If nodes.  I personally prefer to use Valve nodes for this, as they are simpler.


I've attached a small demo showing how this works (in VW2019 format, it's what I had open when I read this post.  I did quickly test it in VW2022 and it seemed to work fine).  The named input variables are a Radio Button node named "Shape" (custom edits to name the options) and a Real node named "Size".  The "Shape" node will output either a 0, 1, or 2 based on what option is chosen in the OIP.  I use three Equal nodes to check the "Shape" output and will pass a TRUE if it matches.  The "Size" node is plugged into the input of Valve nodes, which will allow the input to be passed on if it receives the TRUE input from the Equal nodes.  The div nodes just halve the "Size" data since the Circle and Regular Polygon nodes use radius instead of diameter.


In summary, the Valve nodes are preventing the "Size" input data from reaching the Object nodes unless they're the chosen shape.



Marionette Valve Demo.vwx

  • Like 1
Link to comment

Is it possible, to inhibit that VW will show a variable in the OIP?


Maybe i make such similiar situation like your network.


Input is a selector, rectangle, circle or hexagon.


IF it is a circle, you can input a radius, if rectangle u can input a & b and a hexagon u can input edge count and inner/outer radius?


So i dont need a&b in a circle or hexagon, so i am looking for a way that u can "hide" the named input variables which u define as not needed?



br KC

Link to comment

Unfortunately, I don't think there's any way to toggle the visibility of an OIP parameter with Marionette.  You can certainly do it with Plug-in Objects scripted in Python or Vectorscript, but I can't think of a way to do it in Marionette.  Any input node given a name will appear in the OIP, but there's no way to change a node's name from within a Marionette network.

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...