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

    Assign Render Path

    Cinema 4D SDK
    2
    4
    477
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wanderingstan
      last edited by

      Has something changed in the last few years? I get an error running this.

      >>> renderData[c4d.RDATA_PATH] = r"MyPicturePath.exr"
      TypeError: GeListNode_ass_subscript expected Description identifier, not str
      The above exception was the direct cause of the following exception:
      SystemError: _PyEval_EvalFrameDefault returned a result with an error set
      

      c4d.RDATA_PATH evaluates to a string, but its looking for the type Description identifier

      1 Reply Last reply Reply Quote 0
      • W
        wanderingstan
        last edited by wanderingstan

        Now in 2022 I'm getting an error using SetFilename(). It expects an int where c4d.RDATA_PATH evaluates to the string 'from_code_filename'. I'm new to C4D..has the c4d constants been changed from ints to strings?

        Example:

        >>> doc.GetActiveRenderData().GetData().SetFilename(c4d.RDATA_PATH, str("my_filename"))
        Traceback (most recent call last):
          File "console", line 1, in <module>
        TypeError: an integer is required (got type str)
        
        1 Reply Last reply Reply Quote 0
        • M
          m_adam
          last edited by m_adam

          Hi @wanderingstan first of all welcome in hte plugin cafe community. Please create your own topic, it's easier for us to track it. moreover you don't need to post on different topic the same subject. We usually answers within a day. Finally please read our support guideline.

          Regarding your question here it work as expected when I run the next code in the Python Console.
          doc.GetActiveRenderData().GetDataInstance().SetFilename(c4d.RDATA_PATH, r"test")

          One crucial information to share when you give us code sample is the context (the python console, a plugin ,the script manager, etc...) In your case at least the second one I expect it to run from the Python Console, so it should be fine.

          Regarding your issue I would say please try to restart Cinema 4D, while you tested you may have corrupted the c4d python module by writing something like c4d.RDATA_PATH = "my filename".

          Side note, we will be away the 26th and 27th December, so don't be surprise by the delay if you have follow-up questions, for more information see No support on 26/12 and 27/12.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by

            Hello @wanderingstan,

            without further questions or postings, we will consider this topic as solved by Friday 02/06/2023 and flag it accordingly.

            Thank you for your understanding,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            1 Reply Last reply Reply Quote 0
            • First post
              Last post