Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    InExclude not working with Materials?

    SDK Help
    0
    6
    417
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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!

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              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!

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                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. 🙂

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post