Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Create material groups

    SDK Help
    0
    3
    279
    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 15/06/2004 at 00:04, xxxxxxxx wrote:

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

      ---------
      Hi,
      I have some problem, to read a material group with a specific ID.
      I add the new group with following commands:

      BaseContainer group;
      group.SetLong( MATERIALGROUP_ID, 12345 );
      group.SetString( MATERIALGROUP_NAME, "TEST" );
      group.SetBool( MATERIALGROUP_SELECTED, TRUE);
      GetActiveDocument()->MaterialGroup_Add( group );

      Now, I´ve got a new material group. But if I read with the command
      BaseContainer *bc = GetActiveDocument()->MaterialGroup_GetID( 12345 );
      The return pointer is always NULL. But the group exist. I see it.
      Has anyone an idea ...

      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 18/06/2004 at 14:05, xxxxxxxx wrote:

        Confirmed. The ID seems to be set to the index, rather than the value you suppy in Add().

        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 18/06/2004 at 14:44, xxxxxxxx wrote:

          This is by design. C4D assigns the ID. You can check which ID was assigned in the container returned by _Add().

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