THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/03/2003 at 09:52, xxxxxxxx wrote:
Cinema 4D Version: 8.012
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C.O.F.F.E.E ;
My first little plugin is mostly done, there's one little thing that I've worked around:
Currently I've the following code in the plugin's GetState() method:
var doc =GetActiveDocument(); if (!doc) return NULL; var obj =GetActiveObject(doc) ; if (!obj || !instanceof(obj, PolygonObject)) return NULL; var polysel = obj->GetPolygonSelection(); if (!polysel||polysel->GetCount()==0) return NULL; return CMD_ENABLED ;// ok, enable
This enabled the plugin when there is a polygon selection.
However, to prevent excessive flashing of the icon I actually I would like to enable the plugin when the editor is in polygon mode, not only when I actually have a selection.
Thanks a lot in advance!