[Bf-blender-cvs] [1a13940ef80] master: Fix T88617: Wrong annotation cursor in Preview of sequencer editor
Commit: 1a13940ef80890e3f73f41061c31ed00b8298640 Author: Pratik Borhade Date: Sat Feb 4 10:22:50 2023 +0530 Branches: master https://developer.blender.org/rB1a13940ef80890e3f73f41061c31ed00b8298640 Fix T88617: Wrong annotation cursor in Preview of sequencer editor Allow preview region to change cursor as per the selected tool Reviewed by: campbellbarton, ISS Differential Revision: https://developer.blender.org/D16878 === M source/blender/windowmanager/intern/wm_cursors.c === diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index f7c030db1cd..74e760013fd 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -173,7 +173,7 @@ void WM_cursor_set(wmWindow *win, int curs) bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region) { - if (region && (region->regiontype != RGN_TYPE_WINDOW)) { + if (region && !ELEM(region->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_PREVIEW)) { return false; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d335db09e0a] master: Fix T90893: Restoring a key in the keymap editor doesn't work if the key is only disabled
Commit: d335db09e0a59499ca74a597d7da43cbb05e7708 Author: Pratik Borhade Date: Fri Feb 3 15:45:59 2023 +0530 Branches: master https://developer.blender.org/rBd335db09e0a59499ca74a597d7da43cbb05e7708 Fix T90893: Restoring a key in the keymap editor doesn't work if the key is only disabled Reset `KMI_INACTIVE` flag when restore-item button is called Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D16773 === M source/blender/windowmanager/intern/wm_keymap.c === diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index bb945456d46..c6513a908cf 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -2021,7 +2021,8 @@ void WM_keymap_item_restore_to_default(wmWindowManager *wm, wmKeyMap *keymap, wm kmi->oskey = orig->oskey; kmi->keymodifier = orig->keymodifier; kmi->maptype = orig->maptype; -kmi->flag = (kmi->flag & ~KMI_REPEAT_IGNORE) | (orig->flag & KMI_REPEAT_IGNORE); +kmi->flag = (kmi->flag & ~(KMI_REPEAT_IGNORE | KMI_INACTIVE)) | +(orig->flag & KMI_REPEAT_IGNORE); WM_keyconfig_update_tag(keymap, kmi); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a3c38667f0f] master: Fix T103881: Unlink operation crash in Blender File view
Commit: a3c38667f0f8195ed560b32db5630ccaceb42d54 Author: Pratik Borhade Date: Thu Jan 19 16:04:15 2023 +0530 Branches: master https://developer.blender.org/rBa3c38667f0f8195ed560b32db5630ccaceb42d54 Fix T103881: Unlink operation crash in Blender File view Similar to rBe97443478e32 and rBe772087ed664, exit early when texture, collection and world ID has no parent to unlink from. Reviewed by: Severin, lichtwerk Differential Revision: https://developer.blender.org/D17017 === M source/blender/editors/space_outliner/outliner_tools.cc === diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 01579eb0499..35373c510e3 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -329,13 +329,24 @@ static void unlink_material_fn(bContext * /*C*/, } static void unlink_texture_fn(bContext * /*C*/, - ReportList * /*reports*/, + ReportList *reports, Scene * /*scene*/, TreeElement *te, TreeStoreElem *tsep, - TreeStoreElem * /*tselem*/, + TreeStoreElem *tselem, void * /*user_data*/) { + if (!tsep || !TSE_IS_REAL_ID(tsep)) { +/* Valid case, no parent element of the texture or it is not an ID (could be a #TSE_ID_BASE + * for example) so there's no data to unlink from. */ +BKE_reportf(reports, +RPT_WARNING, +"Cannot unlink texture '%s'. It's not clear which freestyle line style it should " +"be unlinked from, there's no freestyle line style as parent in the Outliner tree", +tselem->id->name + 2); +return; + } + MTex **mtex = nullptr; int a; @@ -358,7 +369,7 @@ static void unlink_texture_fn(bContext * /*C*/, } static void unlink_collection_fn(bContext *C, - ReportList * /*reports*/, + ReportList *reports, Scene * /*scene*/, TreeElement * /*te*/, TreeStoreElem *tsep, @@ -368,6 +379,18 @@ static void unlink_collection_fn(bContext *C, Main *bmain = CTX_data_main(C); Collection *collection = (Collection *)tselem->id; + if (!tsep || !TSE_IS_REAL_ID(tsep)) { +/* Valid case, no parent element of the collection or it is not an ID (could be a #TSE_ID_BASE + * for example) so there's no data to unlink from. */ +BKE_reportf(reports, +RPT_WARNING, +"Cannot unlink collection '%s'. It's not clear which scene, collection or " +"instance empties it should be unlinked from, there's no scene, collection or " +"instance empties as parent in the Outliner tree", +tselem->id->name + 2); +return; + } + if (tsep) { if (GS(tsep->id->name) == ID_OB) { Object *ob = (Object *)tsep->id; @@ -449,13 +472,24 @@ static void unlink_object_fn(bContext *C, } static void unlink_world_fn(bContext * /*C*/, -ReportList * /*reports*/, +ReportList *reports, Scene * /*scene*/, TreeElement * /*te*/, TreeStoreElem *tsep, TreeStoreElem *tselem, void * /*user_data*/) { + if (!tsep || !TSE_IS_REAL_ID(tsep)) { +/* Valid case, no parent element of the world or it is not an ID (could be a #TSE_ID_BASE + * for example) so there's no data to unlink from. */ +BKE_reportf(reports, +RPT_WARNING, +"Cannot unlink world '%s'. It's not clear which scene it should be unlinked from, " +"there's no scene as parent in the Outliner tree", +tselem->id->name + 2); +return; + } + Scene *parscene = (Scene *)tsep->id; World *wo = (World *)tselem->id; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cdc10a92836] blender-v2.93-release: Fix T102993: Incorrect icon displaying of Weighted Normal modifier in the outliner
Commit: cdc10a9283677e3804a67247da8578fcc2722ae0 Author: Pratik Borhade Date: Tue Jan 3 14:56:11 2023 +0530 Branches: blender-v2.93-release https://developer.blender.org/rBcdc10a9283677e3804a67247da8578fcc2722ae0 Fix T102993: Incorrect icon displaying of Weighted Normal modifier in the outliner Mistake in {rBd15e8bdaa3343cf97a74f918b2570e66fb7abfa0} Reviewed by: JacquesLucke Differential Revision: https://developer.blender.org/D16890 === M source/blender/modifiers/intern/MOD_weighted_normal.c === diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c index 40265e37db9..f720c3cae3c 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.c +++ b/source/blender/modifiers/intern/MOD_weighted_normal.c @@ -753,7 +753,7 @@ ModifierTypeInfo modifierType_WeightedNormal = { /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, -/* icon */ ICON_MOD_VERTEX_WEIGHT, +/* icon */ ICON_MOD_NORMALEDIT, /* copyData */ BKE_modifier_copydata_generic, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [849c76a10b2] blender-v3.3-release: Fix T102993: Incorrect icon displaying of Weighted Normal modifier in the outliner
Commit: 849c76a10b2e6a3f5160ec27c2368e18982f5bba Author: Pratik Borhade Date: Tue Jan 3 14:56:11 2023 +0530 Branches: blender-v3.3-release https://developer.blender.org/rB849c76a10b2e6a3f5160ec27c2368e18982f5bba Fix T102993: Incorrect icon displaying of Weighted Normal modifier in the outliner Mistake in {rBd15e8bdaa3343cf97a74f918b2570e66fb7abfa0} Reviewed by: JacquesLucke Differential Revision: https://developer.blender.org/D16890 === M source/blender/modifiers/intern/MOD_weighted_normal.c === diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c index af992c00097..ef86f27953b 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.c +++ b/source/blender/modifiers/intern/MOD_weighted_normal.c @@ -733,7 +733,7 @@ ModifierTypeInfo modifierType_WeightedNormal = { /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, -/* icon */ ICON_MOD_VERTEX_WEIGHT, +/* icon */ ICON_MOD_NORMALEDIT, /* copyData */ BKE_modifier_copydata_generic, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6f38ce5a406] master: Fix T103679: Add missing operators in object context menu for point cloud and curves
Commit: 6f38ce5a406ec2771090e6536d96219b2c0f3743 Author: Pratik Borhade Date: Tue Jan 10 15:27:57 2023 +0530 Branches: master https://developer.blender.org/rB6f38ce5a406ec2771090e6536d96219b2c0f3743 Fix T103679: Add missing operators in object context menu for point cloud and curves Set origin and convert operator now accepts point cloud and new curve object. But these operators were not added in context menu. Support for set origin and convert operator was added in rBadb4dd911b91, rB933d56d9e98d and rB2752a88478a8 Reviewed by: HooglyBoogly Differential Revision: https://developer.blender.org/D16939 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 60494aa4d9e..0af3325ae2c 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2696,14 +2696,14 @@ class VIEW3D_MT_object_context_menu(Menu): if selected_objects_len > 1: layout.operator("object.join") -if obj.type in {'MESH', 'CURVE', 'SURFACE', 'POINTCLOUD', 'META', 'FONT'}: +if obj.type in {'MESH', 'CURVE', 'CURVES', 'SURFACE', 'POINTCLOUD', 'META', 'FONT'}: layout.operator_menu_enum("object.convert", "target") if obj.type == 'GPENCIL': layout.operator_menu_enum("gpencil.convert", "type", text="Convert To") if ( -obj.type in {'MESH', 'CURVE', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META', 'FONT'} or +obj.type in {'MESH', 'CURVE', 'CURVES', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META', 'FONT', 'POINTCLOUD'} or (obj.type == 'EMPTY' and obj.instance_collection is not None) ): layout.operator_context = 'INVOKE_REGION_WIN' ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [e438e8e04ee] master: Fix T102993: Incorrect icon displaying of Weighted Normal modifier in the outliner
Commit: e438e8e04ee83c194c4be9dea8560c53b3aee429 Author: Pratik Borhade Date: Tue Jan 3 14:56:11 2023 +0530 Branches: master https://developer.blender.org/rBe438e8e04ee83c194c4be9dea8560c53b3aee429 Fix T102993: Incorrect icon displaying of Weighted Normal modifier in the outliner Mistake in {rBd15e8bdaa3343cf97a74f918b2570e66fb7abfa0} Reviewed by: JacquesLucke Differential Revision: https://developer.blender.org/D16890 === M source/blender/modifiers/intern/MOD_weighted_normal.cc === diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.cc b/source/blender/modifiers/intern/MOD_weighted_normal.cc index 2f68f00ce07..a7278d13093 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.cc +++ b/source/blender/modifiers/intern/MOD_weighted_normal.cc @@ -738,7 +738,7 @@ ModifierTypeInfo modifierType_WeightedNormal = { /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, -/* icon */ ICON_MOD_VERTEX_WEIGHT, +/* icon */ ICON_MOD_NORMALEDIT, /* copyData */ BKE_modifier_copydata_generic, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b6a11ae7d59] master: Cleanup: Warning in debug console due to full stop in description
Commit: b6a11ae7d59acd17c56e2d46eaab928bdce3d984 Author: Pratik Borhade Date: Tue Dec 27 15:40:13 2022 +0530 Branches: master https://developer.blender.org/rBb6a11ae7d59acd17c56e2d46eaab928bdce3d984 Cleanup: Warning in debug console due to full stop in description Fix warning generated due to the full-stop in the description message of the property `use_auto_mask` Property added in: rBa9cb66b856e80d0542a9ad3fec0b0fb47d28f805 === M source/blender/editors/sculpt_paint/sculpt_expand.c === diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c index b90488f6df4..1a9abb04ba8 100644 --- a/source/blender/editors/sculpt_paint/sculpt_expand.c +++ b/source/blender/editors/sculpt_paint/sculpt_expand.c @@ -2383,5 +2383,5 @@ void SCULPT_OT_expand(wmOperatorType *ot) "use_auto_mask", false, "Auto Create", - "Fill in mask if nothing is already masked."); + "Fill in mask if nothing is already masked"); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6a9b0772fee] blender-v2.93-release: Fix T102187: Add knife tool in mesh panel
Commit: 6a9b0772fee918e408b6b3fbe7f92ab3de8c9ccb Author: Pratik Borhade Date: Sun Nov 13 22:48:24 2022 +0530 Branches: blender-v2.93-release https://developer.blender.org/rB6a9b0772fee918e408b6b3fbe7f92ab3de8c9ccb Fix T102187: Add knife tool in mesh panel Add knife tool option in mesh panel Reviewer: campbellbarton, JulienKaspar Differential Revision: https://developer.blender.org/D16395 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index c658e965ab7..8050b55b6c2 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3677,6 +3677,7 @@ class VIEW3D_MT_edit_mesh(Menu): layout.operator("mesh.bisect") layout.operator("mesh.knife_project") +layout.operator("mesh.knife_tool") if with_bullet: layout.operator("mesh.convex_hull") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [18f0caa6c11] blender-v2.93-release: Fix T99997: Calling teleport without waiting for the previous event disables gravity
Commit: 18f0caa6c1173510f3569bcdd60c2c6796fb26b7 Author: Pratik Borhade Date: Wed Oct 19 18:20:47 2022 +0530 Branches: blender-v2.93-release https://developer.blender.org/rB18f0caa6c1173510f3569bcdd60c2c6796fb26b7 Fix T7: Calling teleport without waiting for the previous event disables gravity During teleport event, gravity is disabled and WalkMethod is stored in `teleport.navigation_mode` which is used later to reset the status after execution. Calling teleport events consecutively will change the initial WalkMethod value. So update it only on the first call. Also remove `else condition` as it stops the previously running teleport when the new teleport call fails to find a hit point. Reviewed by: dfelinto, mano-wii Differential Revision: https://developer.blender.org/D15574 === M source/blender/editors/space_view3d/view3d_walk.c === diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index cbd65e3175d..ee9fc21175e 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -916,11 +916,15 @@ static void walkEvent(bContext *C, WalkInfo *walk, const wmEvent *event) if (ret) { WalkTeleport *teleport = >teleport; + + /* Store the current navigation mode if we are not already teleporting. */ + if (teleport->state == WALK_TELEPORT_STATE_OFF) { +teleport->navigation_mode = walk->navigation_mode; + } teleport->state = WALK_TELEPORT_STATE_ON; teleport->initial_time = PIL_check_seconds_timer(); teleport->duration = U.walk_navigation.teleport_time; - teleport->navigation_mode = walk->navigation_mode; walk_navigation_mode_set(walk, WALK_MODE_FREE); copy_v3_v3(teleport->origin, walk->rv3d->viewinv[3]); @@ -931,9 +935,7 @@ static void walkEvent(bContext *C, WalkInfo *walk, const wmEvent *event) sub_v3_v3v3(teleport->direction, loc, teleport->origin); } -else { - walk->teleport.state = WALK_TELEPORT_STATE_OFF; -} + break; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7c5b7713f12] master: Fix T103001: Width of some compositor nodes is incorrect
Commit: 7c5b7713f12ceb3d0704925d9e86adac839da9a9 Author: Pratik Borhade Date: Fri Dec 9 16:51:34 2022 +0530 Branches: master https://developer.blender.org/rB7c5b7713f12ceb3d0704925d9e86adac839da9a9 Fix T103001: Width of some compositor nodes is incorrect Nodes which are common in multiple editors (RGB, Value, Switch, RGB to BW) has less width in compositor editor. Patch changes compositor node width to 140 for consistency. Reviewed by: HooglyBoogly Differential Revision: https://developer.blender.org/D16719 === M source/blender/nodes/composite/nodes/node_composite_rgb.cc M source/blender/nodes/composite/nodes/node_composite_switch.cc M source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc M source/blender/nodes/composite/nodes/node_composite_value.cc === diff --git a/source/blender/nodes/composite/nodes/node_composite_rgb.cc b/source/blender/nodes/composite/nodes/node_composite_rgb.cc index f107961f301..c4b5e12ea60 100644 --- a/source/blender/nodes/composite/nodes/node_composite_rgb.cc +++ b/source/blender/nodes/composite/nodes/node_composite_rgb.cc @@ -55,7 +55,7 @@ void register_node_type_cmp_rgb() cmp_node_type_base(, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT); ntype.declare = file_ns::cmp_node_rgb_declare; - node_type_size_preset(, NODE_SIZE_SMALL); + node_type_size_preset(, NODE_SIZE_DEFAULT); ntype.get_compositor_operation = file_ns::get_compositor_operation; nodeRegisterType(); diff --git a/source/blender/nodes/composite/nodes/node_composite_switch.cc b/source/blender/nodes/composite/nodes/node_composite_switch.cc index c62ae652029..22b56f4b50c 100644 --- a/source/blender/nodes/composite/nodes/node_composite_switch.cc +++ b/source/blender/nodes/composite/nodes/node_composite_switch.cc @@ -63,7 +63,7 @@ void register_node_type_cmp_switch() cmp_node_type_base(, CMP_NODE_SWITCH, "Switch", NODE_CLASS_LAYOUT); ntype.declare = file_ns::cmp_node_switch_declare; ntype.draw_buttons = file_ns::node_composit_buts_switch; - node_type_size_preset(, NODE_SIZE_SMALL); + node_type_size_preset(, NODE_SIZE_DEFAULT); ntype.get_compositor_operation = file_ns::get_compositor_operation; nodeRegisterType(); diff --git a/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc b/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc index d083051e9d2..35a1261001a 100644 --- a/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc +++ b/source/blender/nodes/composite/nodes/node_composite_val_to_rgb.cc @@ -191,7 +191,7 @@ void register_node_type_cmp_rgbtobw() cmp_node_type_base(, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTER); ntype.declare = file_ns::cmp_node_rgbtobw_declare; - node_type_size_preset(, NODE_SIZE_SMALL); + node_type_size_preset(, NODE_SIZE_DEFAULT); ntype.get_compositor_shader_node = file_ns::get_compositor_shader_node; nodeRegisterType(); diff --git a/source/blender/nodes/composite/nodes/node_composite_value.cc b/source/blender/nodes/composite/nodes/node_composite_value.cc index a96e1db14ad..5b873c9800e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_value.cc +++ b/source/blender/nodes/composite/nodes/node_composite_value.cc @@ -51,7 +51,7 @@ void register_node_type_cmp_value() cmp_node_type_base(, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT); ntype.declare = file_ns::cmp_node_value_declare; - node_type_size_preset(, NODE_SIZE_SMALL); + node_type_size_preset(, NODE_SIZE_DEFAULT); ntype.get_compositor_operation = file_ns::get_compositor_operation; nodeRegisterType(); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [92680674d0b] blender-v3.3-release: Fix T102187: Add knife tool in mesh panel
Commit: 92680674d0b78f477ec8dd68589289e45870791b Author: Pratik Borhade Date: Sun Nov 13 22:48:24 2022 +0530 Branches: blender-v3.3-release https://developer.blender.org/rB92680674d0b78f477ec8dd68589289e45870791b Fix T102187: Add knife tool in mesh panel Add knife tool option in mesh panel Reviewer: campbellbarton, JulienKaspar Differential Revision: https://developer.blender.org/D16395 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index e0970a9708e..1a55a5f2535 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3841,6 +3841,7 @@ class VIEW3D_MT_edit_mesh(Menu): layout.operator("mesh.bisect") layout.operator("mesh.knife_project") +layout.operator("mesh.knife_tool") if with_bullet: layout.operator("mesh.convex_hull") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7419e291e8b] master: Merge branch 'blender-v3.4-release'
Commit: 7419e291e8b81b9dd562a05909bbf30cdd77077e Author: Pratik Borhade Date: Sun Nov 13 22:54:38 2022 +0530 Branches: master https://developer.blender.org/rB7419e291e8b81b9dd562a05909bbf30cdd77077e Merge branch 'blender-v3.4-release' === === ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [b927cc9ba6c] blender-v3.4-release: Fix T102187: Add knife tool in mesh panel
Commit: b927cc9ba6c7567066f26fd82c95b0059a8cff75 Author: Pratik Borhade Date: Sun Nov 13 22:48:24 2022 +0530 Branches: blender-v3.4-release https://developer.blender.org/rBb927cc9ba6c7567066f26fd82c95b0059a8cff75 Fix T102187: Add knife tool in mesh panel Add knife tool option in mesh panel Reviewer: campbellbarton, JulienKaspar Differential Revision: https://developer.blender.org/D16395 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 39684aaf161..d6492ea2d85 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3849,6 +3849,7 @@ class VIEW3D_MT_edit_mesh(Menu): layout.operator("mesh.bisect") layout.operator("mesh.knife_project") +layout.operator("mesh.knife_tool") if with_bullet: layout.operator("mesh.convex_hull") ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2a7b8e78e19] blender-v3.3-release: Fix T99997: Calling teleport without waiting for the previous event disables gravity
Commit: 2a7b8e78e192277aaaef5805aa9166365e23e076 Author: Pratik Borhade Date: Wed Oct 19 18:20:47 2022 +0530 Branches: blender-v3.3-release https://developer.blender.org/rB2a7b8e78e192277aaaef5805aa9166365e23e076 Fix T7: Calling teleport without waiting for the previous event disables gravity During teleport event, gravity is disabled and WalkMethod is stored in `teleport.navigation_mode` which is used later to reset the status after execution. Calling teleport events consecutively will change the initial WalkMethod value. So update it only on the first call. Also remove `else condition` as it stops the previously running teleport when the new teleport call fails to find a hit point. Reviewed by: dfelinto, mano-wii Differential Revision: https://developer.blender.org/D15574 === M source/blender/editors/space_view3d/view3d_navigate_walk.c === diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c index 69deaab7ebe..7d4f56f04c4 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.c +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c @@ -849,11 +849,15 @@ static void walkEvent(WalkInfo *walk, const wmEvent *event) if (ret) { WalkTeleport *teleport = >teleport; + + /* Store the current navigation mode if we are not already teleporting. */ + if (teleport->state == WALK_TELEPORT_STATE_OFF) { +teleport->navigation_mode = walk->navigation_mode; + } teleport->state = WALK_TELEPORT_STATE_ON; teleport->initial_time = PIL_check_seconds_timer(); teleport->duration = U.walk_navigation.teleport_time; - teleport->navigation_mode = walk->navigation_mode; walk_navigation_mode_set(walk, WALK_MODE_FREE); copy_v3_v3(teleport->origin, walk->rv3d->viewinv[3]); @@ -864,9 +868,7 @@ static void walkEvent(WalkInfo *walk, const wmEvent *event) sub_v3_v3v3(teleport->direction, loc, teleport->origin); } -else { - walk->teleport.state = WALK_TELEPORT_STATE_OFF; -} + break; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ead3fc4a075] master: Fix T99997: Calling teleport without waiting for the previous event disables gravity
Commit: ead3fc4a075d24e3481dfebdc63d54e7143a027c Author: Pratik Borhade Date: Wed Oct 19 18:20:47 2022 +0530 Branches: master https://developer.blender.org/rBead3fc4a075d24e3481dfebdc63d54e7143a027c Fix T7: Calling teleport without waiting for the previous event disables gravity During teleport event, gravity is disabled and WalkMethod is stored in `teleport.navigation_mode` which is used later to reset the status after execution. Calling teleport events consecutively will change the initial WalkMethod value. So update it only on the first call. Also remove `else condition` as it stops the previously running teleport when the new teleport call fails to find a hit point. Reviewed by: dfelinto, mano-wii Differential Revision: https://developer.blender.org/D15574 === M source/blender/editors/space_view3d/view3d_navigate_walk.c === diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c index 3e0ce892b5a..aea322d73d9 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.c +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c @@ -849,11 +849,15 @@ static void walkEvent(WalkInfo *walk, const wmEvent *event) if (ret) { WalkTeleport *teleport = >teleport; + + /* Store the current navigation mode if we are not already teleporting. */ + if (teleport->state == WALK_TELEPORT_STATE_OFF) { +teleport->navigation_mode = walk->navigation_mode; + } teleport->state = WALK_TELEPORT_STATE_ON; teleport->initial_time = PIL_check_seconds_timer(); teleport->duration = U.walk_navigation.teleport_time; - teleport->navigation_mode = walk->navigation_mode; walk_navigation_mode_set(walk, WALK_MODE_FREE); copy_v3_v3(teleport->origin, walk->rv3d->viewinv[3]); @@ -864,9 +868,7 @@ static void walkEvent(WalkInfo *walk, const wmEvent *event) sub_v3_v3v3(teleport->direction, loc, teleport->origin); } -else { - walk->teleport.state = WALK_TELEPORT_STATE_OFF; -} + break; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9a6dc39d4b8] master: Sculpt: Fix T101694: Change operator for unhide face sets
Commit: 9a6dc39d4b853594dbce925b9495c9042af89211 Author: Pratik Borhade Date: Tue Oct 11 02:48:33 2022 -0700 Branches: master https://developer.blender.org/rB9a6dc39d4b853594dbce925b9495c9042af89211 Sculpt: Fix T101694: Change operator for unhide face sets In 22c3db72ca2f `SHOW_ALL` has been removed from `face_set_change_visibility`. Instead `SCULPT_OT_reveal_all` is now used for unhiding all face sets. Reviewed By: Joseph Eagar & Julian Kaspar Differential Revision: https://developer.blender.org/D16199 Ref D16199 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index ada2993a16f..e8c0d4586bd 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3356,8 +3356,7 @@ class VIEW3D_MT_face_sets(Menu): op = layout.operator("sculpt.face_set_change_visibility", text='Invert Visible Face Sets') op.mode = 'INVERT' -op = layout.operator("sculpt.face_set_change_visibility", text='Show All Face Sets') -op.mode = 'SHOW_ALL' +op = layout.operator("sculpt.reveal_all", text='Show All Face Sets') layout.separator() @@ -5518,9 +5517,7 @@ class VIEW3D_MT_sculpt_face_sets_edit_pie(Menu): op = pie.operator("sculpt.face_set_change_visibility", text='Invert Visible') op.mode = 'INVERT' -op = pie.operator("sculpt.face_set_change_visibility", text='Show All') -op.mode = 'SHOW_ALL' - +op = pie.operator("sculpt.reveal_all", text='Show All') class VIEW3D_MT_wpaint_vgroup_lock_pie(Menu): bl_label = "Vertex Group Locks" ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [28e09980a2d] blender-v3.3-release: Fix T101233: Crash on deleting the object in outliner due to null pointer access
Commit: 28e09980a2d09eaea3f49cb080265014a4f1c2f4 Author: Pratik Borhade Date: Tue Oct 4 20:49:34 2022 +0530 Branches: blender-v3.3-release https://developer.blender.org/rB28e09980a2d09eaea3f49cb080265014a4f1c2f4 Fix T101233: Crash on deleting the object in outliner due to null pointer access After rB188f7585a183 deleting the object results in crash due to null pointer access if collections are filtered out Reviewed by: mont29 Differential Revision: https://developer.blender.org/D16031 === M source/blender/editors/space_outliner/outliner_tools.cc === diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 847b9e0963b..dfb421367c1 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -2351,7 +2351,7 @@ static TreeTraversalAction outliner_find_objects_to_delete(TreeElement *te, void /* Do not allow to delete children objects of an override collection. */ TreeElement *te_parent = te->parent; - if (outliner_is_collection_tree_element(te_parent)) { + if (te_parent != nullptr && outliner_is_collection_tree_element(te_parent)) { TreeStoreElem *tselem_parent = TREESTORE(te_parent); ID *id_parent = tselem_parent->id; BLI_assert(GS(id_parent->name) == ID_GR); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4186b0ebe4e] master: Fix T101233: Crash on deleting the object in outliner due to null pointer access
Commit: 4186b0ebe4e86eb4de5e88dd333ea3884748173c Author: Pratik Borhade Date: Tue Oct 4 20:49:34 2022 +0530 Branches: master https://developer.blender.org/rB4186b0ebe4e86eb4de5e88dd333ea3884748173c Fix T101233: Crash on deleting the object in outliner due to null pointer access After rB188f7585a183 deleting the object results in crash due to null pointer access if collections are filtered out Reviewed by: mont29 Differential Revision: https://developer.blender.org/D16031 === M source/blender/editors/space_outliner/outliner_tools.cc === diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc index 16b24b14845..6679489af60 100644 --- a/source/blender/editors/space_outliner/outliner_tools.cc +++ b/source/blender/editors/space_outliner/outliner_tools.cc @@ -2371,7 +2371,7 @@ static TreeTraversalAction outliner_collect_objects_to_delete(TreeElement *te, v /* Do not allow to delete children objects of an override collection. */ TreeElement *te_parent = te->parent; - if (outliner_is_collection_tree_element(te_parent)) { + if (te_parent != nullptr && outliner_is_collection_tree_element(te_parent)) { TreeStoreElem *tselem_parent = TREESTORE(te_parent); ID *id_parent = tselem_parent->id; BLI_assert(GS(id_parent->name) == ID_GR); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4b3b8156ee4] blender-v2.93-release: Fix T99070: Apply transform fails to clear delta transform values
Commit: 4b3b8156ee443decdd224a99bb4fac69afb0f4f9 Author: Pratik Borhade Date: Mon Jun 27 10:37:09 2022 -0300 Branches: blender-v2.93-release https://developer.blender.org/rB4b3b8156ee443decdd224a99bb4fac69afb0f4f9 Fix T99070: Apply transform fails to clear delta transform values Clear delta transform value after applying transform. Include delta location while applying transform. Use `copy_v3_fl` for resetting object scale Reviewed By: mano-wii Maniphest Tasks: T99070 Differential Revision: https://developer.blender.org/D15270 === M source/blender/editors/object/object_transform.c === diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index d7863c54c51..c768ac0696a 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -788,7 +788,7 @@ static int apply_objects_internal(bContext *C, /* calculate translation */ if (apply_loc) { - copy_v3_v3(mat[3], ob->loc); + add_v3_v3v3(mat[3], ob->loc, ob->dloc); if (!(apply_scale && apply_rot)) { float tmat[3][3]; @@ -911,12 +911,15 @@ static int apply_objects_internal(bContext *C, if (apply_loc) { zero_v3(ob->loc); + zero_v3(ob->dloc); } if (apply_scale) { - ob->scale[0] = ob->scale[1] = ob->scale[2] = 1.0f; + copy_v3_fl(ob->scale, 1.0f); + copy_v3_fl(ob->dscale, 1.0f); } if (apply_rot) { zero_v3(ob->rot); + zero_v3(ob->drot); unit_qt(ob->quat); unit_axis_angle(ob->rotAxis, >rotAngle); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [ffd8390af7d] master: Fix T101504: Crash when repeat value is zero
Commit: ffd8390af7d9c6dc1f9a2998789f17932a3d23cf Author: Pratik Borhade Date: Sat Oct 1 16:28:14 2022 +0200 Branches: master https://developer.blender.org/rBffd8390af7d9c6dc1f9a2998789f17932a3d23cf Fix T101504: Crash when repeat value is zero Crash triggers due to division by zero fix is to increase minimum limit for `seg_repeat` to 1 Reviewed By: antoniov, frogstomp Maniphest Tasks: T101504 Differential Revision: https://developer.blender.org/D16120 === M source/blender/makesrna/intern/rna_gpencil_modifier.c === diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index ae8208ed0d8..bbc7ce0d896 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -1812,7 +1812,7 @@ static void rna_def_modifier_gpenciltime(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); prop = RNA_def_property(srna, "seg_repeat", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, 0, INT16_MAX); + RNA_def_property_range(prop, 1, INT16_MAX); RNA_def_property_ui_text(prop, "Repeat", "Number of cycle repeats"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [68487cff95b] blender-v3.3-release: Fix T98968: Node reroute tool doesn't add to frames
Commit: 68487cff95b335491e001ded8620b4b7aa3380db Author: Pratik Borhade Date: Mon Aug 29 14:39:14 2022 -0500 Branches: blender-v3.3-release https://developer.blender.org/rB68487cff95b335491e001ded8620b4b7aa3380db Fix T98968: Node reroute tool doesn't add to frames If reroute node lies in side the frame node boundaries then set frame node as the parent of reroute. Differential Revision: https://developer.blender.org/D15739 === M source/blender/editors/space_node/node_add.cc === diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc index a89b5444a4d..e96efb888f3 100644 --- a/source/blender/editors/space_node/node_add.cc +++ b/source/blender/editors/space_node/node_add.cc @@ -192,6 +192,13 @@ static bNodeSocketLink *add_reroute_do_socket_section(bContext *C, reroute_node->locx = insert_point[0] / UI_DPI_FAC; reroute_node->locy = insert_point[1] / UI_DPI_FAC; + +LISTBASE_FOREACH_BACKWARD (bNode *, frame_node, >nodes) { + if (frame_node->type == NODE_FRAME && BLI_rctf_isect_pt_v(_node->totr, insert_point)) { +nodeAttachNode(reroute_node, frame_node); +break; + } +} } return socklink; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [50e5c787995] master: Fix T98968: Node reroute tool doesn't add to frames
Commit: 50e5c787995c2a1a96edfef5479fe40c3a307c7f Author: Pratik Borhade Date: Mon Aug 29 14:39:14 2022 -0500 Branches: master https://developer.blender.org/rB50e5c787995c2a1a96edfef5479fe40c3a307c7f Fix T98968: Node reroute tool doesn't add to frames If reroute node lies in side the frame node boundaries then set frame node as the parent of reroute. Differential Revision: https://developer.blender.org/D15739 === M source/blender/editors/space_node/node_add.cc === diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc index 0d498d07aff..02684d92eaf 100644 --- a/source/blender/editors/space_node/node_add.cc +++ b/source/blender/editors/space_node/node_add.cc @@ -211,6 +211,13 @@ static bNodeSocketLink *add_reroute_do_socket_section(bContext *C, reroute_node->locx = insert_point[0] / UI_DPI_FAC; reroute_node->locy = insert_point[1] / UI_DPI_FAC; + +LISTBASE_FOREACH_BACKWARD (bNode *, frame_node, >nodes) { + if (frame_node->type == NODE_FRAME && BLI_rctf_isect_pt_v(_node->totr, insert_point)) { +nodeAttachNode(reroute_node, frame_node); +break; + } +} } return socklink; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [befe38fe1df] blender-v3.3-release: Fix T92099: No undo when moving viewport with camera locked to view
Commit: befe38fe1dfbbdac9ed9ef61853800426e5966c5 Author: Pratik Borhade Date: Fri Aug 5 15:53:04 2022 +1000 Branches: blender-v3.3-release https://developer.blender.org/rBbefe38fe1dfbbdac9ed9ef61853800426e5966c5 Fix T92099: No undo when moving viewport with camera locked to view Supports undo step generation while navigating in locked camera view. NDOF & track-pad navigation are not included for now. Actions that uses smooth view can be supported but are outside the scope of this change, includes undo push for: - VIEW3D_OT_view_pan - VIEW3D_OT_dolly - VIEW3D_OT_fly - VIEW3D_OT_move - VIEW3D_OT_rotate - VIEW3D_OT_walk - VIEW3D_OT_zoom Reviewed by: campbellbarton Ref D15345 === M source/blender/editors/include/ED_view3d.h M source/blender/editors/space_view3d/view3d_navigate.c M source/blender/editors/space_view3d/view3d_navigate_dolly.c M source/blender/editors/space_view3d/view3d_navigate_fly.c M source/blender/editors/space_view3d/view3d_navigate_move.c M source/blender/editors/space_view3d/view3d_navigate_rotate.c M source/blender/editors/space_view3d/view3d_navigate_walk.c M source/blender/editors/space_view3d/view3d_navigate_zoom.c M source/blender/editors/space_view3d/view3d_utils.c === diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 0298983ed26..931bb7be8bf 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -1196,6 +1196,28 @@ bool ED_view3d_camera_lock_autokey(struct View3D *v3d, void ED_view3d_lock_clear(struct View3D *v3d); +/** + * Create an undo step when the camera is locked to the view. + * \param str: The name of the undo step (typically #wmOperatorType.name should be used). + * + * \return true when the call to push an undo step was made. + */ +bool ED_view3d_camera_lock_undo_push(const char *str, + View3D *v3d, + struct RegionView3D *rv3d, + struct bContext *C); + +/** + * A version of #ED_view3d_camera_lock_undo_push that performs a grouped undo push. + * + * \note use for actions that are likely to be repeated such as mouse wheel to zoom, + * where adding a separate undo step each time isn't desirable. + */ +bool ED_view3d_camera_lock_undo_grouped_push(const char *str, + View3D *v3d, + struct RegionView3D *rv3d, + struct bContext *C); + #define VIEW3D_MARGIN 1.4f #define VIEW3D_DIST_FALLBACK 1.0f diff --git a/source/blender/editors/space_view3d/view3d_navigate.c b/source/blender/editors/space_view3d/view3d_navigate.c index 50d7626a57d..88e004aac48 100644 --- a/source/blender/editors/space_view3d/view3d_navigate.c +++ b/source/blender/editors/space_view3d/view3d_navigate.c @@ -1554,6 +1554,7 @@ static int viewpan_invoke(bContext *C, wmOperator *op, const wmEvent *event) viewmove_apply(vod, vod->prev.event_xy[0] + x, vod->prev.event_xy[1] + y); + ED_view3d_camera_lock_undo_push(op->type->name, vod->v3d, vod->rv3d, C); viewops_data_free(C, vod); return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_navigate_dolly.c b/source/blender/editors/space_view3d/view3d_navigate_dolly.c index d45b0c436ac..376e8ba190b 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_dolly.c +++ b/source/blender/editors/space_view3d/view3d_navigate_dolly.c @@ -181,6 +181,7 @@ static int viewdolly_modal(bContext *C, wmOperator *op, const wmEvent *event) } if (ret & OPERATOR_FINISHED) { +ED_view3d_camera_lock_undo_push(op->type->name, vod->v3d, vod->rv3d, C); viewops_data_free(C, vod); op->customdata = NULL; } diff --git a/source/blender/editors/space_view3d/view3d_navigate_fly.c b/source/blender/editors/space_view3d/view3d_navigate_fly.c index 399f422f411..95114941d66 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_fly.c +++ b/source/blender/editors/space_view3d/view3d_navigate_fly.c @@ -1079,6 +1079,7 @@ static int fly_modal(bContext *C, wmOperator *op, const wmEvent *event) int exit_code; bool do_draw = false; FlyInfo *fly = op->customdata; + View3D *v3d = fly->v3d; RegionView3D *rv3d = fly->rv3d; Object *fly_object = ED_view3d_cameracontrol_object_get(fly->v3d_camera_control); @@ -1102,6 +1103,9 @@ static int fly_modal(bContext *C, wmOperator *op, const wmEvent *event) exit_code = flyEnd(C, fly); + if (exit_code == OPERATOR_FINISHED) { +ED_view3d_camera_lock_undo_push(op->type->name, v3d, rv3d, C); + } if (exit_code != OPERATOR_RUNNING_MODAL) { do_draw =
[Bf-blender-cvs] [074ce49de01] master: Automated testing: Add operators tests
Commit: 074ce49de014641f05f12e3b196d8eb7c4d1f733 Author: Pratik Borhade Date: Tue Aug 2 16:43:42 2022 +0200 Branches: master https://developer.blender.org/rB074ce49de014641f05f12e3b196d8eb7c4d1f733 Automated testing: Add operators tests Part of {T84999} This patch adds test for - `dissolve_limited` - `dissolve_mode` - `merge_normals` Updated blend file: {F13162744} Reviewed By: zazizizou, mont29 Differential Revision: https://developer.blender.org/D15187 === M tests/python/operators.py === diff --git a/tests/python/operators.py b/tests/python/operators.py index 548a2b50b05..3933fc1cd1c 100644 --- a/tests/python/operators.py +++ b/tests/python/operators.py @@ -115,6 +115,18 @@ def main(): [OperatorSpecEditMode("dissolve_faces", {}, "VERT", {5, 34, 47, 49, 83, 91, 95})], ), +# dissolve limited +SpecMeshTest( +"SphereDissolveLimited", "testSphereDissolveLimited", "expectedSphereDissolveLimited", +[OperatorSpecEditMode("dissolve_limited", {"angle_limit": 0.610865}, "FACE", {20, 23, 26, 29, 32})], +), + +# dissolve mode +SpecMeshTest( +"PlaneDissolveMode", "testPlaneDissolveMode", "expectedPlaneDissolveMode", +[OperatorSpecEditMode("dissolve_mode", {"use_verts": True}, "FACE", {0, 1, 2, 10, 12, 13})], +), + # dissolve verts SpecMeshTest( "CubeDissolveVerts", "testCubeDissolveVerts", "expectedCubeDissolveVerts", @@ -332,6 +344,12 @@ def main(): [OperatorSpecEditMode("mark_seam", {}, "EDGE", {1})], ), +# merge normals +SpecMeshTest( +"CubeMergeNormals", "testCubeMergeNormals", "expectedCubeMergeNormals", +[OperatorSpecEditMode("merge_normals", {}, "FACE", {3, 5})], +), + # select all SpecMeshTest( "CircleSelectAll", "testCircleSelectAll", "expectedCircleSelectAll", ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [80d193c51b4] blender-v3.2-release: Fix T100040: Crash when transform applied on multi-user image
Commit: 80d193c51b460cff30266efb4530bef6b6fd Author: Pratik Borhade Date: Mon Aug 1 17:07:56 2022 +0200 Branches: blender-v3.2-release https://developer.blender.org/rB80d193c51b460cff30266efb4530bef6b6fd Fix T100040: Crash when transform applied on multi-user image Affected by rB8621fdb10dc4 Crash if single-user data is created when we apply transform on multi-user image data. Crash occurs because creation of new copy was not handled in `single_obdata_users` for empty objects (image for example) Reviewed By: dfelinto, mont29 Maniphest Tasks: T100040 Differential Revision: https://developer.blender.org/D15587 === 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 111f3b6bf92..7df9f084640 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1822,6 +1822,11 @@ static void single_obdata_users( DEG_id_tag_update(>id, ID_RECALC_GEOMETRY); switch (ob->type) { + case OB_EMPTY: +ob->data = ID_NEW_SET( +ob->data, +BKE_id_copy_ex(bmain, ob->data, NULL, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS)); +break; case OB_LAMP: ob->data = la = ID_NEW_SET( ob->data, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3e8bd1f6e47] blender-v3.3-release: Fix T100040: Crash when transform applied on multi-user image
Commit: 3e8bd1f6e479fd5dad5d75af59ceb929e7017114 Author: Pratik Borhade Date: Mon Aug 1 17:07:56 2022 +0200 Branches: blender-v3.3-release https://developer.blender.org/rB3e8bd1f6e479fd5dad5d75af59ceb929e7017114 Fix T100040: Crash when transform applied on multi-user image Affected by rB8621fdb10dc4 Crash if single-user data is created when we apply transform on multi-user image data. Crash occurs because creation of new copy was not handled in `single_obdata_users` for empty objects (image for example) Reviewed By: dfelinto, mont29 Maniphest Tasks: T100040 Differential Revision: https://developer.blender.org/D15587 === 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 01042824aac..f136d3302df 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1830,6 +1830,11 @@ static void single_obdata_users( DEG_id_tag_update(>id, ID_RECALC_GEOMETRY); switch (ob->type) { + case OB_EMPTY: +ob->data = ID_NEW_SET( +ob->data, +BKE_id_copy_ex(bmain, ob->data, NULL, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS)); +break; case OB_LAMP: ob->data = la = ID_NEW_SET( ob->data, ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [28985ccc05f] master: Fix T99583: Missing update for option in particle edit mode
Commit: 28985ccc05ff15dd22184863b8c57a0851fc9614 Author: Pratik Borhade Date: Tue Jul 19 14:20:44 2022 -0500 Branches: master https://developer.blender.org/rB28985ccc05ff15dd22184863b8c57a0851fc9614 Fix T99583: Missing update for option in particle edit mode Missing Ui refresh when property is accessed through shortcut. Use RNA_def_property_update to solve this. Differential Revision: https://developer.blender.org/D15431 === M source/blender/makesrna/intern/rna_sculpt_paint.c === diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 3de9e632ff6..2e1fa8db7fe 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -1303,6 +1303,7 @@ static void rna_def_particle_edit(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_INTERPOLATE_ADDED); RNA_def_property_ui_text( prop, "Interpolate", "Interpolate new particles from the existing ones"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); prop = RNA_def_property(srna, "default_key_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "totaddkey"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [3063d90cfc0] master: Fix T99453: Regression: Crash on calling menu search
Commit: 3063d90cfc057b4e1f269fd0723abbc0f2ae12f0 Author: Pratik Borhade Date: Thu Jul 7 15:23:41 2022 +0200 Branches: master https://developer.blender.org/rB3063d90cfc057b4e1f269fd0723abbc0f2ae12f0 Fix T99453: Regression: Crash on calling menu search Fix T99453. Crash due to null pointer access. So wrap the function call in simple `if` check Reviewed By: sybren Maniphest Tasks: T99453 Differential Revision: https://developer.blender.org/D15370 === M source/blender/editors/object/object_vgroup.c === diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 158bc28662a..17b7fe7fe5e 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -732,8 +732,10 @@ const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(const bContext * } /* Set `Deform Bone` as default selection if armature is present. */ - RNA_def_property_enum_default( - prop, BKE_modifiers_is_deformed_by_armature(ob) ? WT_VGROUP_BONE_DEFORM : WT_VGROUP_ALL); + if (ob) { +RNA_def_property_enum_default( +prop, BKE_modifiers_is_deformed_by_armature(ob) ? WT_VGROUP_BONE_DEFORM : WT_VGROUP_ALL); + } RNA_enum_item_end(, ); *r_free = true; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0e0115b2147] cycles_oneapi: Fix T99070: Apply transform fails to clear delta transform values
Commit: 0e0115b21476c63731b475c3aa365f99dfd3130e Author: Pratik Borhade Date: Mon Jun 27 10:37:09 2022 -0300 Branches: cycles_oneapi https://developer.blender.org/rB0e0115b21476c63731b475c3aa365f99dfd3130e Fix T99070: Apply transform fails to clear delta transform values Clear delta transform value after applying transform. Include delta location while applying transform. Use `copy_v3_fl` for resetting object scale Reviewed By: mano-wii Maniphest Tasks: T99070 Differential Revision: https://developer.blender.org/D15270 === M source/blender/editors/object/object_transform.cc === diff --git a/source/blender/editors/object/object_transform.cc b/source/blender/editors/object/object_transform.cc index 82e67231ec1..70c3eed3768 100644 --- a/source/blender/editors/object/object_transform.cc +++ b/source/blender/editors/object/object_transform.cc @@ -855,7 +855,7 @@ static int apply_objects_internal(bContext *C, /* calculate translation */ if (apply_loc) { - copy_v3_v3(mat[3], ob->loc); + add_v3_v3v3(mat[3], ob->loc, ob->dloc); if (!(apply_scale && apply_rot)) { float tmat[3][3]; @@ -1023,12 +1023,15 @@ static int apply_objects_internal(bContext *C, else { if (apply_loc) { zero_v3(ob->loc); +zero_v3(ob->dloc); } if (apply_scale) { -ob->scale[0] = ob->scale[1] = ob->scale[2] = 1.0f; +copy_v3_fl(ob->scale, 1.0f); +copy_v3_fl(ob->dscale, 1.0f); } if (apply_rot) { zero_v3(ob->rot); +zero_v3(ob->drot); unit_qt(ob->quat); unit_axis_angle(ob->rotAxis, >rotAngle); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [279e7dac7dc] master: Fix T99070: Apply transform fails to clear delta transform values
Commit: 279e7dac7dcfc0a7d4126c55a23a745362c293dc Author: Pratik Borhade Date: Mon Jun 27 10:37:09 2022 -0300 Branches: master https://developer.blender.org/rB279e7dac7dcfc0a7d4126c55a23a745362c293dc Fix T99070: Apply transform fails to clear delta transform values Clear delta transform value after applying transform. Include delta location while applying transform. Use `copy_v3_fl` for resetting object scale Reviewed By: mano-wii Maniphest Tasks: T99070 Differential Revision: https://developer.blender.org/D15270 === M source/blender/editors/object/object_transform.cc === diff --git a/source/blender/editors/object/object_transform.cc b/source/blender/editors/object/object_transform.cc index 82e67231ec1..70c3eed3768 100644 --- a/source/blender/editors/object/object_transform.cc +++ b/source/blender/editors/object/object_transform.cc @@ -855,7 +855,7 @@ static int apply_objects_internal(bContext *C, /* calculate translation */ if (apply_loc) { - copy_v3_v3(mat[3], ob->loc); + add_v3_v3v3(mat[3], ob->loc, ob->dloc); if (!(apply_scale && apply_rot)) { float tmat[3][3]; @@ -1023,12 +1023,15 @@ static int apply_objects_internal(bContext *C, else { if (apply_loc) { zero_v3(ob->loc); +zero_v3(ob->dloc); } if (apply_scale) { -ob->scale[0] = ob->scale[1] = ob->scale[2] = 1.0f; +copy_v3_fl(ob->scale, 1.0f); +copy_v3_fl(ob->dscale, 1.0f); } if (apply_rot) { zero_v3(ob->rot); +zero_v3(ob->drot); unit_qt(ob->quat); unit_axis_angle(ob->rotAxis, >rotAngle); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a8471459fd1] master: Fix T98445: Knife Tool always cuts through
Commit: a8471459fd18f356f730c684665c8dadadad723d Author: Pratik Borhade Date: Mon May 30 22:25:07 2022 +1000 Branches: master https://developer.blender.org/rBa8471459fd18f356f730c684665c8dadadad723d Fix T98445: Knife Tool always cuts through Minor error in if condition used for early return. Ref D15050 === M source/blender/editors/mesh/editmesh_knife.c === diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 7972459e457..5b3487b0a33 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1310,7 +1310,7 @@ static void knife_bvh_raycast_cb(void *userdata, const BVHTreeRay *ray, BVHTreeRayHit *hit) { - if (index != -1) { + if (index == -1) { return; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0a86ab6639e] master: Fix T96925: Fast diagonal movement in walk navigation
Commit: 0a86ab6639e8ec535808e74b66d6b2ec6b1307bd Author: Pratik Borhade Date: Mon Apr 25 13:07:18 2022 +0200 Branches: master https://developer.blender.org/rB0a86ab6639e8ec535808e74b66d6b2ec6b1307bd Fix T96925: Fast diagonal movement in walk navigation View moves faster with two active directions. This is probably because `dvec` is not normalized when moving in two directions. Normalizing this direction vector will fix the problem. Differential Revision: https://developer.blender.org/D14729 === M source/blender/editors/space_view3d/view3d_navigate_walk.c === diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c index 18ed88aeec6..19e064438fc 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_walk.c +++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c @@ -1205,7 +1205,6 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) dvec_tmp[2] = 0.0f; } - normalize_v3(dvec_tmp); add_v3_v3(dvec, dvec_tmp); } @@ -1226,7 +1225,6 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) dvec_tmp[1] = direction * rv3d->viewinv[0][1]; dvec_tmp[2] = 0.0f; - normalize_v3(dvec_tmp); add_v3_v3(dvec, dvec_tmp); } @@ -1249,6 +1247,8 @@ static int walkApply(bContext *C, WalkInfo *walk, bool is_confirm) } } +normalize_v3(dvec); + /* apply movement */ mul_v3_fl(dvec, walk->speed * time_redraw); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [cff08662231] temp-T96710-pbvh-pixels: Fix: UI alignment in knife tool settings popover
Commit: cff08662231ce8c577f3af8ad92c9c781ad7679b Author: Pratik Borhade Date: Wed Apr 6 17:01:07 2022 -0500 Branches: temp-T96710-pbvh-pixels https://developer.blender.org/rBcff08662231ce8c577f3af8ad92c9c781ad7679b Fix: UI alignment in knife tool settings popover Remove the extra space given for decorators on right of the popover. Differential Revision: https://developer.blender.org/D14518 === M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py === diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 270d0e9b288..158e07659bc 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1074,11 +1074,13 @@ class _defs_edit_mesh: else: extra = True if extra: +layout.use_property_decorate = False layout.use_property_split = True + layout.prop(props, "visible_measurements") layout.prop(props, "angle_snapping") layout.label(text="Angle Snapping Increment") -layout.row().prop(props, "angle_snapping_increment", text="", expand=True) +layout.prop(props, "angle_snapping_increment", text="") if show_extra: layout.popover("TOPBAR_PT_tool_settings_extra", text="...") return dict( ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [77ae30517f1] master: Fix: UI alignment in knife tool settings popover
Commit: 77ae30517f14b40669ef8a1978044598f6291191 Author: Pratik Borhade Date: Wed Apr 6 17:01:07 2022 -0500 Branches: master https://developer.blender.org/rB77ae30517f14b40669ef8a1978044598f6291191 Fix: UI alignment in knife tool settings popover Remove the extra space given for decorators on right of the popover. Differential Revision: https://developer.blender.org/D14518 === M release/scripts/startup/bl_ui/space_toolsystem_toolbar.py === diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 270d0e9b288..158e07659bc 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -1074,11 +1074,13 @@ class _defs_edit_mesh: else: extra = True if extra: +layout.use_property_decorate = False layout.use_property_split = True + layout.prop(props, "visible_measurements") layout.prop(props, "angle_snapping") layout.label(text="Angle Snapping Increment") -layout.row().prop(props, "angle_snapping_increment", text="", expand=True) +layout.prop(props, "angle_snapping_increment", text="") if show_extra: layout.popover("TOPBAR_PT_tool_settings_extra", text="...") return dict( ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f87029f7b13] master: Fix T96424: Don't register undo step for empty knife cut
Commit: f87029f7b13142499a37fb311a721d99bb1aecd7 Author: Pratik Borhade Date: Tue Apr 5 20:53:35 2022 +1000 Branches: master https://developer.blender.org/rBf87029f7b13142499a37fb311a721d99bb1aecd7 Fix T96424: Don't register undo step for empty knife cut Prevents undo push when no cut has been made. Reviewed By: campbellbarton Ref D14329 === M source/blender/editors/mesh/editmesh_knife.c === diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 64d10f7e2af..73716f6edba 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -4399,6 +4399,11 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) knifetool_exit(op); ED_workspace_status_text(C, NULL); +/* Exit early to prevent undo push for empty cuts. */ +if (kcd->totkvert == 0) { + return OPERATOR_CANCELLED; +} + return OPERATOR_FINISHED; case KNF_MODAL_UNDO: if (BLI_stack_is_empty(kcd->undostack)) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [d00de988c36] master: WM: avoid unnecessary undo step creation when duplicating
Commit: d00de988c36a6bde9bccdd75cd544085df2d472c Author: Pratik Borhade Date: Tue Apr 5 20:13:03 2022 +1000 Branches: master https://developer.blender.org/rBd00de988c36a6bde9bccdd75cd544085df2d472c WM: avoid unnecessary undo step creation when duplicating Calling duplicate operation without selecting anything registers an undo step. If nothing is selected (keyframe, curve, object, etc.), cancel the operator execution to prevent undo push. Patch improves following operators: - ACTION_OT_duplicate - GPENCIL_OT_duplicate - GRAPH_OT_duplicate - MESH_OT_duplicate - NODE_OT_duplicate - OBJECT_OT_duplicate Reviewed By: campbellbarton Ref D14511 === M source/blender/editors/animation/keyframes_general.c M source/blender/editors/gpencil/gpencil_edit.c M source/blender/editors/include/ED_keyframes_edit.h M source/blender/editors/mesh/editmesh_tools.c M source/blender/editors/object/object_add.cc M source/blender/editors/space_action/action_edit.c M source/blender/editors/space_graph/graph_edit.c M source/blender/editors/space_node/node_edit.cc === diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index aec2b0f769a..00e2f221117 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -118,11 +118,13 @@ void clear_fcurve_keys(FCurve *fcu) /* */ -void duplicate_fcurve_keys(FCurve *fcu) +bool duplicate_fcurve_keys(FCurve *fcu) { + bool changed = false; + /* this can only work when there is an F-Curve, and also when there are some BezTriples */ if (ELEM(NULL, fcu, fcu->bezt)) { -return; +return changed; } for (int i = 0; i < fcu->totvert; i++) { @@ -135,7 +137,7 @@ void duplicate_fcurve_keys(FCurve *fcu) memcpy(newbezt + i + 1, fcu->bezt + i, sizeof(BezTriple)); memcpy(newbezt + i + 2, fcu->bezt + i + 1, sizeof(BezTriple) * (fcu->totvert - (i + 1))); fcu->totvert++; - + changed = true; /* reassign pointers... (free old, and add new) */ MEM_freeN(fcu->bezt); fcu->bezt = newbezt; @@ -148,6 +150,7 @@ void duplicate_fcurve_keys(FCurve *fcu) BEZT_SEL_ALL(>bezt[i]); } } + return changed; } /* */ diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index a8fb344f366..3c8e6d6e5f5 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -994,9 +994,10 @@ static int gpencil_duplicate_exec(bContext *C, wmOperator *op) /* updates */ DEG_id_tag_update(>id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); +return OPERATOR_FINISHED; } - return OPERATOR_FINISHED; + return OPERATOR_CANCELLED; } void GPENCIL_OT_duplicate(wmOperatorType *ot) diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 3a0bb9738ae..163797d395d 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -381,7 +381,7 @@ bool keyframe_region_circle_test(const KeyframeEdit_CircleData *data_circle, con void delete_fcurve_key(struct FCurve *fcu, int index, bool do_recalc); bool delete_fcurve_keys(struct FCurve *fcu); void clear_fcurve_keys(struct FCurve *fcu); -void duplicate_fcurve_keys(struct FCurve *fcu); +bool duplicate_fcurve_keys(struct FCurve *fcu); float get_default_rna_value(struct FCurve *fcu, struct PropertyRNA *prop, struct PointerRNA *ptr); typedef struct FCurveSegment { diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 1499742af54..0b2944657fd 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2014,6 +2014,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) uint objects_len = 0; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( view_layer, CTX_wm_view3d(C), _len); + bool changed = false; for (uint ob_index = 0; ob_index < objects_len; ob_index++) { Object *obedit = objects[ob_index]; @@ -2024,6 +2025,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) BMOperator bmop; BMesh *bm = em->bm; +changed = true; EDBM_op_init(em, , @@ -2058,16 +2060,16 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) } MEM_freeN(objects); - return OPERATOR_FINISHED; + return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } stati
[Bf-blender-cvs] [66010b6deb6] master: Add soft limit for Bevel segments in modifier.
Commit: 66010b6deb6b7800443d5d9ee29074ff3b2fd994 Author: Pratik Borhade Date: Wed Mar 30 08:51:20 2022 -0400 Branches: master https://developer.blender.org/rB66010b6deb6b7800443d5d9ee29074ff3b2fd994 Add soft limit for Bevel segments in modifier. The recent change to allow a max segments of 1000 in the modifier causes a lag when dragging or wheeling in the segments box. This change makes the soft limit back to 100, but you can still type numbers up to 1000 in the box. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D14477 === M source/blender/makesrna/intern/rna_modifier.c === diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 429fae2fab0..922e0204299 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -4082,6 +4082,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna) prop = RNA_def_property(srna, "segments", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "res"); RNA_def_property_range(prop, 1, 1000); + RNA_def_property_ui_range(prop, 1, 100, 1, -1); RNA_def_property_ui_text(prop, "Segments", "Number of segments for round edges/verts"); RNA_def_property_update(prop, 0, "rna_BevelModifier_update_segments"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [69cea4fce15] blender-v2.93-release: Fix T96624: NLA crash when reordering tracks if no object is selected.
Commit: 69cea4fce15fa4542b62a21d26987e14bd733744 Author: Pratik Borhade Date: Tue Mar 22 12:03:53 2022 +0100 Branches: blender-v2.93-release https://developer.blender.org/rB69cea4fce15fa4542b62a21d26987e14bd733744 Fix T96624: NLA crash when reordering tracks if no object is selected. Caused by rBc0bd240ad0a1. To avoid crash, make boolean value false if active object data is NULL. Should be backported to 2.93 LTS and 3.1 corrective releases. === M source/blender/editors/animation/anim_channels_edit.c === diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index e1d0ed833bf..1b27b27593d 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1160,7 +1160,7 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAn { AnimChanRearrangeFp rearrange_func; ListBase anim_data_visible = {NULL, NULL}; - const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ac->obact); + const bool is_liboverride = (ac->obact != NULL) ? ID_IS_OVERRIDE_LIBRARY(ac->obact) : false; /* hack: invert mode so that functions will work in right order */ mode *= -1; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [960783a21ac] blender-v3.1-release: Fix T96624: NLA crash when reordering tracks if no object is selected.
Commit: 960783a21ac89edf1516276099cbb883cbc120c0 Author: Pratik Borhade Date: Tue Mar 22 12:03:53 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB960783a21ac89edf1516276099cbb883cbc120c0 Fix T96624: NLA crash when reordering tracks if no object is selected. Caused by rBc0bd240ad0a1. To avoid crash, make boolean value false if active object data is NULL. Should be backported to 2.93 LTS and 3.1 corrective releases. === M source/blender/editors/animation/anim_channels_edit.c === diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index b97837a76b9..01903be9972 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1147,7 +1147,7 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAn { AnimChanRearrangeFp rearrange_func; ListBase anim_data_visible = {NULL, NULL}; - const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ac->obact); + const bool is_liboverride = (ac->obact != NULL) ? ID_IS_OVERRIDE_LIBRARY(ac->obact) : false; /* hack: invert mode so that functions will work in right order */ mode *= -1; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [913b6b9ec1b] master: Fix T96624: NLA crash when reordering tracks if no object is selected.
Commit: 913b6b9ec1b1f3cf83b21956b06e2f6d3341c78c Author: Pratik Borhade Date: Tue Mar 22 12:03:53 2022 +0100 Branches: master https://developer.blender.org/rB913b6b9ec1b1f3cf83b21956b06e2f6d3341c78c Fix T96624: NLA crash when reordering tracks if no object is selected. Caused by rBc0bd240ad0a1. To avoid crash, make boolean value false if active object data is NULL. Should be backported to 2.93 LTS and 3.1 corrective releases. === M source/blender/editors/animation/anim_channels_edit.c === diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index df418b204f9..08379be36fa 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1131,7 +1131,7 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAn { AnimChanRearrangeFp rearrange_func; ListBase anim_data_visible = {NULL, NULL}; - const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ac->obact); + const bool is_liboverride = (ac->obact != NULL) ? ID_IS_OVERRIDE_LIBRARY(ac->obact) : false; /* hack: invert mode so that functions will work in right order */ mode *= -1; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [2ddb53de540] blender-v3.1-release: Fix T96228: TypeError on use of Copy from Active Track operation
Commit: 2ddb53de5403fb02e4de053084b2d00b2372a122 Author: Pratik Borhade Date: Tue Mar 8 09:50:32 2022 +0100 Branches: blender-v3.1-release https://developer.blender.org/rB2ddb53de5403fb02e4de053084b2d00b2372a122 Fix T96228: TypeError on use of Copy from Active Track operation Issue was introduced after the python 3.10 switch Explicit conversion to int will fix the issue. Same issue is likely to happen with `MovieTrackingSettings.default_search_size` So I did the same change over there. Differential Revision: https://developer.blender.org/D14273 === M release/scripts/startup/bl_operators/clip.py === diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py index f0e099244f4..734fb071d42 100644 --- a/release/scripts/startup/bl_operators/clip.py +++ b/release/scripts/startup/bl_operators/clip.py @@ -123,8 +123,8 @@ def CLIP_default_settings_from_track(clip, track, framenr): search[1] = search[1] * height settings.default_correlation_min = track.correlation_min -settings.default_pattern_size = max(pattern[0], pattern[1]) -settings.default_search_size = max(search[0], search[1]) +settings.default_pattern_size = int(max(pattern[0], pattern[1])) +settings.default_search_size = int(max(search[0], search[1])) settings.default_frames_limit = track.frames_limit settings.default_pattern_match = track.pattern_match settings.default_margin = track.margin ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1d0d810331b] blender-v3.1-release: Fix T93526: Missing tooltip for attribute search button
Commit: 1d0d810331b0ced05acdba9c75a08948f7b6eaf8 Author: Pratik Borhade Date: Thu Feb 17 23:44:16 2022 -0600 Branches: blender-v3.1-release https://developer.blender.org/rB1d0d810331b0ced05acdba9c75a08948f7b6eaf8 Fix T93526: Missing tooltip for attribute search button For the attribute search button, the tooltip was missing if the input socket type has attribute toggle activated. Differential Revision: https://developer.blender.org/D14142 === M source/blender/modifiers/intern/MOD_nodes.cc === diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index c5ee4b9fb52..1c755a7e2d9 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -1362,7 +1362,7 @@ static void add_attribute_search_button(const bContext , 0.0f, 0.0f, 0.0f, - ""); + socket.description); const Object *object = ED_object_context(); BLI_assert(object != nullptr); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [03c95635824] blender-v3.0-release: Fix T93431: Crash when empty is marked as asset
Commit: 03c956358249851bdd8860b87b88985bd29044cf Author: Pratik Borhade Date: Mon Nov 29 15:24:44 2021 +0100 Branches: blender-v3.0-release https://developer.blender.org/rB03c956358249851bdd8860b87b88985bd29044cf Fix T93431: Crash when empty is marked as asset Make `ED_preview_id_is_supported(ID *)` NULL-safe. It's semantically valid, as it's not possible to render a preview of a NULL ID. The crash was introduced in 481f032f5cbe2cd3c36c9ef516670fd9e06db25f Reviewed By: sybren, jbakker Maniphest Tasks: T93431 Differential Revision: https://developer.blender.org/D13398 === M source/blender/editors/render/render_preview.c === diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 25353dc30fe..e60e5e52187 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -1764,6 +1764,10 @@ static void icon_preview_free(void *customdata) */ bool ED_preview_id_is_supported(const ID *id) { + if (id == NULL) { +return false; + } + if (GS(id->name) == ID_OB) { return object_preview_is_type_supported((const Object *)id); } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [6e26c615af3] blender-v3.0-release: Fix T92663: Snap Selected to Active not working properly
Commit: 6e26c615af3a12facd6e77b79c54da14ce53325f Author: Pratik Borhade Date: Mon Nov 1 17:22:03 2021 +1100 Branches: blender-v3.0-release https://developer.blender.org/rB6e26c615af3a12facd6e77b79c54da14ce53325f Fix T92663: Snap Selected to Active not working properly Wrong values were passed for use_offset and pivot_point in 2bcf93bbbeb9e32f680c37a1e0054ff16cb00ef0 Maniphest Tasks: T92663 Ref D13056 === 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 67b61ed77d8..583a9ad75c2 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -659,7 +659,7 @@ static int snap_selected_to_active_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - if (!snap_selected_to_location(C, snap_target_global, -1, false, true)) { + if (!snap_selected_to_location(C, snap_target_global, false, -1, true)) { return OPERATOR_CANCELLED; } return OPERATOR_FINISHED; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [f9755add654] master: Fix T91785: Change max input limit for knife tool angle snapping
Commit: f9755add6544667e04b2b0d39c7c3bc794b6bdb8 Author: Pratik Borhade Date: Mon Oct 11 11:09:00 2021 +0100 Branches: master https://developer.blender.org/rBf9755add6544667e04b2b0d39c7c3bc794b6bdb8 Fix T91785: Change max input limit for knife tool angle snapping Patch changes the Knife Tool angle snapping input limit to 180. Differential Revision: https://developer.blender.org/D12728 === M source/blender/editors/mesh/editmesh_knife.c === diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 64c008acf8e..036a2d9582f 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -97,7 +97,7 @@ #define KNIFE_DEFAULT_ANGLE_SNAPPING_INCREMENT 30.0f #define KNIFE_MIN_ANGLE_SNAPPING_INCREMENT 0.0f -#define KNIFE_MAX_ANGLE_SNAPPING_INCREMENT 90.0f +#define KNIFE_MAX_ANGLE_SNAPPING_INCREMENT 180.0f typedef struct KnifeColors { uchar line[3]; @@ -1124,7 +1124,7 @@ static void knife_update_header(bContext *C, wmOperator *op, KnifeTool_OpData *k WM_MODALKEY(KNF_MODAL_ANGLE_SNAP_TOGGLE), (kcd->angle >= 0.0f) ? RAD2DEGF(kcd->angle) : 360.0f + RAD2DEGF(kcd->angle), (kcd->angle_snapping_increment > KNIFE_MIN_ANGLE_SNAPPING_INCREMENT && - kcd->angle_snapping_increment < KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) ? + kcd->angle_snapping_increment <= KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) ? kcd->angle_snapping_increment : KNIFE_DEFAULT_ANGLE_SNAPPING_INCREMENT, kcd->angle_snapping ? @@ -3532,9 +3532,9 @@ static bool knife_snap_angle_screen(KnifeTool_OpData *kcd) float dvec[2], dvec_snap[2]; float snap_step; - /* Currently user can input any float between 0 and 90. */ + /* Currently user can input any float between 0 and 180. */ if (kcd->angle_snapping_increment > KNIFE_MIN_ANGLE_SNAPPING_INCREMENT && - kcd->angle_snapping_increment < KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) { + kcd->angle_snapping_increment <= KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) { snap_step = DEG2RADF(kcd->angle_snapping_increment); } else { @@ -3688,7 +3688,7 @@ static bool knife_snap_angle_relative(KnifeTool_OpData *kcd) /* Calculate snap step. */ float snap_step; if (kcd->angle_snapping_increment > KNIFE_MIN_ANGLE_SNAPPING_INCREMENT && -kcd->angle_snapping_increment < KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) { +kcd->angle_snapping_increment <= KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) { snap_step = DEG2RADF(kcd->angle_snapping_increment); } else { @@ -4363,7 +4363,8 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) float snapping_increment_temp; if (kcd->angle_snapping) { -if (kcd->num.str_cur >= 2) { +if (kcd->num.str_cur >= 3 || +kcd->angle_snapping_increment > KNIFE_MAX_ANGLE_SNAPPING_INCREMENT / 10) { knife_reset_snap_angle_input(kcd); } knife_update_header(C, op, kcd); /* Update the angle multiple. */ @@ -4371,9 +4372,9 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_PRESS && hasNumInput(>num) && handleNumInput(C, >num, event)) { handled = true; applyNumInput(>num, _increment_temp); - /* Restrict number key input to 0 - 90 degree range. */ + /* Restrict number key input to 0 - 180 degree range. */ if (snapping_increment_temp > KNIFE_MIN_ANGLE_SNAPPING_INCREMENT && - snapping_increment_temp < KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) { + snapping_increment_temp <= KNIFE_MAX_ANGLE_SNAPPING_INCREMENT) { kcd->angle_snapping_increment = snapping_increment_temp; } knife_update_active(C, kcd); @@ -4617,16 +4618,17 @@ static int knifetool_modal(bContext *C, wmOperator *op, const wmEvent *event) } if (kcd->angle_snapping) { -if (kcd->num.str_cur >= 2) { +if (kcd->num.str_cur >= 3 || +kcd->angle_snapping_increment > KNIFE_MAX_ANGLE_SNAPPING_INCREMENT / 10) { knife_reset_snap_angle_input(kcd); } if (event->type != EVT_MODAL_MAP) { /* Modal number-input inactive, try to handle numeric inputs last. */ if (!handled && event->val == KM_PRESS && handleNumInput(C, >num, event)) { applyNumInput(>num, _increment_temp); -/* Restrict number key input to 0 - 90 degree range. */ +/* Restrict number key input to 0 - 180 degree range. */ if (snapping_increment_temp > KNIFE_MIN_ANGLE_SNAPPING_INCREMENT && -snapping_increment_temp &
[Bf-blender-cvs] [33dc584b371] master: Fix T91285: Bad tooltip for VSE Slip operator
Commit: 33dc584b371211428130596d99559a271c25bc66 Author: Pratik Borhade Date: Thu Sep 30 21:11:09 2021 +0200 Branches: master https://developer.blender.org/rB33dc584b371211428130596d99559a271c25bc66 Fix T91285: Bad tooltip for VSE Slip operator This patch is created to change the tooltip for Slip Strip Contents As per the present info, only active strip will be affected. But in reality selected strips can be trimmed with this operator. Word Trim changed to Slip in tooltip Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12450 === 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 6daa8d690e5..9be947b9112 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -870,9 +870,9 @@ static int sequencer_slip_modal(bContext *C, wmOperator *op, const wmEvent *even void SEQUENCER_OT_slip(struct wmOperatorType *ot) { /* Identifiers. */ - ot->name = "Trim Strips"; + ot->name = "Slip Strips"; ot->idname = "SEQUENCER_OT_slip"; - ot->description = "Trim the contents of the active strip"; + ot->description = "Slip the contents of selected strips"; /* Api callbacks. */ ot->invoke = sequencer_slip_invoke; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [aa330730047] soc-2021-uv-editor-improvements: Fix T87635: Rename shader node "Specular" to "Specular BSDF"
Commit: aa3307300471fa917910491ce4f8f243dd1c1edb Author: Pratik Borhade Date: Wed Aug 4 11:20:43 2021 +0200 Branches: soc-2021-uv-editor-improvements https://developer.blender.org/rBaa3307300471fa917910491ce4f8f243dd1c1edb Fix T87635: Rename shader node "Specular" to "Specular BSDF" Node name edited in Specular node definition Reviewed By: fclem Maniphest Tasks: T87635 Differential Revision: https://developer.blender.org/D11022 === M source/blender/nodes/NOD_static_types.h M source/blender/nodes/shader/nodes/node_shader_eevee_specular.c === diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index b368ac74894..6c3f91df434 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -61,7 +61,7 @@ DefNode(ShaderNode, SH_NODE_COMBRGB, 0, "COMBRG DefNode(ShaderNode, SH_NODE_HUE_SAT, 0, "HUE_SAT",HueSaturation,"Hue/Saturation","" ) DefNode(ShaderNode, SH_NODE_OUTPUT_MATERIAL,def_sh_output, "OUTPUT_MATERIAL",OutputMaterial, "Material Output", "" ) -DefNode(ShaderNode, SH_NODE_EEVEE_SPECULAR, 0, "EEVEE_SPECULAR", EeveeSpecular,"Specular", "" ) +DefNode(ShaderNode, SH_NODE_EEVEE_SPECULAR, 0, "EEVEE_SPECULAR", EeveeSpecular,"Specular BSDF", "" ) DefNode(ShaderNode, SH_NODE_OUTPUT_LIGHT, def_sh_output, "OUTPUT_LIGHT", OutputLight, "Light Output", "" ) DefNode(ShaderNode, SH_NODE_OUTPUT_WORLD, def_sh_output, "OUTPUT_WORLD", OutputWorld, "World Output", "" ) DefNode(ShaderNode, SH_NODE_OUTPUT_LINESTYLE, def_sh_output_linestyle,"OUTPUT_LINESTYLE", OutputLineStyle, "Line Style Output", "" ) diff --git a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c index 56169b9be5e..015af19abb2 100644 --- a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c +++ b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c @@ -91,7 +91,7 @@ void register_node_type_sh_eevee_specular(void) { static bNodeType ntype; - sh_node_type_base(, SH_NODE_EEVEE_SPECULAR, "Specular", NODE_CLASS_SHADER, 0); + sh_node_type_base(, SH_NODE_EEVEE_SPECULAR, "Specular BSDF", NODE_CLASS_SHADER, 0); node_type_socket_templates(, sh_node_eevee_specular_in, sh_node_eevee_specular_out); node_type_init(, NULL); node_type_storage(, "", NULL, NULL); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [8c21076addf] master: Fix T87635: Rename shader node "Specular" to "Specular BSDF"
Commit: 8c21076addf4de01c2f5640c5aaa563d99655783 Author: Pratik Borhade Date: Wed Aug 4 11:20:43 2021 +0200 Branches: master https://developer.blender.org/rB8c21076addf4de01c2f5640c5aaa563d99655783 Fix T87635: Rename shader node "Specular" to "Specular BSDF" Node name edited in Specular node definition Reviewed By: fclem Maniphest Tasks: T87635 Differential Revision: https://developer.blender.org/D11022 === M source/blender/nodes/NOD_static_types.h M source/blender/nodes/shader/nodes/node_shader_eevee_specular.c === diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index b368ac74894..6c3f91df434 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -61,7 +61,7 @@ DefNode(ShaderNode, SH_NODE_COMBRGB, 0, "COMBRG DefNode(ShaderNode, SH_NODE_HUE_SAT, 0, "HUE_SAT",HueSaturation,"Hue/Saturation","" ) DefNode(ShaderNode, SH_NODE_OUTPUT_MATERIAL,def_sh_output, "OUTPUT_MATERIAL",OutputMaterial, "Material Output", "" ) -DefNode(ShaderNode, SH_NODE_EEVEE_SPECULAR, 0, "EEVEE_SPECULAR", EeveeSpecular,"Specular", "" ) +DefNode(ShaderNode, SH_NODE_EEVEE_SPECULAR, 0, "EEVEE_SPECULAR", EeveeSpecular,"Specular BSDF", "" ) DefNode(ShaderNode, SH_NODE_OUTPUT_LIGHT, def_sh_output, "OUTPUT_LIGHT", OutputLight, "Light Output", "" ) DefNode(ShaderNode, SH_NODE_OUTPUT_WORLD, def_sh_output, "OUTPUT_WORLD", OutputWorld, "World Output", "" ) DefNode(ShaderNode, SH_NODE_OUTPUT_LINESTYLE, def_sh_output_linestyle,"OUTPUT_LINESTYLE", OutputLineStyle, "Line Style Output", "" ) diff --git a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c index 56169b9be5e..015af19abb2 100644 --- a/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c +++ b/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c @@ -91,7 +91,7 @@ void register_node_type_sh_eevee_specular(void) { static bNodeType ntype; - sh_node_type_base(, SH_NODE_EEVEE_SPECULAR, "Specular", NODE_CLASS_SHADER, 0); + sh_node_type_base(, SH_NODE_EEVEE_SPECULAR, "Specular BSDF", NODE_CLASS_SHADER, 0); node_type_socket_templates(, sh_node_eevee_specular_in, sh_node_eevee_specular_out); node_type_init(, NULL); node_type_storage(, "", NULL, NULL); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4e5537d0eda] master: Fix T89169: Rename Compositor Node "View Switch" to "Switch View" in search panel
Commit: 4e5537d0edacdba6b66155da99b63f912c91441b Author: Pratik Borhade Date: Thu Jul 8 14:57:55 2021 +0200 Branches: master https://developer.blender.org/rB4e5537d0edacdba6b66155da99b63f912c91441b Fix T89169: Rename Compositor Node "View Switch" to "Switch View" in search panel Renaming compositor node in search panel "View Switch" to "Switch View" for better consistency. Reviewed By: dfelinto Differential Revision: https://developer.blender.org/D11717 === M source/blender/nodes/NOD_static_types.h === diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index 0ae4def4b67..6266126a7b0 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -210,7 +210,7 @@ DefNode(CompositorNode, CMP_NODE_MASK_ELLIPSE, def_cmp_ellipsemask,"ELLIPS DefNode(CompositorNode, CMP_NODE_BOKEHIMAGE, def_cmp_bokehimage, "BOKEHIMAGE", BokehImage, "Bokeh Image", "" ) DefNode(CompositorNode, CMP_NODE_BOKEHBLUR, def_cmp_bokehblur, "BOKEHBLUR", BokehBlur,"Bokeh Blur","" ) DefNode(CompositorNode, CMP_NODE_SWITCH, def_cmp_switch, "SWITCH", Switch, "Switch","" ) -DefNode(CompositorNode, CMP_NODE_SWITCH_VIEW,def_cmp_switch_view, "VIEWSWITCH", SwitchView, "View Switch", "" ) +DefNode(CompositorNode, CMP_NODE_SWITCH_VIEW,def_cmp_switch_view, "VIEWSWITCH", SwitchView, "Switch View", "" ) DefNode(CompositorNode, CMP_NODE_COLORCORRECTION,def_cmp_colorcorrection,"COLORCORRECTION",ColorCorrection, "Color Correction", "" ) DefNode(CompositorNode, CMP_NODE_MASK, def_cmp_mask, "MASK", Mask, "Mask", "" ) DefNode(CompositorNode, CMP_NODE_KEYINGSCREEN, def_cmp_keyingscreen, "KEYINGSCREEN", KeyingScreen, "Keying Screen", "" ) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [46daaec425a] blender-v2.93-release: Fix T88808: Set Origin missing from Text object in 2.93
Commit: 46daaec425a13271b74db62c0da222ba4ac6eb23 Author: Pratik Borhade Date: Wed Jun 23 11:08:01 2021 +0200 Branches: blender-v2.93-release https://developer.blender.org/rB46daaec425a13271b74db62c0da222ba4ac6eb23 Fix T88808: Set Origin missing from Text object in 2.93 Fix T88808. Caused by {rB5f2c5e5bb8c15bf0d6679351e3482f9c38c00935} object type for `TEXT object` was missing in following check that's why `Set Origin` option was lost from object context menu. Reviewed By: lichtwerk Maniphest Tasks: T88808 Differential Revision: https://developer.blender.org/D11495 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index bdc924e3197..c658e965ab7 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2529,7 +2529,7 @@ class VIEW3D_MT_object_context_menu(Menu): layout.operator_menu_enum("gpencil.convert", "type", text="Convert To") if ( -obj.type in {'MESH', 'CURVE', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META'} or +obj.type in {'MESH', 'CURVE', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META', 'FONT'} or (obj.type == 'EMPTY' and obj.instance_collection is not None) ): layout.operator_context = 'INVOKE_REGION_WIN' ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [a6f275cad32] master: Fix T88808: Set Origin missing from Text object in 2.93
Commit: a6f275cad32e9566a9028318c21b70c2a9ece66d Author: Pratik Borhade Date: Wed Jun 23 11:08:01 2021 +0200 Branches: master https://developer.blender.org/rBa6f275cad32e9566a9028318c21b70c2a9ece66d Fix T88808: Set Origin missing from Text object in 2.93 Fix T88808. Caused by {rB5f2c5e5bb8c15bf0d6679351e3482f9c38c00935} object type for `TEXT object` was missing in following check that's why `Set Origin` option was lost from object context menu. Reviewed By: lichtwerk Maniphest Tasks: T88808 Differential Revision: https://developer.blender.org/D11495 === M release/scripts/startup/bl_ui/space_view3d.py === diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index bc66725b7fd..80cede9ee5a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2530,7 +2530,7 @@ class VIEW3D_MT_object_context_menu(Menu): layout.operator_menu_enum("gpencil.convert", "type", text="Convert To") if ( -obj.type in {'MESH', 'CURVE', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META'} or +obj.type in {'MESH', 'CURVE', 'SURFACE', 'GPENCIL', 'LATTICE', 'ARMATURE', 'META', 'FONT'} or (obj.type == 'EMPTY' and obj.instance_collection is not None) ): layout.operator_context = 'INVOKE_REGION_WIN' ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [0606a37e1a8] master: Fix T88500: Constrain window top position (Win32)
Commit: 0606a37e1a8c1e9c1abe94c19848382278ed966e Author: Pratik Borhade Date: Mon May 24 11:42:30 2021 -0700 Branches: master https://developer.blender.org/rB0606a37e1a8c1e9c1abe94c19848382278ed966e Fix T88500: Constrain window top position (Win32) Do not allow a window to be created that has a top position that can obscure all or part of title bar. Right and Left edges can still be specified slightly outside of monitor bounds, but top edge must be clamped to monitor top. see D11371 for more details. https://developer.blender.org/D11371 Reviewed by Ray Molenkamp === M intern/ghost/intern/GHOST_WindowWin32.cpp === diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index bf142239606..3af92153e8b 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -121,19 +121,21 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, monitor.dwFlags = 0; GetMonitorInfo(MonitorFromRect(_rect, MONITOR_DEFAULTTONEAREST), ); - /* Constrain size to fit within this monitor. */ + /* Constrain requested size and position to fit within this monitor. */ width = min(monitor.rcWork.right - monitor.rcWork.left, win_rect.right - win_rect.left); height = min(monitor.rcWork.bottom - monitor.rcWork.top, win_rect.bottom - win_rect.top); - win_rect.left = min(max(monitor.rcWork.left, win_rect.left), monitor.rcWork.right - width); win_rect.right = win_rect.left + width; win_rect.top = min(max(monitor.rcWork.top, win_rect.top), monitor.rcWork.bottom - height); win_rect.bottom = win_rect.top + height; - /* Adjust our requested values to allow for caption, borders, shadows, etc. - Windows API Note: You cannot specify WS_OVERLAPPED when calling. */ + /* Adjust to allow for caption, borders, shadows, scaling, etc. Resulting values can be + * correctly outside of monitor bounds. Note: You cannot specify WS_OVERLAPPED when calling. */ AdjustWindowRectEx(_rect, style & ~WS_OVERLAPPED, FALSE, extended_style); + /* But never allow a top position that can hide part of the title bar. */ + win_rect.top = max(monitor.rcWork.top, win_rect.top); + m_hWnd = ::CreateWindowExW(extended_style, // window extended style s_windowClassName, // pointer to registered class name title_16,// pointer to window name ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9e6c4be731a] blender-v2.93-release: Fix T88167: Regression: no tooltip for syringe/picker, during picking object
Commit: 9e6c4be731a594593cb7cba96f33ed2d17d71b7f Author: Pratik Borhade Date: Wed May 19 13:46:55 2021 +0200 Branches: blender-v2.93-release https://developer.blender.org/rB9e6c4be731a594593cb7cba96f33ed2d17d71b7f Fix T88167: Regression: no tooltip for syringe/picker, during picking object Fix T88167. Caused by {rB97defd9cd79b6e3ed0e52481a7078107dbe0522b} `(BLI_rcti_isect_pt` used here to confirm if cursor position is in between active region boundary. Subtracting min region boundary from the mouse position before the check, fails the condition. `mval[2]` introduced to hold the region relative mouse position. Reviewed By: Severin Maniphest Tasks: T88167 Differential Revision: https://developer.blender.org/D11224 === M source/blender/editors/interface/interface_eyedropper.c === diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index 178f663ff58..e4f502950ab 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -130,14 +130,19 @@ void eyedropper_draw_cursor_text_region(const struct bContext *C, const char *name) { wmWindow *win = CTX_wm_window(C); - const int x = win->eventstate->x - region->winrct.xmin; - const int y = win->eventstate->y - region->winrct.ymin; + const int x = win->eventstate->x; + const int y = win->eventstate->y; if ((name[0] == '\0') || (BLI_rcti_isect_pt(>winrct, x, y) == false)) { return; } - eyedropper_draw_cursor_text_ex(x, y, name); + const int mval[2] = { +x - region->winrct.xmin, +y - region->winrct.ymin, + }; + + eyedropper_draw_cursor_text_ex(mval[0], mval[1], name); } /** ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [16bcf7dc8e7] blender-v2.93-release: Fix T87417: crash when evaluating geo nodes without window manager
Commit: 16bcf7dc8e70890b8ad75c84f8699a4507477668 Author: Pratik Borhade Date: Fri May 14 13:43:30 2021 +0200 Branches: blender-v2.93-release https://developer.blender.org/rB16bcf7dc8e70890b8ad75c84f8699a4507477668 Fix T87417: crash when evaluating geo nodes without window manager Differential Revision: https://developer.blender.org/D11240 === M source/blender/modifiers/intern/MOD_nodes.cc === diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index 607b05d39b0..d808052e5f5 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -1074,8 +1074,11 @@ static void reset_tree_ui_storage(Span tree static Vector find_spreadsheet_editors(Main *bmain) { - Vector spreadsheets; wmWindowManager *wm = (wmWindowManager *)bmain->wm.first; + if (wm == nullptr) { +return {}; + } + Vector spreadsheets; LISTBASE_FOREACH (wmWindow *, window, >windows) { bScreen *screen = BKE_workspace_active_screen_get(window->workspace_hook); LISTBASE_FOREACH (ScrArea *, area, >areabase) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [291094b06fb] temp-lineart-contained: Fix T54339: Shapekey Max value doesn't clamp existing value
Commit: 291094b06fba4b3e240bd10caf12b65a4577d547 Author: Pratik Borhade Date: Mon May 10 15:47:32 2021 +0200 Branches: temp-lineart-contained https://developer.blender.org/rB291094b06fba4b3e240bd10caf12b65a4577d547 Fix T54339: Shapekey Max value doesn't clamp existing value Update the "current value" of the Shape Key blend amount when value is not within the min/max range. New function `rna_ShapeKey_update_minmax` used to update and clamp the current value. Reviewed By: mano-wii, lichtwerk, #animation_rigging, sybren Maniphest Tasks: T54339 Differential Revision: https://developer.blender.org/D11071 === M source/blender/makesrna/intern/rna_key.c === diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 3b9fc970072..a48727526c9 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -699,6 +699,16 @@ static void rna_Key_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *p } } +static void rna_ShapeKey_update_minmax(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + KeyBlock *data = (KeyBlock *)ptr->data; + if (IN_RANGE_INCL(data->curval, data->slidermin, data->slidermax)) { +return; + } + CLAMP(data->curval, data->slidermin, data->slidermax); + rna_Key_update_data(bmain, scene, ptr); +} + static KeyBlock *rna_ShapeKeyData_find_keyblock(Key *key, float *point) { KeyBlock *kb; @@ -955,6 +965,7 @@ static void rna_def_keyblock(BlenderRNA *brna) RNA_def_property_float_funcs( prop, NULL, "rna_ShapeKey_slider_min_set", "rna_ShapeKey_slider_min_range"); RNA_def_property_ui_text(prop, "Slider Min", "Minimum for slider"); + RNA_def_property_update(prop, 0, "rna_ShapeKey_update_minmax"); prop = RNA_def_property(srna, "slider_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "slidermax"); @@ -963,6 +974,7 @@ static void rna_def_keyblock(BlenderRNA *brna) RNA_def_property_float_funcs( prop, NULL, "rna_ShapeKey_slider_max_set", "rna_ShapeKey_slider_max_range"); RNA_def_property_ui_text(prop, "Slider Max", "Maximum for slider"); + RNA_def_property_update(prop, 0, "rna_ShapeKey_update_minmax"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "data", "totelem"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [1b0890ccda7] blender-v2.93-release: Fix T54339: Shapekey Max value doesn't clamp existing value
Commit: 1b0890ccda7d4808a2d2ec9e650c3bffcf5387a7 Author: Pratik Borhade Date: Mon May 10 15:47:32 2021 +0200 Branches: blender-v2.93-release https://developer.blender.org/rB1b0890ccda7d4808a2d2ec9e650c3bffcf5387a7 Fix T54339: Shapekey Max value doesn't clamp existing value Update the "current value" of the Shape Key blend amount when value is not within the min/max range. New function `rna_ShapeKey_update_minmax` used to update and clamp the current value. Reviewed By: mano-wii, lichtwerk, #animation_rigging, sybren Maniphest Tasks: T54339 Differential Revision: https://developer.blender.org/D11071 === M release/scripts/addons M source/blender/makesrna/intern/rna_key.c === diff --git a/release/scripts/addons b/release/scripts/addons index 4cb833e84ac..af635613961 16 --- a/release/scripts/addons +++ b/release/scripts/addons @@ -1 +1 @@ -Subproject commit 4cb833e84acfd2be5fa08ce75118ce9cb60643b8 +Subproject commit af6356139616749c952ff5dfc6bf6dfa668e3325 diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 3b9fc970072..a48727526c9 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -699,6 +699,16 @@ static void rna_Key_update_data(Main *bmain, Scene *UNUSED(scene), PointerRNA *p } } +static void rna_ShapeKey_update_minmax(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + KeyBlock *data = (KeyBlock *)ptr->data; + if (IN_RANGE_INCL(data->curval, data->slidermin, data->slidermax)) { +return; + } + CLAMP(data->curval, data->slidermin, data->slidermax); + rna_Key_update_data(bmain, scene, ptr); +} + static KeyBlock *rna_ShapeKeyData_find_keyblock(Key *key, float *point) { KeyBlock *kb; @@ -955,6 +965,7 @@ static void rna_def_keyblock(BlenderRNA *brna) RNA_def_property_float_funcs( prop, NULL, "rna_ShapeKey_slider_min_set", "rna_ShapeKey_slider_min_range"); RNA_def_property_ui_text(prop, "Slider Min", "Minimum for slider"); + RNA_def_property_update(prop, 0, "rna_ShapeKey_update_minmax"); prop = RNA_def_property(srna, "slider_max", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "slidermax"); @@ -963,6 +974,7 @@ static void rna_def_keyblock(BlenderRNA *brna) RNA_def_property_float_funcs( prop, NULL, "rna_ShapeKey_slider_max_set", "rna_ShapeKey_slider_max_range"); RNA_def_property_ui_text(prop, "Slider Max", "Maximum for slider"); + RNA_def_property_update(prop, 0, "rna_ShapeKey_update_minmax"); prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "data", "totelem"); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [9291128bff9] master: Clean-up: Edit and comments
Commit: 9291128bff9aafcf7ddc5765e9c89c9655e21c4b Author: Pratik Borhade Date: Thu Apr 29 11:50:28 2021 -0300 Branches: master https://developer.blender.org/rB9291128bff9aafcf7ddc5765e9c89c9655e21c4b Clean-up: Edit and comments - Corrected spellings - Comments added and edited Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D10991 === M source/blender/bmesh/intern/bmesh_polygon_edgenet.c === diff --git a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c index dcf9717465c..0754564fa47 100644 --- a/source/blender/bmesh/intern/bmesh_polygon_edgenet.c +++ b/source/blender/bmesh/intern/bmesh_polygon_edgenet.c @@ -106,7 +106,7 @@ static void normalize_v2_m3_v3v3(float out[2], /** * \note Be sure to update #bm_face_split_edgenet_find_loop_pair_exists - * when making changed to edge picking logic. + * when making changes to edge picking logic. */ static bool bm_face_split_edgenet_find_loop_pair(BMVert *v_init, const float face_normal[3], @@ -456,8 +456,8 @@ static bool bm_face_split_edgenet_find_loop(BMVert *v_init, * Splits a face into many smaller faces defined by an edge-net. * handle customdata and degenerate cases. * - * - isolated holes or unsupported face configurations, will be ignored. - * - customdata calculations aren't efficient + * - Isolated holes or unsupported face configurations, will be ignored. + * - Customdata calculations aren't efficient * (need to calculate weights for each vert). */ bool BM_face_split_edgenet(BMesh *bm, @@ -593,7 +593,7 @@ bool BM_face_split_edgenet(BMesh *bm, BMIter iter; BMLoop *l_other; -/* see: #BM_loop_interp_from_face for similar logic */ +/* See: #BM_loop_interp_from_face for similar logic. */ void **blocks = BLI_array_alloca(blocks, f->len); float(*cos_2d)[2] = BLI_array_alloca(cos_2d, f->len); float *w = BLI_array_alloca(w, f->len); @@ -1064,7 +1064,7 @@ static int bm_face_split_edgenet_find_connection(const struct EdgeGroup_FindConn #ifdef USE_PARTIAL_CONNECT /** - * Used to identify edges that get split off when making island from partial connection. + * Used to identify edges that get split off when making island from partial connection. * fptr should be a BMFace*, but is a void* for general interface to BM_vert_separate_tested_edges */ static bool test_tagged_and_notface(BMEdge *e, void *fptr) @@ -1211,7 +1211,7 @@ static bool bm_vert_partial_connect_check_overlap(const int *remap, const int v_a_index, const int v_b_index) { - /* connected to eachother */ + /* Connected to each other. */ if (UNLIKELY((remap[v_a_index] == v_b_index) || (remap[v_b_index] == v_a_index))) { return true; } @@ -1226,7 +1226,7 @@ static bool bm_vert_partial_connect_check_overlap(const int *remap, * \param use_partial_connect: Support for handling islands connected by only a single edge, * \note that this is quite slow so avoid using where possible. * \param mem_arena: Avoids many small allocs & should be cleared after each use. - * take care since \a r_edge_net_new is stored in \a r_edge_net_new. + * take care since \a edge_net_new is stored in \a r_edge_net_new. */ bool BM_face_split_edgenet_connect_islands(BMesh *bm, BMFace *f, @@ -1246,7 +1246,7 @@ bool BM_face_split_edgenet_connect_islands(BMesh *bm, * * Keep the first part fast since it will run very often for edge-nets that have no holes. * - * \note Don't use the mem_arena unless he have holes to fill. + * \note Don't use the mem_arena unless we have holes to fill. * (avoid thrashing the area when the initial check isn't so intensive on the stack). */ @@ -1572,7 +1572,7 @@ bool BM_face_split_edgenet_connect_islands(BMesh *bm, if (g->has_prev_edge == false) { BMVert *v_origin = g->vert_span.min; - +/* Index of BMVert for the edge group connection with `v_origin`. */ const int index_other = bm_face_split_edgenet_find_connection(, v_origin, false); // BLI_assert(index_other >= 0 && index_other < (int)vert_arr_len); @@ -1598,7 +1598,7 @@ bool BM_face_split_edgenet_connect_islands(BMesh *bm, { BMVert *v_origin = g->vert_span.max; - +/* Index of BMVert for the edge group connection with `v_origin`. */ const int index_other = bm_face_split_edgenet_find_connection(, v_origin, true); // BLI_assert(index_other >= 0 && index_other < (int)vert_arr_len); @@ -1660,7 +1660,7 @@ finally: struct TempVertPair *tvp = temp_vert_pairs.list;
[Bf-blender-cvs] [53414820649] master: Fix T87777: Fix typo in Prefs Scripts Dir tooltip
Commit: 534148206492cd3463cf75a8a8983acb6166b2a6 Author: Pratik Borhade Date: Sun Apr 25 18:39:32 2021 -0700 Branches: master https://developer.blender.org/rB534148206492cd3463cf75a8a8983acb6166b2a6 Fix T8: Fix typo in Prefs Scripts Dir tooltip Correction to Prefs tooltip mention of 'add-ons' folder in Scripts Dir. Differential Revision: https://developer.blender.org/D11064 Reviewed by Harley Acheson === M source/blender/makesrna/intern/rna_userdef.c === diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 26887b51f81..bacd3943141 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6160,7 +6160,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) prop, "Python Scripts Directory", "Alternate script path, matching the default layout with subdirectories: " - "startup, add-ons and modules (requires restart)"); + "startup, addons, modules, and presets (requires restart)"); /* TODO, editing should reset sys.path! */ prop = RNA_def_property(srna, "i18n_branches_directory", PROP_STRING, PROP_DIRPATH); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [99dabc156ac] master: Cleanup: spelling and comments
Commit: 99dabc156ac4e843411f9cad71841bc4fb783295 Author: Pratik Borhade Date: Sat Mar 27 16:19:24 2021 +1100 Branches: master https://developer.blender.org/rB99dabc156ac4e843411f9cad71841bc4fb783295 Cleanup: spelling and comments - comment added in struct `KnifeTool_OpData` - struct pointer name `lst` updated to `list` ( Guess its more readable ) - `KNF_MODEL_IGNORE_SNAP_ON` updated to `KNF_MODAL_IGNORE_SNAP_ON` - `KNF_MODEL_IGNORE_SNAP_OFF` updated to `KNF_MODAL_IGNORE_SNAP_OFF` Ref D10824 === M source/blender/editors/mesh/editmesh_knife.c === diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index df0ca6e3cae..c5bfeb57eb1 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -196,7 +196,10 @@ typedef struct KnifeTool_OpData { KnifePosData prev; /* last added cut (a line draws from the cursor to this) */ KnifePosData init; /* the first point in the cut-list, used for closing the loop */ - int totkedge, totkvert; + /** Number of knife edges `kedges`. */ + int totkedge; + /** Number of knife vertices, `kverts`. */ + int totkvert; BLI_mempool *refs; @@ -243,8 +246,8 @@ enum { KNF_MODAL_MIDPOINT_ON, KNF_MODAL_MIDPOINT_OFF, KNF_MODAL_NEW_CUT, - KNF_MODEL_IGNORE_SNAP_ON, - KNF_MODEL_IGNORE_SNAP_OFF, + KNF_MODAL_IGNORE_SNAP_ON, + KNF_MODAL_IGNORE_SNAP_OFF, KNF_MODAL_ADD_CUT, KNF_MODAL_ANGLE_SNAP_TOGGLE, KNF_MODAL_CUT_THROUGH_TOGGLE, @@ -292,7 +295,7 @@ static void knife_update_header(bContext *C, wmOperator *op, KnifeTool_OpData *k WM_MODALKEY(KNF_MODAL_NEW_CUT), WM_MODALKEY(KNF_MODAL_MIDPOINT_ON), WM_bool_as_string(kcd->snap_midpoints), - WM_MODALKEY(KNF_MODEL_IGNORE_SNAP_ON), + WM_MODALKEY(KNF_MODAL_IGNORE_SNAP_ON), WM_bool_as_string(kcd->ignore_edge_snapping), WM_MODALKEY(KNF_MODAL_ANGLE_SNAP_TOGGLE), WM_bool_as_string(kcd->angle_snapping), @@ -345,11 +348,11 @@ static void knife_pos_data_clear(KnifePosData *kpd) static ListBase *knife_empty_list(KnifeTool_OpData *kcd) { - ListBase *lst; + ListBase *list; - lst = BLI_memarena_alloc(kcd->arena, sizeof(ListBase)); - BLI_listbase_clear(lst); - return lst; + list = BLI_memarena_alloc(kcd->arena, sizeof(ListBase)); + BLI_listbase_clear(list); + return list; } static void knife_append_list(KnifeTool_OpData *kcd, ListBase *lst, void *elem) @@ -554,22 +557,22 @@ static void knife_start_cut(KnifeTool_OpData *kcd) static ListBase *knife_get_face_kedges(KnifeTool_OpData *kcd, BMFace *f) { - ListBase *lst = BLI_ghash_lookup(kcd->kedgefacemap, f); + ListBase *list = BLI_ghash_lookup(kcd->kedgefacemap, f); - if (!lst) { + if (!list) { BMIter bmiter; BMEdge *e; -lst = knife_empty_list(kcd); +list = knife_empty_list(kcd); BM_ITER_ELEM (e, , f, BM_EDGES_OF_FACE) { - knife_append_list(kcd, lst, get_bm_knife_edge(kcd, e)); + knife_append_list(kcd, list, get_bm_knife_edge(kcd, e)); } -BLI_ghash_insert(kcd->kedgefacemap, f, lst); +BLI_ghash_insert(kcd->kedgefacemap, f, list); } - return lst; + return list; } static void knife_edge_append_face(KnifeTool_OpData *kcd, KnifeEdge *kfe, BMFace *f) @@ -750,13 +753,13 @@ static void add_hit_to_facehits(KnifeTool_OpData *kcd, BMFace *f, KnifeLineHit *hit) { - ListBase *lst = BLI_ghash_lookup(facehits, f); + ListBase *list = BLI_ghash_lookup(facehits, f); - if (!lst) { -lst = knife_empty_list(kcd); -BLI_ghash_insert(facehits, f, lst); + if (!list) { +list = knife_empty_list(kcd); +BLI_ghash_insert(facehits, f, list); } - knife_append_list_no_dup(kcd, lst, hit); + knife_append_list_no_dup(kcd, list, hit); } /** @@ -891,7 +894,7 @@ static void knife_add_cut(KnifeTool_OpData *kcd) BMFace *f; Ref *r; GHashIterator giter; - ListBase *lst; + ListBase *list; prepare_linehits_for_cut(kcd); if (kcd->totlinehit == 0) { @@ -926,8 +929,8 @@ static void knife_add_cut(KnifeTool_OpData *kcd) * the v and the kfe or f fields will be non-NULL. */ GHASH_ITER (giter, facehits) { f = (BMFace *)BLI_ghashIterator_getKey(); -lst = (ListBase *)BLI_ghashIterator_getValue(); -knife_cut_face(kcd, f, lst); +list = (ListBase *)BLI_ghashIterator_getValue(); +knife_cut_face(kcd, f, list); } /* set up for next cut */ @@ -1246,7 +1249,7 @@ static bool knife_ray_intersect_face(KnifeTool_OpData *kcd, float se1[2], se2[2]; float d, lambda; BMLoop **tri; - ListBase *lst; + ListBase *list; Ref *ref; KnifeEdge *kfe; @@ -1281,8 +1284,8 @@ static bool knife_ray_interse
[Bf-blender-cvs] [a4a6c2a1a41] ui-asset-view-template: Fix T86701: Geometry nodes Cube and UV Sphere mesh size
Commit: a4a6c2a1a41933b411418f5e370e5598ca994d27 Author: Pratik Borhade Date: Thu Mar 18 17:00:47 2021 -0400 Branches: ui-asset-view-template https://developer.blender.org/rBa4a6c2a1a41933b411418f5e370e5598ca994d27 Fix T86701: Geometry nodes Cube and UV Sphere mesh size The size in the transform matrices was extra, since it is also passed as an argument to the BMesh operators. Differential Revision: https://developer.blender.org/D10763 === M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc === diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc index 5c32ff6b687..1ef84c7d070 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc @@ -40,7 +40,7 @@ namespace blender::nodes { static Mesh *create_cube_mesh(const float3 location, const float3 rotation, const float size) { float4x4 transform; - loc_eul_size_to_mat4(transform.values, location, rotation, float3(size)); + loc_eul_size_to_mat4(transform.values, location, rotation, float3(1)); const BMeshCreateParams bmcp = {true}; const BMAllocTemplate allocsize = {8, 12, 24, 6}; diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc index e164ad247a3..7b07722fd5a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc @@ -74,7 +74,7 @@ static Mesh *create_uv_sphere_mesh_bmesh(const float3 location, const int rings) { float4x4 transform; - loc_eul_size_to_mat4(transform.values, location, rotation, float3(radius)); + loc_eul_size_to_mat4(transform.values, location, rotation, float3(1.0f)); const BMeshCreateParams bmcp = {true}; const BMAllocTemplate allocsize = {sphere_vert_total(segments, rings), ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [7e3efac9a85] master: Fix T86701: Geometry nodes Cube and UV Sphere mesh size
Commit: 7e3efac9a85743dbe6a3646170a4f4475bf91e6c Author: Pratik Borhade Date: Thu Mar 18 17:00:47 2021 -0400 Branches: master https://developer.blender.org/rB7e3efac9a85743dbe6a3646170a4f4475bf91e6c Fix T86701: Geometry nodes Cube and UV Sphere mesh size The size in the transform matrices was extra, since it is also passed as an argument to the BMesh operators. Differential Revision: https://developer.blender.org/D10763 === M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc M source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc === diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc index 5c32ff6b687..1ef84c7d070 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cube.cc @@ -40,7 +40,7 @@ namespace blender::nodes { static Mesh *create_cube_mesh(const float3 location, const float3 rotation, const float size) { float4x4 transform; - loc_eul_size_to_mat4(transform.values, location, rotation, float3(size)); + loc_eul_size_to_mat4(transform.values, location, rotation, float3(1)); const BMeshCreateParams bmcp = {true}; const BMAllocTemplate allocsize = {8, 12, 24, 6}; diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc index e164ad247a3..7b07722fd5a 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_uv_sphere.cc @@ -74,7 +74,7 @@ static Mesh *create_uv_sphere_mesh_bmesh(const float3 location, const int rings) { float4x4 transform; - loc_eul_size_to_mat4(transform.values, location, rotation, float3(radius)); + loc_eul_size_to_mat4(transform.values, location, rotation, float3(1.0f)); const BMeshCreateParams bmcp = {true}; const BMAllocTemplate allocsize = {sphere_vert_total(segments, rings), ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [4d3cdb32d39] master: Fix T86168: Add primitive Grid. Wrong number of subdivisions
Commit: 4d3cdb32d399335dba72c180309c0d34f93cd533 Author: Pratik Borhade Date: Tue Mar 16 23:08:35 2021 +1100 Branches: master https://developer.blender.org/rB4d3cdb32d399335dba72c180309c0d34f93cd533 Fix T86168: Add primitive Grid. Wrong number of subdivisions Changes to increase subdivision by one along both axis (X and Y) For example with x_segment = 3 and y_segment = 3. There should be 16 vertices ((3 + 1) * (3 + 1)) for correct number of subdivisions. Currently they are 3 * 3 = 9 vertices. Ref D10699 === M source/blender/bmesh/operators/bmo_primitive.c M source/blender/editors/mesh/editmesh_add.c === diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index 535df52c1e1..a0a31ab6154 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -728,10 +728,10 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op) BMOpSlot *slot_verts_out = BMO_slot_get(op->slots_out, "verts.out"); const float dia = BMO_slot_float_get(op->slots_in, "size"); - const uint xtot = max_ii(2, BMO_slot_int_get(op->slots_in, "x_segments")); - const uint ytot = max_ii(2, BMO_slot_int_get(op->slots_in, "y_segments")); - const float xtot_inv2 = 2.0f / (xtot - 1); - const float ytot_inv2 = 2.0f / (ytot - 1); + const uint xtot = max_ii(1, BMO_slot_int_get(op->slots_in, "x_segments")); + const uint ytot = max_ii(1, BMO_slot_int_get(op->slots_in, "y_segments")); + const float xtot_inv2 = 2.0f / (xtot); + const float ytot_inv2 = 2.0f / (ytot); const int cd_loop_uv_offset = CustomData_get_offset(>ldata, CD_MLOOPUV); const bool calc_uvs = (cd_loop_uv_offset != -1) && BMO_slot_bool_get(op->slots_in, "calc_uvs"); @@ -746,14 +746,14 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op) BMO_slot_mat4_get(op->slots_in, "matrix", mat); - BMO_slot_buffer_alloc(op, op->slots_out, "verts.out", xtot * ytot); + BMO_slot_buffer_alloc(op, op->slots_out, "verts.out", (xtot + 1) * (ytot + 1)); varr = (BMVert **)slot_verts_out->data.buf; i = 0; vec[2] = 0.0f; - for (y = 0; y < ytot; y++) { + for (y = 0; y <= ytot; y++) { vec[1] = ((y * ytot_inv2) - 1.0f) * dia; -for (x = 0; x < xtot; x++) { +for (x = 0; x <= xtot; x++) { vec[0] = ((x * xtot_inv2) - 1.0f) * dia; mul_v3_m4v3(tvec, mat, vec); varr[i] = BM_vert_create(bm, tvec, NULL, BM_CREATE_NOP); @@ -762,10 +762,10 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op) } } -#define XY(_x, _y) ((_x) + ((_y) * (xtot))) +#define XY(_x, _y) ((_x) + ((_y) * (xtot + 1))) - for (y = 1; y < ytot; y++) { -for (x = 1; x < xtot; x++) { + for (y = 1; y <= ytot; y++) { +for (x = 1; x <= xtot; x++) { BMFace *f; vquad[0] = varr[XY(x - 1, y - 1)]; @@ -805,8 +805,8 @@ void BM_mesh_calc_uvs_grid(BMesh *bm, BMLoop *l; BMIter iter, liter; - const float dx = 1.0f / (float)(x_segments - 1); - const float dy = 1.0f / (float)(y_segments - 1); + const float dx = 1.0f / (float)(x_segments); + const float dy = 1.0f / (float)(y_segments); const float dx_wrap = 1.0 - (dx / 2.0f); float x = 0.0f; float y = dy; diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 582ff01173a..18e231893d4 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -137,8 +137,8 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) "verts.out", false, "create_grid x_segments=%i y_segments=%i size=%f matrix=%m4 calc_uvs=%b", - 1, - 1, + 0, + 0, RNA_float_get(op->ptr, "size") / 2.0f, creation_data.mat, calc_uvs)) { @@ -531,9 +531,9 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot) /* Note that if you use MESH_ADD_VERTS_MAXI for both x and y at the same time * you will still reach impossible values (10^12 vertices or so...). */ RNA_def_int( - ot->srna, "x_subdivisions", 10, 2, MESH_ADD_VERTS_MAXI, "X Subdivisions", "", 2, 1000); + ot->srna, "x_subdivisions", 10, 1, MESH_ADD_VERTS_MAXI, "X Subdivisions", "", 1, 1000); RNA_def_int( - ot->srna, "y_subdivisions", 10, 2, MESH_ADD_VERTS_MAXI, "Y Subdivisions", "", 2, 1000); + ot->srna, "y_subdivisions", 10, 1, MESH_ADD_VERTS_MAXI, "Y Subdivisions", "", 1, 1000); ED_object_add_unit_props_size(ot); ED_object_add_mesh_props(ot); ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] [493628e5418] master: Fix T67190: Edge Loop Select doesn't support non-manifold edges
Commit: 493628e5418b1543d82e314b34832ad6cc365055 Author: Pratik Borhade Date: Wed Mar 10 22:02:07 2021 +1100 Branches: master https://developer.blender.org/rB493628e5418b1543d82e314b34832ad6cc365055 Fix T67190: Edge Loop Select doesn't support non-manifold edges - New Walker added `bmw_NonManifoldedgeWalker_type`. - This walks over edges connected with 3 or more faces connected. Ref D10497 with edits. === M source/blender/bmesh/intern/bmesh_walkers.h M source/blender/bmesh/intern/bmesh_walkers_impl.c M source/blender/bmesh/intern/bmesh_walkers_private.h M source/blender/editors/mesh/editmesh_select.c === diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h index 22ee8809a19..ce0f8ae8324 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.h +++ b/source/blender/bmesh/intern/bmesh_walkers.h @@ -114,6 +114,7 @@ enum { BMW_FACELOOP, BMW_EDGERING, BMW_EDGEBOUNDARY, + BMW_EDGELOOP_NONMANIFOLD, /* BMW_RING, */ BMW_LOOPDATA_ISLAND, BMW_ISLANDBOUND, diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index 647a22baaeb..a8558ec4011 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -1596,6 +1596,118 @@ static void *bmw_UVEdgeWalker_step(BMWalker *walker) /** \} */ +/* */ +/** \name Non-manifold Edge Walker + * \{ */ + +static void bmw_NonManifoldedgeWalker_begin(BMWalker *walker, void *data) +{ + BMwNonManifoldEdgeLoopWalker *lwalk; + BMEdge *e = data; + + if (BLI_gset_haskey(walker->visit_set, e)) { +return; + } + + lwalk = BMW_state_add(walker); + lwalk->start = e; + lwalk->cur = e; + lwalk->startv = e->v1; + lwalk->lastv = e->v1; + lwalk->face_count = BM_edge_face_count(e); + BLI_gset_insert(walker->visit_set, e); +} + +static void *bmw_NonManifoldedgeWalker_yield(BMWalker *walker) +{ + BMwNonManifoldEdgeLoopWalker *lwalk = BMW_current_state(walker); + + if (!lwalk) { +return NULL; + } + return lwalk->cur; +} + +/** + * Walk over manifold loops around `v` until loop-edge is found with `face_count` users. + * or return NULL if not found. + * */ +static BMLoop *bmw_NonManifoldLoop_find_next_around_vertex(BMLoop *l, BMVert *v, int face_count) +{ + BLI_assert(!BM_loop_is_manifold(l)); + do { +l = BM_loop_other_edge_loop(l, v); +if (BM_loop_is_manifold(l)) { + l = l->radial_next; +} +else if (BM_edge_face_count_is_equal(l->e, face_count)) { + return l; +} +else { + break; +} + } while (true); + return NULL; +} + +static void *bmw_NonManifoldedgeWalker_step(BMWalker *walker) +{ + BMwNonManifoldEdgeLoopWalker *lwalk, owalk; + BMW_state_remove_r(walker, ); + lwalk = + BMLoop *l_cur = NULL; + const int face_count = lwalk->face_count; + + BMVert *v = NULL; + + /* Use the second pass is unlikely, only needed to walk back in the opposite direction. */ + for (int pass = 0; pass < 2; pass++) { + +BMEdge *e = lwalk->cur; +v = BM_edge_other_vert(e, lwalk->lastv); + +/* If `lwalk.lastv` can't be walked along, start walking in the opposite direction + * on the initial edge, do this at most one time during this walk operation. */ +if (UNLIKELY(pass == 1)) { + e = lwalk->start; + v = lwalk->startv; +} + +BMLoop *l = e->l; +do { + BMLoop *l_next = bmw_NonManifoldLoop_find_next_around_vertex(l, v, face_count); + if ((l_next != NULL) && !BLI_gset_haskey(walker->visit_set, l_next->e)) { +if (l_cur == NULL) { + l_cur = l_next; +} +else if (l_cur->e != l_next->e) { + /* If there are more than one possible edge to step onto (unlikely but possible), + * treat as a junction and stop walking as there is no correct answer in this case. */ + l_cur = NULL; + break; +} + } +} while ((l = l->radial_next) != e->l); + +if (l_cur != NULL) { + break; +} + } + + if (l_cur != NULL) { +BLI_assert(!BLI_gset_haskey(walker->visit_set, l_cur->e)); +BLI_assert(BM_edge_face_count(l_cur->e) == face_count); +lwalk = BMW_state_add(walker); +lwalk->lastv = v; +lwalk->cur = l_cur->e; +lwalk->face_count = face_count; +BLI_gset_insert(walker->visit_set, l_cur->e); + } + return owalk.cur; +} + +/** \} */ + static BMWalker bmw_VertShellWalker_Type = { BM_VERT | BM_EDGE, bmw_VertShellWalker_begin, @@ -1708,6 +1820,16 @@ static BMWalker bmw_EdgeboundaryWalker_Type = { 0, }; +static BMWalker bmw_NonManifoldedgeWalker_type = { +BM_EDGE, +
[Bf-blender-cvs] [c13754e6475] blender-v2.92-release: Fixes T84928 : Lattice vertices at unexpected positions when changing lattice resolution from 1 to 3 or more.
Commit: c13754e6475e438ebd2fbafa2e51aa58504dc5f9 Author: Pratik Borhade Date: Tue Feb 16 13:21:28 2021 +0100 Branches: blender-v2.92-release https://developer.blender.org/rBc13754e6475e438ebd2fbafa2e51aa58504dc5f9 Fixes T84928 : Lattice vertices at unexpected positions when changing lattice resolution from 1 to 3 or more. Fix for T84928 . Considering the changes , issue is resolved ( Ignoring readability issues) . **Changes **: - `Change in value assignment of fu/v/w :` Observing previous code , I noticed ,value assigned to them is equivalent to -0.5 ( i.e. co-ordinate of left most vertex of lattice size =1 where centre of lattice is origin ) . - `Change in value assignment of du/v/w :`Margin ( distance ) between each division of surface along any axis is equivalent to **( (length of surface along axis ) / (no of division line - 1) )** . that's why is changed it to (default_size/unew -1) . - ` New variable declared "default_size" :` As far as I gone through the code , I noticed values 1 < du ,fu < 1 , which indicates these values were calculated with respect to default lattice of size 1 . - `removed pntsu/v/w != 1 check :` Following changes inside the if block worked properly for pntsu/v/w = 1 . Reviewed By: lichtwerk, campbellbarton Differential Revision: https://developer.blender.org/D10353 === M source/blender/blenkernel/intern/lattice.c === diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 74f78106be5..84ffd8c636b 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -319,19 +319,21 @@ void BKE_lattice_resize(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb) * size first. */ if (ltOb) { -if (uNew != 1 && lt->pntsu != 1) { - fu = lt->fu; - du = (lt->pntsu - 1) * lt->du / (uNew - 1); +const float default_size = 1.0; + +if (uNew != 1) { + fu = -default_size / 2.0; + du = default_size / (uNew - 1); } -if (vNew != 1 && lt->pntsv != 1) { - fv = lt->fv; - dv = (lt->pntsv - 1) * lt->dv / (vNew - 1); +if (vNew != 1) { + fv = -default_size / 2.0; + dv = default_size / (vNew - 1); } -if (wNew != 1 && lt->pntsw != 1) { - fw = lt->fw; - dw = (lt->pntsw - 1) * lt->dw / (wNew - 1); +if (wNew != 1) { + fw = -default_size / 2.0; + dw = default_size / (wNew - 1); } } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs