Deformer for multiple objects
-
On 20/07/2016 at 00:37, xxxxxxxx wrote:
Hello,
I am working on a new Deformer plugin, but I have some problems when it affect multiple objects.
In this case, only one instance of the ObjectData Deformer is created and its method ModifyObject is called for each object to deform.
It's normal, ok, but how can we do if we need to save some cache informations for each object ?
I tried to make an array with the objects GUID as keys, to store my informations for each object, but I meet one case when two objects has the same GUID (not the objects himself, but the cache sent to the ObjectData.ModifyObject), so I don't think I can use GUID to identify my objects...
Do you have any ideas ?
-
On 20/07/2016 at 02:16, xxxxxxxx wrote:
Hello,
so if I understand you correctly the question is how to identify an object? A generator that creates multiple virtual objects should assign an ID to each object. You should be able read this ID using BaseObject.GetUniqueIP().
Best wishes,
Sebastian -
On 21/07/2016 at 08:54, xxxxxxxx wrote:
I can access to GetUniqueIP() or GetGUID, yes, but if you just copy an object, the ID is the same for the two objects... so I can't use it because it's not unique.
When I said "object", I mean the "op" argument of the ObjectData.ModifyObject, because I work on a Deformer.