[Bf-blender-cvs] [cd316eb6c61] sculpt-dev: Merge remote-tracking branch 'origin/master' into sculpt-dev
Joseph Eagar
noreply at git.blender.org
Thu May 12 10:11:18 CEST 2022
Commit: cd316eb6c614eb0630cd0bea46f5f3c7c03f0085
Author: Joseph Eagar
Date: Thu May 12 01:10:47 2022 -0700
Branches: sculpt-dev
https://developer.blender.org/rBcd316eb6c614eb0630cd0bea46f5f3c7c03f0085
Merge remote-tracking branch 'origin/master' into sculpt-dev
Also fixed a bug with eevee and color attributes.
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index fd209c21cc7,995b2afebf0..83c30cbe985
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -389,7 -341,8 +389,8 @@@ class _draw_tool_settings_context_mode
"strength",
pressure_name="use_pressure_strength",
unified_name="use_unified_strength",
- header=True)
- header=True,
++ header=True
+ )
return True
diff --cc source/blender/gpu/intern/gpu_node_graph.c
index b3a091ffbb0,b3a091ffbb0..91fb0544cf6
--- a/source/blender/gpu/intern/gpu_node_graph.c
+++ b/source/blender/gpu/intern/gpu_node_graph.c
@@@ -333,6 -333,6 +333,8 @@@ static char attr_prefix_get(CustomDataT
switch (type) {
case CD_TANGENT:
return 't';
++ case CD_MCOL:
++ return 'c';
case CD_AUTO_FROM_NAME:
return 'a';
case CD_HAIRLENGTH:
diff --cc source/blender/makesrna/intern/rna_attribute.c
index 4ba50f664ff,2d9517ce1ee..8717631ae3b
--- a/source/blender/makesrna/intern/rna_attribute.c
+++ b/source/blender/makesrna/intern/rna_attribute.c
@@@ -451,12 -451,14 +451,12 @@@ PointerRNA rna_AttributeGroup_color_ite
int rna_AttributeGroup_color_length(PointerRNA *ptr)
{
- return BKE_id_attributes_length(ptr->owner_id,
- ATTR_DOMAIN_MASK_POINT | ATTR_DOMAIN_MASK_CORNER,
- CD_MASK_PROP_COLOR | CD_MASK_PROP_BYTE_COLOR);
+ return BKE_id_attributes_length(ptr->owner_id, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL, true);
}
- ATTR_NO_OPT int rna_AttributeGroup_length(PointerRNA *ptr)
+ int rna_AttributeGroup_length(PointerRNA *ptr)
{
- return BKE_id_attributes_length(ptr->owner_id, ATTR_DOMAIN_MASK_ALL, CD_MASK_PROP_ALL);
+ return BKE_id_attributes_length(ptr->owner_id, ATTR_DOMAIN_MASK_ALL, CD_MASK_PROP_ALL, false);
}
static int rna_AttributeGroup_active_index_get(PointerRNA *ptr)
diff --cc source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
index a2a9aa9ad91,a2a9aa9ad91..cba944c671c
--- a/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vertex_color.cc
@@@ -42,10 -42,10 +42,20 @@@ static int node_shader_gpu_vertex_color
GPUNodeStack *out)
{
NodeShaderVertexColor *vertexColor = (NodeShaderVertexColor *)node->storage;
-- /* NOTE: using CD_AUTO_FROM_NAME instead of CD_MCOL or CD_PROP_COLOR as geometry nodes may
-- * overwrite data which will also change the CustomDataType. This will also make EEVEE and Cycles
++ /* NOTE: using CD_AUTO_FROM_NAME instead of CD_MCOL or CD_PROP_COLOR for named attributes
++ * as geometry nodes may overwrite data which will also change the CustomDataType.
++ * This will also make EEVEE and Cycles
* consistent. See T93179. */
-- GPUNodeLink *vertexColorLink = GPU_attribute(mat, CD_AUTO_FROM_NAME, vertexColor->layer_name);
++
++ GPUNodeLink *vertexColorLink;
++
++ if (vertexColor->layer_name[0]) {
++ vertexColorLink = GPU_attribute(mat, CD_AUTO_FROM_NAME, vertexColor->layer_name);
++ }
++ else { /* Fall back on active render color attribute. */
++ vertexColorLink = GPU_attribute(mat, CD_MCOL, vertexColor->layer_name);
++ }
++
return GPU_stack_link(mat, node, "node_vertex_color", in, out, vertexColorLink);
}
More information about the Bf-blender-cvs
mailing list