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

    Changing CUSTOMGUI_RANGE

    General Talk
    3
    5
    1.1k
    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.
    • G
      gsmetzer
      last edited by

      I am nearly done with my command data plugin but I have one final issue.
      I have a RangeData Slider and I want to adjust the interface. In the .res file the only CUSTOMGUI function that is recognized is: ANIM OFF and RANGE_CURSORICON (that I can figure out)
      However I need to customize the RangeData with RANGE_ALLOWRANGEEDIT and RANGE_ALLOWRANGESLELECION. See this link for the RANGE_CUSTOMGUI options available.

      https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/BaseCustomGui/RangeCustomGui/index.html#c4d.gui.RangeCustomGui

      Can I update RANGE_ALLOWRANGESELECTION and other custom gui's in my .res file or can I do this in my .pyp file?

      I am using R19
      Thank you for any help.

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by r_gigante

        Hi gsmetzer, thanks for reaching out us.

        With regard to your issue, I think there are no limitation in setting updating RANGE_ALLOWRANGESLELECION in the .res or via the plugin.
        On the other side please be aware that due to some mispell you have to set RANGE_ALLOWRANGESLELECION and not RANGE_ALLOWRANGESELECTION and also, due to an issue in our documentation, ALLOWRANGEEDIT and not **RANGE_**ALLOWRANGEEDIT.

        You can see all the parameter IDs for the Range slider, creating "Range Slider" a UserData in Cinema 4D and switch to the Details tab to see the different IDs.RangeSlide.png

        UPDATE: image has been corrected to reflect the purpose of showing the difference params.

        Best, Riccardo

        1 Reply Last reply Reply Quote 1
        • G
          gsmetzer
          last edited by

          Thanks for the info. I'm using R19 and haven't tested on newer releases so its possible .res access to CUSTOMGUI wasn't available in R19 for RangeData...

          If I can change the CUSTOMGUI's in my python file how do I do that? I have been searching around trying to find some sort of code but coming up empty handed. Handling Description ID's is pretty simple for UserData but not for an ObjectData plugin. Any code or tutorials on how I can customize my gui from my python file in my ObjectData plugin?
          Thank You,

          1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand
            last edited by ferdinand

            Hi,

            I am not quite clear, on what you are actually trying to do.

            1. If you just want to set the gui type for an element statically, you have to set the CUSTOMGUI flag in your description resource file for that element. See the description resource manual for details.
            2. If you want to modify the description of your object dynamically, you will have to overwrite NodeData.GetDDescription(). There is an example in Python SDK examples on how to do that in detail.

            Cheers
            zipit

            MAXON SDK Specialist
            developers.maxon.net

            1 Reply Last reply Reply Quote 0
            • r_giganteR
              r_gigante
              last edited by

              Hi gsmetzer,

              with regard the use of the range slide in a resource file please have a look at <Cinema 4D folder>/resource/modules/olod.res: the LOD_BAR parameter is a range slider

              With regard to using the NodeData::GetDDescription() please check:

              • py-dynamic_parameters_object_r18.pyp
              • py-preference_r19.pyp
              • py-spherify_modifier_r13.pyp

              Best, Riccardo

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