ghpython icon indicating copy to clipboard operation
ghpython copied to clipboard

Access to Script component which maintains the script

Open sbaer opened this issue 13 years ago • 1 comments

Add built-in variable for ghpython scripts to access Grasshopper.Kernel.IGH_ActiveObject. This allows for access to the same bits and pieces that VB/# scripts have access to in grasshopper. See the DottetLine.gh VB script component for a sample http://www.grasshopper3d.com/forum/topics/display-pipeline?commentId=2985220%3AComment%3A639887

sbaer avatar Sep 06 '12 17:09 sbaer

ghenv.Component provides access to that instance.

Similarly to the way other scripting components address this, I also think that the ghPython component should provide some special names that are called to calculate the bounding box or show mesh and curves preview. This would make it a lot easier to override the drawing behavior.

We could even possibly encapsulate the current code into a class.

piac avatar Oct 23 '13 10:10 piac