Changeset View
Changeset View
Standalone View
Standalone View
source/blender/shader_fx/intern/FX_shader_blur.c
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | static void initData(ShaderFxData *fx) | ||||
| gpfx->rotation = 0.0f; | gpfx->rotation = 0.0f; | ||||
| } | } | ||||
| static void copyData(const ShaderFxData *md, ShaderFxData *target) | static void copyData(const ShaderFxData *md, ShaderFxData *target) | ||||
| { | { | ||||
| BKE_shaderfx_copydata_generic(md, target); | BKE_shaderfx_copydata_generic(md, target); | ||||
| } | } | ||||
| static void panel_draw(const bContext *C, Panel *panel) | static void panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| uiLayout *col; | uiLayout *col; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| PointerRNA ptr; | PointerRNA *ptr = shaderfx_panel_get_property_pointers(panel, NULL); | ||||
| shaderfx_panel_get_property_pointers(C, panel, NULL, &ptr); | |||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiItemR(layout, &ptr, "samples", 0, NULL, ICON_NONE); | uiItemR(layout, ptr, "samples", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "use_dof_mode", 0, IFACE_("Use Depth of Field"), ICON_NONE); | uiItemR(layout, ptr, "use_dof_mode", 0, IFACE_("Use Depth of Field"), ICON_NONE); | ||||
| col = uiLayoutColumn(layout, false); | col = uiLayoutColumn(layout, false); | ||||
| uiLayoutSetActive(col, !RNA_boolean_get(&ptr, "use_dof_mode")); | uiLayoutSetActive(col, !RNA_boolean_get(ptr, "use_dof_mode")); | ||||
| uiItemR(col, &ptr, "size", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "size", 0, NULL, ICON_NONE); | ||||
| uiItemR(col, &ptr, "rotation", 0, NULL, ICON_NONE); | uiItemR(col, ptr, "rotation", 0, NULL, ICON_NONE); | ||||
| shaderfx_panel_end(layout, &ptr); | shaderfx_panel_end(layout, ptr); | ||||
| } | } | ||||
| static void panelRegister(ARegionType *region_type) | static void panelRegister(ARegionType *region_type) | ||||
| { | { | ||||
| shaderfx_panel_register(region_type, eShaderFxType_Blur, panel_draw); | shaderfx_panel_register(region_type, eShaderFxType_Blur, panel_draw); | ||||
| } | } | ||||
| ShaderFxTypeInfo shaderfx_Type_Blur = { | ShaderFxTypeInfo shaderfx_Type_Blur = { | ||||
| Show All 17 Lines | |||||