On 31/07/2013 at 19:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R12+
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Howdy,
There seems to be a bug in R12+ regarding setting an object's matrix. To see the bug, create a null object at world center. Then set its X scale to -1. Then write this little bit of code in a CommandData plugin:
Bool TestCommand::Execute(BaseDocument* doc)
{
BaseObject *op = doc->GetActiveObject();
if(op) op->SetMg(Matrix());// set to identity matrix
EventAdd(EVENT_FORCEREDRAW);
return TRUE;
}
... and rather than resetting the object's matrix to the identity matrix (which should be 0,0,0 position, 1,1,1 scale and 0,0,0 rotation coordinates) it sets the object's coordinates to:
Position 0,0,0
Scale -1,-1,1
Rotation 0,0,-180
What's causing this? It doesn't happen in versions prior to R12.
Adios,
Cactus Dan