A few questions for my plugin tool. :)



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

    On 08/12/2008 at 19:26, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R9-R11 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    1. MCOMMAND_TRIANGULATE? Info? The result is put back into ModelingCommandData.op? Is the result inserted into the document automatically? Etc. etc. etc.

    2. ToolData::MouseInput() and clicking points on document objects? BaseDocument.Polygonize() is okay but I'm getting freeze crashes as the polygon counts on objects increases (remember that I'm doing Polygonize to get polygon reps of non-polygon objects or deformed/generated objects). I tried using C4DObjectList with SelectionListCreate() and it doesn't seem to work with primitives/deformed/generated objects so I figured Polygonize() would work. Not if it leads to freeze/crashes though.

    3. So basically, what I need is a solid way to get the *foremost* object under the cursor doubleclick and then use GeRayCollider on it maybe without doc->Polygonize() but only converting an object to polygon when it is the object of interest. I don't think forcing users to bake the object of interest into a polygon form beforehand is very user-friendly.

    Thanks,



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

    On 08/12/2008 at 21:29, xxxxxxxx wrote:

    Okay, it seems better to have the user select an object and have that polygonized in the point-determination process and added into a 'fake document' for the work involved.

    Now I have a problem with crashing like this:

    If my tool is the active tool but not displayed in the AM (say, an object, tag, etc is in the AM) as soon as I double-click in the viewport C4D goes into 'Not Responding' forever and ever. I can't determine why this occurs since it shouldn't matter. If not in the AM, maybe the SubDialog isn't valid?

    Thanks,



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

    On 08/12/2008 at 22:21, xxxxxxxx wrote:

    I also see that using the Tool SubDialog in ToolData::MouseInput() is a bad idea. Seems that if the tool isn't active in the AM - say bye, bye. ;)

    So much for enabling/disabling buttons that way. Instead, I just leave the buttons enabled but make them 'impotent' based on my tool's flags.

    Sheesh. :)



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

    On 11/12/2008 at 09:13, xxxxxxxx wrote:

    Quote: Originally posted by kuroyume0161 on 08  December 2008
    >
    > * * *
    >
    > 1. MCOMMAND_TRIANGULATE? Info? The result is put back into ModelingCommandData.op? Is the result inserted into the document automatically? Etc. etc. etc.
    >
    >
    > * * *
    I got nuthin for you on the others, but this one I can answer...

        
        
          
        //--------------------------------------------------------------------------  
        // Triangulate the mesh  
        //--------------------------------------------------------------------------  
        ModelingCommandData cd;  
        cd.doc = pDoc;  
        cd.op = pMesh;  
        cd.mode = MODIFY_ALL;  
        if( !SendModelingCommand(MCOMMAND_TRIANGULATE,cd) )  
            return false;
        
        
        
        
        //--------------------------------------------------------------------------  
        // get updated face count  
        //--------------------------------------------------------------------------  
        numFaces = pMesh->GetPolygonCount();  
        pPolys = pMesh->GetPolygonW();  
        
    

    ...it seems to be done in-place... the above works for me.
    Is this that same plugin, or something new?


Log in to reply