diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 93 |
1 files changed, 51 insertions, 42 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 90372dfb819..22cfb1c0a78 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -93,31 +93,38 @@ EnumPropertyItem snap_element_items[] = { EnumPropertyItem image_type_items[] = { {0, "", 0, "Image", NULL}, + {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", ""}, + //{R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", ""}, // XXX not yet implemented + {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", ""}, {R_PNG, "PNG", ICON_FILE_IMAGE, "PNG", ""}, {R_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", ""}, #ifdef WITH_OPENJPEG {R_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", ""}, #endif - {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", ""}, {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", ""}, {R_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", ""}, - //{R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", ""}, // XXX not yet implemented - //{R_HAMX, "HAMX", ICON_FILE_IMAGE, "HamX", ""}, // should remove this format, 8bits are so 80's - {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", ""}, {0, "", 0, " ", NULL}, + {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", ""}, + {R_DPX, "DPX",ICON_FILE_IMAGE, "DPX", ""}, #ifdef WITH_OPENEXR - {R_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", ""}, {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", ""}, + {R_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", ""}, #endif - {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", ""}, // XXX only with G.have_libtiff {R_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", ""}, - {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", ""}, - {R_DPX, "DPX", ICON_FILE_IMAGE, "DPX", ""}, +#ifdef WITH_TIFF + {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", ""}, +#endif {0, "", 0, "Movie", NULL}, - {R_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", ""}, - {R_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", ""}, #ifdef _WIN32 - {R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", ""}, + {R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", ""}, // XXX Missing codec menu +#endif + {R_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", ""}, + {R_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", ""}, + {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", ""}, +#ifdef WITH_FFMPEG + {R_H264, "H264", ICON_FILE_MOVIE, "H.264", ""}, + {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", ""}, + {R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", ""}, #endif #ifdef WITH_QUICKTIME # ifdef USE_QTKIT @@ -126,16 +133,9 @@ EnumPropertyItem image_type_items[] = { {R_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", ""}, # endif #endif -#ifdef __sgi - {R_MOVIE, "MOVIE", ICON_FILE_MOVIE, "Movie", ""}, -#endif #ifdef WITH_FFMPEG - {R_H264, "H264", ICON_FILE_MOVIE, "H.264", ""}, {R_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", ""}, - {R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", ""}, - {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", ""}, #endif - {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", ""}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME @@ -376,16 +376,24 @@ static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value) scene->active_keyingset= ANIM_scene_get_keyingset_index(scene, ks); } -#if 0 // XXX: these need to be fixed up first... -static void rna_Scene_active_keying_set_index_range(PointerRNA *ptr, int *min, int *max) +/* get KeyingSet index stuff for list of Keying Sets editing UI + * - active_keyingset-1 since 0 is reserved for 'none' + * - don't clamp, otherwise can never set builtins types as active... + */ +static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr) { - Scene *scene= (Scene *)ptr->data; - - // FIXME: would need access to builtin keyingsets list to count min... - *min= 0; - *max= 0; + Scene *scene= (Scene *)ptr->data; + return scene->active_keyingset-1; +} + +/* get KeyingSet index stuff for list of Keying Sets editing UI + * - value+1 since 0 is reserved for 'none'= + */ +static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value) +{ + Scene *scene= (Scene *)ptr->data; + scene->active_keyingset= value+1; } -#endif // XXX: evil... builtin_keyingsets is defined in keyingsets.c! // TODO: make API function to retrieve this... @@ -1582,7 +1590,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen"); RNA_def_property_update(prop, NC_SCENE, NULL); - prop= RNA_def_property(srna, "depth", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "depth"); RNA_def_property_range(prop, 8, 32); RNA_def_property_ui_text(prop, "Bits", "Displays bit depth of full screen display"); @@ -2376,7 +2384,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Use Local Coords", "Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "render_antialiasing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA); RNA_def_property_ui_text(prop, "Anti-Aliasing", "Render and combine multiple samples per pixel to prevent jagged edges"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); @@ -2403,34 +2411,35 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE); + /* rendering features */ + prop= RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW); - RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering"); + RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rendering"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "render_envmaps", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP); - RNA_def_property_ui_text(prop, "Render Environment Maps", "Calculate environment maps while rendering"); + RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "render_radiosity", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_radiosity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RADIO); - RNA_def_property_ui_text(prop, "Render Radiosity", "Calculate radiosity in a pre-process before rendering"); + RNA_def_property_ui_text(prop, "Radiosity", "Calculate radiosity in a pre-process before rendering"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "render_sss", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS); - RNA_def_property_ui_text(prop, "Render SSS", "Calculate sub-surface scattering in materials rendering"); + RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-surface scattering in materials rendering"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "render_raytracing", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_raytracing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE); - RNA_def_property_ui_text(prop, "Render Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects"); + RNA_def_property_ui_text(prop, "Raytracing", "Pre-calculate the raytrace accelerator and render raytracing effects"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "render_textures", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX); - RNA_def_property_ui_text(prop, "Render Textures", "Use textures to affect material properties"); + RNA_def_property_ui_text(prop, "Textures", "Use textures to affect material properties"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); prop= RNA_def_property(srna, "edge", PROP_BOOLEAN, PROP_NONE); @@ -2797,7 +2806,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Use Simplify", "Enable simplification of scene for quicker preview renders"); RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); - prop= RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf"); RNA_def_property_ui_range(prop, 0, 6, 1, 0); RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level"); @@ -3116,7 +3125,7 @@ void RNA_def_scene(BlenderRNA *brna) prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); - //RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Scene_active_keying_set_index_range"); // XXX + RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL); RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')"); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); |