Blender  V3.3
FX_ui_common.c File Reference
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "MEM_guardedalloc.h"
#include "BKE_context.h"
#include "BKE_object.h"
#include "BKE_screen.h"
#include "BKE_shader_fx.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_shader_fx_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 "FX_ui_common.h"

Go to the source code of this file.

Functions

Panel Drag and Drop, Expansion Saving
static void shaderfx_reorder (bContext *C, Panel *panel, int new_index)
 
static short get_shaderfx_expand_flag (const bContext *UNUSED(C), Panel *panel)
 
static void set_shaderfx_expand_flag (const bContext *UNUSED(C), Panel *panel, short expand_flag)
 
ShaderFx Registration Helpers
static bool shaderfx_ui_poll (const bContext *C, PanelType *UNUSED(pt))
 
PanelTypeshaderfx_panel_register (ARegionType *region_type, ShaderFxType type, PanelDrawFn draw)
 
PanelTypeshaderfx_subpanel_register (ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
 

ShaderFx Panel Layouts

#define ERROR_LIBDATA_MESSAGE   TIP_("External library data")
 
void shaderfx_panel_end (uiLayout *layout, PointerRNA *ptr)
 
PointerRNAshaderfx_panel_get_property_pointers (Panel *panel, PointerRNA *r_ob_ptr)
 
static void gpencil_shaderfx_ops_extra_draw (bContext *C, uiLayout *layout, void *fx_v)
 
static void shaderfx_panel_header (const bContext *UNUSED(C), Panel *panel)
 

Macro Definition Documentation

◆ ERROR_LIBDATA_MESSAGE

#define ERROR_LIBDATA_MESSAGE   TIP_("External library data")

Definition at line 107 of file FX_ui_common.c.

Function Documentation

◆ get_shaderfx_expand_flag()

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

Get the expand flag from the active effect to use for the panel.

Definition at line 61 of file FX_ui_common.c.

References PointerRNA::data, ShaderFxData::ui_expand_flag, and UI_panel_custom_data_get().

Referenced by shaderfx_panel_register().

◆ gpencil_shaderfx_ops_extra_draw()

static void gpencil_shaderfx_ops_extra_draw ( bContext C,
uiLayout layout,
void fx_v 
)
static

◆ set_shaderfx_expand_flag()

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

Save the expand flag for the panel and sub-panels to the effect.

Definition at line 71 of file FX_ui_common.c.

References PointerRNA::data, ShaderFxData::ui_expand_flag, and UI_panel_custom_data_get().

Referenced by shaderfx_panel_register().

◆ shaderfx_panel_end()

void shaderfx_panel_end ( struct uiLayout layout,
PointerRNA ptr 
)

Draw shaderfx error message.

Definition at line 84 of file FX_ui_common.c.

References PointerRNA::data, ShaderFxData::error, ptr, TIP_, uiItemL(), and uiLayoutRow().

Referenced by panel_draw().

◆ shaderfx_panel_get_property_pointers()

PointerRNA* shaderfx_panel_get_property_pointers ( struct Panel panel,
struct PointerRNA r_ob_ptr 
)

◆ shaderfx_panel_header()

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

◆ shaderfx_panel_register()

PanelType* shaderfx_panel_register ( ARegionType region_type,
ShaderFxType  type,
PanelDrawFn  draw 
)

◆ shaderfx_reorder()

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

◆ shaderfx_subpanel_register()

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

◆ shaderfx_ui_poll()

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