diff options
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 14 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 30 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 11 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 15 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nla.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 34 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 28 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 66 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_workspace.c | 24 |
13 files changed, 183 insertions, 74 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index e900160a653..b295a169c83 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -51,29 +51,25 @@ static const EnumPropertyItem beztriple_handle_type_items[] = { #endif const EnumPropertyItem rna_enum_keyframe_handle_type_items[] = { - {HD_FREE, - "FREE", - ICON_HANDLETYPE_FREE_VEC, - "Free", - "Completely independent manually set handle"}, + {HD_FREE, "FREE", ICON_HANDLE_FREE, "Free", "Completely independent manually set handle"}, {HD_ALIGN, "ALIGNED", - ICON_HANDLETYPE_ALIGNED_VEC, + ICON_HANDLE_ALIGNED, "Aligned", "Manually set handle with rotation locked together with its pair"}, {HD_VECT, "VECTOR", - ICON_HANDLETYPE_VECTOR_VEC, + ICON_HANDLE_VECTOR, "Vector", "Automatic handles that create straight lines"}, {HD_AUTO, "AUTO", - ICON_HANDLETYPE_AUTO_VEC, + ICON_HANDLE_AUTO, "Automatic", "Automatic handles that create smooth curves"}, {HD_AUTO_ANIM, "AUTO_CLAMPED", - ICON_HANDLETYPE_AUTO_CLAMP_VEC, + ICON_HANDLE_AUTOCLAMPED, "Auto Clamped", "Automatic handles that create smooth curves which only change direction at keyframes"}, {0, NULL, 0, NULL, NULL}, diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index 55aa529a30e..73a59cbba11 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -3888,6 +3888,36 @@ PropertyRNA *RNA_def_float_matrix(StructOrFunctionRNA *cont_, return prop; } +PropertyRNA *RNA_def_float_translation(StructOrFunctionRNA *cont_, + const char *identifier, + int len, + const float *default_value, + float hardmin, + float hardmax, + const char *ui_name, + const char *ui_description, + float softmin, + float softmax) +{ + PropertyRNA *prop; + + prop = RNA_def_float_vector(cont_, + identifier, + len, + default_value, + hardmin, + hardmax, + ui_name, + ui_description, + softmin, + softmax); + prop->subtype = PROP_TRANSLATION; + + RNA_def_property_ui_range(prop, softmin, softmax, 1, RNA_TRANSLATION_PREC_DEFAULT); + + return prop; +} + PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *identifier, int len, diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index d85c5c5f249..9df21a16e90 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -250,6 +250,9 @@ static Object *rna_Main_objects_new(Main *bmain, ReportList *reports, const char case ID_AR: type = OB_ARMATURE; break; + case ID_LP: + type = OB_LIGHTPROBE; + break; default: { const char *idname; if (RNA_enum_id_from_value(rna_enum_id_type_items, GS(data->name), &idname) == 0) { @@ -665,12 +668,15 @@ static FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char *name return linestyle; } -static LightProbe *rna_Main_lightprobe_new(Main *bmain, const char *name) +static LightProbe *rna_Main_lightprobe_new(Main *bmain, const char *name, int type) { char safe_name[MAX_ID_NAME - 2]; rna_idname_validate(name, safe_name); LightProbe *probe = BKE_lightprobe_add(bmain, safe_name); + + BKE_lightprobe_type_set(probe, type); + id_us_min(&probe->id); return probe; } @@ -2079,6 +2085,9 @@ void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_ui_description(func, "Add a new probe to the main database"); parm = RNA_def_string(func, "name", "Probe", 0, "", "New name for the data-block"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + parm = RNA_def_enum( + func, "type", rna_enum_lightprobes_type_items, 0, "Type", "The type of lightprobe to add"); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); /* return type */ parm = RNA_def_pointer(func, "lightprobe", "LightProbe", "", "New light probe data-block"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 589ce1414bb..6f2f12ebf98 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1838,6 +1838,11 @@ static void rna_def_modifier_warp(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WarpModifier_defgrp_name_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_WARP_INVERT_VGROUP); + RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + rna_def_modifier_generic_map_info(srna); } @@ -2889,6 +2894,11 @@ static void rna_def_modifier_displace(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Space", ""); RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); + prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_DISP_INVERT_VGROUP); + RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + rna_def_modifier_generic_map_info(srna); } @@ -3217,6 +3227,11 @@ static void rna_def_modifier_cast(BlenderRNA *brna) RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); + prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_INVERT_VGROUP); + RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X); RNA_def_property_ui_text(prop, "X", ""); diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 97cab783aed..cf84d38a880 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -801,7 +801,8 @@ static void rna_def_nlastrip(BlenderRNA *brna) prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", NLASTRIP_FLAG_MUTED); - RNA_def_property_ui_text(prop, "Muted", "Disable NLA Strip evaluation"); + RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1); + RNA_def_property_ui_text(prop, "Mute", "Disable NLA Strip evaluation"); RNA_def_property_update(prop, NC_ANIMATION | ND_NLA | NA_EDITED, "rna_NlaStrip_update"); prop = RNA_def_property(srna, "use_reverse", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index ab813f62973..70192198e14 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -25,6 +25,7 @@ #include "DNA_brush_types.h" #include "DNA_collection_types.h" #include "DNA_customdata_types.h" +#include "DNA_lightprobe_types.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_object_force_types.h" @@ -196,6 +197,13 @@ const EnumPropertyItem rna_enum_metaelem_type_items[] = { {0, NULL, 0, NULL, NULL}, }; +const EnumPropertyItem rna_enum_lightprobes_type_items[] = { + {LIGHTPROBE_TYPE_CUBE, "CUBE", ICON_LIGHTPROBE_CUBEMAP, "Cube", ""}, + {LIGHTPROBE_TYPE_PLANAR, "PLANAR", ICON_LIGHTPROBE_PLANAR, "Planar", ""}, + {LIGHTPROBE_TYPE_GRID, "GRID", ICON_LIGHTPROBE_GRID, "Grid", ""}, + {0, NULL, 0, NULL, NULL}, +}; + /* used for 2 enums */ #define OBTYPE_CU_CURVE \ { \ @@ -1574,9 +1582,9 @@ bool rna_Object_modifiers_override_apply(Main *bmain, ModifierData *mod_dst = ED_object_modifier_add( NULL, bmain, NULL, ob_dst, mod_src->name, mod_src->type); - /* XXX Current handling of 'copy' from particlesystem modifier is *very* bad (it keeps same psys + /* XXX Current handling of 'copy' from particle-system modifier is *very* bad (it keeps same psys * pointer as source, then calling code copies psys of object separately and do some magic - * remapping of pointers...), unfortunately several pieces of code in Obejct editing area rely on + * remapping of pointers...), unfortunately several pieces of code in Object editing area rely on * this behavior. So for now, hacking around it to get it doing what we want it to do, as getting * a proper behavior would be everything but trivial, and this whole particle thingy is * end-of-life. */ diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index a5852a30661..29ec968fe2a 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -890,7 +890,7 @@ static void rna_PartSettings_start_set(struct PointerRNA *ptr, float value) /* check for clipping */ if (value > settings->end) { - value = settings->end; + settings->end = value; } /*if (settings->type==PART_REACTOR && value < 1.0) */ @@ -909,7 +909,7 @@ static void rna_PartSettings_end_set(struct PointerRNA *ptr, float value) /* check for clipping */ if (value < settings->sta) { - value = settings->sta; + settings->sta = value; } settings->end = value; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index ea1fb1eb489..262048e55c2 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -941,8 +941,8 @@ static void rna_Scene_start_frame_set(PointerRNA *ptr, int value) CLAMP(value, MINFRAME, MAXFRAME); data->r.sfra = value; - if (data->r.sfra >= data->r.efra) { - data->r.efra = MIN2(data->r.sfra, MAXFRAME); + if (value > data->r.efra) { + data->r.efra = MIN2(value, MAXFRAME); } } @@ -952,8 +952,8 @@ static void rna_Scene_end_frame_set(PointerRNA *ptr, int value) CLAMP(value, MINFRAME, MAXFRAME); data->r.efra = value; - if (data->r.sfra >= data->r.efra) { - data->r.sfra = MAX2(data->r.efra, MINFRAME); + if (data->r.sfra > value) { + data->r.sfra = MAX2(value, MINFRAME); } } @@ -985,10 +985,12 @@ static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value) /* TODO: or just refuse to set instead? */ data->r.pefra = data->r.efra; } - - /* now set normally */ - CLAMP(value, MINAFRAME, data->r.pefra); + CLAMP(value, MINAFRAME, MAXFRAME); data->r.psfra = value; + + if (value > data->r.pefra) { + data->r.pefra = MIN2(value, MAXFRAME); + } } static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value) @@ -1001,10 +1003,12 @@ static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value) /* TODO: or just refuse to set instead? */ data->r.psfra = data->r.sfra; } - - /* now set normally */ - CLAMP(value, data->r.psfra, MAXFRAME); + CLAMP(value, MINAFRAME, MAXFRAME); data->r.pefra = value; + + if (data->r.psfra > value) { + data->r.psfra = MAX2(value, MINAFRAME); + } } static void rna_Scene_show_subframe_update(Main *UNUSED(bmain), @@ -2959,17 +2963,21 @@ static void rna_def_tool_settings(BlenderRNA *brna) prop = RNA_def_property(srna, "use_transform_pivot_point_align", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_AXIS_ALIGN); RNA_def_property_ui_text( - prop, "Only Locations", "Manipulate origins (object, pose and weight paint mode only)"); + prop, + "Only Locations", + "Only transform object locations, without affecting rotation or scaling"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "use_transform_data_origin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_DATA_ORIGIN); - RNA_def_property_ui_text(prop, "Transform Origins", "Manipulate object data"); + RNA_def_property_ui_text( + prop, "Transform Origins", "Transform object origins, while leaving the shape in place"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "use_transform_skip_children", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_SKIP_CHILDREN); - RNA_def_property_ui_text(prop, "Transform Parents", "Don't transform children"); + RNA_def_property_ui_text( + prop, "Transform Parents", "Transform the parents, leaving the children in place"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "use_mesh_automerge", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 2c5f93e28ed..16dbe38f866 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -2701,15 +2701,15 @@ static void rna_def_text(StructRNA *srna) { /* Avoid text icons because they imply this aligns within a frame, see: T71082 */ static const EnumPropertyItem text_align_x_items[] = { - {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", 0, "Left", ""}, - {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", 0, "Center", ""}, - {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", 0, "Right", ""}, + {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", ICON_ANCHOR_LEFT, "Left", ""}, + {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""}, + {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", ICON_ANCHOR_RIGHT, "Right", ""}, {0, NULL, 0, NULL, NULL}, }; static const EnumPropertyItem text_align_y_items[] = { - {SEQ_TEXT_ALIGN_Y_TOP, "TOP", 0, "Top", ""}, - {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", 0, "Center", ""}, - {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", 0, "Bottom", ""}, + {SEQ_TEXT_ALIGN_Y_TOP, "TOP", ICON_ANCHOR_TOP, "Top", ""}, + {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""}, + {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", ICON_ANCHOR_BOTTOM, "Bottom", ""}, {0, NULL, 0, NULL, NULL}, }; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 67b43cb13df..746f9042dd8 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -161,6 +161,13 @@ const EnumPropertyItem rna_enum_space_graph_mode_items[] = { {0, NULL, 0, NULL, NULL}, }; +const EnumPropertyItem rna_enum_space_sequencer_view_type_items[] = { + {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, + {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Preview", ""}, + {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, "Sequencer/Preview", ""}, + {0, NULL, 0, NULL, NULL}, +}; + #define SACT_ITEM_DOPESHEET \ { \ SACTCONT_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dope Sheet", "Edit all keyframes in scene" \ @@ -2640,7 +2647,9 @@ static void rna_def_space(BlenderRNA *brna) /* access to V2D_VIEWSYNC_SCREEN_TIME */ prop = RNA_def_property(srna, "show_locked_time", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_Space_view2d_sync_get", "rna_Space_view2d_sync_set"); - RNA_def_property_ui_text(prop, "Lock Time to Other Windows", ""); + RNA_def_property_ui_text(prop, + "Sync Visible Range", + "Syncronize the visible timeline range with other time-based editors"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, "rna_Space_view2d_sync_update"); rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_HEADER)); @@ -4458,17 +4467,6 @@ static void rna_def_space_sequencer(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static const EnumPropertyItem view_type_items[] = { - {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, - {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Preview", ""}, - {SEQ_VIEW_SEQUENCE_PREVIEW, - "SEQUENCER_PREVIEW", - ICON_SEQ_SPLITVIEW, - "Sequencer/Preview", - ""}, - {0, NULL, 0, NULL, NULL}, - }; - static const EnumPropertyItem display_mode_items[] = { {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""}, {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""}, @@ -4528,12 +4526,14 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_struct_sdna(srna, "SpaceSeq"); RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data"); - rna_def_space_generic_show_region_toggles(srna, (1 << RGN_TYPE_UI)); + rna_def_space_generic_show_region_toggles(srna, + (1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_UI) | + (1 << RGN_TYPE_TOOLS) | (1 << RGN_TYPE_HUD)); /* view type, fairly important */ prop = RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "view"); - RNA_def_property_enum_items(prop, view_type_items); + RNA_def_property_enum_items(prop, rna_enum_space_sequencer_view_type_items); RNA_def_property_ui_text( prop, "View Type", "Type of the Sequencer view (sequencer, preview or both)"); RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 56f19d313fd..b9fb8638c49 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2231,6 +2231,14 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Bone Solid", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "bone_locked_weight", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text( + prop, + "Bone Locked Weight", + "Shade for bones corresponding to a locked weight group during painting"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + /* misc */ prop = RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA); @@ -2508,63 +2516,73 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna) rna_def_userdef_theme_spaces_main(srna); prop = RNA_def_property(srna, "info_selected", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_selected"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Selected Line Background", ""); + RNA_def_property_ui_text(prop, "Selected Line Background", "Background color of selected line"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_selected_text", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_selected_text"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Selected Line Text", ""); + RNA_def_property_ui_text(prop, "Selected Line Text Color", "Text color of selected line"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_error", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_error"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Error Background", ""); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text(prop, "Error Icon Background", "Background color of Error icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_error_text", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_error_text"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Error Text", ""); + RNA_def_property_ui_text(prop, "Error Icon Foreground", "Foreground color of Error icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_warning", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_warning"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Warning Background", ""); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text(prop, "Warning Icon Background", "Background color of Warning icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_warning_text", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_warning_text"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Warning Text", ""); + RNA_def_property_ui_text(prop, "Warning Icon Foreground", "Foreground color of Warning icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_info", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_info"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Info Background", ""); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text(prop, "Info Icon Background", "Background color of Info icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_info_text", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_info_text"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Info Text", ""); + RNA_def_property_ui_text(prop, "Info Icon Foreground", "Foreground color of Info icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_debug", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_debug"); - RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Debug Background", ""); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text(prop, "Debug Icon Background", "Background color of Debug icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); prop = RNA_def_property(srna, "info_debug_text", PROP_FLOAT, PROP_COLOR_GAMMA); - RNA_def_property_float_sdna(prop, NULL, "info_debug_text"); RNA_def_property_array(prop, 3); - RNA_def_property_ui_text(prop, "Debug Text", ""); + RNA_def_property_ui_text(prop, "Debug Icon Foreground", "Foreground color of Debug icon"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "info_property", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text(prop, "Property Icon Background", "Backgrond color of Property icon"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "info_property_text", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Property Icon Foreground", "Foreground color of Property icon"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "info_operator", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text(prop, "Operator Icon Background", "Background color of Operator icon"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + + prop = RNA_def_property(srna, "info_operator_text", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 3); + RNA_def_property_ui_text(prop, "Operator Icon Foreground", "Foreground color of Operator icon"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); } diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 249581d22bf..bf3c562f95f 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -90,6 +90,7 @@ static const EnumPropertyItem event_mouse_type_items[] = { {MOUSEPAN, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", ""}, {MOUSEZOOM, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", ""}, {MOUSEROTATE, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", ""}, + {MOUSESMARTZOOM, "MOUSESMARTZOOM", 0, "Mouse/Trackpad Smart Zoom", ""}, {0, "", 0, NULL, NULL}, {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", ""}, {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", ""}, @@ -186,6 +187,7 @@ const EnumPropertyItem rna_enum_event_type_items[] = { {MOUSEPAN, "TRACKPADPAN", 0, "Mouse/Trackpad Pan", "MsPan"}, {MOUSEZOOM, "TRACKPADZOOM", 0, "Mouse/Trackpad Zoom", "MsZoom"}, {MOUSEROTATE, "MOUSEROTATE", 0, "Mouse/Trackpad Rotate", "MsRot"}, + {MOUSESMARTZOOM, "MOUSESMARTZOOM", 0, "Mouse/Trackpad Smart Zoom", "MsSmartZoom"}, {0, "", 0, NULL, NULL}, {WHEELUPMOUSE, "WHEELUPMOUSE", 0, "Wheel Up", "WhUp"}, {WHEELDOWNMOUSE, "WHEELDOWNMOUSE", 0, "Wheel Down", "WhDown"}, @@ -2185,7 +2187,7 @@ static void rna_def_event(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Is Tablet", "The event has tablet data"); prop = RNA_def_property(srna, "is_mouse_absolute", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "is_motion_absolute", 1); + RNA_def_property_boolean_sdna(prop, NULL, "tablet.is_motion_absolute", 1); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Absolute Motion", "The last motion event was an absolute input"); diff --git a/source/blender/makesrna/intern/rna_workspace.c b/source/blender/makesrna/intern/rna_workspace.c index 4d4ab64abb9..32e348ea72f 100644 --- a/source/blender/makesrna/intern/rna_workspace.c +++ b/source/blender/makesrna/intern/rna_workspace.c @@ -152,7 +152,17 @@ static bToolRef *rna_WorkSpace_tools_from_space_node(WorkSpace *workspace, bool }, create); } - +static bToolRef *rna_WorkSpace_tools_from_space_sequencer(WorkSpace *workspace, + int mode, + bool create) +{ + return rna_WorkSpace_tools_from_tkey(workspace, + &(bToolKey){ + .space_type = SPACE_SEQ, + .mode = mode, + }, + create); +} const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), @@ -164,6 +174,8 @@ const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(bContext *UNUSED(C), return rna_enum_context_mode_items; case SPACE_IMAGE: return rna_enum_space_image_mode_all_items; + case SPACE_SEQ: + return rna_enum_space_sequencer_view_type_items; } return DummyRNA_DEFAULT_items; } @@ -335,6 +347,16 @@ static void rna_def_workspace_tools(BlenderRNA *brna, PropertyRNA *cprop) /* return type */ parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", ""); RNA_def_function_return(func, parm); + + func = RNA_def_function( + srna, "from_space_sequencer", "rna_WorkSpace_tools_from_space_sequencer"); + RNA_def_function_ui_description(func, ""); + parm = RNA_def_enum(func, "mode", rna_enum_space_sequencer_view_type_items, 0, "", ""); + RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); + RNA_def_boolean(func, "create", false, "Create", ""); + /* return type */ + parm = RNA_def_pointer(func, "result", "WorkSpaceTool", "", ""); + RNA_def_function_return(func, parm); } static void rna_def_workspace(BlenderRNA *brna) |