Blender  V3.3
Functions
MOD_gpencil_ui_common.c File Reference
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_material.h"
#include "BKE_screen.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "ED_object.h"
#include "BLT_translation.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "WM_api.h"
#include "WM_types.h"
#include "MOD_gpencil_ui_common.h"

Go to the source code of this file.

Functions

static bool gpencil_modifier_ui_poll (const bContext *C, PanelType *UNUSED(pt))
 
Panel Drag and Drop, Expansion Saving
static void gpencil_modifier_reorder (bContext *C, Panel *panel, int new_index)
 
static short get_gpencil_modifier_expand_flag (const bContext *UNUSED(C), Panel *panel)
 
static void set_gpencil_modifier_expand_flag (const bContext *UNUSED(C), Panel *panel, short expand_flag)
 
Modifier Registration Helpers
PanelTypegpencil_modifier_panel_register (ARegionType *region_type, GpencilModifierType type, PanelDrawFn draw)
 
PanelTypegpencil_modifier_subpanel_register (ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
 

Modifier Panel Layouts

#define ERROR_LIBDATA_MESSAGE   TIP_("External library data")
 
void gpencil_modifier_masking_panel_draw (Panel *panel, bool use_material, bool use_vertex)
 
void gpencil_modifier_curve_header_draw (const bContext *UNUSED(C), Panel *panel)
 
void gpencil_modifier_curve_panel_draw (const bContext *UNUSED(C), Panel *panel)
 
void gpencil_modifier_panel_end (uiLayout *layout, PointerRNA *ptr)
 
PointerRNAgpencil_modifier_panel_get_property_pointers (Panel *panel, PointerRNA *r_ob_ptr)
 
static void gpencil_modifier_ops_extra_draw (bContext *C, uiLayout *layout, void *md_v)
 
static void gpencil_modifier_panel_header (const bContext *UNUSED(C), Panel *panel)
 

Macro Definition Documentation

◆ ERROR_LIBDATA_MESSAGE

#define ERROR_LIBDATA_MESSAGE   TIP_("External library data")

Gets RNA pointers for the active object and the panel's modifier data.

Definition at line 206 of file MOD_gpencil_ui_common.c.

Function Documentation

◆ get_gpencil_modifier_expand_flag()

static short get_gpencil_modifier_expand_flag ( const bContext UNUSEDC,
Panel panel 
)
static

◆ gpencil_modifier_curve_header_draw()

void gpencil_modifier_curve_header_draw ( const bContext UNUSEDC,
Panel panel 
)

◆ gpencil_modifier_curve_panel_draw()

void gpencil_modifier_curve_panel_draw ( const bContext UNUSEDC,
Panel panel 
)

◆ gpencil_modifier_masking_panel_draw()

void gpencil_modifier_masking_panel_draw ( Panel panel,
bool  use_material,
bool  use_vertex 
)

◆ gpencil_modifier_ops_extra_draw()

static void gpencil_modifier_ops_extra_draw ( bContext C,
uiLayout layout,
void md_v 
)
static

◆ gpencil_modifier_panel_end()

void gpencil_modifier_panel_end ( struct uiLayout layout,
PointerRNA ptr 
)

Draw modifier error message.

Definition at line 194 of file MOD_gpencil_ui_common.c.

References PointerRNA::data, GpencilModifierData::error, IFACE_, ptr, uiItemL(), and uiLayoutRow().

Referenced by panel_draw().

◆ gpencil_modifier_panel_get_property_pointers()

PointerRNA* gpencil_modifier_panel_get_property_pointers ( Panel panel,
PointerRNA r_ob_ptr 
)

◆ gpencil_modifier_panel_header()

static void gpencil_modifier_panel_header ( const bContext UNUSEDC,
Panel panel 
)
static

◆ gpencil_modifier_panel_register()

PanelType* gpencil_modifier_panel_register ( struct ARegionType region_type,
GpencilModifierType  type,
PanelDrawFn  draw 
)

◆ gpencil_modifier_reorder()

static void gpencil_modifier_reorder ( bContext C,
Panel panel,
int  new_index 
)
static

◆ gpencil_modifier_subpanel_register()

PanelType* gpencil_modifier_subpanel_register ( struct ARegionType region_type,
const char *  name,
const char *  label,
PanelDrawFn  draw_header,
PanelDrawFn  draw,
struct PanelType parent 
)

◆ gpencil_modifier_ui_poll()

static bool gpencil_modifier_ui_poll ( const bContext C,
PanelType UNUSEDpt 
)
static

Poll function so these modifier panels only show for grease pencil objects.

Definition at line 39 of file MOD_gpencil_ui_common.c.

References C, ED_object_active_context(), NULL, OB_GPENCIL, and Object::type.

Referenced by gpencil_modifier_panel_register(), and gpencil_modifier_subpanel_register().

◆ set_gpencil_modifier_expand_flag()

static void set_gpencil_modifier_expand_flag ( const bContext UNUSEDC,
Panel panel,
short  expand_flag 
)
static