2.5 - Restored access to the Image-Type setting
authorJoshua Leung <aligorith@gmail.com>
Fri, 1 May 2009 11:57:14 +0000 (11:57 +0000)
committerJoshua Leung <aligorith@gmail.com>
Fri, 1 May 2009 11:57:14 +0000 (11:57 +0000)
This has been wrapped under Scene.RenderData, and can currently be accessed under the 'Image' panel in the Scene settings.

As in the old code, image types are only included if they are enabled when compiling. Also note that image-type specific settings have not been wrapped yet.

release/ui/buttons_scene.py
source/blender/makesrna/intern/rna_scene.c

index fa9969870433e4b2b8b2b4063487677cd31eea04..b03f288da4cc7f4687ba6dddf1141b2a89726bf7 100644 (file)
@@ -49,6 +49,9 @@ class RENDER_PT_image(RenderButtonsPanel):
                layout.itemR(rd, "quality")
                layout.itemR(rd, "color_mode")
                
+               layout.row()
+               layout.itemR(rd, "image_type")
+               
                layout.row()
                layout.itemR(rd, "placeholders")
                layout.itemR(rd, "no_overwrite")
index d61db6cc6e899b03142575a627ee55c1ee96cd4f..330cc5f4ca22abfe786d9def9753f4dddb60aa3c 100644 (file)
@@ -210,6 +210,43 @@ void rna_def_scene_render_data(BlenderRNA *brna)
                {0, "THREADS_AUTO", "Auto-detect", ""},
                {R_FIXED_THREADS, "THREADS_FIXED", "Fixed Number", ""},
                {0, NULL, NULL, NULL}};
+               
+       static EnumPropertyItem image_type_items[] = {
+               {R_FRAMESERVER, "FRAMESERVER", "Frame Server", ""},
+#ifdef WITH_FFMPEG
+               {R_FFMPEG, "FFMPEG", "FFMpeg", ""},
+#endif
+               {R_AVIRAW, "AVIRAW", "AVI Raw", ""},
+               {R_AVIJPEG, "AVIJPEG", "AVI JPEG", ""},
+#ifdef _WIN32
+               {R_AVICODEC, "AVICODEC", "AVI Codec", ""},
+#endif
+#ifdef WITH_QUICKTIME
+               {R_QUICKTIME, "QUICKTIME", "QuickTime", ""},
+#endif
+               {R_TARGA, "TARGA", "Targa", ""},
+               {R_RAWTGA, "RAWTARGA", "Targa Raw", ""},
+               {R_PNG, "PNG", "PNG", ""},
+               //{R_DDS, "DDS", "DDS", ""}, // XXX not yet implemented
+#ifdef WITH_OPENJPEG
+               {R_JP2, "JPEG2000", "JPEG 2000", ""},
+#endif         
+               {R_BMP, "BMP", "BMP", ""},
+               {R_JPEG90, "JPEG", "JPEG", ""},
+               {R_HAMX, "HAMX", "HamX", ""},
+               {R_IRIS, "IRIS", "Iris", ""},
+               {R_RADHDR, "RADHDR", "Radiance HDR", ""},
+               {R_CINEON, "CINEON", "Cineon", ""},
+               {R_DPX, "DPX", "DPX", ""},
+#ifdef __sgi
+               {R_MOVIE, "MOVIE", "Movie", ""},
+#endif
+#ifdef WITH_OPENEXR
+               {R_OPENEXR, "OPENEXR", "OpenEXR", ""},
+               {R_MULTILAYER, "MULTILAYER", "MultiLayer", ""},
+#endif
+               {R_TIFF, "TIFF", "TIFF", ""},   // XXX only with G.have_libtiff
+               {0, NULL, NULL, NULL}};
        
        srna= RNA_def_struct(brna, "SceneRenderData", NULL);
        RNA_def_struct_sdna(srna, "RenderData");
@@ -439,6 +476,12 @@ void rna_def_scene_render_data(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "File Extensions", "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
        RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
        
+       prop= RNA_def_property(srna, "image_type", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "imtype");
+       RNA_def_property_enum_items(prop, image_type_items);
+       RNA_def_property_ui_text(prop, "Image Type", "File format to save the rendered images as.");
+       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+       
        prop= RNA_def_property(srna, "free_image_textures", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
        RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");