Adding Hair/Cloth Collider tags?



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

    On 15/08/2007 at 15:54, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R8.2-R10 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    How would I go about this? Do I need to include the Modules:Clothilde:res:description:collidertag.res and Modules:Hair:res:description:thaircollider.res (to get the names Trbd and Thaircollider for allocation)? Is there an alternative approach here?

    Thanks,



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

    On 15/08/2007 at 16:09, xxxxxxxx wrote:

    Okay, Hair can be handled by including the lib_hair.h. Need to see if it works, but seems reasonable.

    Clothilde on the other hand is a mystery. Don't have any enumation of the type for the collider tag.



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

    On 15/08/2007 at 22:31, xxxxxxxx wrote:

    It took a bit, but I finally found the ID for this tag. Had to actually print it after adding it as I couldn't find it anywhere (modules or resource folders).

    I thought there was a way to get such IDs by drag-n-drop into some COFFEE manager - but nothing took. Info, please. :)



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

    On 16/08/2007 at 05:09, xxxxxxxx wrote:

    yep, Clothilde is not enumed anywhere as there is actually no access to it via SDK. So you need to check with GetType() for example.

    What I do is simply start C4D attach the tag that I need info about to a null object, add a COFFEE tag and use this code to get the ID:

    main(doc,op)
    {
         var tag = op->GetFirstTag();
         println(tag->GetNext()->GetType());
    }

    For Cloth it´s 100004020, Cloth collider is 100004021
    Then define it myself in my code. :)



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

    On 16/08/2007 at 07:41, xxxxxxxx wrote:

    Yup, that's the one. ;)

    I just printed the tag->GetName()+" "+LongToString(tag->GetType()) for all of them to get at it.

    Thanks!



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

    On 21/04/2008 at 08:27, xxxxxxxx wrote:

    Hi,
    how do I get the IDs of the different fields, like in the ConstraintTag from the CA module: ID_CA_CONSTRAINT_TAG_PARENT_P etc.?
    Got the ID for the tag itself just fine, thanks to you.
    The IDs from the resource file wont work obviously, so I played around with tag->GetContainer, but I'm stuck.



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

    On 21/04/2008 at 08:48, xxxxxxxx wrote:

    The resources for these are in the Modules\ca and Modules\ca2 folders. Not the Modules in the Resource folder, the one in the Cinema 4D install directly. This means that you'll need to add these to the include path.



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

    On 22/04/2008 at 01:06, xxxxxxxx wrote:

    I've added "....CINEMA 4D R10\modules\ca\res\description" to Tools / Options / Projects and Solutions / VC++ Directories / Include files (I think thats what it is called in english ;-)) and included tcaconstraint.h to my source. But that doesnt make much sense to me, since I could just use the ID directly from the file, and that doesnt do anything.



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

    On 22/04/2008 at 02:02, xxxxxxxx wrote:

    Ok, forget the last sentence, just tried with another Tag, using the IDnumber directly and it worked. Got a bit confused there :-)

    But still I cant get the constraint-tag to work, I bet this has something to do with the group-IDs and/or the fact, that you can add more than one target, since every target-field in the for example parent-group should have its own ID.

    There are IDs like ID_CA_CONSTRAINT_TAG_PSR_TARGET_COUNT and ID_CA_CONSTRAINT_TAG_PARENT_GROUP, do I maybe have to add some numbers?

    Just want to do something like this:

    LONG Tcaconstraint=1019364;
    tag=BaseTag::Alloc(Tcaconstraint);
    obj->InsertTag(tag);
    obj->GetFirstTag()->GetDataInstance()->SetBool(ID_CA_CONSTRAINT_TAG_PARENT_P, TRUE);
    Which compiles fine, but doesnt seem to do anything.



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

    On 22/04/2008 at 05:25, xxxxxxxx wrote:

    BOOL ID_CA_CONSTRAINT_TAG_PARENT_P { HIDDEN; }

    Can't even find it through coffee:
    main(doc,op) {
    var tag = op->GetFirstTag();
    var bc=tag->GetContainer();
    println(bc->FindIndex(ID_CA_CONSTRAINT_TAG_PARENT_P));
    }

    Is the problem the HIDDEN flag?


Log in to reply