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

    DESC_EDITABLE

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 362 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/11/2013 at 04:36, xxxxxxxx wrote:

      Hello,

      I am trying to find out how to disable userdata (to grey the field out/disable it)

      I was able to find a script that hides userdata

      import c4d
      from c4d import gui

      def main() :
          obj=op.GetObject()
          UD = obj.GetUserDataContainer()
          for descId, container in UD:
              if descId[1].id == 1:
                  if obj[c4d.ID_USERDATA,2] == 0:
                      container[c4d.DESC_HIDE] = True
                      obj.SetUserDataContainer(descId, container)

      if obj[c4d.ID_USERDATA,2] != 0:
                      container[c4d.DESC_HIDE] = False
                      obj.SetUserDataContainer(descId, container)

      I tried replacing DESC_HIDE with DESC_EDITABLE to disable the userdata, but that doesn't seems to work

      Any help can be offered ?!

      Thanks,

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

        On 09/12/2013 at 03:38, xxxxxxxx wrote:

        anyone can help ?!

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

          On 09/12/2013 at 10:17, xxxxxxxx wrote:

          UserData do not support all description features, I guess this is another case. If you think
          of GetDEnabling and how it does work it does make sense for me.

          Happy rendering,
          Ferdinand

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

            On 10/12/2013 at 01:56, xxxxxxxx wrote:

            Setting the editable flag for User Data fields is not possible.

            Best,
            -Niklas

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