Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    UserData Insert New Data

    Cinema 4D SDK
    2
    4
    613
    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
      geese780
      last edited by m_adam

      Hey Everyone,

      I hope this finds everyone well. I'm trying my best to learn about the interaction of UserData on objects with a very basic understanding of python(if that haha), I was reading this thread and playing around with it: https://developers.maxon.net/forum/topic/11467/access-custom-user-data-by-name-not-by-id
      and I'm now trying to figure out what functions to call to update the UserData without having to delete the UserData, edit the value then execute the script again. My guess is to use the SetUserDataContainer.
      I attached what my best guess is right now, gonna keep messing and researching the forums.
      Thanks for your time!

      Cheers!

      MattG

      Pythontesting.c4d
      Screenshot 1.PNG

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @geese780 when you say "update the User Data) you mean to define a value or changing its kind or some internal parameters like the parameter name?

        If you only want to define a value then you can define it as any parameters in Cinema 4D see Python Console Parameter.
        Otherwise, you are correct and should redefine the UserData Container and depending on what's you are trying to do, you may need to remove/re-add the user data.

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • G
          geese780
          last edited by

          Hey My Friend!

          Thank you for the response. So, thinking I understood this, I'm able to change the value within the console, but am still getting an error on the line with that syntax inside the script, I'm sure I'm missing something, I'm gonna re-trace my steps here. What I'm trying to do overall goes back to my first post about the OSC thing, so my thinking is figure out how change the value in a UserData Field on a specified piece of mesh, and then assign a variable to listen to the OSC integer, once I cross that bridge haha, but this is where I believe I shoudl start....I think...haha. Here's a screenshot showing my findings.

          Thanks again for your time Maxime!

          Cheers!

          MattG

          Screenshot 1.PNG

          1 Reply Last reply Reply Quote 0
          • G
            geese780
            last edited by

            Hey Guys!

            I think I figured it out! Will resoond if there's any questions!

            Cheers!

            MattG

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