Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
| Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| MirrorGpencilModifierData *mmd = (MirrorGpencilModifierData *)md; | MirrorGpencilModifierData *mmd = (MirrorGpencilModifierData *)md; | ||||
| walk(userData, ob, (ID **)&mmd->material, IDWALK_CB_USER); | walk(userData, ob, (ID **)&mmd->material, IDWALK_CB_USER); | ||||
| foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); | foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); | ||||
| } | } | ||||
| static void panel_draw(const bContext *C, Panel *panel) | static void panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| uiLayout *row; | uiLayout *row; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| int toggles_flag = UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE; | int toggles_flag = UI_ITEM_R_TOGGLE | UI_ITEM_R_FORCE_BLANK_DECORATE; | ||||
| 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); | ||||
| row = uiLayoutRowWithHeading(layout, true, IFACE_("Axis")); | row = uiLayoutRowWithHeading(layout, true, IFACE_("Axis")); | ||||
| uiItemR(row, &ptr, "x_axis", toggles_flag, NULL, ICON_NONE); | uiItemR(row, ptr, "x_axis", toggles_flag, NULL, ICON_NONE); | ||||
| uiItemR(row, &ptr, "y_axis", toggles_flag, NULL, ICON_NONE); | uiItemR(row, ptr, "y_axis", toggles_flag, NULL, ICON_NONE); | ||||
| uiItemR(row, &ptr, "z_axis", toggles_flag, NULL, ICON_NONE); | uiItemR(row, ptr, "z_axis", toggles_flag, NULL, ICON_NONE); | ||||
| uiItemR(layout, &ptr, "object", 0, NULL, ICON_NONE); | uiItemR(layout, ptr, "object", 0, 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_Mirror, panel_draw); | region_type, eGpencilModifierType_Mirror, panel_draw); | ||||
| gpencil_modifier_subpanel_register( | 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 26 Lines | |||||