Update if object moves..
-
On 21/03/2014 at 14:14, xxxxxxxx wrote:
R14 Python:
I am working on a
deformer
ObjectData plugin. How it works is simple - make it a child of any polygon object, and drag and drop another object into a Link field i have created in the deformers properties..This works great, however the deformation is dependent on the object specified in the Link ( this can be a Null, Cube, Camera, pretty much anything with a position Vector ), and as it is just now when i move the linked object around in the editor/viewport i need my deformer to recognise this and update accordingly.
Is there a way to add an event of some kind to the linked object so that it tells the plugin when it has been moved?
I have looked at a bunch of options, literally trawled through the SDK docs and tried various things, but completely stumped. I figure i could manually poll the object every single frame for changes, but feel that i`m missing something here and there must be some Event or internal message that could be leveraged to do this..
Any help much appreciated.
-
On 22/03/2014 at 03:10, xxxxxxxx wrote:
Hi Eclektrik,
You could make your Object also an Expression in which case you get updates in
ObjectData.Execute() when any object is being moved. Check the dirty count of the
linked object in this method and compare it to the dirty count you got the last time
your deformer was in action.Best,
-Niklas