I write a simple noise deformer and use a locator for accessory, to control the origin of the noise. By now the deformer works well except 2 issues:
I want my deformer work in world space. However it comes error when I use MItGeometry::position(MSpace::kWorld) , it seems that the iter parameter of virtual function deform(MDataBlock& block, MItGeometry& iter,const MMatrix& mat,unsigned int multiIndex) is initialized with a MObject rather than a DAG object? If that's true how I can get the WORLD SPACE position?
I checked maya's built-in deformer node, and nothing different, no matrix connection but all deformer works in world space well. So what's wrong with my poor deformer?
I also get another little problem. :sad:
The doc say The accessoryAttribute() method returns the attribute that is connected to the accessory shape, which in this case is offset::offsetMatrix. If the accessory shape is deleted, the deformer node is automatically deleted as well. My deformer's "referenceMatrix" attr is controlled by the locator, so I return the related MObject in accessoryAttribute(), but it not works!
When I delete the deformer, the related locator remains undeleted :eek:
Any help would be appreciated, Thanks!