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:
authorYimingWu <xp8110@outlook.com>2021-03-10 02:59:23 +0300
committerYimingWu <xp8110@outlook.com>2021-03-10 02:59:23 +0300
commit9166075cbeb4163566bf943f7844759702147a8a (patch)
tree1109502274df385ceabfbb3707a56e164c121edc /source/blender/gpencil_modifiers
parent10c097eff0416368bf769c3349e9c81c12f19d5f (diff)
parent53b82efed66baddff3b7ef6c93a919ef10f4ef42 (diff)
Merge remote-tracking branch 'origin/master' into lanpr-under-gp
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
index 05e7a23bc82..10383a9417d 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_ui_common.c
@@ -371,14 +371,9 @@ PanelType *gpencil_modifier_panel_register(ARegionType *region_type,
GpencilModifierType type,
PanelDrawFn draw)
{
+ PanelType *panel_type = MEM_callocN(sizeof(PanelType), __func__);
- /* Get the name for the modifier's panel. */
- char panel_idname[BKE_ST_MAXNAME];
- BKE_gpencil_modifierType_panel_id(type, panel_idname);
-
- PanelType *panel_type = MEM_callocN(sizeof(PanelType), panel_idname);
-
- BLI_strncpy(panel_type->idname, panel_idname, BKE_ST_MAXNAME);
+ BKE_gpencil_modifierType_panel_id(type, panel_type->idname);
BLI_strncpy(panel_type->label, "", BKE_ST_MAXNAME);
BLI_strncpy(panel_type->context, "modifier", BKE_ST_MAXNAME);
BLI_strncpy(panel_type->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA, BKE_ST_MAXNAME);
@@ -412,13 +407,9 @@ PanelType *gpencil_modifier_subpanel_register(ARegionType *region_type,
PanelDrawFn draw,
PanelType *parent)
{
- /* Create the subpanel's ID name. */
- char panel_idname[BKE_ST_MAXNAME];
- BLI_snprintf(panel_idname, BKE_ST_MAXNAME, "%s_%s", parent->idname, name);
-
- PanelType *panel_type = MEM_callocN(sizeof(PanelType), panel_idname);
+ PanelType *panel_type = MEM_callocN(sizeof(PanelType), __func__);
- BLI_strncpy(panel_type->idname, panel_idname, BKE_ST_MAXNAME);
+ BLI_snprintf(panel_type->idname, BKE_ST_MAXNAME, "%s_%s", parent->idname, name);
BLI_strncpy(panel_type->label, label, BKE_ST_MAXNAME);
BLI_strncpy(panel_type->context, "modifier", BKE_ST_MAXNAME);
BLI_strncpy(panel_type->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA, BKE_ST_MAXNAME);