diff options
author | Luca Rood <dev@lucarood.com> | 2017-05-03 19:55:40 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-05-03 19:57:35 +0300 |
commit | 20f95de6ba2d32dcff553251ff4de2efd5b76955 (patch) | |
tree | 3249c645c766757e18f6231afe4e90ad76b996bb /source/blender/blenkernel/intern/layer.c | |
parent | b9451c04931d228161c1fb212c6c7a09545a86b7 (diff) |
Weight painting with draw manager
This implements weight rendering with the draw manager, with all drawing
options (Shading, wire, face masking, vertex masking).
This is part of T51208
Reviewers: campbellbarton
Subscribers: dfelinto
Differential Revision: https://developer.blender.org/D2654
Diffstat (limited to 'source/blender/blenkernel/intern/layer.c')
-rw-r--r-- | source/blender/blenkernel/intern/layer.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c index d9398ae83c7..1a920a155b8 100644 --- a/source/blender/blenkernel/intern/layer.c +++ b/source/blender/blenkernel/intern/layer.c @@ -1088,6 +1088,22 @@ static void layer_collection_create_mode_settings_edit(IDProperty *root, const b IDP_AddToGroup(root, props); } +static void layer_collection_create_mode_settings_paint_weight(IDProperty *root, const bool populate) +{ + IDProperty *props; + IDPropertyTemplate val = {0}; + + props = IDP_New(IDP_GROUP, &val, "WeightPaintMode"); + props->subtype = IDP_GROUP_SUB_MODE_PAINT_WEIGHT; + + /* properties */ + if (populate) { + PAINT_WEIGHT_collection_settings_create(props); + } + + IDP_AddToGroup(root, props); +} + static void collection_create_render_settings(IDProperty *root, const bool populate) { CollectionEngineSettingsCB_Type *ces_type; @@ -1103,6 +1119,7 @@ static void collection_create_mode_settings(IDProperty *root, const bool populat * and have IDP_AddToGroup outside the callbacks */ layer_collection_create_mode_settings_object(root, populate); layer_collection_create_mode_settings_edit(root, populate); + layer_collection_create_mode_settings_paint_weight(root, populate); } static int idproperty_group_subtype(const int mode_type) @@ -1116,6 +1133,9 @@ static int idproperty_group_subtype(const int mode_type) case COLLECTION_MODE_EDIT: idgroup_type = IDP_GROUP_SUB_MODE_EDIT; break; + case COLLECTION_MODE_PAINT_WEIGHT: + idgroup_type = IDP_GROUP_SUB_MODE_PAINT_WEIGHT; + break; default: case COLLECTION_MODE_NONE: return IDP_GROUP_SUB_ENGINE_RENDER; |