From d35a42d3e6de9666380db5ddc2b6ede60438beac Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 16 Aug 2009 22:53:15 +0000 Subject: 2.5: Render Api * Add RenderResult.load_from_file to load whole multilayer exr's at once. * Removed x/y offset from RenderLayer.load_from_file, better to encourage using offset in begin_result() to minimize memory usage. * Added WITH_OPENEXR in some screen/file/image module for scons/make, exr was not working in some places there. --- source/blender/makesrna/intern/rna_render.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source/blender/makesrna') diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index eaea62d36ae..a219bd5aefa 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -273,10 +273,17 @@ static void rna_def_render_result(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; + FunctionRNA *func; srna= RNA_def_struct(brna, "RenderResult", NULL); RNA_def_struct_ui_text(srna, "Render Result", "Result of rendering, including all layers and passes."); + func= RNA_def_function(srna, "load_from_file", "RE_result_load_from_file"); + RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file."); + RNA_def_function_flag(func, FUNC_USE_REPORTS); + prop= RNA_def_string(func, "filename", "", 0, "Filename", "Filename to load into this render tile, must be no smaller then the render result"); + RNA_def_property_flag(prop, PROP_REQUIRED); + RNA_define_verify_sdna(0); prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE); @@ -303,15 +310,11 @@ static void rna_def_render_layer(BlenderRNA *brna) srna= RNA_def_struct(brna, "RenderLayer", NULL); RNA_def_struct_ui_text(srna, "Render Layer", ""); - func= RNA_def_function(srna, "rect_from_file", "RE_layer_rect_from_file"); + func= RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file"); RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file."); RNA_def_function_flag(func, FUNC_USE_REPORTS); prop= RNA_def_string(func, "filename", "", 0, "Filename", "Filename to load into this render tile, must be no smaller then the renderlayer"); RNA_def_property_flag(prop, PROP_REQUIRED); - prop= RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X", "Offset the position to copy from if the image is larger then the render layer", 0, INT_MAX); - RNA_def_property_flag(prop, PROP_REQUIRED); - prop= RNA_def_int(func, "y", 0, 0, INT_MAX, "Offset Y", "Offset the position to copy from if the image is larger then the render layer", 0, INT_MAX); - RNA_def_property_flag(prop, PROP_REQUIRED); RNA_define_verify_sdna(0); -- cgit v1.2.3