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
    • Recent
    • Tags
    • Users
    • Login

    User Data Integer Opions?

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 628 Views
    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 Offline
      Helper
      last edited by

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

      On 13/08/2011 at 08:02, xxxxxxxx wrote:

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

      ---------
      Howdy,

      How can I get to the options of an Integer User Data through code?:

      Adios,
      Cactus Dan

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

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

        On 13/08/2011 at 08:08, xxxxxxxx wrote:

        Hi, with C4DAtom::GetDynamicDescription you can browse through the userdata of an object. With DynamicDescription::Browse* and the retrieved BaseContainer you can access all these values. Cheers, Sebastian

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

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

          On 13/08/2011 at 08:17, xxxxxxxx wrote:

          Howdy,

          Thanks Sebastian, but which container am I looking for that will be the "Options"?

          That's probably how I should have worded the question. 😊

          Adios,
          Cactus Dan

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

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

            On 13/08/2011 at 08:35, xxxxxxxx wrote:

            Howdy,

            DOH!  The container is "DESC_CYCLE"!

            Hehe, I should've known that. 😊

            Adios,
            Cactus Dan

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

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

              On 13/08/2011 at 15:18, xxxxxxxx wrote:

              Howdy,

              OK, I can create a User Data popup menu, and I can detect if an object has a popup menu with this code:

              Bool TestCommand::Execute(BaseDocument *doc)
              {
              	BaseObject *op = doc->GetActiveObject();
              	if(op)
              	{
              		DynamicDescription *dd = op->GetDynamicDescription();
              		if(dd)
              		{
              			DescID dscID;
              			const BaseContainer *bc;
              			void *dscHnd = dd->BrowseInit();
              			
              			while(dd->BrowseGetNext(dscHnd, &dscID, &bc))
              			{
              				GeData gData;
              				CDGetParameter(op,dscID,gData);
              				if(bc->GetLong(DESC_CUSTOMGUI) == CUSTOMGUI_LONG)
              				{
              					BaseContainer *cycle = bc->GetContainerInstance(DESC_CYCLE);
              					if(!cycle) GePrint(bc->GetString(DESC_NAME)+" - No DESC_CYCLE detected");
              					else
              					{
              						GePrint(bc->GetString(DESC_NAME)+" - DESC_CYCLE detected");
              					}
              				}
              			}
              			dd->BrowseFree(dscHnd);
              		}
              	}
                
              	EventAdd(EVENT_FORCEREDRAW);
              	return TRUE;
              }
                
              
              

              But, how would I get the number of entries that are in the popup menu?

              I'm not only interested in the current value of the popup menu User Data, but I'd also like to know how many items are available in the popup menu.

              Adios,
              Cactus Dan

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

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

                On 17/08/2011 at 02:11, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                I'm not only interested in the current value of the popup menu User Data, but I'd also like to know how many items are available in the popup menu.

                I think you need to manually count the entries in the DESC_CYCLE container.

                cheers,
                Matthias

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

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

                  On 18/08/2011 at 08:48, xxxxxxxx wrote:

                  Howdy,

                  Thanks, Matthias. That worked. 😉

                  Adios,
                  Cactus Dan

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