[Bf-blender-cvs] [212351ad781] greasepencil-object: Merge branch 'master' into greasepencil-object
Commit: 212351ad78134d086ad71d9d8f8c1a6e8dd102ec Author: Antonioya Date: Wed Jun 12 08:46:38 2019 +0200 Branches: greasepencil-object https://developer.blender.org/rB212351ad78134d086ad71d9d8f8c1a6e8dd102ec Merge branch 'master' into greasepencil-object === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e680755ad7e] soc-2019-outliner: Outliner: Remove negative from sync selection
Commit: e680755ad7edd3dee12d663890f5adcd5d540d10 Author: Nathan Craddock Date: Tue Jun 11 21:47:40 2019 -0600 Branches: soc-2019-outliner https://developer.blender.org/rBe680755ad7edd3dee12d663890f5adcd5d540d10 Outliner: Remove negative from sync selection Removing because it was behaving strangely. I might not entirely understand what `negative_sdna` does === M source/blender/makesrna/intern/rna_space.c === diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index c9026962311..78a150a9f45 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2829,7 +2829,7 @@ static void rna_def_space_outliner(BlenderRNA *brna) RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); prop = RNA_def_property(srna, "use_sync_selection", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_SYNC_SELECTION); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SO_SYNC_SELECTION); RNA_def_property_ui_text( prop, "Sync Outliner Selection", "Sync outliner selection with other editors"); RNA_def_property_ui_icon(prop, ICON_UV_SYNC_SELECT, 0); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8ee6fd8866e] soc-2019-outliner: Outliner: Add dirty flag
Commit: 8ee6fd8866ea7caebd7dff0154a166e5d8a1d5c7 Author: Nathan Craddock Date: Tue Jun 11 22:13:05 2019 -0600 Branches: soc-2019-outliner https://developer.blender.org/rB8ee6fd8866ea7caebd7dff0154a166e5d8a1d5c7 Outliner: Add dirty flag This dirty flag is to indicate whether an outliner needs to sync its selection state with the active view layer before redrawing === M source/blender/editors/space_outliner/space_outliner.c M source/blender/makesdna/DNA_space_types.h === diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index d103322d912..908b033d688 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -299,6 +299,7 @@ static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED( soutliner->filter_id_type = ID_GR; soutliner->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_HIDE; soutliner->outlinevis = SO_VIEW_LAYER; + soutliner->flag |= SO_IS_DIRTY; /* header */ ar = MEM_callocN(sizeof(ARegion), "header for outliner"); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index c26f96fcc95..69c8d6b9cda 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -264,6 +264,7 @@ typedef enum eSpaceOutliner_Flag { SO_HIDE_KEYINGSETINFO = (1 << 3), SO_SKIP_SORT_ALPHA = (1 << 4), SO_SYNC_SELECTION = (1 << 5), + SO_IS_DIRTY = (1 << 6), } eSpaceOutliner_Flag; /* SpaceOutliner.filter */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [213d0d6f706] soc-2019-outliner: Outliner: Add synced selection
Commit: 213d0d6f706006a5cc43376b661c6f8a4e273f77 Author: Nathan Craddock Date: Tue Jun 11 22:27:34 2019 -0600 Branches: soc-2019-outliner https://developer.blender.org/rB213d0d6f706006a5cc43376b661c6f8a4e273f77 Outliner: Add synced selection This implementation is to see how syncing will be done, to be redone later in a more general way. Right now each operator must explicitly sync the selection. === M source/blender/editors/object/object_select.c M source/blender/editors/space_outliner/outliner_draw.c M source/blender/editors/space_outliner/outliner_intern.h M source/blender/editors/space_outliner/outliner_select.c M source/blender/editors/space_view3d/view3d_select.c === diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index afdda8d6b7f..c13f3694135 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -94,6 +94,24 @@ * \note Caller must send a `NC_SCENE | ND_OB_SELECT` notifier * (or a `NC_SCENE | ND_OB_VISIBLE` in case of visibility toggling). */ + +static void object_sync_selection_to_outliner(bContext *C) +{ + Main *bmain = CTX_data_main(C); + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { +for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { + for (SpaceLink *space = sa->spacedata.first; space; space = space->next) { +if (space->spacetype == SPACE_OUTLINER) { + SpaceOutliner *soutliner = (SpaceOutliner *)space; + + /* Mark selection state as dirty */ + soutliner->flag |= SO_IS_DIRTY; +} + } +} + } +} + void ED_object_base_select(Base *base, eObjectSelect_Mode mode) { if (mode == BA_INVERT) { @@ -1141,6 +1159,8 @@ static int object_select_all_exec(bContext *C, wmOperator *op) DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); +object_sync_selection_to_outliner(C); + return OPERATOR_FINISHED; } else if (any_visible == false) { diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 4f32543730e..c905ffa5742 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -3507,6 +3507,12 @@ void draw_outliner(const bContext *C) outliner_build_tree(mainvar, scene, view_layer, soops, ar); // always + /* Get selection state from view layer if dirty */ + if ((soops->flag & SO_IS_DIRTY) != 0 && (soops->flag & SO_SYNC_SELECTION)) { +do_outliner_selection_sync(C, false); + } + soops->flag &= ~SO_IS_DIRTY; + /* force display to pixel coords */ v2d->flag |= (V2D_PIXELOFS_X | V2D_PIXELOFS_Y); /* set matrix for 2d-view controls */ diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index bf51b05c240..a5f079ef490 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -261,6 +261,8 @@ void outliner_object_mode_toggle(struct bContext *C, ViewLayer *view_layer, Base *base); +void do_outliner_selection_sync(struct bContext *C, bool to_view_layer); + /* outliner_edit.c -- */ typedef void (*outliner_operation_cb)(struct bContext *C, struct ReportList *, diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index c17fe1a06da..6032177ecb7 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1310,6 +1310,74 @@ void outliner_item_do_activate_from_tree_element( C, scene, view_layer, soops, te, tselem, extend, recursive); } +static void do_outliner_selection_sync_recursive(SpaceOutliner *soops, + ViewLayer *view_layer, + ListBase *tree, + bool to_view_layer) +{ + TreeElement *te; + + for (te = tree->first; te; te = te->next) { +if (te->idcode == ID_OB) { + TreeStoreElem *tselem = TREESTORE(te); + Object *ob = (Object *)tselem->id; + + Base *base = (te->directdata) ? (Base *)te->directdata : + BKE_view_layer_base_find(view_layer, ob); + + if (to_view_layer) { +const bool is_selected = (tselem->flag & TSE_SELECTED) != 0; + +if (is_selected) { + + base->flag |= BASE_SELECTED; +} +
[Bf-blender-cvs] [934b3c74f32] master: Unit System: remove 'm' as an alternate name for mile
Commit: 934b3c74f328c8942eef9a5cf1219cca3ad46cd0 Author: Campbell Barton Date: Wed Jun 12 14:20:59 2019 +1000 Branches: master https://developer.blender.org/rB934b3c74f328c8942eef9a5cf1219cca3ad46cd0 Unit System: remove 'm' as an alternate name for mile Now when using imperial dimensions, using 'm' suffix is treated as meters instead of miles (use 'mi' or 'mile' instead). Resolves T65731 === M source/blender/blenkernel/intern/unit.c === diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index f5b73d88867..7e7d5c82654 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -157,7 +157,7 @@ static struct bUnitDef buMetricLenDef[] = { static const struct bUnitCollection buMetricLenCollection = {buMetricLenDef, 3, 0, UNIT_COLLECTION_LENGTH(buMetricLenDef)}; static struct bUnitDef buImperialLenDef[] = { - {"mile","miles","mi", "m", "Miles","MILES",UN_SC_MI, 0.0, B_UNIT_DEF_NONE}, + {"mile","miles","mi", NULL, "Miles","MILES",UN_SC_MI, 0.0, B_UNIT_DEF_NONE}, {"furlong", "furlongs", "fur", NULL, "Furlongs", "FURLONGS", UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS}, {"chain", "chains", "ch", NULL, "Chains", "CHAINS", UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS}, {"yard","yards","yd", NULL, "Yards","YARDS",UN_SC_YD, 0.0, B_UNIT_DEF_SUPPRESS}, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [30c431d6624] master: Revert "Keymap: Add additional scrubbing affordance (Alt-LMB)"
Commit: 30c431d662404c83ceedc78485b25b367ac64f98 Author: Campbell Barton Date: Wed Jun 12 13:46:30 2019 +1000 Branches: master https://developer.blender.org/rB30c431d662404c83ceedc78485b25b367ac64f98 Revert "Keymap: Add additional scrubbing affordance (Alt-LMB)" This reverts commits dcec863b2f2fce7fc5caa138ad3816c88e2aa2a3, f11929c145ef45444598a9679e675b2d013ae2ef. It wasn't possible to set the cursor without accidentally selecting a column of keys & (vice-versa). This conflicts with Alt->LMB to select column of keys. Shift-RMB is already bound to scrubbing. === M release/scripts/presets/keyconfig/keymap_data/blender_default.py === diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 62d71e62fe8..72204762a22 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1445,7 +1445,6 @@ def km_graph_editor(params): if params.select_mouse == 'LEFTMOUSE' and not params.legacy: items.extend([ ("graph.cursor_set", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True}, None), -("graph.cursor_set", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, None), ]) else: items.extend([ @@ -2796,7 +2795,6 @@ def km_animation(params): if params.select_mouse == 'LEFTMOUSE' and not params.legacy: items.extend([ ("anim.change_frame", {"type": 'RIGHTMOUSE', "value": 'PRESS', "shift": True}, None), -("anim.change_frame", {"type": 'LEFTMOUSE', "value": 'PRESS', "alt": True}, None), ]) else: items.extend([ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [aa0cd21da03] master: Fix T65727: Broken button tool-tips in 3D view
Commit: aa0cd21da03421b8757cc743ea595783849d87ef Author: Campbell Barton Date: Wed Jun 12 12:57:20 2019 +1000 Branches: master https://developer.blender.org/rBaa0cd21da03421b8757cc743ea595783849d87ef Fix T65727: Broken button tool-tips in 3D view Own error in 686820289982. === M source/blender/windowmanager/intern/wm_event_system.c === diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 18b6397844d..005e05c4003 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2794,8 +2794,11 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers int part = -1; gz = wm_gizmomap_highlight_find(gzmap, C, event, &part); - if ((gz == NULL) || (prev.gz != gz) || (prev.part != part)) { -WM_tooltip_clear(C, CTX_wm_window(C)); + /* If no gizmos are/were active, don't clear tool-tips. */ + if (gz || prev.gz) { +if ((prev.gz != gz) || (prev.part != part)) { + WM_tooltip_clear(C, CTX_wm_window(C)); +} } if (wm_gizmomap_highlight_set(gzmap, C, gz, part)) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [fcb534e336c] master: UI: alternate fix for T65702, handling of auto-saving userprefs
Commit: fcb534e336c3b9d9065c5bbc9143bcc305497975 Author: Campbell Barton Date: Wed Jun 12 12:21:21 2019 +1000 Branches: master https://developer.blender.org/rBfcb534e336c3b9d9065c5bbc9143bcc305497975 UI: alternate fix for T65702, handling of auto-saving userprefs The behavior for loading factory settings wasn't clear for users. This commit changes the behavior: - Loading factory settings always disables auto-save for the current session. - The internal setting to skip saving on exit is now exposed in the preferences (when enabled). - The menu item "Load Factory Settings (Temporary)" has been removed since it's always temporary. This way users can always reset factory settings without having to consider the combination of options that might cause their preferences to be overwritten at exit. If they want to enable auto-save for the current session this can be done from the preferences. === M release/scripts/startup/bl_ui/space_topbar.py M release/scripts/startup/bl_ui/space_userpref.py M source/blender/python/intern/bpy_app.c M source/blender/windowmanager/intern/wm_files.c === diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index d99df2eced7..35c4a5ec5a1 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -334,15 +334,6 @@ class TOPBAR_MT_file_defaults(Menu): if app_template: props.app_template = app_template -if prefs.use_preferences_save: -props = layout.operator( -"wm.read_factory_settings", -text="Load Factory Settings (Temporary)" -) -if app_template: -props.app_template = app_template -props.use_temporary_preferences = True - class TOPBAR_MT_app_about(Menu): bl_label = "About" diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 79f7cdf6d5a..8da5237b7f9 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -40,10 +40,21 @@ class USERPREF_HT_header(Header): row = layout.row() row.menu("USERPREF_MT_save_load", text="", icon='COLLAPSEMENU') -if not prefs.use_preferences_save: -sub_revert = row.row(align=True) -sub_revert.active = prefs.is_dirty -sub_revert.operator("wm.save_userpref") +if prefs.use_preferences_save: +if bpy.app.use_userpref_skip_save_on_exit: +# We should have an 'alert' icon, for now use 'error'. +sub = row.row(align=True) +props = sub.operator( +"wm.context_toggle", +text="Skip Auto-Save", +icon='CHECKBOX_HLT', +) +props.module = "bpy.app" +props.data_path = "use_userpref_skip_save_on_exit" +else: +sub = row.row(align=True) +sub.active = prefs.is_dirty +sub.operator("wm.save_userpref") def draw(self, context): layout = self.layout diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index f0a3c7f4d5f..9ffb4cb4821 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -508,6 +508,12 @@ static PyGetSetDef bpy_app_getsets[] = { (char *)bpy_app_global_flag_doc, (void *)G_FLAG_EVENT_SIMULATE}, +{(char *)"use_userpref_skip_save_on_exit", + bpy_app_global_flag_get, + bpy_app_global_flag_set, + (char *)bpy_app_global_flag_doc, + (void *)G_FLAG_USERPREF_NO_SAVE_ON_EXIT}, + {(char *)"binary_path_python", bpy_app_binary_path_python_get, NULL, diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 3a1c164c88e..1feab316010 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1742,9 +1742,7 @@ void WM_OT_save_userpref(wmOperatorType *ot) /** * When reading preferences, there are some exceptions for values which are reset. */ -static void wm_userpref_read_exceptions(UserDef *userdef_curr, -const UserDef *userdef_prev, -const bool use_factory_settings) +static void wm_userpref_read_exceptions(UserDef *userdef_curr, const UserDef *userdef_prev) { #define USERDEF_RESTORE(member) \ { \ @@ -1755,13 +1753,6 @@ static void wm_userpref_read_exceptions(UserDef *userdef_curr, /* Current visible preferences category. */ USERDEF_RESTORE(userpref); - if (use_factory_settings) { -/* Preferences about the preferen
[Bf-blender-cvs] [2459a1a214b] master: WM: optionally override the context with a module for wm.context_toggle
Commit: 2459a1a214b950cc8baa4e8fcb48e7dfada58b77 Author: Campbell Barton Date: Wed Jun 12 12:17:50 2019 +1000 Branches: master https://developer.blender.org/rB2459a1a214b950cc8baa4e8fcb48e7dfada58b77 WM: optionally override the context with a module for wm.context_toggle This may be used with other wm.context_* operators in the future. === M release/scripts/startup/bl_operators/wm.py === diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 0788e3bc51c..774c8e63002 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -69,6 +69,14 @@ rna_space_type_prop = EnumProperty( default='EMPTY', ) +# Note, this can be used for more operators, +# currently not used for all "WM_OT_context_" operators. +rna_module_prop = StringProperty( +name="Module", +description="Optionally override the context with a module", +maxlen=1024, +) + def context_path_validate(context, data_path): try: @@ -325,16 +333,24 @@ class WM_OT_context_toggle(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path: rna_path_prop +module: rna_module_prop def execute(self, context): data_path = self.data_path -if context_path_validate(context, data_path) is Ellipsis: +module = self.module +if not module: +base = context +else: +from importlib import import_module +base = import_module(self.module) + +if context_path_validate(base, data_path) is Ellipsis: return {'PASS_THROUGH'} -exec("context.%s = not (context.%s)" % (data_path, data_path)) +exec("base.%s = not (base.%s)" % (data_path, data_path)) -return operator_path_undo_return(context, data_path) +return operator_path_undo_return(base, data_path) class WM_OT_context_toggle_enum(Operator): ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [017b8dfe47b] master: Cleanup: expand left/right select keymap items
Commit: 017b8dfe47b56c64f6d2d708f9f358cf66dedc41 Author: Campbell Barton Date: Wed Jun 12 11:11:39 2019 +1000 Branches: master https://developer.blender.org/rB017b8dfe47b56c64f6d2d708f9f358cf66dedc41 Cleanup: expand left/right select keymap items This was meant to simplify the keymap but ended up not having a significant advantage. === M release/scripts/presets/keyconfig/keymap_data/blender_default.py === diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 1e34b5699fb..62d71e62fe8 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1357,10 +1357,12 @@ def km_graph_editor(params): {"properties": [("extend", False), ("column", False), ("curves", True)]}), ("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, {"properties": [("extend", True), ("column", False), ("curves", True)]}), -*(("graph.select_leftright", - {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": extend, "alt": not params.legacy}, - {"properties": [("mode", 'CHECK'), ("extend", extend)]} -) for extend in (False, True)), +("graph.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", False)]}), +("graph.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": True, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", True)]}), ("graph.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("mode", 'LEFT'), ("extend", False)]}), ("graph.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, @@ -1889,10 +1891,12 @@ def km_dopesheet(params): {"properties": [("extend", False), ("column", False), ("channel", True)]}), ("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, {"properties": [("extend", True), ("column", False), ("channel", True)]}), -*(("action.select_leftright", - {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": extend, "alt": not params.legacy}, - {"properties": [("mode", 'CHECK'), ("extend", extend)]} -) for extend in (False, True)), +("action.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", False)]}), +("action.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": True, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", True)]}), ("action.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("mode", 'LEFT'), ("extend", False)]}), ("action.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, @@ -2030,10 +2034,12 @@ def km_nla_editor(params): {"properties": [("extend", False), ("deselect_all", not params.legacy)]}), ("nla.click_select", {"type": params.select_mouse, "value": 'PRESS', "shift": True}, {"properties": [("extend", True)]}), -*(("nla.select_leftright", - {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": extend, "alt": not params.legacy}, - {"properties": [("mode", 'CHECK'), ("extend", extend)]} -) for extend in (False, True)), +("nla.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", False)]}), +("nla.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": True, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", True)]}), ("nla.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("mode", 'LEFT'), ("extend", False)]}), ("nla.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, @@ -2350,10 +2356,12 @@ def km_sequencer(params): {"properties": [("extend", False), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True}, {"properties": [("extend", True), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), -*(("
[Bf-blender-cvs] [15f0315ab1e] master: Keymap: Add Ctrl-SelectMouse in to box-deselect
Commit: 15f0315ab1e57d465584525f4c01a27cf7a25601 Author: Campbell Barton Date: Wed Jun 12 10:42:57 2019 +1000 Branches: master https://developer.blender.org/rB15f0315ab1e57d465584525f4c01a27cf7a25601 Keymap: Add Ctrl-SelectMouse in to box-deselect === M release/scripts/presets/keyconfig/keymap_data/blender_default.py === diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 10ebb80df91..1e34b5699fb 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1378,6 +1378,8 @@ def km_graph_editor(params): {"properties": [("tweak", True), ("mode", 'SET')]}), ("graph.select_box", {"type": params.select_tweak, "value": 'ANY', "shift": True}, {"properties": [("tweak", True), ("mode", 'ADD')]}), +("graph.select_box", {"type": params.select_tweak, "value": 'ANY', "ctrl": True}, + {"properties": [("tweak", True), ("mode", 'SUB')]}), ("graph.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True}, {"properties": [("mode", 'ADD')]}), ("graph.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True}, @@ -1904,6 +1906,8 @@ def km_dopesheet(params): {"properties": [("tweak", True), ("mode", 'SET')]}), ("action.select_box", {"type": params.select_tweak, "value": 'ANY', "shift": True}, {"properties": [("tweak", True), ("mode", 'ADD')]}), +("action.select_box", {"type": params.select_tweak, "value": 'ANY', "ctrl": True}, + {"properties": [("tweak", True), ("mode", 'SUB')]}), ("action.select_lasso", {"type": params.action_tweak, "value": 'ANY', "ctrl": True}, {"properties": [("mode", 'ADD')]}), ("action.select_lasso", {"type": params.action_tweak, "value": 'ANY', "shift": True, "ctrl": True}, @@ -2043,6 +2047,8 @@ def km_nla_editor(params): {"properties": [("tweak", True), ("mode", 'SET')]}), ("nla.select_box", {"type": params.select_tweak, "value": 'ANY', "shift": True}, {"properties": [("tweak", True), ("mode", 'ADD')]}), +("nla.select_box", {"type": params.select_tweak, "value": 'ANY', "ctrl": True}, + {"properties": [("tweak", True), ("mode", 'SUB')]}), ("nla.previewrange_set", {"type": 'P', "value": 'PRESS', "ctrl": True, "alt": True}, None), ("nla.view_all", {"type": 'HOME', "value": 'PRESS'}, None), ("nla.view_all", {"type": 'NDOF_BUTTON_FIT', "value": 'PRESS'}, None), ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8ce93ef6ae5] master: Cleanup: clang-format
Commit: 8ce93ef6ae5169297aca67f5439503c3b25dc707 Author: Campbell Barton Date: Wed Jun 12 08:17:40 2019 +1000 Branches: master https://developer.blender.org/rB8ce93ef6ae5169297aca67f5439503c3b25dc707 Cleanup: clang-format === M intern/ghost/intern/GHOST_ContextCGL.mm M intern/ghost/intern/GHOST_SystemCocoa.mm === diff --git a/intern/ghost/intern/GHOST_ContextCGL.mm b/intern/ghost/intern/GHOST_ContextCGL.mm index 0fca41306a6..12c340ffe97 100644 --- a/intern/ghost/intern/GHOST_ContextCGL.mm +++ b/intern/ghost/intern/GHOST_ContextCGL.mm @@ -34,8 +34,7 @@ static void ghost_fatal_error_dialog(const char *msg) { - @autoreleasepool - { + @autoreleasepool { NSString *message = [NSString stringWithFormat:@"Error opening window:\n%s", msg]; NSAlert *alert = [[NSAlert alloc] init]; @@ -338,8 +337,7 @@ static const OSType METAL_CORE_VIDEO_PIXEL_FORMAT = kCVPixelFormatType_32BGRA; void GHOST_ContextCGL::metalInit() { - @autoreleasepool - { + @autoreleasepool { id device = m_metalLayer.device; // Create a command queue for blit/present operation @@ -534,8 +532,7 @@ void GHOST_ContextCGL::metalUpdateFramebuffer() void GHOST_ContextCGL::metalSwapBuffers() { - @autoreleasepool - { + @autoreleasepool { updateDrawingContext(); glFlush(); diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 80a521a7ca5..376ebfa2a21 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -1358,8 +1358,7 @@ bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr) // Check open windows if some changes are not saved if (m_windowManager->getAnyModifiedState()) { -@autoreleasepool -{ +@autoreleasepool { NSAlert *alert = [[NSAlert alloc] init]; NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]]; NSString *text = @"Current document has not been saved.\nDo you really want to proceed?"; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6529d20d79a] master: Cleanup: spelling in comments
Commit: 6529d20d79a5e55696a2fa48150055d3e4a942dd Author: Campbell Barton Date: Wed Jun 12 09:04:10 2019 +1000 Branches: master https://developer.blender.org/rB6529d20d79a5e55696a2fa48150055d3e4a942dd Cleanup: spelling in comments === M intern/cycles/blender/blender_python.cpp M intern/cycles/kernel/closure/bssrdf.h M intern/cycles/kernel/kernel_camera.h M intern/cycles/kernel/kernel_passes.h M intern/cycles/kernel/kernel_types.h M intern/cycles/render/session.cpp M intern/cycles/subd/subd_dice.cpp M intern/cycles/util/util_math_matrix.h M intern/cycles/util/util_task.cpp M intern/ghost/GHOST_C-api.h M intern/ghost/intern/GHOST_DropTargetWin32.h M intern/ghost/intern/GHOST_WindowX11.cpp M source/blender/blenkernel/BKE_animsys.h M source/blender/blenkernel/BKE_gpencil_modifier.h M source/blender/blenkernel/BKE_modifier.h M source/blender/blenkernel/BKE_particle.h M source/blender/blenkernel/BKE_shader_fx.h M source/blender/blenkernel/intern/DerivedMesh.c M source/blender/blenkernel/intern/anim_sys.c M source/blender/blenkernel/intern/blendfile.c M source/blender/blenkernel/intern/constraint.c M source/blender/blenkernel/intern/customdata.c M source/blender/blenkernel/intern/data_transfer.c M source/blender/blenkernel/intern/fcurve.c M source/blender/blenkernel/intern/fmodifier.c M source/blender/blenkernel/intern/image.c M source/blender/blenkernel/intern/ipo.c M source/blender/blenkernel/intern/layer.c M source/blender/blenkernel/intern/library.c M source/blender/blenkernel/intern/library_query.c M source/blender/blenkernel/intern/library_remap.c M source/blender/blenkernel/intern/lightprobe.c M source/blender/blenkernel/intern/main.c M source/blender/blenkernel/intern/mask_rasterize.c M source/blender/blenkernel/intern/movieclip.c M source/blender/blenkernel/intern/multires.c M source/blender/blenkernel/intern/nla.c M source/blender/blenkernel/intern/object_update.c M source/blender/blenkernel/intern/pbvh.c M source/blender/blenkernel/intern/pbvh_bmesh.c M source/blender/blenkernel/intern/pointcache.c M source/blender/blenkernel/intern/seqcache.c M source/blender/blenkernel/intern/sequencer.c M source/blender/blenkernel/intern/softbody.c M source/blender/blenkernel/intern/sound.c M source/blender/blenkernel/intern/subdiv_converter_mesh.c M source/blender/blenkernel/intern/subsurf_ccg.c M source/blender/blenkernel/intern/text.c M source/blender/blenlib/intern/expr_pylike_eval.c M source/blender/blenlib/intern/math_geom.c M source/blender/blenlib/intern/math_matrix.c M source/blender/blenlib/intern/scanfill.c M source/blender/blenlib/intern/string_utils.c M source/blender/blenlib/intern/threads.c M source/blender/blenloader/intern/blend_validate.c M source/blender/blenloader/intern/readblenentry.c M source/blender/blenloader/intern/readfile.c M source/blender/blenloader/intern/versioning_270.c M source/blender/blenloader/intern/versioning_280.c M source/blender/blenloader/intern/writefile.c M source/blender/bmesh/intern/bmesh_marking.c M source/blender/bmesh/intern/bmesh_mesh.c M source/blender/bmesh/intern/bmesh_operators.c M source/blender/bmesh/intern/bmesh_query.c M source/blender/bmesh/intern/bmesh_walkers.c M source/blender/bmesh/intern/bmesh_walkers.h M source/blender/compositor/COM_defines.h M source/blender/depsgraph/DEG_depsgraph_query.h M source/blender/depsgraph/intern/builder/deg_builder_relations.cc M source/blender/depsgraph/intern/depsgraph_query.cc M source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc M source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.h M source/blender/depsgraph/intern/eval/deg_eval_flush.cc M source/blender/depsgraph/intern/node/deg_node_operation.h M source/blender/draw/engines/eevee/eevee_bloom.c M source/blender/draw/engines/eevee/eevee_depth_of_field.c M source/blender/draw/engines/eevee/eevee_effects.c M source/blender/draw/engines/eevee/eevee_lightcache.c M source/blender/draw/engines/eevee/eevee_lightprobes.c M source/blender/draw/engines/eevee/eevee_lights.c M source/blender/draw/engines/eevee/eevee_lookdev.c M source/blender/draw/engines/eevee/eevee_screen_raytrace.c M source/blender/draw/engines/eevee/shaders/effect_downsample_cube_frag.glsl M source/blender/draw/engines/eevee/shaders/effect_downsample_frag.glsl M source/blender/draw/engines/eevee/shaders/effect_minmaxz_frag.glsl M source/blender/draw/engines/eevee/shaders/lightprobe_planar_downsample_frag.glsl M
[Bf-blender-cvs] [96708701abd] master: Cleanup: unused vars
Commit: 96708701abdb0688dfbbc5c97134a0ff45b2f09d Author: Campbell Barton Date: Wed Jun 12 08:16:58 2019 +1000 Branches: master https://developer.blender.org/rB96708701abdb0688dfbbc5c97134a0ff45b2f09d Cleanup: unused vars === M source/blender/blenkernel/intern/nla.c M source/blender/blenkernel/intern/sequencer.c M source/blender/blenkernel/intern/sound.c M source/blender/editors/armature/armature_utils.c === diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index d7546e5db0c..ae786a7d2c5 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -408,8 +408,7 @@ NlaStrip *BKE_nla_add_soundstrip(Main *bmain, Scene *scene, Speaker *speaker) { strip->end = 10.0f; /* quiet compiler warnings */ -(void)scene; -(void)speaker; +UNUSED_VARS(bmain, scene, speaker); } /* general settings */ diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 215f651811c..bfc6565819c 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1057,6 +1057,7 @@ void BKE_sequence_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, cons seq->len = 0; } #else + UNUSED_VARS(bmain); return; #endif break; @@ -4962,7 +4963,7 @@ void BKE_sequencer_refresh_sound_length(Main *bmain, Scene *scene) sequencer_refresh_sound_length_recursive(bmain, scene, &scene->ed->seqbase); } #else - (void)scene; + UNUSED_VARS(bmain, scene); #endif } diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 927a45accca..dfa0783de06 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -1199,7 +1199,7 @@ int BKE_sound_scene_playing(Scene *UNUSED(scene)) } void BKE_sound_read_waveform(Main *bmain, bSound *sound, short *stop) { - UNUSED_VARS(sound, stop); + UNUSED_VARS(sound, stop, bmain); } void BKE_sound_init_main(Main *UNUSED(bmain)) { diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index c67a031317c..5d424594229 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -429,9 +429,7 @@ void ED_armature_ebone_transform_mirror_update(bArmature *arm, EditBone *ebo, bo void ED_armature_edit_transform_mirror_update(Object *obedit) { bArmature *arm = obedit->data; - EditBone *ebo, *eboflip; - - for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { + for (EditBone *ebo = arm->edbo->first; ebo; ebo = ebo->next) { ED_armature_ebone_transform_mirror_update(arm, ebo, true); } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d93a7290e50] master: View3D Snap: Don't mix original/evaluated in the same function parameters.
Commit: d93a7290e5063be31c7c6af9f0496182658f42d2 Author: mano-wii Date: Tue Jun 11 18:45:46 2019 -0300 Branches: master https://developer.blender.org/rBd93a7290e5063be31c7c6af9f0496182658f42d2 View3D Snap: Don't mix original/evaluated in the same function parameters. === M source/blender/editors/space_view3d/view3d_snap.c === diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 8b1d2028107..51dc14f3dff 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -428,13 +428,14 @@ static int snap_selected_to_location(bContext *C, sub_v3_v3(cursor_parent, ob->obmat[3]); if (ob->parent) { - float parentmat[4][4]; - /* The evaluated object is used here because sometimes - * `runtime.curve_cache` is required. */ - Object *ob_parent_eval = DEG_get_evaluated_object(depsgraph, ob->parent); - BKE_object_get_parent_matrix(ob, ob_parent_eval, parentmat); - mul_m3_m4m4(imat, parentmat, ob->parentinv); - invert_m3(imat); + float originmat[3][3], parentmat[4][4]; + /* Use the evaluated object here because sometimes + * `ob->parent->runtime.curve_cache` is required. */ + Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); + + BKE_object_get_parent_matrix(ob_eval, ob_eval->parent, parentmat); + mul_m3_m4m4(originmat, parentmat, ob->parentinv); + invert_m3_m3(imat, originmat); mul_m3_v3(imat, cursor_parent); } if ((ob->protectflag & OB_LOCK_LOCX) == 0) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f92bb695c40] master: Fix T64478: Wrong location Snap Selection to Cursor after set camera Follow the path.
Commit: f92bb695c4082351b52a4b8ccb5d021cd6a88263 Author: mano-wii Date: Tue Jun 11 18:12:14 2019 -0300 Branches: master https://developer.blender.org/rBf92bb695c4082351b52a4b8ccb5d021cd6a88263 Fix T64478: Wrong location Snap Selection to Cursor after set camera Follow the path. In this case it is necessary to use the `object->parent` evaluated to obtain the correct `parentmat`. === M source/blender/editors/space_view3d/view3d_snap.c === diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index fb121aa716b..8b1d2028107 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -428,10 +428,13 @@ static int snap_selected_to_location(bContext *C, sub_v3_v3(cursor_parent, ob->obmat[3]); if (ob->parent) { - float originmat[3][3]; - BKE_object_where_is_calc_ex(depsgraph, scene, NULL, ob, originmat); - - invert_m3_m3(imat, originmat); + float parentmat[4][4]; + /* The evaluated object is used here because sometimes + * `runtime.curve_cache` is required. */ + Object *ob_parent_eval = DEG_get_evaluated_object(depsgraph, ob->parent); + BKE_object_get_parent_matrix(ob, ob_parent_eval, parentmat); + mul_m3_m4m4(imat, parentmat, ob->parentinv); + invert_m3(imat); mul_m3_v3(imat, cursor_parent); } if ((ob->protectflag & OB_LOCK_LOCX) == 0) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d665d128536] master: Cleanup: remove unused var.
Commit: d665d128536cb7fc42e3796c0bd4529c1a391431 Author: Bastien Montagne Date: Tue Jun 11 21:16:36 2019 +0200 Branches: master https://developer.blender.org/rBd665d128536cb7fc42e3796c0bd4529c1a391431 Cleanup: remove unused var. === M source/blender/makesrna/intern/rna_armature.c === diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 3f4acabec34..99b2c423b44 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -550,7 +550,7 @@ static void rna_Armature_editbone_transform_update(Main *bmain, Scene *scene, Po { bArmature *arm = (bArmature *)ptr->id.data; EditBone *ebone = (EditBone *)ptr->data; - EditBone *child, *eboflip; + EditBone *child; /* update our parent */ if (ebone->parent && ebone->flag & BONE_CONNECTED) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [23df1a774b5] master: Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_.
Commit: 23df1a774b5b70e5108e2d1b1901d2a204ca1d9e Author: Bastien Montagne Date: Tue Jun 11 22:25:01 2019 +0200 Branches: master https://developer.blender.org/rB23df1a774b5b70e5108e2d1b1901d2a204ca1d9e Fix/Cleanup: I18N: Bad usage of IFACE_ instead of TIP_. Cheap tip: anything that is not "Camel Case" and/or that is more than a few words long should use `TIP_` translation, not `IFACE_` one. Also added several missing strings (including the one reported in D5056 by Jean First (@robbott), thanks). === M source/blender/blenkernel/intern/pointcache.c M source/blender/compositor/intern/COM_ExecutionGroup.cpp M source/blender/compositor/intern/COM_ExecutionSystem.cpp M source/blender/draw/engines/eevee/eevee_lightcache.c M source/blender/editors/animation/anim_ipo_utils.c M source/blender/editors/animation/anim_markers.c M source/blender/editors/armature/pose_lib.c M source/blender/editors/armature/pose_slide.c M source/blender/editors/gpencil/annotate_paint.c M source/blender/editors/gpencil/gpencil_brush.c M source/blender/editors/gpencil/gpencil_fill.c M source/blender/editors/gpencil/gpencil_interpolate.c M source/blender/editors/gpencil/gpencil_paint.c M source/blender/editors/gpencil/gpencil_primitive.c M source/blender/editors/interface/interface_region_tooltip.c M source/blender/editors/interface/interface_templates.c M source/blender/editors/mesh/editmesh_bevel.c M source/blender/editors/mesh/editmesh_bisect.c M source/blender/editors/mesh/editmesh_inset.c M source/blender/editors/mesh/editmesh_knife.c M source/blender/editors/mesh/editmesh_loopcut.c M source/blender/editors/mesh/editmesh_tools.c M source/blender/editors/render/render_internal.c M source/blender/editors/screen/screen_user_menu.c M source/blender/editors/sculpt_paint/paint_image.c M source/blender/editors/sculpt_paint/sculpt.c M source/blender/editors/space_buttons/buttons_texture.c M source/blender/editors/space_clip/clip_buttons.c M source/blender/editors/space_clip/tracking_ops.c M source/blender/editors/space_graph/graph_buttons.c M source/blender/editors/space_image/image_buttons.c M source/blender/editors/space_info/info_stats.c M source/blender/editors/space_node/node_relationships.c M source/blender/editors/space_sequencer/sequencer_edit.c M source/blender/editors/transform/transform.c M source/blender/editors/transform/transform_constraints.c M source/blender/editors/transform/transform_orientations.c M source/blender/editors/util/ed_util.c M source/blender/editors/uvedit/uvedit_smart_stitch.c M source/blender/editors/uvedit/uvedit_unwrap_ops.c M source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp M source/blender/render/intern/source/pipeline.c M source/blender/windowmanager/intern/wm_files.c === diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index a55d0be4f95..2a64a50213c 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -4482,13 +4482,13 @@ void BKE_ptcache_update_info(PTCacheID *pid) /* smoke doesn't use frame 0 as info frame so can't check based on totpoint */ if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN && totframes) { - BLI_snprintf(cache->info, sizeof(cache->info), IFACE_("%i frames found!"), totframes); + BLI_snprintf(cache->info, sizeof(cache->info), TIP_("%i frames found!"), totframes); } else if (totframes && cache->totpoint) { - BLI_snprintf(cache->info, sizeof(cache->info), IFACE_("%i points found!"), cache->totpoint); + BLI_snprintf(cache->info, sizeof(cache->info), TIP_("%i points found!"), cache->totpoint); } else { - BLI_strncpy(cache->info, IFACE_("No valid data to read!"), sizeof(cache->info)); + BLI_strncpy(cache->info, TIP_("No valid data to read!"), sizeof(cache->info)); } return; } @@ -4499,10 +4499,10 @@ void BKE_ptcache_update_info(PTCacheID *pid) if (cache->totpoint > totpoint) { BLI_snprintf( -mem_info, sizeof(mem_info), IFACE_("%i cells + High Resolution cached"), totpoint); +mem_info, sizeof(mem_info), TIP_("%i cells + High Resolution cached"), totpoint); } else { -BLI_snprintf(mem_info, sizeof(mem_info), IFACE_("%i cells cached"), totpoint); +BLI_snprintf(mem_info, sizeof(mem_info), TIP_("%i cells cached"), totpoint); } } else { @@ -4514,7 +4514,7 @@ void BKE_ptcache_update_info(PTCacheID *pid) } } - BLI_snprintf(mem_info, sizeof(mem_info), IFACE_("%i frames on disk"), totframes);
[Bf-blender-cvs] [14bd257bb78] master: Fix (unreported) message wrongly using IFACE_ for its translation.
Commit: 14bd257bb780411ff949129aec4d59ef61423306 Author: Bastien Montagne Date: Tue Jun 11 20:54:43 2019 +0200 Branches: master https://developer.blender.org/rB14bd257bb780411ff949129aec4d59ef61423306 Fix (unreported) message wrongly using IFACE_ for its translation. `IFACE_` is for short strings always shown in UI (like labels of buttons, menu entries...). Every thing else, especially when more than a couple of words, must use `TIP_`. === M source/blender/editors/space_outliner/outliner_dragdrop.c === diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index 49ba397a108..d8276aa2bbc 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -802,7 +802,7 @@ static bool collection_drop_poll(bContext *C, if (!data.from || event->ctrl) { tselem->flag |= TSE_DRAG_INTO; changed = true; - *tooltip = IFACE_("Link inside Collection"); + *tooltip = TIP_("Link inside Collection"); } else { switch (data.insert_type) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [09c32a15d2f] master: Fix T64430: Removing objects from sub-collection doesn't update instances of parent collection.
Commit: 09c32a15d2f9171c2b61220c6ba5cc585f541cb2 Author: Bastien Montagne Date: Tue Jun 11 21:13:37 2019 +0200 Branches: master https://developer.blender.org/rB09c32a15d2f9171c2b61220c6ba5cc585f541cb2 Fix T64430: Removing objects from sub-collection doesn't update instances of parent collection. Collections are a tad annoying with all their caching of objects... When we modify content of a children collection, we need to tag DeG for CoW update of all of the ancestors. For now keeping that recursive tagging helper private, but would not be surprised if we found more similar cases and needed to expose it to more code... === M source/blender/blenkernel/intern/collection.c === diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 03bae118f0f..88ec4f8793f 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -624,6 +624,26 @@ bool BKE_collection_is_empty(Collection *collection) /** Collection Objects */ +static void collection_tag_update_parent_recursive(Main *bmain, + Collection *collection, + const int flag) +{ + if (collection->flag & COLLECTION_IS_MASTER) { +return; + } + + DEG_id_tag_update_ex(bmain, &collection->id, flag); + + for (CollectionParent *collection_parent = collection->parents.first; collection_parent; + collection_parent = collection_parent->next) { +if (collection_parent->collection->flag & COLLECTION_IS_MASTER) { + /* We don't care about scene/master collection here. */ + continue; +} +collection_tag_update_parent_recursive(bmain, collection_parent->collection, flag); + } +} + static bool collection_object_add( Main *bmain, Collection *collection, Object *ob, int flag, const bool add_us) { @@ -649,7 +669,7 @@ static bool collection_object_add( } if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) { -DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE); +collection_tag_update_parent_recursive(bmain, collection, ID_RECALC_COPY_ON_WRITE); } if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) { @@ -679,7 +699,7 @@ static bool collection_object_remove(Main *bmain, id_us_min(&ob->id); } - DEG_id_tag_update_ex(bmain, &collection->id, ID_RECALC_COPY_ON_WRITE); + collection_tag_update_parent_recursive(bmain, collection, ID_RECALC_COPY_ON_WRITE); return true; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [42f4c147324] master: Fix T64608: DOF Focus object, not linked to new copy, Scen "full_copy".
Commit: 42f4c147324f7d14f7d1cd3bcab20295176de846 Author: Bastien Montagne Date: Tue Jun 11 20:48:52 2019 +0200 Branches: master https://developer.blender.org/rB42f4c147324f7d14f7d1cd3bcab20295176de846 Fix T64608: DOF Focus object, not linked to new copy, Scen "full_copy". Note that there are probably many other similar cases... This code is really legacy, should use library_query helpers and other modern BKE_library code instead of doing its own dirty cooking... === M source/blender/editors/object/object_relations.c === diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f748fd247ee..1446ea23bb8 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -29,19 +29,20 @@ #include "DNA_anim_types.h" #include "DNA_armature_types.h" -#include "DNA_mesh_types.h" +#include "DNA_camera_types.h" #include "DNA_collection_types.h" #include "DNA_constraint_types.h" +#include "DNA_gpencil_types.h" #include "DNA_light_types.h" #include "DNA_lattice_types.h" #include "DNA_material_types.h" +#include "DNA_mesh_types.h" #include "DNA_meta_types.h" +#include "DNA_object_types.h" #include "DNA_particle_types.h" #include "DNA_scene_types.h" -#include "DNA_world_types.h" -#include "DNA_object_types.h" #include "DNA_vfont_types.h" -#include "DNA_gpencil_types.h" +#include "DNA_world_types.h" #include "BLI_math.h" #include "BLI_listbase.h" @@ -1852,7 +1853,7 @@ static void single_obdata_users( { Light *la; Curve *cu; - /* Camera *cam; */ + Camera *cam; Mesh *me; Lattice *lat; ID *id; @@ -1869,7 +1870,8 @@ static void single_obdata_users( ob->data = la = ID_NEW_SET(ob->data, BKE_light_copy(bmain, ob->data)); break; case OB_CAMERA: -ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data)); +cam = ob->data = ID_NEW_SET(ob->data, BKE_camera_copy(bmain, ob->data)); +ID_NEW_REMAP(cam->dof.focus_object); break; case OB_MESH: /* Needed to remap texcomesh below. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2f68a76409e] soc-2019-openxr: Split wm_xr.c into multiple files
Commit: 2f68a76409eaed743790727ee3a8296f070ee40d Author: Julian Eisel Date: Tue Jun 11 17:50:16 2019 +0200 Branches: soc-2019-openxr https://developer.blender.org/rB2f68a76409eaed743790727ee3a8296f070ee40d Split wm_xr.c into multiple files Similar to gizmo/ and message_bus/, there's now a xr/ directory containing header files and a intern/ directory for source and internal header files. Guess this is reasonable to do. And better to do early on to avoid loosing much git history. === M release/scripts/addons M source/blender/windowmanager/CMakeLists.txt M source/blender/windowmanager/intern/wm.c M source/blender/windowmanager/intern/wm_operators.c M source/blender/windowmanager/intern/wm_window.c M source/blender/windowmanager/wm.h R060source/blender/windowmanager/intern/wm_xr.c source/blender/windowmanager/xr/intern/wm_xr.c A source/blender/windowmanager/xr/intern/wm_xr_event.c A source/blender/windowmanager/xr/intern/wm_xr_intern.h A source/blender/windowmanager/xr/intern/wm_xr_openxr_includes.h A source/blender/windowmanager/xr/intern/wm_xr_session.c A source/blender/windowmanager/xr/wm_xr.h === diff --git a/release/scripts/addons b/release/scripts/addons index 7317987baa8..fcf7d4c16b1 16 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit 7317987baa8aac52a11d6af0a825d87acc658f60 +Subproject commit fcf7d4c16b17c34579fc080386425e0774a502d2 diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index a6a1f068e33..41b992862fa 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -176,7 +176,16 @@ endif() if(WITH_OPENXR) list(APPEND SRC -intern/wm_xr.c +xr/intern/wm_xr.c +xr/intern/wm_xr_event.c +xr/intern/wm_xr_session.c + +xr/wm_xr.h +xr/intern/wm_xr_intern.h +xr/intern/wm_xr_openxr_includes.h + ) + list(APPEND INC +xr ) list(APPEND INC_SYS ${OPENXR_SDK_INCLUDES} diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index a3b2b85e53b..87a2e1a4647 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -52,6 +52,9 @@ #include "wm_event_system.h" #include "wm_draw.h" #include "wm.h" +#ifdef WITH_OPENXR +# include "wm_xr.h" +#endif #include "ED_screen.h" #include "BKE_undo_system.h" diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 30965abc4e1..bbea21b7c7b 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -115,6 +115,9 @@ #include "wm_event_types.h" #include "wm_files.h" #include "wm_window.h" +#ifdef WITH_OPENXR +# include "wm_xr.h" +#endif #define UNDOCUMENTED_OPERATOR_TIP N_("(undocumented operator)") diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 6ab7466ac48..a63726ae82d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -64,6 +64,9 @@ #include "wm_files.h" #include "wm_window.h" #include "wm_event_system.h" +#ifdef WITH_OPENXR +# include "wm_xr.h" +#endif #include "ED_anim_api.h" #include "ED_render.h" diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h index 6eb3a16fd25..fa375efb469 100644 --- a/source/blender/windowmanager/wm.h +++ b/source/blender/windowmanager/wm.h @@ -95,49 +95,4 @@ void wm_stereo3d_set_cancel(bContext *C, wmOperator *op); void wm_open_init_load_ui(wmOperator *op, bool use_prefs); void wm_open_init_use_scripts(wmOperator *op, bool use_prefs); -/* wm_xr.c */ -#ifdef WITH_OPENXR - -/** - * The XR view (i.e. the OpenXR runtime) may require a different graphics library than OpenGL. An - * offscreen texture of the viewport will then be drawn into using OpenGL, but the final texture - * draw call will happen through another lib (say DirectX). - * - * This enum defines the possible graphics bindings to attempt to enable. - */ -typedef enum { - WM_XR_GRAPHICS_UNKNOWN = 0, - WM_XR_GRAPHICS_OPENGL, -# ifdef WIN32 - WM_XR_GRAPHICS_D3D11, -# endif - /* For later */ - // WM_XR_GRAPHICS_VULKAN, -} eWM_xrGraphicsBinding; - -/* An array of eWM_xrGraphicsBinding items defining the candidate bindings to use. The first - * available candidate will be chosen, so order defines priority. */ -typedef const eWM_xrGraphicsBinding *wmXRGraphicsBindingCandidates; - -typedef struct { - const wmXRGraphicsBindingCandidates gpu_binding_candidates; - unsigned int gpu_binding_candidates_count; -} wmXRContextCreateInfo; - -/* xr-context */ -struct wmXRContext *wm_xr_contex
[Bf-blender-cvs] [c058c338648] master: Edit Mode: Fix face alpha being too strong in xray mode
Commit: c058c3386487ccfa6bc7ccdb2f534d5c41ece99d Author: Clément Foucault Date: Tue Jun 11 17:48:06 2019 +0200 Branches: master https://developer.blender.org/rBc058c3386487ccfa6bc7ccdb2f534d5c41ece99d Edit Mode: Fix face alpha being too strong in xray mode This make the xray & wireframe follows the same style as the solid mode. === M source/blender/draw/modes/edit_mesh_mode.c === diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index cbe7cf89d50..8365a7f1b72 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -587,6 +587,7 @@ static void EDIT_MESH_cache_init(void *vedata) psl->facefill_occlude_cage = DRW_pass_create("Front Face Cage Color", state); if (g_data->do_faces) { + const bool select_face = (tsettings->selectmode & SCE_SELECT_FACE) != 0; DRWShadingGroup *shgrp; /* however we loose the front faces value (because we need the depth of occluded wires and @@ -595,6 +596,7 @@ static void EDIT_MESH_cache_init(void *vedata) psl->facefill_occlude); DRW_shgroup_uniform_block(shgrp, "globalsBlock", G_draw.block_ubo); DRW_shgroup_uniform_ivec4(shgrp, "dataMask", g_data->data_mask, 1); + DRW_shgroup_uniform_bool_copy(shgrp, "selectFaces", select_face); if (rv3d->rflag & RV3D_CLIPPING) { DRW_shgroup_state_enable(shgrp, DRW_STATE_CLIP_PLANES); } @@ -603,6 +605,7 @@ static void EDIT_MESH_cache_init(void *vedata) sh_data->overlay_facefill, psl->facefill_occlude_cage); DRW_shgroup_uniform_block(shgrp, "globalsBlock", G_draw.block_ubo); DRW_shgroup_uniform_ivec4(shgrp, "dataMask", g_data->data_mask, 1); + DRW_shgroup_uniform_bool_copy(shgrp, "selectFaces", select_face); if (rv3d->rflag & RV3D_CLIPPING) { DRW_shgroup_state_enable(shgrp, DRW_STATE_CLIP_PLANES); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c84c59c81bc] master: Fix T65406 Edit Mode: Edge selection is below wireframe overlay
Commit: c84c59c81bc90a915b7e74aa90a0bc1fe8aadd22 Author: Clément Foucault Date: Tue Jun 11 17:29:31 2019 +0200 Branches: master https://developer.blender.org/rBc84c59c81bc90a915b7e74aa90a0bc1fe8aadd22 Fix T65406 Edit Mode: Edge selection is below wireframe overlay This was due to a double offset of the wireframe. We also reduce the wireframe offset. The look of the wireframe overlay changes a little with on distant wires. === M source/blender/draw/modes/edit_mesh_mode.c M source/blender/draw/modes/overlay_mode.c M source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl === diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 0a63f303db0..cbe7cf89d50 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -175,7 +175,7 @@ typedef struct EDIT_MESH_PrivateData { DRWView *view_faces; DRWView *view_faces_cage; DRWView *view_edges; - DRWView *view_wires; + DRWView *view_verts; int data_mask[4]; int ghost_ob; @@ -333,7 +333,7 @@ static void EDIT_MESH_engine_init(void *vedata) stl->g_data->view_faces = (DRWView *)DRW_view_default_get(); stl->g_data->view_faces_cage = DRW_view_create_with_zoffset(draw_ctx->rv3d, 0.5f); stl->g_data->view_edges = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.0f); -stl->g_data->view_wires = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.5f); +stl->g_data->view_verts = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.5f); } } @@ -791,7 +791,7 @@ static void edit_mesh_draw_components(EDIT_MESH_ComponentPassList *passes, DRW_view_set_active(g_data->view_edges); DRW_draw_pass(passes->edges); - DRW_view_set_active(g_data->view_wires); + DRW_view_set_active(g_data->view_verts); DRW_draw_pass(passes->verts); DRW_view_set_active(NULL); diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c index fe989dbe8cd..aaaeefa81c9 100644 --- a/source/blender/draw/modes/overlay_mode.c +++ b/source/blender/draw/modes/overlay_mode.c @@ -166,7 +166,7 @@ static void overlay_engine_init(void *vedata) #endif } - stl->g_data->view_wires = DRW_view_create_with_zoffset(draw_ctx->rv3d, 1.0f); + stl->g_data->view_wires = DRW_view_create_with_zoffset(draw_ctx->rv3d, 0.5f); } static void overlay_cache_init(void *vedata) @@ -178,11 +178,9 @@ static void overlay_cache_init(void *vedata) const DRWContextState *draw_ctx = DRW_context_state_get(); RegionView3D *rv3d = draw_ctx->rv3d; + View3D *v3d = draw_ctx->v3d; OVERLAY_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg]; - const DRWContextState *DCS = DRW_context_state_get(); - - View3D *v3d = DCS->v3d; if (v3d) { g_data->overlay = v3d->overlay; g_data->show_overlays = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0; @@ -221,15 +219,6 @@ static void overlay_cache_init(void *vedata) DRW_STATE_FIRST_VERTEX_CONVENTION; float wire_size = U.pixelsize * 0.5f; -float winmat[4][4]; -float viewdist = rv3d->dist; -DRW_view_winmat_get(NULL, winmat, false); -/* special exception for ortho camera (viewdist isnt used for perspective cameras) */ -if (rv3d->persp == RV3D_CAMOB && rv3d->is_persp == false) { - viewdist = 1.0f / max_ff(fabsf(rv3d->winmat[0][0]), fabsf(rv3d->winmat[1][1])); -} -const float depth_ofs = bglPolygonOffsetCalc((float *)winmat, viewdist, 1.0f); - const bool use_select = (DRW_state_is_select() || DRW_state_is_depth()); GPUShader *face_wires_sh = use_select ? sh_data->select_wireframe : sh_data->face_wireframe; @@ -238,7 +227,6 @@ static void overlay_cache_init(void *vedata) g_data->face_wires_shgrp = DRW_shgroup_create(face_wires_sh, psl->face_wireframe_pass); DRW_shgroup_uniform_float( g_data->face_wires_shgrp, "wireStepParam", &g_data->wire_step_param, 1); -DRW_shgroup_uniform_float_copy(g_data->face_wires_shgrp, "ofs", depth_ofs); if (use_select || USE_GEOM_SHADER_WORKAROUND) { DRW_shgroup_uniform_float_copy(g_data->face_wires_shgrp, "wireSize", wire_size); DRW_shgroup_uniform_vec2( diff --git a/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl b/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl index 23f64e6e49c..9022456abb2 100644 --- a/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl +++ b/source/blender/draw/modes/shaders/overlay_face_wireframe_vert.glsl @@ -1,6 +1,5 @@ uniform float wireStepParam; -uniform float ofs; in vec3 pos; in vec3 nor; @@ -31,7 +30,6 @@ flat out float edgeSharpness; void main() { mat4 projmat = ProjectionMatrix; - projmat[3][2] -= ofs; vec4 wpos = ModelMatrix * vec4(pos, 1.0); gl_Position = projmat * (ViewMatrix * wpos); __
[Bf-blender-cvs] [304d9a20fcb] soc-2019-openxr: Fix compile errors and crashes on Windows
Commit: 304d9a20fcbc5eec4b2062aedc6e8de3db2d88b1 Author: Julian Eisel Date: Tue Jun 11 16:33:55 2019 +0200 Branches: soc-2019-openxr https://developer.blender.org/rB304d9a20fcbc5eec4b2062aedc6e8de3db2d88b1 Fix compile errors and crashes on Windows * Include needed Windows/DirectX headers * Disable zero sized arraz (GCC extension) * Add missing break causing failling assert * Add missing semicolon in Win only code :) === M source/blender/windowmanager/intern/wm_xr.c === diff --git a/source/blender/windowmanager/intern/wm_xr.c b/source/blender/windowmanager/intern/wm_xr.c index c30ea44bc2f..36d745c85a9 100644 --- a/source/blender/windowmanager/intern/wm_xr.c +++ b/source/blender/windowmanager/intern/wm_xr.c @@ -35,6 +35,22 @@ #include "GHOST_C-api.h" +/* Platform headers */ +#ifdef XR_USE_PLATFORM_WIN32 +# define WIN32_LEAN_AND_MEAN +# define NOMINMAX +# include +#endif +/* Graphics headers */ +#ifdef XR_USE_GRAPHICS_API_D3D10 +# include +#endif +#ifdef XR_USE_GRAPHICS_API_D3D11 +# include +#endif +#ifdef XR_USE_GRAPHICS_API_D3D12 +# include +#endif #ifdef WITH_X11 # include #endif @@ -215,8 +231,14 @@ static void openxr_extensions_to_enable_get(const wmXRContext *context, BLI_assert(gpu_binding); { +/* Zero sized array is GCC extension, so disable until it grows. */ +#if 0 const static char *try_ext[] = {}; const uint try_ext_count = ARRAY_SIZE(try_ext); +#else +const static char **try_ext = NULL; +const uint try_ext_count = 0; +#endif BLI_assert(r_ext_names != NULL); BLI_assert(r_ext_count != NULL); @@ -361,13 +383,14 @@ static void *openxr_graphics_binding_create(const wmXRContext *xr_context, XrGraphicsBindingOpenGLXlibKHR binding = {.type = XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR}; #elif defined(WIN32) - XrGraphicsBindingOpenGLWin32KHR binding = - {.type = XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR } + XrGraphicsBindingOpenGLWin32KHR binding = { + .type = XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR}; #endif binding_ptr = MEM_mallocN(sizeof(binding), __func__); memcpy(binding_ptr, &binding, sizeof(binding)); + break; } #ifdef WIN32 @@ -376,6 +399,8 @@ static void *openxr_graphics_binding_create(const wmXRContext *xr_context, binding_ptr = MEM_mallocN(sizeof(binding), __func__); memcpy(binding_ptr, &binding, sizeof(binding)); + + break; } #endif default: ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c5b1e7cd4e8] master: FFmpeg: Fix integer overflow when writing custom FPS with high denominator
Commit: c5b1e7cd4e86f9aff010fa84192d783b895ce6c7 Author: Sybren A. Stüvel Date: Tue Jun 11 15:51:39 2019 +0200 Branches: master https://developer.blender.org/rBc5b1e7cd4e86f9aff010fa84192d783b895ce6c7 FFmpeg: Fix integer overflow when writing custom FPS with high denominator FFmpeg uses a fraction of integers to indicate the frame rate, whereas Blender uses `int / float`. When a custom frame rate is used with non-integer base, the FPS and Base settings were multiplied with 10 before passing to FFmpeg as `int`. This could overflow when a high enough FPS setting was used, which is the case when importing a video of almost-but-not-quite-integer frame rate into the VSE. The overflow caused FFmpeg to return an error "The encoder timebase is not set", which is rather cryptic for users. The new solution is to take the max int and divide that by the frame rate, and use that ratio to pass to FFmpeg. This won't overflow, and thus allows exporting arbitrary frame rates. === M source/blender/blenkernel/intern/writeffmpeg.c === diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index ae41b8f3272..fb8bfa1dfd9 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -589,8 +589,13 @@ static AVStream *alloc_video_stream(FFMpegContext *context, c->time_base.num = (int)rd->frs_sec_base; } else { -c->time_base.den = rd->frs_sec * 10; -c->time_base.num = ((double)rd->frs_sec_base) * 10; +// This calculates a fraction (DENUM_MAX / num) which approximates the scene +// frame rate (frs_sec / frs_sec_base). +const double DENUM_MAX = 2147483647; +const double num = (DENUM_MAX / (double)rd->frs_sec) * rd->frs_sec_base; + +c->time_base.den = (int)DENUM_MAX; +c->time_base.num = (int)num; } c->gop_size = context->ffmpeg_gop_size; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [bbba447d54b] master: OpenGL Render: Fix crash when using audio
Commit: bbba447d54b3f81dde82610d27925fa429e35870 Author: Sergey Sharybin Date: Tue Jun 11 15:40:03 2019 +0200 Branches: master https://developer.blender.org/rBbbba447d54b3f81dde82610d27925fa429e35870 OpenGL Render: Fix crash when using audio Was very easy to reproduce by rendering sequencer with sound strip. Need to use evaluated scene to open movie handle, since that is the only scene which has proper sound handle with everything else attached to it. === M source/blender/editors/render/render_opengl.c === diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 845f60e9ad1..110dc7aaaf1 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -51,6 +51,7 @@ #include "BKE_writeavi.h" #include "DEG_depsgraph.h" +#include "DEG_depsgraph_query.h" #include "DRW_engine.h" @@ -798,11 +799,12 @@ static bool screen_opengl_render_anim_initialize(bContext *C, wmOperator *op) oglrender->movie_ctx_arr = MEM_mallocN(sizeof(void *) * oglrender->totvideos, "Movies"); for (i = 0; i < oglrender->totvideos; i++) { + Scene *scene_eval = DEG_get_evaluated_scene(oglrender->depsgraph); const char *suffix = BKE_scene_multiview_view_id_suffix_get(&scene->r, i); oglrender->movie_ctx_arr[i] = oglrender->mh->context_create(); if (!oglrender->mh->start_movie(oglrender->movie_ctx_arr[i], - scene, + scene_eval, &scene->r, oglrender->sizex, oglrender->sizey, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d9fd3be084f] sculpt-mode-features: Pose tool: Mask expand operator
Commit: d9fd3be084fa9dabb3d73b8e3b24d5394acb2483 Author: Pablo Dobarro Date: Tue Jun 11 15:28:10 2019 +0200 Branches: sculpt-mode-features https://developer.blender.org/rBd9fd3be084fa9dabb3d73b8e3b24d5394acb2483 Pose tool: Mask expand operator This operator is designed to use with the transform.rotate tool to create a pose tool. It generates a mask from the active vertex, following the topology of the mesh. The operator has two modes. It can expand the mask to the vertex under the cursor or to a certain number of iterations. All the iterations are cached when the operator is invoked, so it should be usable with high poly meshes. I also included some hardcoded mask operations when the operator finishes. In the future, this could be included as an operator macro if it does not have a significant performance penalty (like redrawing all nodes each time a new operator is invoked). It does not support symmetry and it only works with meshes (no dyntopo or multires). I also fixed some bugs in the transform code that were breaking EEVEE compatibility. Undo system still fails sometimes. === M source/blender/draw/modes/sculpt_mode.c M source/blender/editors/sculpt_paint/sculpt.c M source/blender/editors/sculpt_paint/sculpt_intern.h === diff --git a/source/blender/draw/modes/sculpt_mode.c b/source/blender/draw/modes/sculpt_mode.c index 42a2333f305..18deddb04ae 100644 --- a/source/blender/draw/modes/sculpt_mode.c +++ b/source/blender/draw/modes/sculpt_mode.c @@ -155,7 +155,7 @@ static void SCULPT_cache_populate(void *vedata, Object *ob) if (ob->sculpt) { const DRWContextState *draw_ctx = DRW_context_state_get(); -if ((ob == draw_ctx->obact) && BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d)) { +if (ob == draw_ctx->obact) { PBVH *pbvh = ob->sculpt->pbvh; if (pbvh && pbvh_has_mask(pbvh)) { DRW_shgroup_call_sculpt(stl->g_data->mask_overlay_grp, ob, false, true, false); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index d22750c1f89..266279e688b 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -31,6 +31,7 @@ #include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BLI_stack.h" +#include "BLI_gsqueue.h" #include "BLT_translation.h" @@ -7756,14 +7757,21 @@ static void sculpt_filter_cache_init(Object *ob, Sculpt *sd, bool init_random, b static void sculpt_filter_cache_free(SculptSession *ss) { - MEM_freeN(ss->filter_cache->orco); - MEM_freeN(ss->filter_cache->nodes); + if (ss->filter_cache->orco) { +MEM_freeN(ss->filter_cache->orco); + } + if (ss->filter_cache->nodes) { +MEM_freeN(ss->filter_cache->nodes); + } if (ss->filter_cache->random_disp) { MEM_freeN(ss->filter_cache->random_disp); } if (ss->filter_cache->orvcol) { MEM_freeN(ss->filter_cache->orvcol); } + if (ss->filter_cache->mask_update_it) { +MEM_freeN(ss->filter_cache->mask_update_it); + } MEM_freeN(ss->filter_cache); } @@ -8788,7 +8796,6 @@ void ED_sculpt_init_transform(const struct bContext *C, bool transform_pivot_onl Sculpt *sd = CTX_data_tool_settings(C)->sculpt; Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; - struct Scene *scene = CTX_data_scene(C); Depsgraph *depsgraph = CTX_data_depsgraph(C); copy_v3_v3(ss->init_pivot_pos, ss->pivot_pos); @@ -8938,16 +8945,36 @@ void ED_sculpt_update_modal_transform(const struct bContext *C, bool transform_p Sculpt *sd = CTX_data_tool_settings(C)->sculpt; Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; - ARegion *ar = CTX_wm_region(C); - struct Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); Depsgraph *depsgraph = CTX_data_depsgraph(C); if (transform_pivot_only) { return; } + if (!ss->pbvh) { +return; + } + BKE_sculpt_update_object_for_edit(depsgraph, ob, false, true); + if (!BKE_sculptsession_use_pbvh_draw(ob, v3d)) { + +if (ss->filter_cache->nodes) { + MEM_freeN(ss->filter_cache->nodes); +} +SculptSearchSphereData searchdata = { +.ss = ss, +.sd = sd, +.radius_squared = FLT_MAX, +}; +BKE_pbvh_search_gather(ss->pbvh, + sculpt_search_sphere_cb, + &searchdata, + &ss->filter_cache->nodes, + &ss->filter_cache->totnode); + } + SculptThreadedTaskData data = { .sd = sd, .ob = ob, @@ -9038,7 +9065,6 @@ static int sculpt_set_pivot_position_invoke(bContext *C, wmOperator *op, const w Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; ARegion *ar = CTX_wm_region(C); - struct Scene *scene = CTX_data_scene(C); Depsgraph
[Bf-blender-cvs] [86d229f52c4] master: Sound: Fix missing sound sequences length update on FPS change
Commit: 86d229f52c417c36fabd4e3a3151295ea7aa4a54 Author: Sergey Sharybin Date: Tue Jun 11 15:19:32 2019 +0200 Branches: master https://developer.blender.org/rB86d229f52c417c36fabd4e3a3151295ea7aa4a54 Sound: Fix missing sound sequences length update on FPS change === M source/blender/makesrna/intern/rna_scene.c === diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 54f9a52477a..16003815003 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -817,9 +817,13 @@ static void rna_Scene_camera_update(Main *bmain, Scene *UNUSED(scene_unused), Po DEG_relations_tag_update(bmain); } -static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) +static void rna_Scene_fps_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) { DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_FPS | ID_RECALC_SEQUENCER_STRIPS); + /* NOTE: Tag via dependency graph will take care of all the updates ion the evaluated domain, + * however, changes in FPS actually modifies an original stip length, so this we take care about + * here. */ + BKE_sequencer_refresh_sound_length(bmain, scene); } static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0767f95a639] master: Sound: Fix queries of sound info
Commit: 0767f95a63959e156c302520db7fbf480159abe0 Author: Sergey Sharybin Date: Tue Jun 11 10:55:13 2019 +0200 Branches: master https://developer.blender.org/rB0767f95a63959e156c302520db7fbf480159abe0 Sound: Fix queries of sound info A lot of areas were querying sound information directly using audio handle which does not exist on an original sound IDs. This change basically makes it so it's possible to query information about given sound ID, without worrying about whether it's loaded or not: if it is needed to load it first it happens automatically (no automatically-opened handles are left behind though). While this seems a bit extreme to open files on such queries it is still better than the old situation when all sound handles were opened on file load, no matter if it's needed or not. Besides, none of the changed code paths are performance critical, just handful of tools. Fixes T65696: Sequencer fails to create a new sound sequence strip via Python Fixes T65656: Audio strip - SHIFT K crashes Blender Reviewers: brecht Reviewed By: brecht Subscribers: ISS Maniphest Tasks: T65696, T65656 Differential Revision: https://developer.blender.org/D5061 === M source/blender/blenkernel/BKE_nla.h M source/blender/blenkernel/BKE_sequencer.h M source/blender/blenkernel/BKE_sound.h M source/blender/blenkernel/intern/nla.c M source/blender/blenkernel/intern/scene.c M source/blender/blenkernel/intern/sequencer.c M source/blender/blenkernel/intern/sound.c M source/blender/editors/object/object_add.c M source/blender/editors/space_nla/nla_edit.c M source/blender/editors/space_sequencer/sequencer_edit.c M source/blender/editors/space_sequencer/sequencer_preview.c M source/blender/makesrna/intern/rna_sequencer.c M source/blender/makesrna/intern/rna_sequencer_api.c === diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index 423f79a8049..0ba83516e91 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -55,7 +55,9 @@ void BKE_nla_tracks_copy(struct Main *bmain, ListBase *dst, ListBase *src, const struct NlaTrack *BKE_nlatrack_add(struct AnimData *adt, struct NlaTrack *prev); struct NlaStrip *BKE_nlastrip_new(struct bAction *act); struct NlaStrip *BKE_nlastack_add_strip(struct AnimData *adt, struct bAction *act); -struct NlaStrip *BKE_nla_add_soundstrip(struct Scene *scene, struct Speaker *spk); +struct NlaStrip *BKE_nla_add_soundstrip(struct Main *bmain, +struct Scene *scene, +struct Speaker *spk); /* - */ /* API */ diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 7eb08e6f770..a9e1dfb2392 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -266,7 +266,8 @@ const char *BKE_sequence_give_name(struct Sequence *seq); ListBase *BKE_sequence_seqbase_get(struct Sequence *seq, int *r_offset); void BKE_sequence_calc(struct Scene *scene, struct Sequence *seq); void BKE_sequence_calc_disp(struct Scene *scene, struct Sequence *seq); -void BKE_sequence_reload_new_file(struct Scene *scene, +void BKE_sequence_reload_new_file(struct Main *bmain, + struct Scene *scene, struct Sequence *seq, const bool lock_range); int BKE_sequencer_evaluate_frame(struct Scene *scene, int cfra); @@ -406,7 +407,7 @@ void BKE_sequencer_update_sound_bounds(struct Scene *scene, struct Sequence *seq void BKE_sequencer_update_muting(struct Editing *ed); void BKE_sequencer_update_sound(struct Scene *scene, struct bSound *sound); -void BKE_sequencer_refresh_sound_length(struct Scene *scene); +void BKE_sequencer_refresh_sound_length(struct Main *bmain, struct Scene *scene); void BKE_sequence_base_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq); void BKE_sequence_base_dupli_recursive(const struct Scene *scene_src, diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index 07795e8438c..4694e86f4d6 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -78,10 +78,29 @@ void BKE_sound_ensure_loaded(struct Main *bmain, struct bSound *sound); void BKE_sound_free(struct bSound *sound); -/* Is used by sequencer to temporarily load audio to access information about channels and - * duration. */ -void BKE_sound_load_audio(struct Main *main, struct bSound *sound); -void BKE_sound_free_audio(struct bSound *sound); +/* Matches AUD_Channels. */ +typedef enum eSoundChannels { + SOUND_CHANNELS_INVALID = 0, + SOUND_CHANNELS_MONO = 1, + SOUND_CHANN
[Bf-blender-cvs] [3a6f6c87e05] master: Fix T65671: Armature X-Mirror inconsistencies
Commit: 3a6f6c87e051edd3e98c92428980a52bafd7abf0 Author: mano-wii Date: Tue Jun 11 09:41:18 2019 -0300 Branches: master https://developer.blender.org/rB3a6f6c87e051edd3e98c92428980a52bafd7abf0 Fix T65671: Armature X-Mirror inconsistencies Apparently the `rna_Armature_editbone_transform_update` function was incomplete because it didn't copy all mirrored transform values. I also noticed that the same logic seen in `rna_Armature_editbone_transform_update` is also seen in `ED_armature_edit_transform_mirror_update`. So the solution is expose and use that logic that updates a mirrored bone. Thus deduplicating and fixing T65671. Reviewers: brecht, zeddb Differential Revision: https://developer.blender.org/D5058 === M source/blender/editors/armature/armature_utils.c M source/blender/editors/include/ED_armature.h M source/blender/makesrna/intern/rna_armature.c === diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 27076f84c7f..c67a031317c 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -367,6 +367,63 @@ void armature_tag_unselect(bArmature *arm) /* - */ +void ED_armature_ebone_transform_mirror_update(bArmature *arm, EditBone *ebo, bool check_select) +{ + /* no layer check, correct mirror is more important */ + if (!check_select || ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) { +EditBone *eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo); +if (eboflip) { + /* we assume X-axis flipping for now */ + if (check_select && ebo->flag & BONE_TIPSEL) { +EditBone *children; + +eboflip->tail[0] = -ebo->tail[0]; +eboflip->tail[1] = ebo->tail[1]; +eboflip->tail[2] = ebo->tail[2]; +eboflip->rad_tail = ebo->rad_tail; +eboflip->roll = -ebo->roll; +eboflip->curve_out_x = -ebo->curve_out_x; +eboflip->roll2 = -ebo->roll2; + +/* Also move connected children, in case children's name aren't mirrored properly */ +for (children = arm->edbo->first; children; children = children->next) { + if (children->parent == eboflip && children->flag & BONE_CONNECTED) { +copy_v3_v3(children->head, eboflip->tail); +children->rad_head = ebo->rad_tail; + } +} + } + if (!check_select || ebo->flag & BONE_ROOTSEL) { +eboflip->head[0] = -ebo->head[0]; +eboflip->head[1] = ebo->head[1]; +eboflip->head[2] = ebo->head[2]; +eboflip->rad_head = ebo->rad_head; +eboflip->roll = -ebo->roll; +eboflip->curve_in_x = -ebo->curve_in_x; +eboflip->roll1 = -ebo->roll1; + +/* Also move connected parent, in case parent's name isn't mirrored properly */ +if (eboflip->parent && eboflip->flag & BONE_CONNECTED) { + EditBone *parent = eboflip->parent; + copy_v3_v3(parent->tail, eboflip->head); + parent->rad_tail = ebo->rad_head; +} + } + if (!check_select || ebo->flag & BONE_SELECTED) { +eboflip->dist = ebo->dist; +eboflip->roll = -ebo->roll; +eboflip->xwidth = ebo->xwidth; +eboflip->zwidth = ebo->zwidth; + +eboflip->curve_in_x = -ebo->curve_in_x; +eboflip->curve_out_x = -ebo->curve_out_x; +eboflip->roll1 = -ebo->roll1; +eboflip->roll2 = -ebo->roll2; + } +} + } +} + /* if editbone (partial) selected, copy data */ /* context; editmode armature, with mirror editing enabled */ void ED_armature_edit_transform_mirror_update(Object *obedit) @@ -375,60 +432,7 @@ void ED_armature_edit_transform_mirror_update(Object *obedit) EditBone *ebo, *eboflip; for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { -/* no layer check, correct mirror is more important */ -if (ebo->flag & (BONE_TIPSEL | BONE_ROOTSEL)) { - eboflip = ED_armature_ebone_get_mirrored(arm->edbo, ebo); - - if (eboflip) { -/* we assume X-axis flipping for now */ -if (ebo->flag & BONE_TIPSEL) { - EditBone *children; - - eboflip->tail[0] = -ebo->tail[0]; - eboflip->tail[1] = ebo->tail[1]; - eboflip->tail[2] = ebo->tail[2]; - eboflip->rad_tail = ebo->rad_tail; - eboflip->roll = -ebo->roll; - eboflip->curve_out_x = -ebo->curve_out_x; - eboflip->roll2 = -ebo->roll2; - - /* Also move connected children, in case children's name aren't mirrored properly */ - for (children = arm->edbo->first; children; children = children->next) { -if (children->parent == eboflip && children->flag & BONE_CONNECTED) { - copy_v3_v3(children->head, eboflip->tail); - children->rad_head = ebo->rad_tai
[Bf-blender-cvs] [f58b97a4575] master: Documentation: Update description with documentation
Commit: f58b97a45758c828675543335f78bbfc82f67b31 Author: Jeroen Bakker Date: Tue Jun 11 14:27:18 2019 +0200 Branches: master https://developer.blender.org/rBf58b97a45758c828675543335f78bbfc82f67b31 Documentation: Update description with documentation === M release/datafiles/locale M release/scripts/addons M release/scripts/addons_contrib M release/scripts/startup/bl_ui/space_view3d.py M source/blender/makesrna/intern/rna_space.c === diff --git a/release/datafiles/locale b/release/datafiles/locale index ad82c4ce43e..d1f85e37b7f 16 --- a/release/datafiles/locale +++ b/release/datafiles/locale @@ -1 +1 @@ -Subproject commit ad82c4ce43ef2801ef51e75af1f9702992478b02 +Subproject commit d1f85e37b7fa2574243a112670fd36fbebc61d4c diff --git a/release/scripts/addons b/release/scripts/addons index 8e6f485cf5b..290ed760cb8 16 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit 8e6f485cf5b160c425d7da7c743879b20f3d6a96 +Subproject commit 290ed760cb83079f7889fafab8f7bb7383736d54 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib index 7077ff07384..929e9e75703 16 --- a/release/scripts/addons_contrib +++ b/release/scripts/addons_contrib @@ -1 +1 @@ -Subproject commit 7077ff07384491d1f7630484995557f1c7302dae +Subproject commit 929e9e75703444689704cad809f5af1ffad6c9b0 diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index bc1192cd223..8c34dfd5f20 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4995,7 +4995,7 @@ class VIEW3D_PT_object_type_visibility(Panel): ("curve", "Curve"), ("surf", "Surface"), ("meta", "Meta"), -("font", "Font"), +("font", "Text"), ("grease_pencil", "Grease Pencil"), (None, None), # Other diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 911035c5521..84955c69ee0 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3239,23 +3239,22 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR); - RNA_def_property_ui_text( - prop, "Display Grid Floor", "Show the ground plane grid in perspective view"); + RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X); - RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line in perspective view"); + RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y); - RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line in perspective view"); + RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z); - RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line in perspective view"); + RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE); @@ -3290,9 +3289,7 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) prop = RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SELECT_OUTLINE); RNA_def_property_ui_text( - prop, - "Outline Selected", - "Show an outline highlight around selected objects in non-wireframe views"); + prop, "Outline Selected", "Show an outline highlight around selected objects"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "show_object_origins", PROP_BOOLEAN, PROP_NONE); @@ -3434,20 +3431,17 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) prop = RNA_def_property(srna, "show_edges", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGES); - RNA_def_property_ui_text(prop, "Draw Edges
[Bf-blender-cvs] [b169e327bf5] soc-2019-openxr: Fix compile error with system OpenXR SDK
Commit: b169e327bf59a8260e56d017315e49070c9c15ca Author: Julian Eisel Date: Tue Jun 11 14:17:19 2019 +0200 Branches: soc-2019-openxr https://developer.blender.org/rBb169e327bf59a8260e56d017315e49070c9c15ca Fix compile error with system OpenXR SDK Graphics binding types were disabled by a compiler flag then. === M source/blender/windowmanager/CMakeLists.txt === diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index fa6640c5140..a6a1f068e33 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -182,6 +182,8 @@ if(WITH_OPENXR) ${OPENXR_SDK_INCLUDES} ) + include(xr_platform_defines) + if(OPENXR_USE_BUNDLED_SRC) if(WIN32) set(OPENXR_LOADER_NAME openxr_loader-0_90) @@ -189,8 +191,6 @@ if(WITH_OPENXR) set(OPENXR_LOADER_NAME openxr_loader) endif() -include(xr_platform_defines) - list(APPEND LIB ${OPENXR_LOADER_NAME}) endif() ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4419dd3bfd0] master: fix T65576 collada exporter duplicates node tree when exported material already uses nodes
Commit: 4419dd3bfd00906f9f0f174f083d3490c27b01f8 Author: Gaia Clary Date: Tue Jun 11 13:56:31 2019 +0200 Branches: master https://developer.blender.org/rB4419dd3bfd00906f9f0f174f083d3490c27b01f8 fix T65576 collada exporter duplicates node tree when exported material already uses nodes === M source/blender/collada/Materials.cpp === diff --git a/source/blender/collada/Materials.cpp b/source/blender/collada/Materials.cpp index 5b60eadef3d..aa35b71b9db 100644 --- a/source/blender/collada/Materials.cpp +++ b/source/blender/collada/Materials.cpp @@ -19,11 +19,13 @@ MaterialNode::MaterialNode(bContext *C, Material *ma, KeyImageMap &key_image_map) : mContext(C), material(ma), effect(nullptr), key_image_map(&key_image_map) { - ntree = prepare_material_nodetree(); + bNodeTree *new_ntree = prepare_material_nodetree(); setShaderType(); - shader_node = add_node(SH_NODE_BSDF_PRINCIPLED, 0, 300, ""); - output_node = add_node(SH_NODE_OUTPUT_MATERIAL, 300, 300, ""); - add_link(shader_node, 0, output_node, 0); + if (new_ntree) { +shader_node = add_node(SH_NODE_BSDF_PRINCIPLED, 0, 300, ""); +output_node = add_node(SH_NODE_OUTPUT_MATERIAL, 300, 300, ""); +add_link(shader_node, 0, output_node, 0); + } } MaterialNode::MaterialNode(bContext *C, @@ -32,7 +34,7 @@ MaterialNode::MaterialNode(bContext *C, UidImageMap &uid_image_map) : mContext(C), material(ma), effect(ef), uid_image_map(&uid_image_map) { - ntree = prepare_material_nodetree(); + prepare_material_nodetree(); setShaderType(); std::map nmap; @@ -89,13 +91,18 @@ void MaterialNode::setShaderType() #endif } +// returns null if material already has a node tree bNodeTree *MaterialNode::prepare_material_nodetree() { - if (material->nodetree == NULL) { -material->nodetree = ntreeAddTree(NULL, "Shader Nodetree", "ShaderNodeTree"); -material->use_nodes = true; + if (material->nodetree) { +ntree = material->nodetree; +return NULL; } - return material->nodetree; + + material->nodetree = ntreeAddTree(NULL, "Shader Nodetree", "ShaderNodeTree"); + material->use_nodes = true; + ntree = material->nodetree; + return ntree; } bNode *MaterialNode::add_node(int node_type, int locx, int locy, std::string label) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [43d35726555] master: Fix T65702: Load factory erases setting without confirmation
Commit: 43d3572675d3fd31ba0912eea886308676db Author: Campbell Barton Date: Tue Jun 11 21:49:05 2019 +1000 Branches: master https://developer.blender.org/rB43d3572675d3fd31ba0912eea886308676db Fix T65702: Load factory erases setting without confirmation It could be argued this was correct behavior, since auto-save defaults to 'on' nevertheless, auto-saving settings once the user has disabled auto-save can lead to accidents. Don't reset the preferences flag when resetting preferences. === M source/blender/windowmanager/intern/wm_files.c === diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index f3aa5a1b6ca..67b1b828f96 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -1739,6 +1739,32 @@ void WM_OT_save_userpref(wmOperatorType *ot) ot->exec = wm_userpref_write_exec; } +/** + * When reading preferences, there are some exceptions for values which are reset. + */ +static void wm_userpref_read_exceptions(UserDef *userdef_curr, +const UserDef *userdef_prev, +const bool use_factory_settings) +{ +#define USERDEF_RESTORE(member) \ + { \ +userdef_curr->member = userdef_prev->member; \ + } \ + ((void)0) + + /* Current visible preferences category. */ + USERDEF_RESTORE(userpref); + + if (use_factory_settings) { +/* Preferences about the preferences. + * Technically correct not to reset however this causes issues in practice. + * Since loading factory settings will then overwrite your preferences on exit, see: T65702. */ +USERDEF_RESTORE(pref_flag); + } + +#undef USERDEF_RESTORE +} + static void rna_struct_update_when_changed(bContext *C, Main *bmain, PointerRNA *ptr_a, @@ -1811,15 +1837,7 @@ static int wm_userpref_read_exec(bContext *C, wmOperator *op) WM_init_state_app_template_get(), NULL); -#define USERDEF_RESTORE(member) \ - { \ -U.member = U_backup.member; \ - } \ - ((void)0) - - USERDEF_RESTORE(userpref); - -#undef USERDEF_RESTORE + wm_userpref_read_exceptions(&U, &U_backup, use_factory_settings); Main *bmain = CTX_data_main(C); @@ -1883,6 +1901,7 @@ static int wm_homefile_read_exec(bContext *C, wmOperator *op) bool use_userdef = false; char filepath_buf[FILE_MAX]; const char *filepath = NULL; + UserDef U_backup = U; if (!use_factory_settings) { PropertyRNA *prop = RNA_struct_find_property(op->ptr, "filepath"); @@ -1947,6 +1966,10 @@ static int wm_homefile_read_exec(bContext *C, wmOperator *op) } SET_FLAG_FROM_TEST(G.f, use_temporary_preferences, G_FLAG_USERPREF_NO_SAVE_ON_EXIT); + if (use_userdef) { +wm_userpref_read_exceptions(&U, &U_backup, use_factory_settings); + } + return OPERATOR_FINISHED; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [c9cc4ddf641] master: Fix T65715: Instant crash when grouping strips in VSE
Commit: c9cc4ddf6415f7f6d6cba5487839093c157723e8 Author: Sergey Sharybin Date: Tue Jun 11 13:22:59 2019 +0200 Branches: master https://developer.blender.org/rBc9cc4ddf6415f7f6d6cba5487839093c157723e8 Fix T65715: Instant crash when grouping strips in VSE === M source/blender/editors/space_sequencer/sequencer_edit.c === diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 1b07a070505..c214b84b611 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2695,7 +2695,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seqm); - BKE_sequence_invalidate_cache_composite(scene, seq); + BKE_sequence_invalidate_cache_composite(scene, seqm); WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [18e0d06cfa8] soc-2019-adaptive-cloth: Cloth: Basic UI Implemented
Commit: 18e0d06cfa8c33ec37a6c23a7776735a7dc7d860 Author: ishbosamiya Date: Tue Jun 11 16:32:30 2019 +0530 Branches: soc-2019-adaptive-cloth https://developer.blender.org/rB18e0d06cfa8c33ec37a6c23a7776735a7dc7d860 Cloth: Basic UI Implemented This is not the final UI, only a rough UI for current usage, need to add option for whether or not remeshing should be enabled. === M release/scripts/startup/bl_ui/properties_physics_cloth.py M source/blender/makesrna/intern/rna_cloth.c === diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index 92c4f1aae63..26f943c4517 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -309,6 +309,37 @@ class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel): col.prop_search(cloth, "vertex_group_self_collisions", ob, "vertex_groups", text="Vertex Group") +class PHYSICS_PT_cloth_remeshing(PhysicButtonsPanel, Panel): +bl_label = "Remeshing" +bl_parent_id = 'PHYSICS_PT_cloth' +bl_options = {'DEFAULT_CLOSED'} +COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} + +def draw(self, context): +layout = self.layout +layout.use_property_split = True + +md = context.cloth +cloth = md.settings + +#layout.active = cloth_panel_enabled(md) + +flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=True) + +col = flow.column() +col.prop(cloth, "refine_angle", text="Refine Angle") +col = flow.column() +col.prop(cloth, "refine_compression", text="Refine Compression") +col = flow.column() +col.prop(cloth, "refine_velocity", text="Refine Velocity") +col = flow.column() +col.prop(cloth, "size_min", text="Size Minimum") +col = flow.column() +col.prop(cloth, "size_max", text="Size Maximum") +col = flow.column() +col.prop(cloth, "aspect_min", text="Aspect Minimum") + + class PHYSICS_PT_cloth_property_weights(PhysicButtonsPanel, Panel): bl_label = "Property Weights" bl_parent_id = 'PHYSICS_PT_cloth' @@ -385,6 +416,7 @@ classes = ( PHYSICS_PT_cloth_collision, PHYSICS_PT_cloth_object_collision, PHYSICS_PT_cloth_self_collision, +PHYSICS_PT_cloth_remeshing, PHYSICS_PT_cloth_property_weights, PHYSICS_PT_cloth_field_weights, ) diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index c93833ef493..dfa3b62ae80 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -774,6 +774,43 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_cloth_update"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + /* remeshing */ + prop = RNA_def_property(srna, "refine_angle", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "refine_angle"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Remeshing Refine Angle", "Remeshing refine angle"); + RNA_def_property_update(prop, 0, "rna_cloth_update"); + + prop = RNA_def_property(srna, "refine_compression", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "refine_compression"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Remeshing Refine Compression", "Remeshing refine compression"); + RNA_def_property_update(prop, 0, "rna_cloth_update"); + + prop = RNA_def_property(srna, "refine_velocity", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "refine_velocity"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Remeshing Refine Velocity", "Remeshing refine velocity"); + RNA_def_property_update(prop, 0, "rna_cloth_update"); + + prop = RNA_def_property(srna, "size_min", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "size_min"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Remeshing Size Min", "Remeshing size minimum"); + RNA_def_property_update(prop, 0, "rna_cloth_update"); + + prop = RNA_def_property(srna, "size_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "size_max"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Remeshing Size Max", "Remeshing size maximum"); + RNA_def_property_update(prop, 0, "rna_cloth_update"); + + prop = RNA_def_property(srna, "aspect_min", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "aspect_min"); + RNA_def_property_range(prop, 0.0f, 10.0f); + RNA_def_property_ui_text(prop, "Remeshing Aspect Min", "Remeshing aspect min
[Bf-blender-cvs] [e2cd13e8a7d] soc-2019-adaptive-cloth: Cloth: custom split edges function Now no need to call triangulate function after splitting edges, custom split edges function triangulates the
Commit: e2cd13e8a7d4d5e698f5c31f664962fcc8906e99 Author: ishbosamiya Date: Tue Jun 11 15:08:24 2019 +0530 Branches: soc-2019-adaptive-cloth https://developer.blender.org/rBe2cd13e8a7d4d5e698f5c31f664962fcc8906e99 Cloth: custom split edges function Now no need to call triangulate function after splitting edges, custom split edges function triangulates the face(s) that contain the edges that has been split === M source/blender/blenkernel/intern/cloth.c === diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index f4322330882..6da3b80cc32 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -476,7 +476,8 @@ static float cloth_remeshing_edge_size(BMesh *bm, BMEdge *edge, LinkNodePair *si float value = 0.0; float temp_v2[2]; int index = BM_elem_index_get(&v1); - ClothSizing *sizing_temp = (ClothSizing *)BLI_linklist_find(sizing->list, index)->link; + /* ClothSizing *sizing_temp = (ClothSizing *)BLI_linklist_find(sizing->list, index)->link; */ + ClothSizing *sizing_temp = (ClothSizing *)BLI_linklist_find(sizing->list, 0)->link; /* TODO(Ish): sizing_temp needs to be average of the both vertices, for static it doesn't matter * since all sizing are same */ mul_v2_m2v2(temp_v2, sizing_temp->m, u12); @@ -507,6 +508,67 @@ static int cloth_remeshing_find_bad_edges(BMesh *bm, LinkNodePair *sizing) return tagged; } +static BMVert *cloth_remeshing_split_edge_keep_triangles(BMesh *bm, + BMEdge *e, + BMVert *v, + float fac) +{ + BLI_assert(BM_vert_in_edge(e, v) == true); + + /* find faces containing edge, should be only 2 */ + BMFace *f; + BMIter fiter; + int face_i = 0; + BMFace *f1 = NULL, *f2 = NULL; + BM_ITER_ELEM_INDEX (f, &fiter, e, BM_FACES_OF_EDGE, face_i) { +if (face_i == 0) { + f1 = f; +} +else { + f2 = f; +} +printf("face_i: %d\n", face_i); + } + + if (!f1) { +return NULL; + } + + /* split the edge */ + BMEdge *new_edge; + BMEdge old_edge = *e; + BMVert *new_v = BM_edge_split(bm, e, v, &new_edge, fac); + BM_elem_flag_disable(new_edge, BM_ELEM_TAG); + + BMVert *vert; + BMIter viter; + /* search for vert within the face that is not part of input edge + * create new edge between this + * vert and newly created vert */ + BM_ITER_ELEM (vert, &viter, f1, BM_VERTS_OF_FACE) { +if (vert == old_edge.v1 || vert == old_edge.v2 || vert == new_v) { + continue; +} + +BM_face_create_quad_tri(bm, vert, old_edge.v1, new_v, NULL, NULL, BM_CREATE_NOP); +BM_face_create_quad_tri(bm, vert, new_v, old_edge.v2, NULL, NULL, BM_CREATE_NOP); +BM_face_kill(bm, f1); + } + if (f2) { +BM_ITER_ELEM (vert, &viter, f2, BM_VERTS_OF_FACE) { + if (vert == old_edge.v1 || vert == old_edge.v2 || vert == new_v) { +continue; + } + + BM_face_create_quad_tri(bm, vert, old_edge.v1, new_v, NULL, NULL, BM_CREATE_NOP); + BM_face_create_quad_tri(bm, vert, new_v, old_edge.v2, NULL, NULL, BM_CREATE_NOP); + BM_face_kill(bm, f2); +} + } + + return new_v; +} + static bool cloth_remeshing_split_edges(ClothModifierData *clmd, LinkNodePair *sizing) { BMesh *bm = clmd->clothObject->bm; @@ -521,29 +583,30 @@ static bool cloth_remeshing_split_edges(ClothModifierData *clmd, LinkNodePair *s if (BM_elem_flag_test_bool(e, BM_ELEM_TAG)) { int v1_index = BM_elem_index_get(e->v1); int v2_index = BM_elem_index_get(e->v2); - BMEdge *new_e; - BMVert *new_v = BM_edge_split(bm, e, e->v1, &new_e, 0.5); - ClothSizing *sizing_mean = MEM_mallocN(sizeof(ClothSizing), "ClothSizing_single"); - - /* average of the sizing of the other 2 vertices */ - ClothSizing *sizing_01 = (ClothSizing *)BLI_linklist_find(sizing->list, v1_index)->link; - ClothSizing *sizing_02 = (ClothSizing *)BLI_linklist_find(sizing->list, v2_index)->link; - add_m2_m2m2(sizing_mean->m, - /* first vertex sizing */ - sizing_01->m, - /* second vertex sizing */ - sizing_02->m); - mul_m2_fl(sizing_mean->m, 0.5f); - - /* TODO(Ish): need to figure out the indexing between sizing and the vertices */ - BLI_linklist_append(sizing, sizing_mean); - BM_elem_flag_disable(new_e, BM_ELEM_TAG); + BMEdge(*new_edges)[3]; + int new_edge_count = 0; + BMVert *new_v = cloth_remeshing_split_edge_keep_triangles(bm, e, e->v1, 0.5); BM_elem_flag_disable(e, BM_ELEM_TAG); + /* ClothSizing *sizing_mean = MEM_mallocN(sizeof(ClothSizing), "ClothSizing_single"); */ + + /* /\* average of the sizing of the other
[Bf-blender-cvs] [10869e24316] master: Fix T65626: Use Nodes checkbox locks after being checked with "insert keyframe"
Commit: 10869e243162fcd06c06e5a7161a685b38eead54 Author: Sergey Sharybin Date: Tue Jun 11 11:56:30 2019 +0200 Branches: master https://developer.blender.org/rB10869e243162fcd06c06e5a7161a685b38eead54 Fix T65626: Use Nodes checkbox locks after being checked with "insert keyframe" Not sure if this is something what is supported by render pipeline, but this report discovered some actual error in logic. === M source/blender/depsgraph/intern/node/deg_node_id.cc === diff --git a/source/blender/depsgraph/intern/node/deg_node_id.cc b/source/blender/depsgraph/intern/node/deg_node_id.cc index 8a7ec927f8c..8dd01050753 100644 --- a/source/blender/depsgraph/intern/node/deg_node_id.cc +++ b/source/blender/depsgraph/intern/node/deg_node_id.cc @@ -206,6 +206,11 @@ ComponentNode *IDNode::add_component(NodeType type, const char *name) void IDNode::tag_update(Depsgraph *graph, eUpdateSource source) { GHASH_FOREACH_BEGIN (ComponentNode *, comp_node, components) { +/* Relations update does explicit animation update when needed. Here we ignore animation + * component to avoid loss of possible unkeyed changes. */ +if (comp_node->type == NodeType::ANIMATION && source == DEG_UPDATE_SOURCE_RELATIONS) { + continue; +} comp_node->tag_update(graph, source); } GHASH_FOREACH_END(); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6ec3f4a6284] master: Sequencer: Fix missing relations and recalc tags in RNA
Commit: 6ec3f4a62842d82bd25cbbdd428d2eb9de18b22d Author: Sergey Sharybin Date: Tue Jun 11 11:18:47 2019 +0200 Branches: master https://developer.blender.org/rB6ec3f4a62842d82bd25cbbdd428d2eb9de18b22d Sequencer: Fix missing relations and recalc tags in RNA === M source/blender/makesrna/intern/rna_sequencer_api.c === diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 5e307f4379e..b2afa81b29b 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -103,8 +103,13 @@ static Sequence *alloc_generic_sequence( return seq; } -static Sequence *rna_Sequences_new_clip( -ID *id, Editing *ed, const char *name, MovieClip *clip, int channel, int frame_start) +static Sequence *rna_Sequences_new_clip(ID *id, +Editing *ed, +Main *bmain, +const char *name, +MovieClip *clip, +int channel, +int frame_start) { Scene *scene = (Scene *)id; Sequence *seq; @@ -116,13 +121,15 @@ static Sequence *rna_Sequences_new_clip( BKE_sequence_calc_disp(scene, seq); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return seq; } static Sequence *rna_Sequences_new_mask( -ID *id, Editing *ed, const char *name, Mask *mask, int channel, int frame_start) +ID *id, Editing *ed, Main *bmain, const char *name, Mask *mask, int channel, int frame_start) { Scene *scene = (Scene *)id; Sequence *seq; @@ -135,6 +142,8 @@ static Sequence *rna_Sequences_new_mask( BKE_sequence_calc_disp(scene, seq); BKE_sequence_invalidate_cache_composite(scene, seq); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return seq; @@ -168,6 +177,7 @@ static Sequence *rna_Sequences_new_scene(ID *id, static Sequence *rna_Sequences_new_image(ID *id, Editing *ed, + Main *bmain, ReportList *reports, const char *name, const char *file, @@ -190,6 +200,8 @@ static Sequence *rna_Sequences_new_image(ID *id, BKE_sequence_calc_disp(scene, seq); BKE_sequence_invalidate_cache_composite(scene, seq); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return seq; @@ -226,6 +238,7 @@ static Sequence *rna_Sequences_new_movie(ID *id, BKE_sequence_calc_disp(scene, seq); BKE_sequence_invalidate_cache_composite(scene, seq); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return seq; @@ -260,6 +273,8 @@ static Sequence *rna_Sequences_new_sound(ID *id, BKE_sequence_calc_disp(scene, seq); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return seq; @@ -351,12 +366,14 @@ static Sequence *rna_Sequences_new_effect(ID *id, BKE_sequence_calc_disp(scene, seq); BKE_sequence_invalidate_cache_composite(scene, seq); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return seq; } -static void rna_Sequences_remove(ID *id, Editing *ed, ReportList *reports, PointerRNA *seq_ptr) +static void rna_Sequences_remove( +ID *id, Editing *ed, Main *bmain, ReportList *reports, PointerRNA *seq_ptr) { Sequence *seq = seq_ptr->data; Scene *scene = (Scene *)id; @@ -370,6 +387,8 @@ static void rna_Sequences_remove(ID *id, Editing *ed, ReportList *reports, Point BKE_sequence_free(scene, seq); RNA_POINTER_INVALIDATE(seq_ptr); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); } @@ -526,7 +545,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences"); func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip"); - RNA_def_function_flag(func, FUNC_USE_SELF_ID); + RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN); RNA_def_function_ui_description(func, "Add a new movie clip sequence"); parm = RNA_def_string(func, "name", "
[Bf-blender-cvs] [bcd0b6fb8ef] master: Fix T65677: Creating a scene sequencer strip with python crash blender
Commit: bcd0b6fb8ef0161cbac31992d170e15435c56c72 Author: Sergey Sharybin Date: Tue Jun 11 11:15:52 2019 +0200 Branches: master https://developer.blender.org/rBbcd0b6fb8ef0161cbac31992d170e15435c56c72 Fix T65677: Creating a scene sequencer strip with python crash blender === M source/blender/makesrna/intern/rna_sequencer_api.c === diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c index 37ebb76daa5..5e307f4379e 100644 --- a/source/blender/makesrna/intern/rna_sequencer_api.c +++ b/source/blender/makesrna/intern/rna_sequencer_api.c @@ -140,8 +140,13 @@ static Sequence *rna_Sequences_new_mask( return seq; } -static Sequence *rna_Sequences_new_scene( -ID *id, Editing *ed, const char *name, Scene *sce_seq, int channel, int frame_start) +static Sequence *rna_Sequences_new_scene(ID *id, + Editing *ed, + Main *bmain, + const char *name, + Scene *sce_seq, + int channel, + int frame_start) { Scene *scene = (Scene *)id; Sequence *seq; @@ -149,13 +154,13 @@ static Sequence *rna_Sequences_new_scene( seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_SCENE, NULL); seq->scene = sce_seq; seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1; - seq->scene_sound = BKE_sound_scene_add_scene_sound( - scene, seq, frame_start, frame_start + seq->len, 0); id_us_plus((ID *)sce_seq); BKE_sequence_calc_disp(scene, seq); BKE_sequence_invalidate_cache_composite(scene, seq); + DEG_relations_tag_update(bmain); + DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); return seq; @@ -569,7 +574,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_function_return(func, parm); func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene"); - RNA_def_function_flag(func, FUNC_USE_SELF_ID); + RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_MAIN); RNA_def_function_ui_description(func, "Add a new scene sequence"); parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0dd47056ebb] greasepencil-object: Merge branch 'master' into greasepencil-object
Commit: 0dd47056ebb8adba8c476dd84da09da073d91b2c Author: Antonioya Date: Tue Jun 11 11:06:11 2019 +0200 Branches: greasepencil-object https://developer.blender.org/rB0dd47056ebb8adba8c476dd84da09da073d91b2c Merge branch 'master' into greasepencil-object === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [325b0ad2ed8] master: Keymap: fix conflict introduced by recent Alt-LMB for scrubbing
Commit: 325b0ad2ed85577e08b8d27fbb3f62d7157da512 Author: Campbell Barton Date: Tue Jun 11 17:44:30 2019 +1000 Branches: master https://developer.blender.org/rB325b0ad2ed85577e08b8d27fbb3f62d7157da512 Keymap: fix conflict introduced by recent Alt-LMB for scrubbing Use Ctrl-Alt modifier for select-left/right. === M release/scripts/presets/keyconfig/keymap_data/blender_default.py === diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index 715b062814d..10ebb80df91 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1357,10 +1357,10 @@ def km_graph_editor(params): {"properties": [("extend", False), ("column", False), ("curves", True)]}), ("graph.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, {"properties": [("extend", True), ("column", False), ("curves", True)]}), -("graph.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True}, - {"properties": [("mode", 'CHECK'), ("extend", False)]}), -("graph.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True}, - {"properties": [("mode", 'CHECK'), ("extend", True)]}), +*(("graph.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": extend, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", extend)]} +) for extend in (False, True)), ("graph.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("mode", 'LEFT'), ("extend", False)]}), ("graph.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, @@ -1887,10 +1887,10 @@ def km_dopesheet(params): {"properties": [("extend", False), ("column", False), ("channel", True)]}), ("action.clickselect", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, {"properties": [("extend", True), ("column", False), ("channel", True)]}), -("action.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True}, - {"properties": [("mode", 'CHECK'), ("extend", False)]}), -("action.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True}, - {"properties": [("mode", 'CHECK'), ("extend", True)]}), +*(("action.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": extend, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", extend)]} +) for extend in (False, True)), ("action.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("mode", 'LEFT'), ("extend", False)]}), ("action.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, @@ -2026,10 +2026,10 @@ def km_nla_editor(params): {"properties": [("extend", False), ("deselect_all", not params.legacy)]}), ("nla.click_select", {"type": params.select_mouse, "value": 'PRESS', "shift": True}, {"properties": [("extend", True)]}), -("nla.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True}, - {"properties": [("mode", 'CHECK'), ("extend", False)]}), -("nla.select_leftright", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "ctrl": True}, - {"properties": [("mode", 'CHECK'), ("extend", True)]}), +*(("nla.select_leftright", + {"type": params.select_mouse, "value": 'PRESS', "ctrl": True, "shift": extend, "alt": not params.legacy}, + {"properties": [("mode", 'CHECK'), ("extend", extend)]} +) for extend in (False, True)), ("nla.select_leftright", {"type": 'LEFT_BRACKET', "value": 'PRESS'}, {"properties": [("mode", 'LEFT'), ("extend", False)]}), ("nla.select_leftright", {"type": 'RIGHT_BRACKET', "value": 'PRESS'}, @@ -2344,10 +2344,10 @@ def km_sequencer(params): {"properties": [("extend", False), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), ("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "shift": True, "alt": True}, {"properties": [("extend", True), ("linked_handle", True), ("left_right", 'NONE'), ("linked_time", False)]}), -("sequencer.select", {"type": params.select_mouse, "value": 'PRESS', "ctrl": True}, - {"properties": [("extend", False), ("linked_handle", False), ("left_right", 'MOUSE'), ("linked_time", True)]}), -("sequencer.select", {"type"
[Bf-blender-cvs] [06dd60761c1] master: Fix extend being ignored for left/right sequencer selection
Commit: 06dd60761c1fcb1ce64c026fc64da20bf42d1c2e Author: Campbell Barton Date: Tue Jun 11 18:11:35 2019 +1000 Branches: master https://developer.blender.org/rB06dd60761c1fcb1ce64c026fc64da20bf42d1c2e Fix extend being ignored for left/right sequencer selection === M source/blender/editors/space_sequencer/sequencer_select.c === diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index af4b53ee858..57f86059d9d 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -362,7 +362,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e else if (left_right != SEQ_SELECT_LR_NONE) { /* use different logic for this */ float x; -ED_sequencer_deselect_all(scene); +if (extend == false) { + ED_sequencer_deselect_all(scene); +} switch (left_right) { case SEQ_SELECT_LR_MOUSE: ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs