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
    • Recent
    • Tags
    • Users
    • Login

    Get the Output File Name from Render Data

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 373 Views 1 Watching
    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.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 11/01/2011 at 05:58, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :       PYTHON  ;

      ---------
      Hi,

      Is it possible to get the full output file name (including padding and extension) from a scene's render data? Currently I use the following code to get the output file name, but it only gives me the file name's prefix:

      scene = documents.GetActiveDocument()
      renderData = scene.GetActiveRenderData().GetData()
      outputFilename = renderData.GetFilename( 5041 ) # file name ID in render settings

      Also, if multi-pass is enabled, is it possible to get the multi-pass output file name as well?

      Thanks!
       - Ryan

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 11/01/2011 at 22:39, xxxxxxxx wrote:

        i don't think it is possible.
        you need to concatenate the name yourself from the different parts (path, filename, framenumber, extension)

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 13/01/2011 at 06:12, xxxxxxxx wrote:

          I have the path and filename parts. I just can't figure out how to get the padding size (we can swap it out for the frame # ourselves), and the extension.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 13/01/2011 at 10:54, xxxxxxxx wrote:

            Since RenderData is basically a Container where you are able to extrude values by their ID...

            You will get the extension by interpreting RDATA_FORMAT (LONG); there are constants like FILTER_TIF, FILTER_TGA, FILTER_BMP, FILTER_JPG for this value that (mostly) make pretty obvious what value will generate which suffix. (Don't know whether the constants exist in Python... this is from C++)

            The padding is always 3 or 4 digits, depending on the name format. The ID under which the name format is stored is RDATA_NAMEFORMAT (LONG) with the following constants:
            RDATA_NAMEFORMAT_0 -> Name0000.TIF
            RDATA_NAMEFORMAT_1 -> Name0000
            RDATA_NAMEFORMAT_2 -> Name.0000
            RDATA_NAMEFORMAT_3 -> Name000.TIF
            RDATA_NAMEFORMAT_4 -> Name000
            RDATA_NAMEFORMAT_5 -> Name.000
            RDATA_NAMEFORMAT_6 -> Name.0000.TIF

            If Python doesn't have these constants, you can still look up the numeric values in the C++ API.

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