Check for c4d version in res file?



  • 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



  • 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
    


  • 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



  • 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. :)



  • 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



  • 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



  • 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://plugincafe.maxon.net/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



  • 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



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

    Ok thanks, I will give it a try.

    -Pim


Log in to reply