Page MenuHome

Fix T92928: Geometry nodes animation decorator wrong for vectors
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Nov 9 2021, 2:17 PM.

Details

Summary

Decorators were only added for the first item of an array.

Decorators for all items of an array are added:

  • if the layout is flagged UI_ITEM_PROP_DECORATE automatically in uiItemFullR or
  • calling uiItemDecoratorR (but only in certain situations, see below)

When calling uiItemDecoratorR with an index of 0, the following happens:

  • the index is passed to uiItemDecoratorR_prop
  • that checks with ui_item_rna_is_expand if decorators should be added to all items of an array
  • the check fails (because it only permits RNA_NO_INDEX -- which is -1)

So two things we can do:

  • remain using uiItemDecoratorR (that would require to pass an index of RNA_NO_INDEX -- a bad level include -- or -1)
  • just use uiLayoutSetPropDecorate to flag the row properly

This patch does later.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Nov 9 2021, 2:17 PM
Philipp Oeser (lichtwerk) created this revision.

Given the two options you describe, I agree with your choice. Thanks for the fix.

This revision is now accepted and ready to land.Nov 9 2021, 3:27 PM