BaseObject(Polygon) into BaseObject(Oskin)



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

    On 14/01/2012 at 05:08, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:    
    Platform:      
    Language(s) :

    ---------
    hi,
    I'm Wondering if it's possible to insert a Mesh into the Oskin Instance. I think it's possible since every Class is available. But SDK not telling that much about that.
    So here is what i want to achieve.
    [[IMG]http://img249.imageshack.us/img249/4316/howp.png/IMG]
    I'm currently going through every single functions with a Set in the name ;)



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

    On 14/01/2012 at 09:37, xxxxxxxx wrote:

    That's an in/exclude list, so look in the SDK at InExcludeData. You need to get that list from the skin's base container, then call InsertObject() from the list object.

    Steve



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

    On 15/01/2012 at 13:45, xxxxxxxx wrote:

    you mean something like this.

      
    BaseObject skin = BaseObject.Alloc(C4dApi.Oskin);
    skin.getData
    InExexcludeCumstomGui inex = CustomDataType.Alloc();
    inex.InsertObject(this.myMesh);
    

    I'm still working on wrapping the CustomDataType so i Cant test it thats Why I'm saying "you mean something like this"



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

    On 15/01/2012 at 16:28, xxxxxxxx wrote:

    No, you don't have to allocate the list. You already created the list in your description (or rather, Maxon did, for the inbuilt Skin object). So you need to get the InExcludeData related to that description element. Something like this:

      
    BaseObject *skin;    // a pointer to a skin object   
    BaseContainer *bc = skin->GetDataInstance();   
    InExcludeData *list = (InExcludeData* )bc->GetCustomDataType(ID_CA_SKIN_OBJECT_INCLUDE, CUSTOMDATATYPE_INEXCLUDE_LIST);   
      
    BaseObject *mesh;   // the object you want to insert into the list   
    list->InsertObject(mesh, 0);   
    

    The identifier 'ID_CA_SKIN_OBJECT_INCLUDE' you can get from the header files or more easily by dragging the word 'List' in the AM into the text field at the bottom of the console window.

    That's all you need to do.

    Steve



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

    On 17/01/2012 at 08:28, xxxxxxxx wrote:

    hm think i need to include a header file, that it work, cause as soon as ai compile my project it says error undefined The Name "ID_CA_SKIN_OBJECT_INCLUDE" was not found in the current file.
    I searched the api for this definition "ID_CA_SKIN_OBJECT_INCLUDE" to get the number but i had no luck



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

    On 17/01/2012 at 08:58, xxxxxxxx wrote:

    You'll find it in \your c4d location\resource\modules\ca\res\description\ocaskin.h

    The header files relating to the descriptions of Cinema's objects are found in the resource or modules folders, not the api folder.

    Steve


Log in to reply