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. treezw
    • Profile
    • Following 3
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    treezw

    @treezw

    0
    Reputation
    5
    Profile views
    5
    Posts
    0
    Followers
    3
    Following
    Joined Last Online

    treezw Unfollow Follow

    Latest posts made by treezw

    • RE: How do I sort the plug-in menu?

      @ferdinand Thank you very much for your help, I have solved the problem!😄

      posted in Cinema 4D SDK
      treezwT
      treezw
    • RE: How do I sort the plug-in menu?

      @ferdinand I don't quite understand what you mean, because the plugin I took the screenshot of is also in the "Extensions" menu, but it has "Group Separator".111111111.png

      posted in Cinema 4D SDK
      treezwT
      treezw
    • RE: How do I sort the plug-in menu?

      @ferdinand I'm very sorry, but I was wondering how the separator on the screenshot is implemented? Yes, my question is in the "Extensions" menu

      posted in Cinema 4D SDK
      treezwT
      treezw
    • How do I sort the plug-in menu?

      I registered several plugins in a .pyp file, but when I opened Cinema4D and opened the plugins menu, I found that his sorting is very bad, I want to know how to sort according to my requirements, and I want to add delimiters between the plugins, but I don't know how to do it

      1、This is an example of a plug-in menu separator:
      Snipaste_2024-09-04_23-29-59.png ,Snipaste_2024-09-04_23-09-09.png
      2、This is an example of the plugin I registered:

      import c4d, random, os, webbrowser
      from c4d import documents, gui, BaseContainer, storage as s, gui as g, utils as u, bitmaps
      from typing import Optional
      from c4d.gui import GeDialog
      
      
      #  START ----------------------------- Plugins_ID ------------------------------------------------------------------------------------------------------------------------
      Rig_Start_Plugins_ID = 9863771
      Animation_Camera_Plugins_ID = 9863772
      Add_Switch_Plugins_ID = 9863773
      
      About_tree_Plugins_ID = 9863787
      #  END ----------------------------- Plugins_ID ------------------------------------------------------------------------------------------------------------------------
      
      #  START ----------------------------- 绑定开始 ------------------------------------------------------------------------------------------------------------------------
      class Rig_Start(c4d.plugins.CommandData):
          def Execute(self, doc):
      
              pass
      
              return True
      
      if __name__ == "__main__":
          scriptPath = os.path.split(__file__)[0]
      
          bmp_Rig_Start = bitmaps.BaseBitmap()
          iconPath_Rig_Start = os.path.join(scriptPath, "res", "Rig_Start.tif")
          bmp_Rig_Start.InitWith(iconPath_Rig_Start)
          
          c4d.plugins.RegisterCommandPlugin(
              id=Rig_Start_Plugins_ID,
              str="绑定开始",
              info=0,
              icon=bmp_Rig_Start,
              help="创建绑定初始层组",
              dat=Rig_Start(),
      
          )
      #  END ----------------------------- 绑定开始 ------------------------------------------------------------------------------------------------------------------------
      
      
      #  START ----------------------------- Animation_Camera ------------------------------------------------------------------------------------------------------------------------
      class Animation_Camera(c4d.plugins.CommandData):
          def Execute(self, doc):
      
              pass
      
              return True
      
      if __name__ == "__main__":
          scriptPath = os.path.split(__file__)[0]
      
          bmp_Animation_Camera = bitmaps.BaseBitmap()
          iconPath_Animation_Camera = os.path.join(scriptPath, "res", "Animation_Camera.tif")
          bmp_Animation_Camera.InitWith(iconPath_Animation_Camera)
          
          c4d.plugins.RegisterCommandPlugin(
              id=Animation_Camera_Plugins_ID,
              str="CameraAnimation",
              info=0,
              icon=bmp_Animation_Camera,
              help="创建动画摄像机层组",
              dat=Animation_Camera(),
      
          )
      #  END ----------------------------- Animation_Camera ------------------------------------------------------------------------------------------------------------------------
      
      
      #  START ----------------------------- 添加开关 ------------------------------------------------------------------------------------------------------------------------
      class Add_Switch(c4d.plugins.CommandData):
          def Execute(self, doc):
      
              pass
      
              return True
      
      if __name__ == "__main__":
          # 获取脚本所在目录
          scriptPath = os.path.split(__file__)[0]
      
          bmp_Add_Switch = bitmaps.BaseBitmap()
          iconPath_Add_Switch = os.path.join(scriptPath, "res", "Add_Switch.tif")
          bmp_Add_Switch.InitWith(iconPath_Add_Switch)
          
          c4d.plugins.RegisterCommandPlugin(
              id=Add_Switch_Plugins_ID,
              str="添加开关",
              info=0,
              icon=bmp_Add_Switch,
              help="选中层,点击添加开关!",
              dat=Add_Switch(),
      
          )
      #  END ----------------------------- 添加开关 ------------------------------------------------------------------------------------------------------------------------
      
      #  START ----------------------------- 关于... ------------------------------------------------------------------------------------------------------------------------
      class About_tree(c4d.plugins.CommandData):
          def Execute(self, doc):
      
              pass
      
              return True
          
      
      if __name__ == "__main__":
          # 获取脚本所在目录
          scriptPath = os.path.split(__file__)[0]
      
          bmp_about_tree = bitmaps.BaseBitmap()
          iconPath_about_tree = os.path.join(scriptPath, "res", "about_tree.tif")
          bmp_about_tree.InitWith(iconPath_about_tree)
          
          c4d.plugins.RegisterCommandPlugin(
              id=About_tree_Plugins_ID,
              str="关于...",
              info=0,
              icon=bmp_about_tree,
              help="使用教程及后续更新...",
              dat=About_tree(),
      
          )
      #  END ----------------------------- 关于... ------------------------------------------------------------------------------------------------------------------------
      
      posted in Cinema 4D SDK python
      treezwT
      treezw
    • How to modify python tags as generators first?
      import c4d
      
      def main():
          
          cloner = c4d.BaseObject(c4d.Omgcloner)
          python = c4d.BaseTag(c4d.Tpython)
      
          cloner.InsertTag(python)
          doc.InsertObject(cloner)
      
          c4d.EventAdd()
      
      if __name__ == '__main__':
          main()
      

      python.png

      posted in Cinema 4D SDK programming
      treezwT
      treezw