InExclude not working with Materials?



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

    On 19/03/2008 at 14:06, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   9600 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Hi,

    I only checked in 9.6, but is it true that the InExclude list does not work with BaseMaterials?

    No matter what I do, the ObjectFromIndex() does always return NULL when the object in the list is a BaseMaterial.

    The Object count is 1 and it´s only the material in the list, so the list knows that the basematerial is there but the ObjectFromIndex() call does not return it.

    Is it intented not to work with materials (as the return type is BaseList2D, this should actually include BaseMaterials)? Or is it only in 9.6 that it doesn´t work? If so is there a workaround for 9.6.

    That would be highly important to me.

    I am in GetVirtualObjects() btw.

    Thanks!
    Samir



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

    On 20/03/2008 at 07:37, xxxxxxxx wrote:

    I don't know, it works fine here.

    little test code I used in the Atom object SDK example's GetVirtualObjects function

    > \> BaseContainer \*data = op->GetDataInstance(); \> \> InExcludeData \*list = NULL; \> list = (InExcludeData\* )data->GetCustomDataType(ATOM_LIST,CUSTOMDATATYPE_INEXCLUDE_LIST); \> \> if(list) \> { \>      BaseMaterial \*mat = NULL; \>      LONG i, ocnt = list->GetObjectCount(); \>      for(i=0; i<ocnt; i++) \>      { \>           mat = (BaseMaterial\* )list->ObjectFromIndex(op->GetDocument(),i); \>           if(mat) \>           { \>                GePrint(mat->GetName()); \>           } \>      } \> } \>

    cheers,
    Matthias



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

    On 20/03/2008 at 07:43, xxxxxxxx wrote:

    Hi Matthias,

    thx first of all. Is this in R10+? or 9.6? I do the exact same thing in 9.6 and it doesn´t work. But if it works in R10 and higher then I could make my code specific and use normal link fields for 9.6.

    Thanks!



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

    On 20/03/2008 at 07:47, xxxxxxxx wrote:

    I tested it in 9.6 and 10+. It works in both versions.

    cheers,
    Matthias



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

    On 20/03/2008 at 08:25, xxxxxxxx wrote:

    thanks Matthias. Hmm, then any of my pointers must be not filled correctly as I am using the same code. I´ll have a look. :)

    Thanks for your fast response!



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

    On 20/03/2008 at 08:44, xxxxxxxx wrote:

    Cool, got it. It was indeed that my update structure did not have the link to the current document.

    Thx again. Pointed me into the right direction. :)


Log in to reply