@nathanletwory, I’ve been analysing your proposed solution and, while it opens possibilities to several features regarding RhinoObjects per se, when dealing with instances it still doesn’t allow several things.
The MeshIntance given info is somewhat limited.
As far as we’ve discussed, the MeshInstance InstanceId is a CRC of several data of the instance, and while it’s unique, it doesn’t allow for identification when, for example, I want to use the selected objects on the viewport to define some settings on the parallel structure for the required objects.
For example:
var selected = doc.Objects.GetSelectedObjects(false, false);
This returns the selected RhinoObjects, which easily may ot may not be instances.It can be checked doing:
public static bool IsInstance(RhinoObject obj)
{
return obj != null && obj.ObjectType == Rhino.DocObjects.ObjectType.InstanceReference;
}
Even if I were to use the way of obtaining an InstanceObject shown here:
var iref = objref.Object() as Rhino.DocObjects.InstanceObject;
I would not be able to bond easily said object to the info given to me by MeshInstance, simply because the only common ground is the transform.
This wouldn’t be a problem if each instance provided by the changequeue were to have its own UserData, as I could simply use those to set the data necessary for identification within.
Right now, this means I cannot use the ChangeQueue to populate my parallel structure, because if I were to try and modify something, if it were not to be modified from the changequeue, I wouldn’t be able to properly identify it.
Also, while we are at it, I’m wondering which would be an adequate place to initiate a changequeue that keeps track of the changes in a doc while there’s no render engine.
Thanks in advance,
Alonso