diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 75 |
1 files changed, 24 insertions, 51 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 4d35acc84a0..686672e1629 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -145,7 +145,7 @@ EnumPropertyItem snap_element_items[] = { }; EnumPropertyItem snap_node_element_items[] = { - {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"}, + {SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_INCREMENT, "Grid", "Snap to grid"}, {SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_SNAP_EDGE, "Node X", "Snap to left/right node border"}, {SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_SNAP_EDGE, "Node Y", "Snap to top/bottom node border"}, {SCE_SNAP_MODE_NODE_XY, "NODE_XY", ICON_SNAP_EDGE, "Node X / Y", "Snap to any node border"}, @@ -159,7 +159,7 @@ EnumPropertyItem snap_uv_element_items[] = { }; /* workaround for duplicate enums, - * have each enum line as a defne then conditionally set it or not + * have each enum line as a define then conditionally set it or not */ #define R_IMF_ENUM_BMP {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"}, @@ -219,14 +219,6 @@ EnumPropertyItem snap_uv_element_items[] = { # define R_IMF_ENUM_TIFF #endif -#ifdef WITH_OPENIMAGEIO -# define R_IMF_ENUM_PSD {R_IMF_IMTYPE_PSD, "PSD", ICON_FILE_IMAGE, "Photosp PSD", \ - "Output image in Photoshop PSD format"}, -#else -# define R_IMF_ENUM_PSD -#endif - - #define IMAGE_TYPE_ITEMS_IMAGE_ONLY \ R_IMF_ENUM_BMP \ /* DDS save not supported yet R_IMF_ENUM_DDS */ \ @@ -243,7 +235,6 @@ EnumPropertyItem snap_uv_element_items[] = { R_IMF_ENUM_EXR \ R_IMF_ENUM_HDR \ R_IMF_ENUM_TIFF \ - R_IMF_ENUM_PSD \ EnumPropertyItem image_only_type_items[] = { @@ -270,11 +261,7 @@ EnumPropertyItem image_type_items[] = { {R_IMF_IMTYPE_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"}, #endif #ifdef WITH_QUICKTIME -# ifdef USE_QTKIT - {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, -# else - {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, -# endif + {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, #endif #ifdef WITH_FFMPEG {R_IMF_IMTYPE_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"}, @@ -964,7 +951,6 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(bCon return item; } -#ifdef USE_QTKIT static int rna_RenderSettings_qtcodecsettings_audiocodecType_get(PointerRNA *ptr) { QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data; @@ -1003,7 +989,6 @@ static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf return item; } #endif -#endif #ifdef WITH_FFMPEG static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, int value) @@ -1452,6 +1437,12 @@ static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, cons } } +static void rna_UnifiedPaintSettings_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) +{ + Brush *br = BKE_paint_brush(BKE_paint_get_active(scene)); + WM_main_add_notifier(NC_BRUSH | NA_EDITED, br); +} + static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value) { UnifiedPaintSettings *ups = ptr->data; @@ -1471,10 +1462,11 @@ static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, flo ups->unprojected_radius = value; } -static void rna_UnifiedPaintSettings_radius_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) +static void rna_UnifiedPaintSettings_radius_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - /* changing the unified size should invalidate */ + /* changing the unified size should invalidate the overlay but also update the brush */ BKE_paint_invalidate_overlay_all(); + rna_UnifiedPaintSettings_update(bmain, scene, ptr); } static char *rna_UnifiedPaintSettings_path(PointerRNA *UNUSED(ptr)) @@ -2045,6 +2037,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.0f, 10.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied"); + RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update"); prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "weight"); @@ -2052,6 +2045,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex groups"); + RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update"); prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE); @@ -2329,12 +2323,6 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); - prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE); - RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)"); - if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); - else RNA_def_property_clear_flag(prop, PROP_EDITABLE); - prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND); RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer"); @@ -3143,7 +3131,6 @@ static void rna_def_scene_game_data(BlenderRNA *brna) }; static EnumPropertyItem material_items[] = { - {GAME_MAT_TEXFACE, "SINGLETEXTURE", 0, "Singletexture", "Singletexture face materials"}, {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"}, {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"}, {0, NULL, 0, NULL, NULL} @@ -3435,7 +3422,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna) prop = RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES); RNA_def_property_ui_text(prop, "Use Frame Rate", - "Respect the frame rate rather than rendering as many frames as possible"); + "Respect the frame rate from the Physics panel in the world properties " + "rather than rendering as many frames as possible"); prop = RNA_def_property(srna, "use_display_lists", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS); @@ -3783,8 +3771,6 @@ static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) {FFMPEG_OGG, "OGG", 0, "Ogg", ""}, {FFMPEG_MKV, "MKV", 0, "Matroska", ""}, {FFMPEG_FLV, "FLASH", 0, "Flash", ""}, - {FFMPEG_WAV, "WAV", 0, "Wav", ""}, - {FFMPEG_MP3, "MP3", 0, "Mp3", ""}, {0, NULL, 0, NULL, NULL} }; @@ -3955,7 +3941,6 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; -#ifdef USE_QTKIT static EnumPropertyItem quicktime_audio_samplerate_items[] = { {22050, "22050", 0, "22kHz", ""}, {44100, "44100", 0, "44.1kHz", ""}, @@ -3985,7 +3970,6 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna) {320000, "320000", 0, "320kbps", ""}, {0, NULL, 0, NULL, NULL} }; -#endif /* QuickTime */ srna = RNA_def_struct(brna, "QuickTimeSettings", NULL); @@ -4007,7 +3991,6 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial quality level"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); -#ifdef USE_QTKIT prop = RNA_def_property(srna, "audiocodec_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "audiocodecType"); RNA_def_property_enum_items(prop, quicktime_codec_type_items); @@ -4044,7 +4027,6 @@ static void rna_def_scene_quicktime_settings(BlenderRNA *brna) RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items); RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); -#endif } #endif @@ -4384,23 +4366,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna) 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, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE); - RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); - - prop = RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "edgeint"); - RNA_def_property_range(prop, 0, 255); - RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); - - prop = RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR); - RNA_def_property_float_sdna(prop, NULL, "edgeR"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Edge Color", "Edge color"); - RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); - prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS); RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle"); @@ -5220,6 +5185,14 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Current Frame Final", "Current frame with subframe and time remapping applied"); + prop = RNA_def_property(srna, "lock_frame_selection_to_range", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_LOCK_FRAME_SELECTION); + RNA_def_property_ui_text(prop, "Lock Frame Selection", + "Don't allow frame to be selected with mouse outside of frame range"); + RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); + RNA_def_property_ui_icon(prop, ICON_LOCKED, 0); + /* Preview Range (frame-range for UI playback) */ prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); |