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

    Set Tag-Parameter in R17 [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 307 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 25/10/2016 at 01:01, xxxxxxxx wrote:

      Hey there!

      I need to something pretty simple, but I can't figure out how it's done:
      My tag plugin has just two elements in the interface, a button and a text field (STRING). How can I change the content of the text field by code?

      In pseudo code:
      MyPlugin.MyTextfield = "Hello World!"

      Ps: The plugin has to work in R17.

      thank you in advance,
      simon

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

        On 25/10/2016 at 01:25, xxxxxxxx wrote:

        Hello and welcome,

        the syntax you are using is not correct. You are using the syntax of accessing a member variable of the given object.

        A parameter of an object is not a member variable. You can access a parameter using the SetParameter() and GetParameter() methods or the subscription syntax. You find examples for both ways in the Python examples.

        • Using GetParameter() / SetParameter()
        • Using subscription syntax

        best wishes,
        Sebastian

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

          On 25/10/2016 at 05:00, xxxxxxxx wrote:

          Thank you! That was exactly what I needed.

          My final code:
          node.SetParameter(STR_MY_PARAMETER_ID, "Text to Display", c4d.DESCFLAGS_SET_0)

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