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

    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
    • RE: Falloff on Python deformer

      Amazing ! Thanks !

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • Falloff on Python deformer

      Hello,

      The question was posted some years ago but I would like to know if with all the last updates there is now a possibility to add a falloff tab on a Python deformer plugin like in C++ ?

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: C++ new plugin with Project tool fail

      Thanks,

      The informations a bit dispatched and I don't find the doc very clear, for example, there is no link to download Project Tool on the Project Tool page, and globally not enough examples in the sdk.

      Sorry but the more clear doc to build and update faster our plugins is the tutorial made by a member here, because all the infos are on the same page : https://developers.maxon.net/forum/topic/10967/compiling-the-cinema-4d-r20-c-sdk-examples

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: C++ new plugin with Project tool fail

      Thanks for the info.

      By the way, how can we disable the "Style guide" errors ?

      For example, all my { after "if" generate an error "Style guide requires a new line for the substatement of if.".

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • RE: C++ new plugin with Project tool fail

      Thanks for your help,

      Before all these steps I extracted the sdk.zip into the Cinema 4D R20 folder.

      What do you mean by "run the project tool on that "sdk"-folder" ?
      I executed the command : kernel_app_64bit.exe g_updateproject="C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins"
      where "plugins" folder is from the sdk.zip.

      I removed my plugin, to try to build the sdk, but when I open the plugins/project/plugins.sln, I got the exact same error about the file not found :

      C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins\microsdk\project\microsdk.vcxproj : error : Le projet importé "C:\Program Files\MAXON\Cinema 4D R20 Demo\frameworks\core.framework\project\core.framework.includes.props" est introuvable. Vérifiez que le chemin dans la déclaration <Import> est correct et que le fichier existe sur le disque. C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins\microsdk\project\microsdk.vcxproj

      Edit : My bad, I just needed to execute the tool to the frameworks too :
      kernel_app_64bit.exe g_updateproject="C:\Program Files\MAXON\Cinema 4D R20 Demo\frameworks"

      I understand now what you mean.

      It works now.

      posted in Cinema 4D SDK
      César VoncC
      César Vonc
    • C++ new plugin with Project tool fail

      Hello,

      I tried to make a new plugin with the Project tool, but I got an error when I exec the vcxproj file generated. Here is my steps :

      • I created my plugin folder with res and source into the R20/plugins folder.
      • I copied the cinema4dsdk/project folder into my plugin folder and changed the custom ID by a new one registered : ModuleId=1050015
      • I added my plugin into plugins\projects\projectdefinition.txt
      • I exec the command : kernel_app_64bit.exe g_updateproject="C:\Program Files\MAXON\Cinema 4D R20 Demo\plugins", it said it's ok, the files was generated.
      • I exec the vcsproj generated into my plugin and I got a Visual Studio Express error saying that C:\Program Files\MAXON\Cinema 4D R20 Demo\frameworks\cinema.framework.includes.props is not found.

      I find the documentation to start a new C++ project very messy, and I lost 10 min to understand that the old forum was down and to find the new one, because there is no link nowhere to it on the "How to get Plugin IDs" page. : /

      posted in Cinema 4D SDK c++ r20 project tool
      César VoncC
      César Vonc