Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-10-07 18:25:51 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-03-18 11:55:44 +0300
commit084bf7daee3ebcd57696f5b2a0c83db1b1f3d472 (patch)
treee5f37d2e47d11a23730d90afb60f7cac633e0f8c /source/blender/draw/intern/draw_cache_extract.h
parent82c51d0edbab45f014b4d0b4c0a96c000c46e232 (diff)
Weight Paint: Implement a new Lock-Relative mode.
This check box alters how weights are displayed and painted, similar to Multi Paint, but in a different way. Specifically, weights are presented as if all locked vertex groups were deleted, and the remaining deform groups normalized. The new feature is intended for use when balancing weights within a group of bones while all others are locked. Enabling the option presents weight as if the locked bones didn't exist, and their weight was proportionally redistributed to the editable bones. Conversely, the Multi-Paint feature allows balancing a group of bones as a whole against all unselected bones, while ignoring weight distribution within the selected group. This mode also allows temporarily viewing non-normalized weights as if they were normalized, without actually changing the values. Differential Revision: https://developer.blender.org/D3837
Diffstat (limited to 'source/blender/draw/intern/draw_cache_extract.h')
-rw-r--r--source/blender/draw/intern/draw_cache_extract.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_extract.h b/source/blender/draw/intern/draw_cache_extract.h
index 6226b5dcf7f..0e02b07e95b 100644
--- a/source/blender/draw/intern/draw_cache_extract.h
+++ b/source/blender/draw/intern/draw_cache_extract.h
@@ -34,12 +34,17 @@ typedef struct DRW_MeshWeightState {
/* Set of all selected bones for Multipaint. */
bool *defgroup_sel; /* [defgroup_len] */
int defgroup_sel_count;
+
+ /* Set of all locked and unlocked deform bones for Lock Relative mode. */
+ bool *defgroup_locked; /* [defgroup_len] */
+ bool *defgroup_unlocked; /* [defgroup_len] */
} DRW_MeshWeightState;
/* DRW_MeshWeightState.flags */
enum {
DRW_MESH_WEIGHT_STATE_MULTIPAINT = (1 << 0),
DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE = (1 << 1),
+ DRW_MESH_WEIGHT_STATE_LOCK_RELATIVE = (1 << 2),
};
typedef struct DRW_MeshCDMask {