Execute (When?) lock x,y,z
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/05/2011 at 06:11, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 12
Platform: Mac OSX ;
Language(s) : C++ ;---------
HelloI am working on a little plugin tag which is supposed to lock selected axis - somewhat like the X,Y,Z lock of the C4D interface.
No problem locking an object to a specified fixed location which the user can enter in the Tag description. But what about simply locking an object at it's current position?
In Execute() I would have to get info about where the object is before moved and where it is going. How can this be done?
Thanks
Peter
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/05/2011 at 08:16, xxxxxxxx wrote:
//This is COFFEE, not C++ var isLocked = FALSE; var pos = NULL; TAG::Execute(op,doc) { if (op->GetData(TAG_ISLOCKENABLED)) { if (!isLocked) { pos = op->GetPosition(); } isLocked = TRUE; if (pos) { op->SetPosition(pos); } } else { isLocked = FALSE; } }
Cheers, Niklas