Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
| Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | |||||
| static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, void *userData) | static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, void *userData) | ||||
| { | { | ||||
| ColorGpencilModifierData *mmd = (ColorGpencilModifierData *)md; | ColorGpencilModifierData *mmd = (ColorGpencilModifierData *)md; | ||||
| walk(userData, ob, (ID **)&mmd->material, IDWALK_CB_USER); | walk(userData, ob, (ID **)&mmd->material, IDWALK_CB_USER); | ||||
| } | } | ||||
| static void panel_draw(const bContext *C, Panel *panel) | static void panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| PointerRNA ptr; | PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL); | ||||
| gpencil_modifier_panel_get_property_pointers(C, panel, NULL, &ptr); | |||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiItemR(layout, &ptr, "modify_color", 0, NULL, ICON_NONE); | uiItemR(layout, ptr, "modify_color", 0, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | uiItemR(layout, ptr, "hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | uiItemR(layout, ptr, "saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "value", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | uiItemR(layout, ptr, "value", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | ||||
| gpencil_modifier_panel_end(layout, &ptr); | gpencil_modifier_panel_end(layout, ptr); | ||||
| } | } | ||||
| static void mask_panel_draw(const bContext *C, Panel *panel) | static void mask_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| gpencil_modifier_masking_panel_draw(C, panel, true, false); | gpencil_modifier_masking_panel_draw(panel, true, false); | ||||
| } | } | ||||
| static void panelRegister(ARegionType *region_type) | static void panelRegister(ARegionType *region_type) | ||||
| { | { | ||||
| PanelType *panel_type = gpencil_modifier_panel_register( | PanelType *panel_type = gpencil_modifier_panel_register( | ||||
| region_type, eGpencilModifierType_Color, panel_draw); | region_type, eGpencilModifierType_Color, panel_draw); | ||||
| PanelType *mask_panel_type = gpencil_modifier_subpanel_register( | PanelType *mask_panel_type = gpencil_modifier_subpanel_register( | ||||
| region_type, "mask", "Influence", NULL, mask_panel_draw, panel_type); | region_type, "mask", "Influence", NULL, mask_panel_draw, panel_type); | ||||
| Show All 32 Lines | |||||