[Bf-blender-cvs] [9bea7259e12] temp_bmesh_multires: Merge branch 'master' into temp_bmesh_multires
Joseph Eagar
noreply at git.blender.org
Mon May 17 10:06:13 CEST 2021
Commit: 9bea7259e125d18c33bfa9307bc3b8a5b8b074f6
Author: Joseph Eagar
Date: Sun May 16 23:32:35 2021 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rB9bea7259e125d18c33bfa9307bc3b8a5b8b074f6
Merge branch 'master' into temp_bmesh_multires
===================================================================
===================================================================
diff --cc release/scripts/addons
index bb16aba5bd3,bb16aba5bd3..4fcdbfe7c20
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
--Subproject commit bb16aba5bd3873794eefe167497118b6063b9a85
++Subproject commit 4fcdbfe7c20edfc1204c0aa46c98ea25354abcd9
diff --cc release/scripts/startup/nodeitems_builtins.py
index 96c825c5285,96c825c5285..9ec52a9980e
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@@ -488,6 -488,6 +488,7 @@@ geometry_node_categories =
NodeItem("GeometryNodeAttributeClamp"),
NodeItem("GeometryNodeAttributeCompare"),
NodeItem("GeometryNodeAttributeConvert"),
++ NodeItem("GeometryNodeAttributeCache"),
NodeItem("GeometryNodeAttributeCurveMap"),
NodeItem("GeometryNodeAttributeFill"),
NodeItem("GeometryNodeAttributeMix"),
diff --cc source/blender/editors/object/object_modifier.c
index e71b66b1a72,e71b66b1a72..5000a1be7aa
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@@ -783,7 -783,7 +783,7 @@@ static bool modifier_apply_obdata
Object *object_eval = DEG_get_evaluated_object(depsgraph, ob);
Curve *curve = ob->data;
Curve *curve_eval = (Curve *)object_eval->data;
-- ModifierEvalContext mectx = {depsgraph, object_eval, 0};
++ ModifierEvalContext mectx = {depsgraph, object_eval, 0, false};
if (ELEM(mti->type, eModifierTypeType_Constructive, eModifierTypeType_Nonconstructive)) {
BKE_report(
@@@ -807,7 -807,7 +807,7 @@@
else if (ob->type == OB_LATTICE) {
Object *object_eval = DEG_get_evaluated_object(depsgraph, ob);
Lattice *lattice = ob->data;
-- ModifierEvalContext mectx = {depsgraph, object_eval, 0};
++ ModifierEvalContext mectx = {depsgraph, object_eval, 0, false};
if (ELEM(mti->type, eModifierTypeType_Constructive, eModifierTypeType_Nonconstructive)) {
BKE_report(reports, RPT_ERROR, "Constructive modifiers cannot be applied");
diff --cc source/blender/editors/sculpt_paint/sculpt.c
index e61ba7d0133,2e1dd928f96..2ed195c5c41
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@@ -1335,10 -778,12 +1335,14 @@@ static void sculpt_vertex_neighbors_get
iter->num_duplicates = 0;
iter->capacity = SCULPT_VERTEX_NEIGHBOR_FIXED_CAPACITY;
iter->neighbors = iter->neighbors_fixed;
+ iter->neighbor_indices = iter->neighbor_indices_fixed;
+ iter->is_duplicate = false;
for (int i = 0; i < ss->pmap[index].count; i++) {
+ if (ss->face_sets[vert_map->indices[i]] < 0) {
+ /* Skip connectivity from hidden faces. */
+ continue;
+ }
const MPoly *p = &ss->mpoly[vert_map->indices[i]];
uint f_adj_v[2];
if (poly_get_adj_loops_from_vert(p, ss->mloop, index, f_adj_v) != -1) {
diff --cc source/blender/editors/sculpt_paint/sculpt_expand.c
index 1ccfb19400d,2de7d5d72cc..0a4a2fe27a1
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@@ -729,50 -683,18 +729,50 @@@ static float *sculpt_expand_diagonals_f
/* Propagate the falloff increasing the value by 1 each time a new vertex is visited. */
Mesh *mesh = ob->data;
while (!BLI_gsqueue_is_empty(queue)) {
- int v_next;
+ SculptVertRef v_next;
BLI_gsqueue_pop(queue, &v_next);
- for (int j = 0; j < ss->pmap[v_next].count; j++) {
- MPoly *p = &ss->mpoly[ss->pmap[v_next].indices[j]];
- for (int l = 0; l < p->totloop; l++) {
- const int neighbor_v = mesh->mloop[p->loopstart + l].v;
- if (BLI_BITMAP_TEST(visited_vertices, neighbor_v)) {
- continue;
+
+ int v_next_i = BKE_pbvh_vertex_index_to_table(ss->pbvh, v_next);
+
+ if (ss->bm) {
+ BMIter iter;
+ BMFace *f;
- BMVert *v = (BMVert*)v_next.i;
++ BMVert *v = (BMVert *)v_next.i;
+
- BM_ITER_ELEM(f, &iter, v, BM_FACES_OF_VERT) {
++ BM_ITER_ELEM (f, &iter, v, BM_FACES_OF_VERT) {
+ BMLoop *l = f->l_first;
+
+ do {
+ BMVert *neighbor_v = l->next->v;
+ const int neighbor_v_i = BM_elem_index_get(neighbor_v);
+
+ if (BLI_BITMAP_TEST(visited_vertices, neighbor_v_i)) {
+ l = l->next;
+ continue;
+ }
+
+ dists[neighbor_v_i] = dists[v_next_i] + 1.0f;
+ BLI_BITMAP_ENABLE(visited_vertices, neighbor_v_i);
+ BLI_gsqueue_push(queue, &neighbor_v);
+
+ l = l->next;
+ } while (l != f->l_first);
+ }
+ }
+ else {
+ for (int j = 0; j < ss->pmap[v_next_i].count; j++) {
+ MPoly *p = &ss->mpoly[ss->pmap[v_next_i].indices[j]];
+ for (int l = 0; l < p->totloop; l++) {
+ const int neighbor_v = mesh->mloop[p->loopstart + l].v;
+
+ if (BLI_BITMAP_TEST(visited_vertices, neighbor_v)) {
+ continue;
+ }
+
+ dists[neighbor_v] = dists[v_next_i] + 1.0f;
+ BLI_BITMAP_ENABLE(visited_vertices, neighbor_v);
+ BLI_gsqueue_push(queue, &neighbor_v);
}
- dists[neighbor_v] = dists[v_next] + 1.0f;
- BLI_BITMAP_ENABLE(visited_vertices, neighbor_v);
- BLI_gsqueue_push(queue, &neighbor_v);
}
}
}
@@@ -875,23 -792,6 +875,23 @@@ static void sculpt_expand_vertex_to_fac
}
}
+static void sculpt_expand_vertex_to_faces_falloff_bmesh(BMesh *bm, ExpandCache *expand_cache)
+{
+ BMIter iter;
+ BMFace *f;
- BM_ITER_MESH(f, &iter, bm, BM_FACES_OF_MESH) {
++ BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) {
+ BMLoop *l = f->l_first;
+
+ float accum = 0.0f;
+
+ do {
+ accum += expand_cache->vert_falloff[BM_elem_index_get(l->v)];
+ l = l->next;
+ } while (l != f->l_first);
+
+ expand_cache->face_falloff[BM_elem_index_get(f)] = accum / f->len;
+ }
+}
/**
* Main function to update the faces falloff from a already calculated vertex falloff.
*/
@@@ -1625,8 -1487,8 +1625,8 @@@ static void sculpt_expand_reposition_pi
/* For boundary topology, position the pivot using only the boundary of the enabled vertices,
* without taking mesh boundary into account. This allows to create deformations like bending the
* mesh from the boundary of the mask that was just created. */
- const float use_mesh_boundary = expand_cache->falloff_type !=
- SCULPT_EXPAND_FALLOFF_BOUNDARY_TOPOLOGY;
+ const bool use_mesh_boundary = expand_cache->falloff_type !=
- SCULPT_EXPAND_FALLOFF_BOUNDARY_TOPOLOGY;
++ SCULPT_EXPAND_FALLOFF_BOUNDARY_TOPOLOGY;
BLI_bitmap *boundary_vertices = sculpt_expand_boundary_from_enabled(
ss, enabled_vertices, use_mesh_boundary);
diff --cc source/blender/makesdna/DNA_node_types.h
index bee312d42ef,58c94b6f369..63b37b5add8
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@@ -356,8 -360,8 +360,8 @@@ typedef struct bNode
/* XXX NODE_UPDATE is a generic update flag. More fine-grained updates
* might be used in the future, but currently all work the same way.
*/
--#define NODE_UPDATE 0xFFFF /* generic update flag (includes all others) */
--#define NODE_UPDATE_ID 1 /* associated id data block has changed */
++#define NODE_UPDATE 0xFFFF /* generic update flag (includes all others) */
++#define NODE_UPDATE_ID 1 /* associated id data block has changed */
#define NODE_UPDATE_OPERATOR 2 /* node update triggered from update operator */
/* Unique hash key for identifying node instances
@@@ -403,9 -407,9 +407,9 @@@ typedef struct bNodeLink
/* link->flag */
#define NODE_LINKFLAG_HILITE (1 << 0) /* link has been successfully validated */
#define NODE_LINK_VALID (1 << 1)
--#define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */
++#define NODE_LINK_TEST (1 << 2) /* free test flag, undefined */
#define NODE_LINK_TEMP_HIGHLIGHT (1 << 3) /* Link is highlighted for picking. */
--#define NODE_LINK_MUTED (1 << 4) /* Link is muted. */
++#define NODE_LINK_MUTED (1 << 4) /* Link is muted. */
/* tree->edit_quality/tree->render_quality */
#define NTREE_QUALITY_HIGH 0
@@@ -520,11 -524,11 +524,11 @@@ typedef struct bNodeTree
#define NTREE_TYPE_INIT 1
/* ntree->flag */
--#define NTREE_DS_EXPAND (1 << 0) /* for animation editors */
--#define NTREE_COM_OPENCL (1 << 1) /* use opencl */
--#define NTREE_TWO_PASS (1 << 2) /* two pass */
++#define NTREE_DS_EXPAND (1 << 0) /* for animation editors */
++#define NTREE_COM_OPENCL (1 << 1) /* use opencl */
++#define NTREE_TWO_PASS (1 << 2) /* two pass */
#define NTREE_COM_GROUPNODE_BUFFER (1 << 3) /* use groupnode buffers */
--#define NTREE_VIEWER_BORDER (1 << 4) /* use a border for viewer nodes */
++#define NTREE_VIEWER_BORDER (1 << 4) /* use a border for viewer nodes */
/* NOTE: DEPRECATED, use (id->tag & LIB_TAG_LOCALIZED) instead. */
/* tree is localized copy, free when deleting node groups */
@@@ -1306,6 -1318,6 +1318,19 @@@ typedef struct NodeAttributeConvert
int8_t domain;
} NodeAttributeConvert;
++typedef struct NodeAttributeCache {
++ /* CustomDataType. */
++ int8_t data_type;
++
++ /* AttributeDomain. */
++ int8_t domain;
++ int8_t _pad[6];
++
++ void *elems;
++ int totelem;
++ int elemsize;
++} NodeAttributeCache;
++
typedef struct NodeGeometryMeshCircle {
/* GeometryNodeMeshCircleFillType. */
uint8_t fill_type;
@@@ -1357,7 -1369,7 +1382,7 @@@ typedef struct NodeGeometryAttributeTra
#define NODE_IES_EXTERNAL 1
/* frame node flags */
--#define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */
++#define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */
#define NODE_FRAME_RESIZEABLE 2 /* test flag, if frame can be resized by user */
/* proxy node flags */
diff --cc source/blender/makesrna/intern/rna_nodetree.c
index e4256b8f07f,a1b6885e7e2..effadbb745c
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@@ -9031
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list