Extending COFFEE with C++



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

    On 10/08/2009 at 09:04, xxxxxxxx wrote:

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

    ---------
    From the C++ reference I guess it is possible to extend COFFEE through C++, right? Is there a working minimal example around?



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

    On 11/08/2009 at 02:34, xxxxxxxx wrote:

    Yes you can extend COFFEE through the C++ API, see chapter "C.O.F.F.E.E. library" of the C++ SDK docu. Afaik there is no working example avaible.

    cheers,
    Matthias



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

    On 11/08/2009 at 08:55, xxxxxxxx wrote:

    That's pretty cool. I never realized that this was possible (or I might have taken up a cause to fill in the gaps so many complain about). Something of an extended COFFEE interface that supplements the stock COFFEE interface would allow it to be pushed up to nearly MEL levels by adding some of the C++ interface not available therein and would probably spur a great influx of plugin development.

    Hmmm... food for thought. :)



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

    On 20/08/2009 at 16:15, xxxxxxxx wrote:

    Yeah, I've batted around the idea of creating an opensource project to generate "COFFEE beans". Ultimately I never end up with enough time to get it off the ground.

    Here's some sample code though in case it helps:

    > \> void GetMachineFeatures(Coffee\* Co, VALUE \*&sp;, LONG argc) { \>      BaseContainer machineInfo = GetMachineFeatures(); \>      GeCoffeeGeData2Value(Co, machineInfo, &sp;[argc]); \>      sp += argc; \> } \> \> void GetSystemEnvironmentVariable(Coffee\* Co, VALUE \*&sp;, LONG argc) { \>      String varname; \>      varname = sp[argc-1].GetString(); \> \>      String result; \>      if(GetSystemEnvironmentVariable(varname, result)) { \>           GeCoffeeGeData2Value(Co, result, &sp;[argc]); \>           sp += argc; \>      } else { \>           RetFalse(); \>      } \> } \> \>      Coffee \*cof = GetCoffeeMaster(); \>      if(!cof) return FALSE; \> \>      cof->AddGlobalFunction("GetMachineFeatures",GetMachineFeatures) \>      cof->AddGlobalFunction("GetSystemEnvironmentVariable",GetSystemEnvironmentVariable)) \> } \>


Log in to reply