Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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. blkmsk
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 14
    • Groups 0

    blkmsk

    @blkmsk

    1
    Reputation
    5
    Profile views
    14
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    blkmsk Unfollow Follow

    Best posts made by blkmsk

    • RE: How to add Strengths of each Pose I set in Pose Morph as Ports into Xpresso?

      Hi @bentraje I just came across this thread and quickly tested the above script in 2024. It still works as expected.
      Without any further knowledge I would assume that A) you dont have a xpresso tag on your object or B) its not the the second tag on your object.

      image.png

      posted in Cinema 4D SDK
      B
      blkmsk

    Latest posts made by blkmsk

    • RE: Several Asset Browser Issues

      Hi @ferdinand

      Thank you for the reply and I totally understand your point.
      I think I will try to find another solution and will adjust my rigs to maybe get rid of the python tag thats causing the issue.
      I wasn't aware that this is considered "dark magic" python code^^ haha

      Thank you once again for your efforts!

      Cheers,
      Ben

      posted in Cinema 4D SDK
      B
      blkmsk
    • RE: Several Asset Browser Issues

      Hi @ferdinand

      Here is another try to create a reproduceable example regarding the issue to pull a asset from the asset browser via python in version 2026 that has been imported to the asset browser as a ZIP archive.

      The reason I'm using a zip archive is that this is the way I have been providing certain rigs and assets together with some setup scripts to my users for quite a while now and this has been working fine since version 2023.

      For this example I'm using C4D 2025.2.1 / 2026.0.0 I'm creating a asset based on the 'shorty toon rig' from the asset browser and again using the python example script to load a asset from github

      Here is a capture of the process.

      Loading the toon rig asset via python works fine in both versions.

      • I'm only using the master controller with the python 'reset userdata' tag and creating two asset from it within a test category stored in the 'preferences' database: One with the python tag and one without
      • I select both assets in the asset browser -> right click -> export lastest version
      • for the export I'm using version 2025.2.1 as this is the last version where this was possible for me
      • After importing the ZIP file via 'create' -> 'Import Assets' in 2025.2.1 loading both assets via python works fine
      • After importing the ZIP file via 'create' -> 'Import Assets' in 2026.0.0 only the asset without the python tag loads fine via python
      • When I try to load the asset with the python tag C4D stops working

      And just so you know what I actually want to do, here is a capture of my import character script that gives the user the option to pull two rig assets from the asset browser and automatically apply it to a character. For now I will simply 'exclude' those options again for version 2026 as pulling the rigs manually from the asset browser and running the setup scripts still works fine.

      Thanks again for your time and efforts!

      Cheers,
      Ben

      posted in Cinema 4D SDK
      B
      blkmsk
    • RE: Several Asset Browser Issues

      Hi Ferdinand,

      Thanks for your reply and consolidating my post. And sorry for violating the support procedures! I will keep that in mind for future postings!

      @ferdinand said in Several Asset Browser Issues:

      That would be an end user bug because there is no code invloved, please report it via the support-center. Without an exact version the file and line number is not too much worth as our source code of changes drastically, even for minor version increments. But this is a call deep inside an internal system. I think it tries to resolve IDs in your zip there. Which could hint at your zip database being somehow malformed. But you have to discuss this with end user support.

      I dont think that is an 'end user bug' as I'm experience this on multiple machines since version 2025.3.1 and I already reported this as a bug on 13.07.2025 to the maxon support (Bug ID: 604301). here is a quote from the maxon support reply to this:

      "I was able to reconstruct the same error here and did not found a report of this problem.
      As this looks like a bug to me, I forwarded the topic to our development for further investigation and fixing. I hope our developer will be able to fix the behaviour soon
      ."

      So I was just asking here if there is any information when this could be fixed.

      @ferdinand said in Several Asset Browser Issues:

      This is all a bit hazy for me, better reproductions steps in accordance with our support guidelines would help here a lot. I watched your first video, and you seem to load some complex right, and then run a Script Manager script, and then Cinema 4D freezes. But you seem to have also other Python code in your scene. This is pretty much all a black box for me and therefore very hard to answer.

      When you have problems with that zip database of yours, I would first make sure that this is not the same issue, i.e., make sure that whatever assets you try to load, are sourced from a non-tainted database. Ideally the built-in database.
      Event notifications are private for a reason and can easily be the cause for crashes. I think you used the toon rig in your videos and it unfortunately uses event notifications in its Python code. So, I guess you got it from there. But when you changed something about the toon rig or its code, this could lead to freezes. NOTIFY_EVENT_MESSAGE is however one of the more harmless event notifications and it is somehwhat unlikely that it is the cause.
      My recommendation would be to first sort out if your database is not somehow malformed. If that does not help, please show us your code and scene files, without them, we cannot help you. Please put some time into boiling down your issue. There are so many moving parts here such as your zip database, and that ultra complex toon rig. Ideally you show us something that fails with out builtin database in a simple scene.

      I will prepare a reproduceable example with the builtin database and get back to you as soon as possible.

      Thanks again for your time and effort and sorry again for my messy posts!
      Ben

      posted in Cinema 4D SDK
      B
      blkmsk
    • Several Asset Browser Issues

      Hi there^^
      I have two asset browser issues right now:

      The first is that I'm unable to export the latest version of one or more assets as a ZIP file through the asset browser since version 2025.3.1. The export seems to work fine but when I try to re-import the ZIP file via 'Create' -> 'Import Asset' in the asset browser I get a error message:

      "Error importing assets:

      fileformat[asset.impl.cpp(4541)]"

      Here is a recent video showing the issue in version 2026.0.0 and 2025.3.3

      I already posted about it here and reported it as a bug back then.
      As the issue still persists in version 2026 is there any idea when this will be fixed?
      For now I can still export my assets and provide them to the users with version 2025.2.1
      but I would rather not have to do this in a 'legacy' version.

      And this brings me to my second issue:

      Within one of my scripts I pull some of the above described assets from the asset browser based on the method described in one of the example scripts here.

      The original assets are already a couple of years old and I think the asset id's were created in version 2023 but since then this method has been working fine.
      Now in version 2026 when I try to pull those assets from the asset browser with the script, cinema 4D is freezing and stops responding.

      So I tried creating a new asset with a new asset id in version 2026. With this new asset the script is working in version 2026 but using it in previous version now again freezes Cinema 4D.

      Here is a short video showing the issue in version 2026 and 2025.3.3
      Is there any idea how I could solve this issue?

      Thank you in advance for your time and your efforts!
      best,

      Ben


      edit @ferdinand: Consolidated postings.


      Ok here is a short follow up:

      After removing all objects from this rig except for the master control I managed to boil the problem down to a python tag on the master control to reset certain userdata fields.
      When I also remove the tag and save a new asset version I can load the asset via python in both C4D 2025.3.3 and 2026. When the tag is there, C4D 2026 is freezing when I try to load it via python (or the other way arround, when the new asset version was saved in 2026).

      It also works fine in both versions when its just a 'blank' python tag.

      The code of the tag is based on the 'reset userdata' python tag of the 'sporty toon rig' rigging example scene from the C4D asset browser.

      Loading the sporty toon rig asset via python works fine in both versions, but when I copy the code from the sporty rig into the python tag on my rig or simply copy the whole master control with the python tag from the sporty rig into my rig and save it as a new asset C4D is freezing as well.

      Here is a short capture again


      Ok I think this piece of code is causing the issue but I dont know why.

      import c4d
      
      def message(msg_type, data):
          if msg_type == c4d.MSG_NOTIFY_EVENT:
              event_data = data['event_data']
              if event_data['msg_id'] == c4d.MSG_DESCRIPTION_COMMAND:
      
                  print("test")
      
      def main():
          bc = c4d.BaseContainer()
          obj = op.GetObject()
          if not obj.FindEventNotification(doc, op, c4d.NOTIFY_EVENT_MESSAGE):
              obj.AddEventNotification(op, c4d.NOTIFY_EVENT_MESSAGE, 0, bc)
      

      Without those lines loading the asset via python works fine in both versions.
      But of course, this way the python tag does not work.
      Disabling the python tag also doesnt help.

      posted in Cinema 4D SDK 2026 2025 python
      B
      blkmsk
    • RE: Correct OCIO Color Value Conversion via Python?

      Hey Ferdinand,

      Thank you for the quick response! Ah ok I see. Thank you for the provided information, I will have a look at it.
      But I can also wait for the moment.

      My work arround for now would be to simply set everything up / import the parameters and colors with color management set to 'Basic' and manually doing the conversion via 'Convert to OCIO' in the Project settings. Thats giving me the correct result.

      But thanks again!

      Cheers,
      Ben

      posted in Cinema 4D SDK
      B
      blkmsk
    • Correct OCIO Color Value Conversion via Python?

      Hello^^
      I want to import certain parameters from a JSON file with python. The loading of the file and parameter import works fine so far, the only thing I'm not sure about is how to correctly convert the color values.

      Here is a short script to demonstrate what I'm doing right now.
      This will just set a userdata parameter with the name 'Color' on a selected null object to the value [255.0, 94.3499984741211, 76.5]

      import c4d
      
      def convert_rgb_to_color(rgb_list):
             
              if len(rgb_list) != 3:
                  raise ValueError("RGB list must contain exactly 3 values.")
              
              r, g, b = rgb_list
      
              # Normalize 8-bit (0-255) to the range 0.0-1.0
              r_normal = r / 255.0
              g_normal = g / 255.0
              b_normal = b / 255.0
          
              return c4d.Vector(r_normal, g_normal, b_normal)
      
      def main():
          # Get the active object 
          obj = doc.GetActiveObject()
          
          # Check if an object is selected
          if obj is None:
              print("No object selected.")
              return
      
          # Define the color value
          color = [255.0, 94.3499984741211, 76.5]
          
          # Convert the color value
          color_vector = convert_rgb_to_color(color)
          
          # Check if the object has user data
          if not obj.GetUserDataContainer():
              print("The selected object has no user data.")
              return
      
          # Iterate over the user data on the object
          for userdata_id, bc in obj.GetUserDataContainer():
              
              if bc[c4d.DESC_NAME] == "Color":
                  # Set the user data value to the color vector
                  obj[userdata_id] = color_vector
                  c4d.EventAdd()  
                  print("'Color' parameter has been set to:", color_vector)
                  return
      
      # Execute the script
      if __name__ == '__main__':
          main()
      

      When the project color management is set to Basic the value gets set to [255,94,77] as expected.
      But when the color management is set to OpenColorIO the value gets set to:
      sRGB[255,146,143] / RAW[255,94,77].

      How could I set the sRGB value to the desired value rather than the RAW value when color Management is OpenColorIO? Like this:
      sRGB[255,94,77] / RAW[167,45,25].

      I'm Thankfull for any hints on the topic!

      Cheers and best regards
      Ben

      posted in Cinema 4D SDK windows python 2024
      B
      blkmsk
    • RE: Issue - Loading Spline Object with Python Tag from Asset Browser via Python Script

      Awesome, Thank you so much @m_adam !

      Cheers and best regards
      Ben

      posted in Bugs
      B
      blkmsk
    • RE: Issue - Loading Spline Object with Python Tag from Asset Browser via Python Script

      Hi I just wanted to follow up and ask if this will be fixed any time soon?
      Its not super urgent but this bug is putting a project of mine on hold where I want to pull a rig (with several python tags on spline control objects) from the asset browser with a script. For the moment its not a problem to do it manually though but I would love to automate this.

      Cheers Ben

      posted in Bugs
      B
      blkmsk
    • RE: How to add Strengths of each Pose I set in Pose Morph as Ports into Xpresso?

      Hi @bentraje I just came across this thread and quickly tested the above script in 2024. It still works as expected.
      Without any further knowledge I would assume that A) you dont have a xpresso tag on your object or B) its not the the second tag on your object.

      image.png

      posted in Cinema 4D SDK
      B
      blkmsk
    • Issue - Loading Spline Object with Python Tag from Asset Browser via Python Script

      Hello^^
      I am experiencing a weird, but very specific behaviour in c4d 2024:
      When I try to load a Spline Object with a Python Tag attached to it from the Asset Browser via a python script, Cinema 4D 2024 gets stuck. But this happens only with Spline Object and only in 2024. I tried it with a Null Object as well with a Polygon Object and those are loading fine.

      In Cinema 4D 2023 there is no issue. all three Objects (Spline, Null and Polygon) get loaded with the script and manually loading the Asset by double clicking it in the Asset Browser is also no problem in both versions. Could this be simply a bug?

      Here is a small video to show you the behaviour in both R 2023 and R 2024.
      The script I used is a striped down version from one of the example scripts on github.

      Thank you in advance for your time!

      posted in Bugs 2024 2023 python
      B
      blkmsk