Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4125

Accessing objects triggered by events

$
0
0

Hello,

I am working on building an event handler that mainly writes User Text to objects given certain conditions. I have discovered that some of the events return a Rhino object, while others do not.

RhinoCommon API (rhino3d.com)

From the events that I’ve tested, it’s only with AddRhinoObject, DeleteRhinoObject, ReplaceRhinoObject that return an object. As a workaround, I’m using SelectObjects and then working with rs.SelectedObjects() to loop through selected objects and modifying user text, layers, etc.

Is there a better way to do this?

I’m working with an adapted version of the script from @dale from here:

rhino-developer-samples/rhinopython/SampleEventHandler.py at 8 · mcneel/rhino-developer-samples (github.com)

And am finding that it’s also not running in V8. Have there been changes to the way that Events are handled in V8?

Thanks,

Dan

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4125

Trending Articles