Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I need to change my exr compression to one scanline at a time but beside using a c4d default document is there any other way to change it directly in a script?
Here you go: https://github.com/PluginCafe/cinema4d_py_sdk_extended/blob/762c9d505e0ed2f09dafdd8c6cef972a82d084e8/scripts/04_3d_concepts/rendering/render_settings_openexr_data_r20.py
The script change the compression method to zip not to Zips or what i expected: RLE because rle was the given value.
Oh yes, you are right. The SDK example doesn't work at all. Problem is, maxon.Id is wrong. maxon.InternedId would be the correct way for setting the save options. Here's the correct code:
maxon.Id
maxon.InternedId
""" Copyright: MAXON Computer GmbH Author: Maxime Adam Description: - Configures OpenEXR output render format with SetImageSettingsDictionary() then reads these with GetImageSettingsDictionary(). Class/method highlighted: - c4d.bitmaps.SetImageSettingsDictionary() - c4d.bitmaps.GetImageSettingsDictionary() Compatible: - Win / Mac - R20, R21, S22, R23 """ import c4d import maxon def main(): # Retrieves render data and its container renderData = doc.GetActiveRenderData() bc = renderData.GetDataInstance() # Gets image filters options saveOptions = bc.GetContainerInstance(c4d.RDATA_SAVEOPTIONS) # Sets OpenEXR output format bc[c4d.RDATA_FORMAT] = c4d.FILTER_EXR # Defines OpenEXR settings compressionmethodID = maxon.InternedId('net.maxon.mediasession.openexr.export.compressionmethod') halffloatID = maxon.InternedId('net.maxon.mediasession.openexr.export.halffloat') layernumberingID = maxon.InternedId('net.maxon.mediasession.openexr.export.layernumbering') # Configures OpenEXR format options with a maxon.DataDictionary exportSettings = maxon.DataDictionary() exportSettings.Set(compressionmethodID, maxon.Id("rle")) exportSettings.Set(halffloatID, True) exportSettings.Set(layernumberingID, True) # Stores settings in render data container c4d.bitmaps.SetImageSettingsDictionary(exportSettings, saveOptions, c4d.FILTER_EXR) # Pushes an update event to Cinema 4D c4d.EventAdd() # Retrieves OpenEXR images settings settings = c4d.bitmaps.GetImageSettingsDictionary(saveOptions, c4d.FILTER_EXR) # Reads and prints OpenEXR format options print("openexr.export.compressionmethod: " + str(settings.Get(compressionmethodID))) print("openexr.export.halffloat: " + str(settings.Get(halffloatID))) print("openexr.export.layernumbering: " + str(settings.Get(layernumberingID))) if __name__ == '__main__': main()
@m_adam maybe the code example in the repo should be updated.
<3<3<3<3
Thanks a lot for the update and yes maxon.InternedId should be used instead of maxon.Id. I will take care of updating the example in Github. Cheers, Maxime.