Skip to content

Instantly share code, notes, and snippets.

@StudioLE
Created February 16, 2019 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StudioLE/73a6f47f6419ef0f0a4445699f11ea91 to your computer and use it in GitHub Desktop.
Save StudioLE/73a6f47f6419ef0f0a4445699f11ea91 to your computer and use it in GitHub Desktop.
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
true_list = IN[0]
false_list = IN[1]
bool_list = IN[2]
result = []
i = 0
for bool in bool_list:
if bool : result.append(true_list[i])
else : result.append(false_list[i])
i = i + 1
#Assign your output to the OUT variable.
OUT = result
@StudioLE
Copy link
Author

2019-02-16 mergebyboolmask py

2019-02-16 mergebyboolmask py 02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment