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

    Cloth Surface object ID name

    Cinema 4D SDK
    sdk c++
    2
    4
    618
    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.
    • mfersaouiM
      mfersaoui
      last edited by mfersaoui

      Hi,
      I'm using the command id number to add new Cloth Surface object, but I'm searching what the object id name to use it instead of.

      // Create a Cloth Surface.
      BaseObject* clothSurface = BaseObject::Alloc(100004007);
      if (!clothSurface)
      	return BaseObject::Alloc(Onull);
      
      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        hello,

        There's currently no exposed Symbol for that value.
        There's no issue using the value itself, just be aware it can be changed in the futur.

        Cheers,
        Manuel

        MAXON SDK Specialist

        MAXON Registered Developer

        mfersaouiM 1 Reply Last reply Reply Quote 0
        • mfersaouiM
          mfersaoui @Manuel
          last edited by mfersaoui

          @m_magalhaes
          Hello,
          Sorry I just see your reply, I have an additional question about.
          As the Cloth Surface is available only in Studio version of Cinema 4D, I have added the condition IsCommandEnabled(100004007).
          Is it OK or there is method to get the current c4d version type?

          if (IsCommandEnabled(100004007)) {
               // Create a Cloth Surface.
               BaseObject* clothSurface = BaseObject::Alloc(100004007);
               if (!clothSurface)
               	return BaseObject::Alloc(Onull);
          }
          
          1 Reply Last reply Reply Quote 0
          • ManuelM
            Manuel
            last edited by Manuel

            hello,

            up to version R20 you can use GeGetVersionType but this have been removed with the version R21 (we only have one package now)

            With the version R21 follow you have several functions see this page

            to check the version you can check for API_VERSION

            #if API_VERSION > 20999
            	ApplicationOutput("this is a message");
            #else
            	GePrint("this is a message");
            #endif
            

            Cheers
            Manuel

            MAXON SDK Specialist

            MAXON Registered Developer

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