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
    1. Maxon Developers Forum
    2. mrittman
    3. Topics
    • Profile
    • Following 0
    • Followers 1
    • Topics 3
    • Posts 17
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by mrittman

    • mrittmanM

      Use a list or array for data?

      General Talk
      • python • • mrittman
      5
      0
      Votes
      5
      Posts
      1.5k
      Views

      ManuelM

      hello,

      if you don't have anything else to add, i'll mark this topic as "solved"

      Cheers
      Manuel

    • mrittmanM

      Add/Remove Groups of User Data

      Cinema 4D SDK
      • python • • mrittman
      12
      0
      Votes
      12
      Posts
      3.3k
      Views

      mrittmanM

      @m_magalhaes said in Add/Remove Groups of User Data:

      Hello,

      I was also talking about something like this. But it's not the best way to go. I suggest a TagData (plugin) with his own UI.

      pyTagCode = '\ import c4d \n\ #Welcome to the world of Python \n\ \n\ def main():\n\ print "this ia a message"\n\ \n\ ' import c4d # Main function def main(): if op is None: gui.MessageDialog("Please selecte a target object") tag = c4d.BaseTag(c4d.Tpython) tag[c4d.TPYTHON_CODE] = pyTagCode op.InsertTag(tag) c4d.EventAdd() # Execute main() if __name__=='__main__': main()

      By the way, don't forget you can save tag presets, that include python tags. You can simple add them with right click on your object in OM and "Load tag preset"

      Cheers,
      Manuel

      Oh this is good to know! Thanks so much for the information, this is quite helpful!

      Matt

    • mrittmanM

      Output Current Sound Track Name

      Cinema 4D SDK
      • python r20 • • mrittman
      12
      0
      Votes
      12
      Posts
      2.4k
      Views

      S

      Hello,

      it seems you just write the name of the last track into your user data field:

      obj[c4d.ID_USERDATA,19] = trak.GetName()

      Since you do not extend that string, it can only show one name.

      best wishes,
      Sebastian