mcneel / ghpython

A Grasshopper component for Rhino.Python
http://www.food4rhino.com/project/ghpython
119 stars 34 forks source link

CustomPreview in ghpythonlib #56

Open piac opened 10 years ago

piac commented 10 years ago

" I tried using CustomPreview (ghcomp.CustomPreview(geometry=Geometry,shader=colors) but I didn't get it to work."

http://discourse.mcneel.com/t/new-ghpython-with-node-in-code-and-multi-threading/4499/7

sbaer commented 10 years ago

@piac Based on your comments on discourse, I interpret this to be that the CustomPreview component is similar to components like Kangaroo where some sort of state needs to be maintained. Is this correct?

We probably need a way to identify these types of components so we can modify the way we work with them -or- simply remove them from the list of available functions

piac commented 10 years ago

Yes, this is correct. The Grasshopper Counter, Custom previews, Vector Preview, Text preview, and several parts in third-party plugins will not work. These are the ones with open connections (gHowl, Exceltools, Firefly etc), all the ones with stored in-between particles (like, by heart, Kangaroo, SPM Vector Components, Rabbit), and all looping ones (like Hoopsnake, Loop) -- in short, all plug-ins that keep a copy of anything and use it later, are dereferenced too early right now. I do not think that there's a way to identify them right now.