Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_buttons/space_buttons.c')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index c06c107d4a3..187334a5c34 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -30,8 +30,11 @@
#include "BLI_utildefines.h"
#include "BKE_context.h"
+#include "BKE_modifier.h"
#include "BKE_screen.h"
+#include "DNA_modifier_types.h"
+
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_view3d.h" /* To draw toolbar UI. */
@@ -632,6 +635,15 @@ void ED_spacetype_buttons(void)
#endif
BLI_addhead(&st->regiontypes, art);
+ /* Register the panel types from modifiers. The actual panels are built per modifier rather than
+ * per modifier type. */
+ for (ModifierType i = 0; i < NUM_MODIFIER_TYPES; i++) {
+ const ModifierTypeInfo *mti = BKE_modifier_get_info(i);
+ if (mti != NULL && mti->panelRegister != NULL) {
+ mti->panelRegister(art);
+ }
+ }
+
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype buttons region");
art->regionid = RGN_TYPE_HEADER;