Jump to content

Popup- value for true/false

Recommended Posts

Hey All,


I seem to be missing something, Probably over thinking it.


I have a popup

0- left

1- right

2- top

3- bottom

4- none


I'm looking for a way to have an "IF" statement with the popup being the test.


If the "popup"  is "none"  its true, any other value would return a false.

Ultimate goal is to use this to remove an item when not required. 


I'm sure its not explained very well.




Link to comment

I don't think there is a way to use the default Popup node to handle a dynamic number of items. If you want that you will have to create your own popup node and then probably pass it a list of display values and output values for each display.


It is often better to explain what you are trying to accomplish rather then your implementation idea. Once we know what the goal and input conditions are we can better offer different implementation ideas.

Link to comment
Posted (edited)

I'll use a color picker as an example.


I want to have a popup be able to chose a line color, and then say if red is selected turn off part or hide a section of the marionette.

Just missing the step in between.


I've attached the bit used to pick the color, works like a charm via popup under object attributes

Color Picker.PNG

Edited by Kurtiswilk
Link to comment

So I did indeed figure out how to accomplish the if statement. The new problem, How to sett a fill of a rectangle to None .



I was drastically over thinking the if problem. 

Using a "if in string" with the main string being the popup and the sub string and integer matching the selection you want

in the attached example, if you select the color grey it'll be overridden with yellow otherwise will show the selected

Color Picker-fixed.PNG

Link to comment

It should be possible, to use the "Attributes"-Node to set fill pattern to 0. Connect it after your object and set it to Empty  Fill. After That attach your colors. The Problem could be that the "Attributes" node replace also the line weight and line style. If that is a problem you can use the "function"-Node. And just paste vs.SetFPat(x, 0) in the input field.

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...