On 14/05/2015 at 06:31, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14+
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
I'm doing a final tidy-up of remaining code in my plugin and have noticed something which causes C4D to freeze..
My plugin is an ObjectData, registered with OBJECT_MODIFIER, and op->SetDeformMode(TRUE) is also set inside the MSG_MENUPREPARE of the Message function.
I have narrowed it down to the following code. If i delete everything else inside my ModifyObject override and just have the following, it will freeze C4D by simply toggling between perspective viewport and four-views 3 or 4 times:
Bool MyPlugin::ModifyObject(BaseObject* mod, BaseDocument* doc, BaseObject* op, const Matrix& op_mg, const Matrix& mod_mg, Real lod, LONG flags, BaseThread* thread)
{
PolygonObject* poly = ToPoly(op);
BaseSelect* sel = poly->GetPolygonS();
sel->SelectAll(0,poly->GetPolygonCount());
return TRUE;
}
Can anybody confirm this or suggest a solution?
[edit] Just to add, all i do is inside a fresh scene, create a cube, create my plugin deformer, and drag the deformer under the cube, then switch between perspective single view, and default four-views, a couple of times, and it freezes..