diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_pbvh.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_intern.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 27 |
9 files changed, 1 insertions, 45 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index cf9608e7c0f..cbe250d0ac8 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -242,7 +242,6 @@ typedef struct SculptSession { /* PBVH acceleration structure */ struct PBVH *pbvh; - bool show_diffuse_color; bool show_mask; /* Painting on deformed mesh */ diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 79b462e749c..3806868e060 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -409,7 +409,6 @@ bool BKE_pbvh_node_vert_update_check_any(PBVH *bvh, PBVHNode *node); // void BKE_pbvh_node_BB_expand(PBVHNode *node, float co[3]); bool pbvh_has_mask(PBVH *bvh); -void pbvh_show_diffuse_color_set(PBVH *bvh, bool show_diffuse_color); void pbvh_show_mask_set(PBVH *bvh, bool show_mask); #endif /* __BKE_PBVH_H__ */ diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index eb1e8311a12..28bd9c0cea5 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -270,7 +270,6 @@ static PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) ob->sculpt->cd_vert_node_offset, ob->sculpt->cd_face_node_offset); - pbvh_show_diffuse_color_set(cddm->pbvh, ob->sculpt->show_diffuse_color); pbvh_show_mask_set(cddm->pbvh, ob->sculpt->show_mask); } @@ -300,7 +299,6 @@ static PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) looptri, looptris_num); - pbvh_show_diffuse_color_set(cddm->pbvh, ob->sculpt->show_diffuse_color); pbvh_show_mask_set(cddm->pbvh, ob->sculpt->show_mask); deformed = check_sculpt_object_deformed(ob, true); diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 99ae19c3c30..0e93c80ecb5 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -1158,7 +1158,6 @@ static void sculpt_update_object( MultiresModifierData *mmd = BKE_sculpt_multires_active(scene, ob); ss->modifiers_active = sculpt_modifiers_active(scene, sd, ob); - ss->show_diffuse_color = (sd->flags & SCULPT_SHOW_DIFFUSE) != 0; ss->show_mask = (sd->flags & SCULPT_HIDE_MASK) == 0; ss->building_vp_handle = false; @@ -1213,7 +1212,6 @@ static void sculpt_update_object( &ss->pmap, &ss->pmap_mem, me->mpoly, me->mloop, me->totvert, me->totpoly, me->totloop); } - pbvh_show_diffuse_color_set(ss->pbvh, ss->show_diffuse_color); pbvh_show_mask_set(ss->pbvh, ss->show_mask); if (ss->modifiers_active) { @@ -1449,7 +1447,6 @@ static PBVH *build_pbvh_for_dynamic_topology(Object *ob) ob->sculpt->bm_log, ob->sculpt->cd_vert_node_offset, ob->sculpt->cd_face_node_offset); - pbvh_show_diffuse_color_set(pbvh, ob->sculpt->show_diffuse_color); pbvh_show_mask_set(pbvh, ob->sculpt->show_mask); return pbvh; } @@ -1474,7 +1471,6 @@ static PBVH *build_pbvh_from_regular_mesh(Object *ob, Mesh *me_eval_deform) looptri, looptris_num); - pbvh_show_diffuse_color_set(pbvh, ob->sculpt->show_diffuse_color); pbvh_show_mask_set(pbvh, ob->sculpt->show_mask); const bool is_deformed = check_sculpt_object_deformed(ob, true); @@ -1500,7 +1496,6 @@ static PBVH *build_pbvh_from_ccg(Object *ob, SubdivCCG *subdiv_ccg) (void **)subdiv_ccg->grid_faces, subdiv_ccg->grid_flag_mats, subdiv_ccg->grid_hidden); - pbvh_show_diffuse_color_set(pbvh, ob->sculpt->show_diffuse_color); pbvh_show_mask_set(pbvh, ob->sculpt->show_mask); return pbvh; } diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 860e2bdaa93..64a16a0e3be 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -2501,11 +2501,6 @@ bool pbvh_has_mask(PBVH *bvh) return false; } -void pbvh_show_diffuse_color_set(PBVH *bvh, bool show_diffuse_color) -{ - bvh->show_diffuse_color = !pbvh_has_mask(bvh) || show_diffuse_color; -} - void pbvh_show_mask_set(PBVH *bvh, bool show_mask) { bvh->show_mask = show_mask; diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index dc9d796075b..e74a8d43c68 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -152,8 +152,6 @@ struct PBVH { /* flag are verts/faces deformed */ bool deformed; - - bool show_diffuse_color; bool show_mask; /* Dynamic topology */ diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 09a073e3ca6..3f57ae169ff 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2379,7 +2379,6 @@ static struct PBVH *ccgDM_getPBVH(Object *ob, DerivedMesh *dm) } if (ccgdm->pbvh != NULL) { - pbvh_show_diffuse_color_set(ccgdm->pbvh, ob->sculpt->show_diffuse_color); pbvh_show_mask_set(ccgdm->pbvh, ob->sculpt->show_mask); } diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index f0ca4e30cdf..f50b345e402 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -2170,7 +2170,7 @@ typedef enum eSculptFlags { SCULPT_USE_OPENMP = (1 << 7), SCULPT_ONLY_DEFORM = (1 << 8), - SCULPT_SHOW_DIFFUSE = (1 << 9), + // SCULPT_SHOW_DIFFUSE = (1 << 9), // deprecated /* If set, the mesh will be drawn with smooth-shading in * dynamic-topology mode */ diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index ac41736451a..84f2cb7c1be 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -414,25 +414,6 @@ static void rna_Sculpt_update(bContext *C, PointerRNA *UNUSED(ptr)) } } -static void rna_Sculpt_ShowDiffuseColor_update(bContext *C, PointerRNA *UNUSED(ptr)) -{ - ViewLayer *view_layer = CTX_data_view_layer(C); - Object *ob = OBACT(view_layer); - - if (ob && ob->sculpt) { - Scene *scene = CTX_data_scene(C); - Sculpt *sd = scene->toolsettings->sculpt; - ob->sculpt->show_diffuse_color = ((sd->flags & SCULPT_SHOW_DIFFUSE) != 0); - - if (ob->sculpt->pbvh) { - pbvh_show_diffuse_color_set(ob->sculpt->pbvh, ob->sculpt->show_diffuse_color); - } - - DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); - WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); - } -} - static void rna_Sculpt_ShowMask_update(bContext *C, PointerRNA *UNUSED(ptr)) { ViewLayer *view_layer = CTX_data_view_layer(C); @@ -827,14 +808,6 @@ static void rna_def_sculpt(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_update"); - prop = RNA_def_property(srna, "show_diffuse_color", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SHOW_DIFFUSE); - RNA_def_property_ui_text(prop, - "Show Diffuse Color", - "Show diffuse color of object and overlay sculpt mask on top of it"); - RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); - RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Sculpt_ShowDiffuseColor_update"); - prop = RNA_def_property(srna, "show_mask", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flags", SCULPT_HIDE_MASK); RNA_def_property_ui_text(prop, "Show Mask", "Show mask as overlay on object"); |