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. César Vonc
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 16
    • Best 3
    • Controversial 0
    • Groups 0

    César Vonc

    @César Vonc

    3
    Reputation
    147
    Profile views
    16
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website code.vonc.fr Location France

    César Vonc Unfollow Follow

    Best posts made by César Vonc

    • Preset option with shortcut or custom layout in CommandData plugin

      Hello,

      I have a CommandData Python plugin that contains different options.

      When I assign a shortcut to my CommandData, or add it to a custom layout, it opens with the default options.

      Is is possible to define different shortcuts or custom layout icons that pass parameters to my CommandData plugin and then preset different options ?

      For example, imagine a shortcut that execute the Optimize command with the Unused Points checked, and an other one unchecked.
      Is it possible ?

      Thanks,

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: RenderDocument flags and return values?

      Just for the info, calling the command to open the PictureViewer and RenderDocument with both c4d.RENDERFLAGS_CREATE_PICTUREVIEWER and c4d.RENDERFLAGS_OPEN_PICTUREVIEWER works just fine for me :

      c4d.CallCommand(430000700)  # Picture Viewer
      
      c4d.documents.RenderDocument(doc, rdData, bmp, c4d.RENDERFLAGS_EXTERNAL | c4d.RENDERFLAGS_CREATE_PICTUREVIEWER  | c4d.RENDERFLAGS_OPEN_PICTUREVIEWER)
      
      posted in Bugs
      César VoncC
      César Vonc
    • RE: Plugins limitation count

      @lev said in Plugins limitation count:

      Hi guys, can u please solve the limitation of loading maximum 50 python plugins ? I dont understand whats the point of it and quite a bit annoying... A plugin pack basically kills every other plugins.... Thanks in advance

      I can only agree.

      Some times for one plugin you need to register multiple ObjectData or TagData, so it increase quickly...

      posted in Cinema 4D SDK
      César VoncC
      César Vonc

    Latest posts made by César Vonc

    • Copy to the OS clipboard

      Hello,

      I would like to create a gateway between C4D and a Web application by using the clipboard.

      But in C4D, when I copy a mesh to the clipboard, it don't seems to be into the OS clipboard system (I don't see any data using a clipboard inspector like InsideClipboard). Can you confirm ?

      posted in Cinema 4D SDK windows macos
      César VoncC
      César Vonc
    • RE: Plugins limitation count

      @lev said in Plugins limitation count:

      Hi guys, can u please solve the limitation of loading maximum 50 python plugins ? I dont understand whats the point of it and quite a bit annoying... A plugin pack basically kills every other plugins.... Thanks in advance

      I can only agree.

      Some times for one plugin you need to register multiple ObjectData or TagData, so it increase quickly...

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: RenderDocument flags and return values?

      Just for the info, calling the command to open the PictureViewer and RenderDocument with both c4d.RENDERFLAGS_CREATE_PICTUREVIEWER and c4d.RENDERFLAGS_OPEN_PICTUREVIEWER works just fine for me :

      c4d.CallCommand(430000700)  # Picture Viewer
      
      c4d.documents.RenderDocument(doc, rdData, bmp, c4d.RENDERFLAGS_EXTERNAL | c4d.RENDERFLAGS_CREATE_PICTUREVIEWER  | c4d.RENDERFLAGS_OPEN_PICTUREVIEWER)
      
      posted in Bugs
      César VoncC
      César Vonc
    • RE: Plugins limitation count

      Hello, it's indeed about Python plugins on S24 and R25 and OSX, and I guess other C4D version and OS.

      It's a shame that it is limited to 50 ObjectData, 50 TagData, etc.., the common user will not check the console window and will think it's a bug from the plugin.

      I hope it wil change one day. 🙂

      Thanks for your answer

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • Plugins limitation count

      Hello,

      I have a customer that can't install a plugin, I check his console and I see the message :

      OSError : cannot handle more than 50 object plugins.

      As it's tagged with "OSError", I guess it depends of the OS, what can we do to increase this limitation ?

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: Preset option with shortcut or custom layout in CommandData plugin

      Thank you very much ! 🙂

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • Preset option with shortcut or custom layout in CommandData plugin

      Hello,

      I have a CommandData Python plugin that contains different options.

      When I assign a shortcut to my CommandData, or add it to a custom layout, it opens with the default options.

      Is is possible to define different shortcuts or custom layout icons that pass parameters to my CommandData plugin and then preset different options ?

      For example, imagine a shortcut that execute the Optimize command with the Unused Points checked, and an other one unchecked.
      Is it possible ?

      Thanks,

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: Send Message to CommandData

      Aah ok, I misunderstood indeed. Thanks a lot for your complete answer. 🙂
      I take a look on all of this.

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: Send Message to CommandData

      Mm, it did not work for me, the message was still not triggered even with a message ID higher than ID_TREEVIEW_FIRST_NEW_ID.

      I managed in a different way with PluginMessage and c4d.GePluginMessage

      But contrarely to what say doc, it's not the easiest way if you want to pass some data lol, the data received from PluginMessage is not an object but a PyCapsule object.

      Here is how I retreived the original data object, it's not very elegant but it works :

      import ctypes
      import _ctypes
      
      def getObjectFromCapsule(capsule):
          ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
          ctypes.pythonapi.PyCapsule_GetPointer.argtypes = [ctypes.py_object, ctypes.c_char_p]
          pointer = ctypes.pythonapi.PyCapsule_GetPointer(capsule, None)
          return _ctypes.PyObj_FromPtr(pointer)
      
      def PluginMessage(id, data):
          if id == MY_UNIQUE_ID :
              o = getObjectFromCapsule(data)
              o['foo'] = 'bar'
              return True
          return False
      
      

      And then in my other plugin :

      o = {}
      print(c4d.GePluginMessage(MY_UNIQUE_ID, o)) # {'foo': 'bar'}
      
      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • Send Message to CommandData

      Hello,

      I try to send a message to a CommandData plugin like this :

      class MyPlugin(plugins.CommandData):
      
          def Message(self, type, data):
              print("test", type, data)
              return True
      
      if __name__ == "__main__" :
      
          plugins.RegisterCommandPlugin(id=1057321,
                                        str="test",
                                        info=0,
                                        help="",
                                        dat=MyPlugin(),
                                        icon=None
          )
      

      And then send the message like this in the console :

      c4d.plugins.FindPlugin(1057321).Message(123)
      

      It returns True but nothing print. Do you know why ?

      posted in Cinema 4D SDK
      César VoncC
      César Vonc