diff options
author | Philipp Oeser <lichtwerk> | 2020-09-03 15:59:34 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-09-03 16:01:50 +0300 |
commit | f00cb93dbec7bf5dc05302c868f20fcd5aed7db7 (patch) | |
tree | 2631292eb3265ad366165ea0fe567d31a1f1f1b5 /source/blender/editors/include | |
parent | a505a85873602a9e265bafb107d2ea356fc23a17 (diff) |
Fix T63125: Gpencil: bones cannot be selected in weightpaint mode
Some underlying functionality was not ready for greasepencil:
- BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist)
- BKE_modifiers_is_deformed_by_armature
- checks in drawing code
- checks in (pose) selection code
A couple of changes to make this work:
- `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`)
- `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) -- (now use new `OB_MODE_ALL_WEIGHT_PAINT`)
- `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint`
This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode)
Reviewed By: campbellbarton
Maniphest Tasks: T63125
Differential Revision: https://developer.blender.org/D8483
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_object.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index dc674aefe2e..d69c1227ee0 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -352,6 +352,11 @@ void ED_object_mode_generic_exit(struct Main *bmain, struct Object *ob); bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, struct Object *ob); +void ED_object_posemode_set_for_weight_paint(struct bContext *C, + struct Main *bmain, + struct Object *ob, + const bool is_mode_set); + /* object_modifier.c */ enum { MODIFIER_APPLY_DATA = 1, |