[Bf-blender-cvs] [3d9f0280ff1] master: Fix T93899: Incorrect decorator buttons for geometry nodes vector/colors
Hans Goudey
noreply at git.blender.org
Thu Apr 28 20:46:50 CEST 2022
Commit: 3d9f0280ff1bc308aa31e95af6b1726f1b497111
Author: Hans Goudey
Date: Thu Apr 28 13:46:42 2022 -0500
Branches: master
https://developer.blender.org/rB3d9f0280ff1bc308aa31e95af6b1726f1b497111
Fix T93899: Incorrect decorator buttons for geometry nodes vector/colors
For properties exposed to the geometry nodes modifier, decorators didn't
work at all for colors and it only worked on the X component of vectors.
The fix is to use -1 for the RNA index of the decorator button instead
of 1, which lets the UI code figure out what to do with arrays.
===================================================================
M source/blender/modifiers/intern/MOD_nodes.cc
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 1c890190678..21041e8e1b2 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -1472,7 +1472,7 @@ static void add_attribute_search_or_value_buttons(const bContext &C,
}
else {
uiItemR(row, md_ptr, rna_path.c_str(), 0, "", ICON_NONE);
- uiItemDecoratorR(row, md_ptr, rna_path.c_str(), 0);
+ uiItemDecoratorR(row, md_ptr, rna_path.c_str(), -1);
}
}
More information about the Bf-blender-cvs
mailing list