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

    Check for c4d version in res file?

    Scheduled Pinned Locked Moved PYTHON Development
    9 Posts 0 Posters 949 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

      On 27/03/2015 at 08:51, xxxxxxxx wrote:

      Is it possible  to check the c4d version in à .res file.
      For example give out different ui fields for r16.

      It is for à tag plugin with à res file.
      Or is it possible to hide or disable tag ui fields defined by à .res file?

      -pim

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

        On 27/03/2015 at 11:03, xxxxxxxx wrote:

        Could I use something like this in a .res file?
        If so is API_VERSION somewhere defined?

            #if API_VERSION > 16000
                
            #else
                BOOL    AREA_OFF {}  
            #endif
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 30/03/2015 at 08:23, xxxxxxxx wrote:

          Hello,

          there is no such functionality. You can of course check the current Cinema 4D version using GetC4DVersion(). With that information you can enable and disable parameters in GetDEnabling(). You find some example in the Double Circle plugin.

          Best wishes,
          Sebastian

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

            On 30/03/2015 at 08:27, xxxxxxxx wrote:

            Or you could write the description two times in the two different versions and check upon plugin
            registration which to use. Not a very clean solution, but it would work. 🙂

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

              On 30/03/2015 at 09:57, xxxxxxxx wrote:

              @sebastian: I am using a tag plugin and I read in a post that GetDEnabling() can not be used in a tag plugin.

              @niklas: yes, that would be my next option.
              Can I load a res file in a tag plugin?

              -Pim

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

                On 31/03/2015 at 01:10, xxxxxxxx wrote:

                Hello,

                GetDEnabling seems to work perfectly fine with a TagData plugin. What post did you read?

                You don't need to load a res file yourself. You already define which res file is loaded and associated with your plugin when you call RegisterTagPlugin().

                Best wishes,
                Sebastian

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

                  On 31/03/2015 at 01:54, xxxxxxxx wrote:

                  Originally posted by xxxxxxxx

                  Hi,

                  GetDEnabling() has to be implemented in an ObjectData plugin to enable/disable user data of the object. It cannot be used to enable/disable user data on other objects.

                  Link: https://developers.maxon.net/forum/topic/8473/11060_disenable-userdata&KW=GetDEnabling&PID=43563#43563

                  But perhaps I am wrong, because he talks about user data.
                  I have a tag plugin with a res file defining ui fields.
                  For example I have a field:  tag[AREA_SHOWINSPECULAR]
                  How to enable/disable this field using GetDEnabling()?

                  I know that the res file is loaded with RegisterTagPlugin(), but if I use a second res file (like Niklas suggested), I would need a way to  load that second res file.
                  Of course I can also check the version before I do a RegisterTagPlugin() and that way load different res files.

                  -Pim

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

                    On 31/03/2015 at 10:11, xxxxxxxx wrote:

                    Hello,

                    the thread that you are quoting discusses user data on objects, so it is not relevant for this thread.

                    You disable parameters with GetDEnabling() by implementing this method in your plugin class. Then you have to react to the given DescID. Cinema will ask for each parameter if it should be enabled, so you have to return true or false. You find some example in the Double Circle plugin.

                    Best wishes,
                    Sebastian

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

                      On 01/04/2015 at 01:38, xxxxxxxx wrote:

                      Ok thanks, I will give it a try.

                      -Pim

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