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. joel-wong-aws
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Joel Wong

    @joel-wong-aws

    0
    Reputation
    2
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website aws.amazon.com/deadline-cloud/

    joel-wong-aws Unfollow Follow

    Latest posts made by joel-wong-aws

    • RE: Cinema 4D Python on Windows Long Path Errors

      Hi Ferdinand,

      Thank you for your help!

      I've briefly tried out the solution you have proposed. I already have the registry key set. I've spent a day trying to get our scripts to work with UNC, but unfortunately haven't been able to complete a successful end to end render. Redshift is also important to us, so long path support there would be valuable in our flows as well.

      For context, I am from the AWS Deadline Cloud team and we have written an integration to allow users to run Cinema 4D renders (including Redshift workloads) on our product. The current integration code is publicly available here.

      One of the reasons that we encounter long path issues so often is that our assets are stored in a directory like C:\ProgramData\Amazon\OpenJD\session-d04e4000a1754907bcb75289655c2a8ff_32sm7o\assetroot-7a6a0443639bf42cdffb\.
      We intentionally chose this path to make the organization of assets clearer between different render jobs. However, it can prepend up to ~100 characters to the file path, depending on the user's path mapping.

      While we are also working within AWS Deadline Cloud to allow the asset directory to be configurable (and potentially shortened), the work isn't trivial and so simply having long paths supported on Cinema 4D Python (and Redshift!) would simplify things a lot for us and our customers.

      Unfortunately, I haven't been able to get Cinema 4D working with UNC long paths in our scripts after a day of debugging. Adding UNC everywhere doesn't just make it more complicated for us, but also for any contributors that wish to make changes to the adaptor.

      So in short: we don't know of any scenarios where long path support in Cinema 4D Python is absolutely necessary, but it would save us and our users a lot of time and headache. We have projects that exceed the default path limit and would benefit from long path support in Cinema 4D Python and Redshift.

      Thanks,
      Joel

      posted in Cinema 4D SDK
      J
      joel-wong-aws
    • Cinema 4D Python on Windows Long Path Errors

      Hi!

      We are having trouble handling files with long paths on Windows in Cinema 4D Python. When a full file path exceeds 260 characters, Cinema 4D Python cannot read or write the file. We've encountered this issue with both Cinema 4D Redshift and non-Redshift job.

      The easiest way to reproduce this is to open Windows -> Console -> Python in Cinema 4D on Windows and run the following command:

      import os
      from pathlib import Path
      p = Path(r"C:\ProgramData" + r"\test1234567890" * 26)
      os.makedirs(p)
      

      The output we get from this is:

      Traceback (most recent call last):
        File "console", line 1, in <module>
        File "<frozen os>", line 215, in makedirs
        File "<frozen os>", line 215, in makedirs
        File "<frozen os>", line 215, in makedirs
        [Previous line repeated 7 more times]
        File "<frozen os>", line 225, in makedirs
      FileNotFoundError: [WinError 206] The filename or extension is too long: 'C:\\ProgramData\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890'
      

      Similarly, if we try to read an existing file that has a long path:

       p = Path(r"C:\ProgramData" + r"\test1234567890" * 26 + r"\test.txt")
       p.open("r")  # same result with p.open("w")
      

      We get an error:

      Traceback (most recent call last):
        File "console", line 1, in <module>
        File "C:\Program Files\Maxon Cinema 4D 2025\resource\modules\python\libs\win64\lib\pathlib.py", line 1044, in open
          return io.open(self, mode, buffering, encoding, errors, newline)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      FileNotFoundError: [Errno 2] No such file or directory: 'C:\\ProgramData\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test1234567890\\test.txt'
      

      When I run either of these commands in an external Python interpreter (e.g. from https://www.python.org/) on my workstation, I don't get an an error and the directories are created and files are read/written.

      Cinema 4D Versions: Tested on 2025.1.2 and 2024.5.1
      Windows Version: Windows 11 Enterprise 24H2
      Redshift Version: 2025.2.2

      posted in Cinema 4D SDK windows python 2025 2024
      J
      joel-wong-aws