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. Ling
    L
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 15
    • Best 0
    • Controversial 0
    • Groups 0

    Ling

    @Ling

    0
    Reputation
    7
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Ling Unfollow Follow

    Latest posts made by Ling

    • RE: can I have a callback when I close the c4d?

      @ferdinand Thank for your suggestions!

      posted in Cinema 4D SDK
      L
      Ling
    • RE: can I have a callback when I close the c4d?

      @ferdinand I think what I want is:
      import c4d
      import os

      def PluginMessage(id, data):
      if id == c4d.C4DPL_ENDPROGRAM:
      path="T:\PythonDeveopment\test.txt"
      with open(path, "w") as file:
      file.write("test")
      return True
      return False

      it gets me a callback when c4d is being closing as Python SDK said

      posted in Cinema 4D SDK
      L
      Ling
    • RE: can I have a callback when I close the c4d?

      @c4ds thanks. I can not find pluginEnd() in Python.
      why I want to rewrite res files is that I want to make the plugin name with multiple languages can be changed in the UI by users.
      with a lot of difficults, finally I choose to use a json file with string plugin name. it means that plugin name with only one language can be created.
      I can use json file with multiple languages too.but it is not more flexible than c4d strings file in res.

      posted in Cinema 4D SDK
      L
      Ling
    • can I have a callback when I close the c4d?

      can I have a callback when I close the c4d ?
      I want to rewrite c4dsymbols file and strings files in res folder when closing c4d.
      because I don't know whether c4d would crash for the changes of c4dsymbols file and strings files in res folder when c4d is running.
      I guess that c4d should not crash for changes.
      but I don't want to risk changing text of files above when c4d is running if I have other solutions.

      posted in Cinema 4D SDK
      L
      Ling
    • update background color of bitmap button and static text

      how can I update background color of bitmap button and static text when dialog have opened.update backgroundcolor in class 'commandData', but not in the class 'c4d.gui.Gialog'.
      I know how to change the color of the gui elements, but I don't know how to update the background color after opening dialog. I have got a try with 'c4d.gui.GeUpateUI()', but I think it not suitable.
      or can I use the userArea to replace the bitmap button and static text?
      can you guys tell me the ways or get me an example. Thanks guys!

      posted in Cinema 4D SDK
      L
      Ling
    • RE: interactions between two or more plugins which are in a single Python file

      I just use 'global value' to settle this problem. it is not good way or good solution for coding. but I have to solve this problem in a short time because it is just a little part of my plugin. I have so many problems to deal with that I can not waste my time.I think the message of commandData will update or call back when this command gui updates, or message maybe update with other conditions.sorry! I just a newbie for programming.

      posted in Cinema 4D SDK
      L
      Ling
    • RE: interactions between two or more plugins which are in a single Python file

      @c4ds Thanks! I had changed my solution. Thank you to reply me!

      posted in Cinema 4D SDK
      L
      Ling
    • RE: interactions between two or more plugins which are in a single Python file

      @c4ds I had got a try.
      I write codes:

      commandPlugin=c4d.plugins.FindPllugin(the plugin id, c4d.PLUGINTYPE_ANY)
      commandPlugin.Message(the integer)
       in GetCursorInfo() called back function of toolData.
      and, codes:
      if type== the integer:
         print(the integer)
      

      in Message() called back function of commandData.
      but the codes can't print "the integer" when I move the mouse with the toolData.
      actually, I change codes like that:
      print(the integer)
      in Message() called back function of commandData. .
      but I still can not receive a message.
      I want to change a value or execute a function in the commandData baesd on the mouse movement of toolData or a message from toolData

      posted in Cinema 4D SDK
      L
      Ling
    • interactions between two or more plugins which are in a single Python file

      how can I make interactions between two or more plugins which are created in a single Python file, including the commandData plugin and the toolData plugin. now, I want to send a message from a toolData plugin to two or more commandData plugins if the 'if' conditions is Ture. but, I don't want to use global values in Python. How can I realize that. Thank guys!

      posted in Cinema 4D SDK python
      L
      Ling
    • How to Highlight a Button

      @ferdinand and, do you know how to make a button hightight with a blue background like the attributes manager when selecting a panel?

      edit: Forked form Add a GUI Button (by @ferdinand)

      posted in Cinema 4D SDK python
      L
      Ling