Need advice - Tool or Dialog?



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

    On 17/09/2007 at 17:00, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10 
    Platform:      Mac OSX  ; 
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    Hello

    I'm new to COFFEE and I have already re-created a few tutorial plug-ins.

    Now I want ot do something new. I want to create a small plug-in that allows to align a vertex on another vertex. Here is how this should work:

    1. You select a point in the editor with the standard selection tool
    2. You click on the plug-in, a dialog box opens where you can adjust on what axis the point should be aligned
    3. You click on another point and the selected point snaps to the same axis as this point

    A) Would this plug-in be a TOOL or a DIALOG plug-in? Tool no?
    B) How can I find out if there is a vertex under the location where I clicked in the viewport?



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

    On 18/09/2007 at 00:22, xxxxxxxx wrote:

    Do you use COFFEE or C++?

    cheers,
    Matthias



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

    On 18/09/2007 at 02:20, xxxxxxxx wrote:

    Quote: Originally posted by Matthias Bober on 18 September 2007
    >
    > * * *
    >
    > Do you use COFFEE or C++?
    >
    > cheers,
    > Matthias
    >
    >
    >
    > * * *

    COFFEE



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

    On 18/09/2007 at 02:51, xxxxxxxx wrote:

    A) There are no Tool plugins in COFFEE.

    B) You can't determine where clicked in the viewport in COFFEE

    If you really have to use COFFEE I would say do it like this:

    -make a dialog with two buttons, one for storing the first point and the second to apply the action
    -select the first point and press the first button to store the point index
    -select the axis in the dialog
    -select the second point and hit the second button to apply the action

    For a real interactive tool you need to write in C++.

    cheers,
    Matthias



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

    On 18/09/2007 at 03:17, xxxxxxxx wrote:

    Ah, ok thanks.

    BTW, do you know something that can get me started in C++ for Cinema? I already learned C++ in school but I'm looking for some good examples of small plugins that I can study. Or isn't there a difference between COFFEE and C++ (I mean the c4d classes, types...)



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

    On 18/09/2007 at 03:22, xxxxxxxx wrote:

    Check the cinema4dsdk folder in the plugin folder of your Cinema4D installation. There are several examples for various ares of the SDK (tools, objects, shaders, gui etc.)

    You need Visual Studio for PC or XCode for the Mac to compile the plugins.

    Download the C++ SDK documentation from the Plugincafe website.

    cheers,
    Matthias



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

    On 18/09/2007 at 04:16, xxxxxxxx wrote:

    OK, thanks



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

    On 18/09/2007 at 05:03, xxxxxxxx wrote:

    Ups, here is one more question.

    I'm having a hard time getting the selected point/points from an object in COFFEE.

    I'm doing something like this:

    doc->GetActiveObject();
    obj->GetActiveObject();
    obj->GetEdgeS(); ??????????



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

    On 18/09/2007 at 05:10, xxxxxxxx wrote:

    Please read the COFFEE documentation. There is no GetEdgesS() in COFFEE. Edges are not supported by COFFEE.

    cheers,
    Matthias


Log in to reply