From 20f95de6ba2d32dcff553251ff4de2efd5b76955 Mon Sep 17 00:00:00 2001 From: Luca Rood Date: Wed, 3 May 2017 18:55:40 +0200 Subject: 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 --- source/blender/blenkernel/intern/layer.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source/blender/blenkernel/intern/layer.c') 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; -- cgit v1.2.3