|
Blender V5.0
|
#include "BLI_listbase.h"#include "BLI_string_utf8.h"#include "MEM_guardedalloc.h"#include "BKE_context.hh"#include "BKE_library.hh"#include "BKE_screen.hh"#include "BKE_shader_fx.h"#include "DNA_object_types.h"#include "DNA_screen_types.h"#include "DNA_shader_fx_types.h"#include "ED_object.hh"#include "BLT_translation.hh"#include "UI_interface.hh"#include "UI_interface_layout.hh"#include "UI_resources.hh"#include "RNA_access.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"#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 *, Panel *panel) |
| static void | set_shaderfx_expand_flag (const bContext *, Panel *panel, short expand_flag) |
ShaderFx Registration Helpers | |
| static bool | shaderfx_ui_poll (const bContext *C, PanelType *) |
| PanelType * | shaderfx_panel_register (ARegionType *region_type, ShaderFxType type, PanelDrawFn draw) |
| PanelType * | shaderfx_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 N_("External library data") |
| void | shaderfx_panel_end (uiLayout *layout, PointerRNA *ptr) |
| PointerRNA * | shaderfx_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 *, Panel *panel) |
| #define ERROR_LIBDATA_MESSAGE N_("External library data") |
Definition at line 109 of file FX_ui_common.cc.
Get the expand flag from the active effect to use for the panel.
Definition at line 63 of file FX_ui_common.cc.
References PointerRNA::data, ShaderFxData::ui_expand_flag, and UI_panel_custom_data_get().
Referenced by shaderfx_panel_register().
Definition at line 111 of file FX_ui_common.cc.
References BLI_listbase_count(), BLT_I18NCONTEXT_OPERATOR_DEFAULT, C, uiLayout::column(), blender::ed::object::context_active_object(), uiLayout::context_ptr_set(), CTX_IFACE_, uiLayout::enabled_set(), Object::id, IFACE_, blender::wm::InvokeDefault, ShaderFxData::next, uiLayout::op(), uiLayout::operator_context_set(), ShaderFxData::prev, ptr, RNA_int_set(), RNA_pointer_create_discrete(), uiLayout::separator(), Object::shader_fx, UI_ITEM_NONE, and uiLayout::ui_units_x_set().
Referenced by shaderfx_panel_header().
Save the expand flag for the panel and sub-panels to the effect.
Definition at line 73 of file FX_ui_common.cc.
References PointerRNA::data, ShaderFxData::ui_expand_flag, and UI_panel_custom_data_get().
Referenced by shaderfx_panel_register().
| void shaderfx_panel_end | ( | struct uiLayout * | layout, |
| PointerRNA * | ptr ) |
Draw shaderfx error message.
Definition at line 86 of file FX_ui_common.cc.
References ShaderFxData::error, uiLayout::label(), ptr, uiLayout::row(), and RPT_.
Referenced by panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), and panel_draw().
| PointerRNA * shaderfx_panel_get_property_pointers | ( | struct Panel * | panel, |
| struct PointerRNA * | r_ob_ptr ) |
Gets RNA pointers for the active object and the panel's shaderfx data.
Definition at line 95 of file FX_ui_common.cc.
References BLI_assert, ptr, RNA_pointer_create_discrete(), RNA_struct_is_a(), UI_panel_context_pointer_set(), and UI_panel_custom_data_get().
Referenced by blur_panel_draw(), blur_panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), panel_draw(), shaderfx_panel_header(), wave_header_draw(), and wave_panel_draw().
Definition at line 156 of file FX_ui_common.cc.
References uiLayout::active_set(), BKE_shaderfx_get_info(), uiLayout::block(), uiLayout::emboss_set(), ERROR_LIBDATA_MESSAGE, eShaderFxTypeFlag_SupportsEditmode, ShaderFxTypeInfo::flags, gpencil_shaderfx_ops_extra_draw(), ID_IS_EDITABLE, ShaderFxTypeInfo::is_disabled, uiLayout::label(), Panel::layout, uiLayout::menu_fn(), blender::ui::None, uiLayout::op(), uiLayout::prop(), ptr, uiLayout::red_alert_set(), RNA_struct_ui_icon(), uiLayout::row(), uiLayout::separator(), shaderfx_panel_get_property_pointers(), Panel::sizex, ShaderFxData::type, UI_block_lock_set(), UI_ITEM_NONE, and UI_UNIT_X.
Referenced by shaderfx_panel_register().
| PanelType * shaderfx_panel_register | ( | ARegionType * | region_type, |
| ShaderFxType | type, | ||
| PanelDrawFn | draw ) |
Create a panel in the context's region
Definition at line 215 of file FX_ui_common.cc.
References BKE_shaderfxType_panel_id(), BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::context, PanelType::draw, PanelType::draw_header, PanelType::flag, PanelType::get_list_data_expand_flag, get_shaderfx_expand_flag(), PanelType::idname, PanelType::label, MEM_callocN(), PANEL_TYPE_HEADER_EXPAND, PANEL_TYPE_INSTANCED, ARegionType::paneltypes, PanelType::poll, PanelType::reorder, PanelType::set_list_data_expand_flag, set_shaderfx_expand_flag(), shaderfx_panel_header(), shaderfx_reorder(), shaderfx_ui_poll(), STRNCPY_UTF8, and PanelType::translation_context.
Referenced by panel_register(), panel_register(), panel_register(), panel_register(), panel_register(), panel_register(), panel_register(), panel_register(), and panel_register().
Move an effect to the index it's moved to after a drag and drop.
Definition at line 46 of file FX_ui_common.cc.
References C, PointerRNA::data, blender::wm::InvokeDefault, ShaderFxData::name, ot, RNA_int_set(), RNA_string_set(), UI_panel_custom_data_get(), WM_operator_name_call_ptr(), WM_operator_properties_create_ptr(), WM_operator_properties_free(), and WM_operatortype_find().
Referenced by shaderfx_panel_register().
| PanelType * shaderfx_subpanel_register | ( | struct ARegionType * | region_type, |
| const char * | name, | ||
| const char * | label, | ||
| PanelDrawFn | draw_header, | ||
| PanelDrawFn | draw, | ||
| struct PanelType * | parent ) |
Add a child panel to the parent.
Definition at line 240 of file FX_ui_common.cc.
References BLI_addtail(), BLI_assert, BLI_genericNodeN(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, PanelType::children, PanelType::context, PanelType::draw, PanelType::draw_header, PanelType::flag, PanelType::idname, PanelType::label, MEM_callocN(), name, PANEL_TYPE_DEFAULT_CLOSED, ARegionType::paneltypes, PanelType::parent, PanelType::parent_id, PanelType::poll, shaderfx_ui_poll(), SNPRINTF_UTF8, STRNCPY_UTF8, and PanelType::translation_context.
Referenced by panel_register(), and panel_register().
Definition at line 208 of file FX_ui_common.cc.
References C, blender::ed::object::context_active_object(), OB_GREASE_PENCIL, and Object::type.
Referenced by shaderfx_panel_register(), and shaderfx_subpanel_register().