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

    Read InExcludeData items

    SDK Help
    0
    3
    926
    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

      On 21/06/2018 at 03:38, xxxxxxxx wrote:

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

      ---------
      I've created a basic exclude list and a button
      GROUP OBJECT_GROUP_BACKGROUNDS
      {                         _
      _ DEFAULT 1;

      _  IN_EXCLUDE OBJECT_EXPORTABLE_GEOMETRY_
      _  {_
      _    NUM_FLAGS 0;_
      _    ACCEPT { Opolygon; };_
      _  }              _
      _ BUTTON OBJECT_EXPORT_BACKGROUNDS {}_
      }

      And I need to get the click on the button and list all the items of the list and I tried

      Bool ObjectData::Message(GeListNode* node, Int32 type, void* data)
      {
      _ //............_
      _
      _
      _ if (((DescriptionCommand* )data)- >id == DescID(OBJECT_EXPORT_BACKGROUNDS))_
      _ {_
      _
      GeData outdata;
      const Bool success = ((BaseObject* )node)->GetDataInstance()->GetParameter(OBJECT_EXPORTABLE_GEOMETRY, outdata);;

      	// check type
      	if (success && outdata.GetType() == CUSTOMDATATYPE_INEXCLUDE_LIST)
      	{
      		InExcludeData\* inexData = (InExcludeData\* )outdata.GetCustomDataType(CUSTOMDATATYPE_INEXCLUDE_LIST);
      		//............
      	}
      }
      

      _
      }

      But probably I'm doing something wrong since success is true but the GetType is 0 so I cannot read the values.

      Thank you in advance for any tip!

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

        On 22/06/2018 at 08:02, xxxxxxxx wrote:

        Hi,

        actually we see nothing immediately wrong with your code snippet. Except maybe you are using different symbols for the DescIDs in the resource files and in source. If these are defined with different values, well then this could explain your issue. Just a guess.

        There's also an example demonstrating the use of InExcludeList: objectdata_descriptions

        Edit: Forgot to link to GitHub example

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

          On 27/06/2018 at 05:01, xxxxxxxx wrote:

          Thank you for the tip

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