Page MenuHome

Refactor RNA property: split flags in property flags, parameter flags, and internal flags.

Authored by Bastien Montagne (mont29) on Dec 6 2016, 5:36 PM.



This gives us 9 flags available again for properties (we had none), and
also makes things slightly cleaner.

To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.

This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).

And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).

Diff Detail

rB Blender

Event Timeline

Bastien Montagne (mont29) retitled this revision from to Refactor RNA property: split flags in property flags, parameter flags, and internal flags..
Bastien Montagne (mont29) updated this object.

woops, should start at 1 << 0!

Sergey Sharybin (sergey) edited edge metadata.

Guess this is indeed the only way to go. Apart from your note don't currently feedback.

This revision is now accepted and ready to land.Dec 7 2016, 2:05 PM
Julian Eisel (Severin) accepted this revision.EditedDec 7 2016, 4:47 PM

Great, this is definitely needed, LGTM from quick glance.

If we run out of bits again, we can also think about splitting off RNA internal flags, as well as UI related flags. Tried the later one at some point but faced some issues in bpy_props.c (IIRC). Nothing that can't be solved, just didn't get around to work on it further. If someone wants to pick it up: P431

This revision was automatically updated to reflect the committed changes.