Page MenuHome

Fix (unreported) broken handling of constraints reordering with liboverride.
ClosedPublic

Authored by Julian Eisel (Severin) on Nov 22 2021, 3:24 PM.

Details

Summary

Alternative to D13291 (patch description partially copied from there).

New drag&drop reordering code would call constraints reordering operator
with the generic context, and not the one from the panel's layout.
missing the "constraint" member which is mandatory for poll function to
properly deal with override vs. local constraints.

For this to work in a decent way, there needs to be some panel-wide
context that we can restore when executing callbacks outside of the
normal draw context. So similar to uiLayoutSetContextPointer() to set
context on a layout level, this introduces
UI_panel_context_pointer_set() for panel level context (this calls the
former for the current panel root layout as well).

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 18852
Build 18852: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Nov 22 2021, 3:24 PM
Julian Eisel (Severin) created this revision.

Oh, interesting! I think this can probably replace panel.runtime.custom_data_ptr too.
Though that doesn't seem necessary as part of this patch, maybe it could be part of the comment.

This revision is now accepted and ready to land.Nov 23 2021, 9:02 AM