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.
This commit is contained in:
Hans Goudey 2022-04-28 13:46:42 -05:00
parent 1425b356b8
commit 3d9f0280ff
Notes: blender-bot 2023-02-14 11:00:17 +01:00
Referenced by issue #93899, "Animate Property" UI-dot-button does not insert key when the input is a Color [field, constant is OK]
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}