Activate create layers component via Boolean

@andheum

Is there a way the ‘create/modify layers’ component can be activated via a Boolean. The Elefront component does this but it seems to have a bug with the materials attributes. I know that it is possible with Metahopper’s ‘Enable/disable object’ but was hoping to be able to control it within the component itself.

Thanks

Why not use something like StreamFilter:

You can easily use ghpython node in code, to add a custom input like what you want:

import ghpythonlib.components as gh
if run:
    L, FP = gh.Human.CreateModifyLayers(L,C,LT,M,V,PW,PC,D)


Pual.gh (14.1 KB)

the component itself does not have an action toggle but metahopper enable/disable and any of the above solutions should do the trick. Why does it matter that it be “in the component itself”?

Thanks Andrew.

I guess what I was referring to was that the GH default is in ‘preview’ mode until geometry is baked. Human modifies the Rhino document immediately once you wire it up. I find this a little dangerous and prefer a toggle to activate - hence the reference to Elefront. Stream filter and Metahopper both do the trick but like some of your other components (HumanUI live listener for example) I though their might be an inbuilt toggle that I was missing.

My logic is that a novice user has to explicitly activate a toggle, whereas if Metahopper is used to disable the component, they could think this was a mistake and enable it accidentally (say doing a big batch enable/disable). It’s less of a technical problem than a user experience issue really.

Yeah, I admit it’s inconsistent across my components. Not something I’m likely to fix though :stuck_out_tongue_closed_eyes: