Error with SetPrimitiveType



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

    On 29/04/2003 at 22:09, xxxxxxxx wrote:

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

    ---------
    I have a very simple coffee plugin that worked under 7.3 but in 8.1 gives an error in the following (partial code) :

      
    var cube = new(PrimitiveObject);  
    cube->SetPrimitiveType(PRIMITIVE_CUBE);   
    

    The error is:
    Incompatible types... NIL/OBJECT

    What could be wrong? Has something changed in 8.1?



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

    On 29/04/2003 at 23:19, xxxxxxxx wrote:

    On further exploration I see that

      
    var cube = new(PrimitiveObject);  
      
    

    returns nil
    It PrimitiveObject not in the api anymore? How does one make a cube?



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

    On 30/04/2003 at 02:31, xxxxxxxx wrote:

    This is the only place where the R8 C.O.F.F.E.E. actually has changed. Since PrimitiveObject doesn't exist anymore you have to use the new CubeObject class. Please refer to the C4D executable with a hex editor for the rest of the classes.



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

    On 30/04/2003 at 07:41, xxxxxxxx wrote:

    Thanks Mikael - That worked! Only one thing seems to still be not working as it did in v 7.3:

      
    var floor_instance = new(InstanceObject);  
    var ic = floor_instance->GetContainer();  
    ic->SetData(INSTANCEOBJECT_SOURCE,"hausfloor");  
    

    creates the instance, but does not give it the source object, though "hausfloor" exists



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

    On 30/04/2003 at 08:19, xxxxxxxx wrote:

    This part (object links) doesn't work in C.O.F.F.E.E. yet. So you cannot change what a created instance object points to.



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

    On 30/04/2003 at 08:38, xxxxxxxx wrote:

    So can I simply not use Instances in coffee then? Or is there someway to create an instance and point it at the same time? With arguments in the new command?



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

    On 30/04/2003 at 10:44, xxxxxxxx wrote:

    No, unfortunately that's not possible.



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

    On 18/09/2004 at 16:51, xxxxxxxx wrote:

    This post helped me to resolve a problem but I've got to ask, did Maxon ever produce an updated COFFEE SDK?  I've got the latest SDK from this site but it still refers to the defunct PrimitiveObject which doesn't work in 8.1+.
    Mikael states in this thread:  "Please refer to the C4D executable with a hex editor for the rest of the classes."
    Surely we can do better than that, right Maxon?
    In a another post by a similarly frustrated COFFEE coder, Mikael responds: "I'm glad that you found the solution. As you've noticed the C.O.F.F.E.E. docs are currently for R6. The reason for this is mostly that besides the things you noticed there haven't been many changes to C.O.F.F.E.E. in R8."
    May I suggest that since so little has changed, it wouldn't take much effort to actually update the SDK.  It would be of great value to those stubbing their noses on the walls of these so-called minor changes if we didn't have to learn COFFEE -and- what's wrong with the SDK documentation.  Remember that not all of us have been following Cinem4D from 6.x on.  I personally came in at 8.5 with an implicit trust of the documentation that Maxon is providing.
    Thank you Mikael (and others) for your insight on these issues.  If it weren't for your posts, I'd still be stuck!



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

    On 20/09/2004 at 10:40, xxxxxxxx wrote:

    This work fine in R8 .
    var floor_instance = new(InstanceObject);
    var ic = floor_instance->GetContainer();
    ic->SetData(1001, hausfloor);
    floor_instance->SetContainer(ic);
    hausfloor is an Object, not name of Object.


Log in to reply