Checking editor mode?



  • 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:

    User Information:
    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.

    Any hints?

    Thanks a lot in advance!

    Kabe



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2003 at 10:36, xxxxxxxx wrote:

        
        
        doc->GetMode() == [CODE]Mpolygon
    

    [/CODE]



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2003 at 10:50, xxxxxxxx wrote:

    Mh, you realized that I was asking about COFFEE?

    Unfortunately that function is neither in the docs [which would be bearable] nor avalailable in the application [(9) Member not found].

    I'm using R8.1 with OS X

    Thanks for any clarification!

    Klaus



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2003 at 10:55, xxxxxxxx wrote:

    Sorry, then it's not possible.


Log in to reply