[Bf-blender-cvs] [cbe010ca003] sculpt-dev: Merge branch 'master' into sculpt-dev
Joseph Eagar
noreply at git.blender.org
Mon Jan 3 14:20:25 CET 2022
Commit: cbe010ca003d2e5e650d0b8413a9b796c964fe24
Author: Joseph Eagar
Date: Mon Jan 3 05:20:10 2022 -0800
Branches: sculpt-dev
https://developer.blender.org/rBcbe010ca003d2e5e650d0b8413a9b796c964fe24
Merge branch 'master' into sculpt-dev
===================================================================
===================================================================
diff --cc release/datafiles/locale
index 620b85f16d0,620b85f16d0..6ac775c595a
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@@ -1,1 -1,1 +1,1 @@@
--Subproject commit 620b85f16d03a6aadd7cae56969c9c29b06b992d
++Subproject commit 6ac775c595a2dd40684cd6421d24f1f064fe3a6f
diff --cc release/scripts/addons
index c2eeb9bb473,c08568cc376..231186d45fe
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@@ -1,1 -1,1 +1,1 @@@
- Subproject commit c2eeb9bb4732602c324a011f7f913a33a5e8b1f2
-Subproject commit c08568cc376d2e4298710c4172fb0c74f0611de1
++Subproject commit 231186d45fe8998729e594a7683fd19d30ce8a2c
diff --cc release/scripts/addons_contrib
index 7936dde9ece,7936dde9ece..42da56aa737
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@@ -1,1 -1,1 +1,1 @@@
--Subproject commit 7936dde9ece881d531b1a2ee6c45ddb56d30038c
++Subproject commit 42da56aa73726710107031787af5eea186797984
diff --cc release/scripts/startup/bl_ui/properties_data_mesh.py
index 2426e97eb04,ba5ecd1efde..4c9d254dd81
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@@ -486,60 -448,56 +486,59 @@@ class DATA_PT_vertex_colors(MeshButtons
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
- layout = self.layout
-
- me = context.mesh
+ mesh = context.mesh
+ layout = self.layout
row = layout.row()
- col = row.column()
- col.template_list("MESH_UL_vcols", "vcols", me, "vertex_colors", me.vertex_colors, "active_index", rows=2)
+ col = row.column()
+ col.template_list("MESH_UL_color_attributes",
+ "attributes",
+ mesh,
+ "attributes",
+ mesh.attributes,
+ "active_color_index",
+ rows=3,)
col = row.column(align=True)
- col.operator("mesh.vertex_color_add", icon='ADD', text="")
- col.operator("mesh.vertex_color_remove", icon='REMOVE', text="")
+ col.operator("geometry.color_attribute_add", icon='ADD', text="")
+ col.operator("geometry.color_attribute_remove", icon='REMOVE', text="")
- active = mesh.attributes.active
-
- if active and (active.domain == "POINT" and active.data_type == "FLOAT_COLOR"):
- layout.operator("sculpt.vertex_to_loop_colors", text="Save To Corners")
- layout.operator("sculpt.loop_to_vertex_colors", text="Load From Corners")
++ #active = mesh.attributes.active
++ #if active and (active.domain == "POINT" and active.data_type == "FLOAT_COLOR"):
++ # layout.operator("sculpt.vertex_to_loop_colors", text="Save To Corners")
++ # layout.operator("sculpt.loop_to_vertex_colors", text="Load From Corners")
-class DATA_PT_sculpt_vertex_colors(MeshButtonsPanel, Panel):
- bl_label = "Sculpt Vertex Colors"
- bl_options = {'DEFAULT_CLOSED'}
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+ self.draw_attribute_warnings(context, layout)
- @classmethod
- def poll(cls, context):
- return super().poll(context) and context.preferences.experimental.use_sculpt_vertex_colors
+ def draw_attribute_warnings(self, context, layout):
+ attributes_by_name = defaultdict(list)
- def draw(self, context):
- layout = self.layout
+ ob = context.object
+ mesh = ob.data
- me = context.mesh
+ builtin_attribute = object()
- row = layout.row()
- col = row.column()
+ def add_builtin(name):
+ attributes_by_name[name].append(builtin_attribute)
- col.template_list(
- "MESH_UL_vcols",
- "svcols",
- me,
- "sculpt_vertex_colors",
- me.sculpt_vertex_colors,
- "active_index",
- rows=2,
- )
+ def add_attributes(layers):
+ for layer in layers:
+ attributes_by_name[layer.name].append(layer)
- col = row.column(align=True)
- col.operator("mesh.sculpt_vertex_color_add", icon='ADD', text="")
- col.operator("mesh.sculpt_vertex_color_remove", icon='REMOVE', text="")
+ add_builtin("position")
+ add_builtin("material_index")
+ add_builtin("shade_smooth")
+ add_builtin("normal")
+ add_builtin("crease")
- row = layout.row()
- col = row.column()
- col.operator("sculpt.vertex_to_loop_colors", text="Store Sculpt Vertex Color")
- col.operator("sculpt.loop_to_vertex_colors", text="Load Sculpt Vertex Color")
+ add_attributes(mesh.attributes)
+
+ colliding_names = [name for name, layers in attributes_by_name.items() if len(layers) >= 2]
+ if len(colliding_names) == 0:
+ return
+ layout.label(text="Name collisions: {}".format(", ".join(colliding_names)), icon='ERROR')
class DATA_PT_remesh(MeshButtonsPanel, Panel):
bl_label = "Remesh"
diff --cc release/scripts/startup/bl_ui/space_userpref.py
index 957394a7c7c,e3ae536bc37..7eaebbcfc8c
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@@ -763,8 -772,20 +763,19 @@@ class USERPREF_PT_viewport_selection(Vi
layout.prop(system, "use_select_pick_depth")
+ class USERPREF_PT_viewport_subdivision(ViewportPanel, CenterAlignMixIn, Panel):
+ bl_label = "Subdivision"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw_centered(self, context, layout):
+ prefs = context.preferences
+ system = prefs.system
+
+ layout.prop(system, "use_gpu_subdivision")
+
+
# -----------------------------------------------------------------------------
# Theme Panels
-
class ThemePanel:
bl_space_type = 'PREFERENCES'
bl_region_type = 'WINDOW'
diff --cc release/scripts/startup/bl_ui/space_view3d_toolbar.py
index a4388374c07,4d62d7072cb..2fbad9ba285
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@@ -810,13 -697,9 +810,13 @@@ class VIEW3D_PT_tools_weight_gradient(P
@classmethod
def poll(cls, context):
+ if context.mode != "PAINT_WEIGHT":
+ return False
+
settings = context.tool_settings.weight_paint
- if not settings:
+ if settings is None:
return False
+
brush = settings.brush
return brush is not None
diff --cc source/blender/blenkernel/BKE_attribute.h
index 518e109135d,1e2dcf09b64..86dad4b928f
--- a/source/blender/blenkernel/BKE_attribute.h
+++ b/source/blender/blenkernel/BKE_attribute.h
@@@ -36,13 -36,8 +36,9 @@@ struct CustomData
struct CustomDataLayer;
struct ID;
struct ReportList;
+struct AttributeRef;
/* Attribute.domain */
- /**
- * \warning Careful when changing existing items.
- * Arrays may be initialized from this (e.g. #DATASET_layout_hierarchy).
- */
typedef enum AttributeDomain {
ATTR_DOMAIN_AUTO = -1, /* Use for nodes to choose automatically based on other data. */
ATTR_DOMAIN_POINT = 0, /* Mesh, Hair or PointCloud Point */
@@@ -100,32 -83,7 +96,38 @@@ void BKE_id_attributes_active_set(struc
int *BKE_id_attributes_active_index_p(struct ID *id);
CustomData *BKE_id_attributes_iterator_next_domain(struct ID *id, struct CustomDataLayer *layers);
- CustomDataLayer *BKE_id_attribute_from_index(const struct ID *id, int lookup_index, const AttributeDomainMask domain_mask);
-
++CustomDataLayer *BKE_id_attribute_from_index(const struct ID *id,
++ int lookup_index,
++ const AttributeDomainMask domain_mask);
+
+struct AttributeRef *BKE_id_attributes_active_color_ref_p(struct ID *id);
+void BKE_id_attributes_active_color_set(struct ID *id, struct CustomDataLayer *active_layer);
+struct CustomDataLayer *BKE_id_attributes_active_color_get(struct ID *id);
+
+struct AttributeRef *BKE_id_attributes_render_color_ref_p(struct ID *id);
+void BKE_id_attributes_render_color_set(struct ID *id, struct CustomDataLayer *active_layer);
+CustomDataLayer *BKE_id_attributes_render_color_get(struct ID *id);
+
+bool BKE_id_attribute_find_unique_name(struct ID *id,
+ const char *name,
+ char *outname,
+ CustomDataMask mask);
+
+int BKE_id_attribute_index_from_ref(struct ID *id,
+ struct AttributeRef *ref,
+ AttributeDomainMask domain_mask,
+ CustomDataMask type_filter);
+
+bool BKE_id_attribute_ref_from_index(struct ID *id,
+ int attr_index,
+ AttributeDomainMask domain_mask,
+ CustomDataMask type_filter,
+ struct AttributeRef *r_ref);
+
++bool BKE_id_attribute_ref_equals(const struct AttributeRef *ref1, const struct AttributeRef *ref2);
++bool BKE_id_attribute_ref_layer_equals(const struct AttributeRef *ref,
++ const struct CustomDataLayer *layer,
++ const AttributeDomain domain);
#ifdef __cplusplus
}
#endif
diff --cc source/blender/blenkernel/BKE_customdata.h
index 14176d748a6,68d29235469..22a148a2049
--- a/source/blender/blenkernel/BKE_customdata.h
+++ b/source/blender/blenkernel/BKE_customdata.h
@@@ -784,12 -754,6 +784,16 @@@ void CustomData_blend_write(struct Blen
struct ID *id);
void CustomData_blend_read(struct BlendDataReader *reader, struct CustomData *data, int count);
+void CustomData_unmark_temporary_nocopy(struct CustomData *data);
+void CustomData_mark_temporary_nocopy(struct CustomData *data);
+
+int CustomData_get_elem_size(CustomDataLayer *layer);
+void CustomData_regen_active_refs(CustomData *data);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list