I have an event handler attached to BeforeTransformObjects. I want to be able to extract the objects in the document that the transform is being applied to and the transformation. There’s a known bug around the Objects field in the RhinoTransformObjectsEventArgs passed to the event handler being null, even when the ObjectCount is non-zero. I’ve been working around this by grabbing a list of selected objects from the active document, and this setup works in most cases.
However, if I add curves to a document, turn control points on, and transform one of the points, my transform handler gets called with object count 0,
Download, build and install (or set up your own event handler):
DemoTransformHandler.zip (38.0 KB)
Open a new document
Install the plugin
(1) Run “DemoTransformHandler” to attach the event handler.
(2) Add a new line
(3) Drag the line to translate it.
(4) Note that the event handler is called with an objectCount of 1, a null objects array (see known bug above), and that the document reports one selected object.
(5) Run PointsOn, select the line, finish the command.
(6) Drag the line’s start point to a new location.
(7) Note that the event handler is called with ObjectCount 0, and that the document is reporting that no objects are selected.
Anybody have ideas on whether there’s a way for me to find a structured representation of the transformation and the particular control point that it’s being applied to?