UI: Grease Pencil Modifier Drag and Drop, Layout Changes

This patch implements the list panel system D7490 for grease pencil
modifiers. It also moves their drawing to a callback in
GpencilModifierTypeInfo in line with the extensible architecture
refactoring goal T75724.

This also adds the "set_error" function for grease pencil modifiers,
which hadn't been copied from mesh modifiers yet.

The implementation is basically exactly the same as for the modifier
patch (9b099c8612).

Thanks to Matias Mendiola (mendio) for providing mockups for many
of the layout changes.

Differential Revision: https://developer.blender.org/D7978
This commit is contained in:
2020-06-19 14:42:08 -04:00
parent fb7d8e2f4b
commit ec963d9d7d
35 changed files with 1975 additions and 634 deletions

View File

@@ -1222,13 +1222,10 @@ void RNA_api_ui_layout(StructRNA *srna)
"",
"Add panels for bone constraints instead of object constraints");
func = RNA_def_function(srna, "template_greasepencil_modifier", "uiTemplateGpencilModifier");
func = RNA_def_function(srna, "template_grease_pencil_modifiers", "uiTemplateGpencilModifiers");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Generates the UI layout for grease pencil modifiers");
parm = RNA_def_pointer(func, "data", "GpencilModifier", "", "Modifier data");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);
parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
RNA_def_function_ui_description(func,
"Generates the panels for the grease pencil modifier stack");
func = RNA_def_function(srna, "template_shaderfx", "uiTemplateShaderFx");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);