Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_intern.h
| Context not available. | |||||
| float *r_x, float *r_y); | float *r_x, float *r_y); | ||||
| void gp_point_to_parent_space(bGPDspoint *pt, float diff_mat[4][4], bGPDspoint *r_pt); | void gp_point_to_parent_space(bGPDspoint *pt, float diff_mat[4][4], bGPDspoint *r_pt); | ||||
| /** | |||||
| void gp_apply_parent(bGPDlayer *gpl, bGPDstroke *gps); | * Change points position relative to parent object | ||||
| */ | |||||
| void gp_apply_parent_point(bGPDlayer *gpl, bGPDspoint *pt); | void gp_apply_parent(struct Object *obact, bGPdata *gpd, bGPDlayer *gpl, bGPDstroke *gps); | ||||
| /** | |||||
| * Change point position relative to parent object | |||||
| */ | |||||
| void gp_apply_parent_point(struct Object *obact, bGPdata *gpd, bGPDlayer *gpl, bGPDspoint *pt); | |||||
| bool gp_point_xy_to_3d(GP_SpaceConversion *gsc, struct Scene *scene, const float screen_co[2], float r_out[3]); | bool gp_point_xy_to_3d(GP_SpaceConversion *gsc, struct Scene *scene, const float screen_co[2], float r_out[3]); | ||||
| Context not available. | |||||
| int gp_add_poll(struct bContext *C); | int gp_add_poll(struct bContext *C); | ||||
| int gp_active_layer_poll(struct bContext *C); | int gp_active_layer_poll(struct bContext *C); | ||||
| int gp_active_brush_poll(struct bContext *C); | int gp_active_brush_poll(struct bContext *C); | ||||
| int gp_active_palette_poll(struct bContext *C); | |||||
| int gp_active_palettecolor_poll(struct bContext *C); | |||||
| int gp_brush_crt_presets_poll(bContext *C); | int gp_brush_crt_presets_poll(bContext *C); | ||||
| /* Copy/Paste Buffer --------------------------------- */ | /* Copy/Paste Buffer --------------------------------- */ | ||||
| Context not available. | |||||
| extern ListBase gp_strokes_copypastebuf; | extern ListBase gp_strokes_copypastebuf; | ||||
| /* Build a map for converting between old colornames and destination-color-refs */ | /* Build a map for converting between old colornames and destination-color-refs */ | ||||
| struct GHash *gp_copybuf_validate_colormap(bGPdata *gpd); | struct GHash *gp_copybuf_validate_colormap(struct bContext *C); | ||||
| /* Stroke Editing ------------------------------------ */ | /* Stroke Editing ------------------------------------ */ | ||||
| Context not available. | |||||
| /* stroke editing ----- */ | /* stroke editing ----- */ | ||||
| void GPENCIL_OT_editmode_toggle(struct wmOperatorType *ot); | void GPENCIL_OT_editmode_toggle(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_paintmode_toggle(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_sculptmode_toggle(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_weightmode_toggle(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_selection_opacity_toggle(struct wmOperatorType *ot); | void GPENCIL_OT_selection_opacity_toggle(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_multiedit_toggle(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_select(struct wmOperatorType *ot); | void GPENCIL_OT_select(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_select_all(struct wmOperatorType *ot); | void GPENCIL_OT_select_all(struct wmOperatorType *ot); | ||||
| Context not available. | |||||
| void GPENCIL_OT_select_less(struct wmOperatorType *ot); | void GPENCIL_OT_select_less(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_select_first(struct wmOperatorType *ot); | void GPENCIL_OT_select_first(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_select_last(struct wmOperatorType *ot); | void GPENCIL_OT_select_last(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_select_alternate(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_duplicate(struct wmOperatorType *ot); | void GPENCIL_OT_duplicate(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_delete(struct wmOperatorType *ot); | void GPENCIL_OT_delete(struct wmOperatorType *ot); | ||||
| Context not available. | |||||
| void GPENCIL_OT_active_frames_delete_all(struct wmOperatorType *ot); | void GPENCIL_OT_active_frames_delete_all(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_convert(struct wmOperatorType *ot); | void GPENCIL_OT_convert(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_convert_scene_to_object(struct wmOperatorType *ot); | |||||
| enum { | enum { | ||||
| GP_STROKE_JOIN = -1, | GP_STROKE_JOIN = -1, | ||||
| GP_STROKE_JOINCOPY = 1 | GP_STROKE_JOINCOPY = 1 | ||||
| }; | }; | ||||
| /* move strokes to new palette */ | |||||
| enum { | |||||
| GP_MOVE_PALETTE_SELECT = -1, | |||||
| GP_MOVE_PALETTE_ALL = 1, | |||||
| GP_MOVE_PALETTE_BEFORE = 2, | |||||
| GP_MOVE_PALETTE_AFTER = 3, | |||||
| GP_MOVE_PALETTE_CURRENT = 4 | |||||
| }; | |||||
| enum { | |||||
| GP_STROKE_BOX = -1, | |||||
| GP_STROKE_CIRCLE = 1 | |||||
| }; | |||||
| void GPENCIL_OT_stroke_arrange(struct wmOperatorType *ot); | void GPENCIL_OT_stroke_arrange(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_stroke_change_palette(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_stroke_change_color(struct wmOperatorType *ot); | void GPENCIL_OT_stroke_change_color(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_stroke_lock_color(struct wmOperatorType *ot); | void GPENCIL_OT_stroke_lock_color(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_stroke_apply_thickness(struct wmOperatorType *ot); | void GPENCIL_OT_stroke_apply_thickness(struct wmOperatorType *ot); | ||||
| Context not available. | |||||
| void GPENCIL_OT_stroke_join(struct wmOperatorType *ot); | void GPENCIL_OT_stroke_join(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_stroke_flip(struct wmOperatorType *ot); | void GPENCIL_OT_stroke_flip(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_stroke_subdivide(struct wmOperatorType *ot); | void GPENCIL_OT_stroke_subdivide(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_stroke_simplify(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_brush_add(struct wmOperatorType *ot); | void GPENCIL_OT_brush_add(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_brush_remove(struct wmOperatorType *ot); | void GPENCIL_OT_brush_remove(struct wmOperatorType *ot); | ||||
| Context not available. | |||||
| void GPENCIL_OT_brush_copy(struct wmOperatorType *ot); | void GPENCIL_OT_brush_copy(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_brush_select(struct wmOperatorType *ot); | void GPENCIL_OT_brush_select(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_palette_add(struct wmOperatorType *ot); | void GPENCIL_OT_sculpt_select(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_palette_remove(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palette_change(struct wmOperatorType *ot); | void GPENCIL_OT_palette_slot_add(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_palette_lock_layer(struct wmOperatorType *ot); | void GPENCIL_OT_palette_slot_remove(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_palettecolor_add(struct wmOperatorType *ot); | void GPENCIL_OT_convert_old_palettes(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_palettecolor_remove(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_isolate(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_hide(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_reveal(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_lock_all(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_unlock_all(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_move(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_select(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_palettecolor_copy(struct wmOperatorType *ot); | |||||
| /* undo stack ---------- */ | /* undo stack ---------- */ | ||||
| Context not available. | |||||
| void GPENCIL_OT_interpolate_sequence(struct wmOperatorType *ot); | void GPENCIL_OT_interpolate_sequence(struct wmOperatorType *ot); | ||||
| void GPENCIL_OT_interpolate_reverse(struct wmOperatorType *ot); | void GPENCIL_OT_interpolate_reverse(struct wmOperatorType *ot); | ||||
| /* primitves ---------- */ | |||||
| void GPENCIL_OT_primitive(struct wmOperatorType *ot); | |||||
| /* vertex groups ------------ */ | |||||
| void GPENCIL_OT_vertex_group_assign(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_vertex_group_remove_from(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_vertex_group_select(struct wmOperatorType *ot); | |||||
| void GPENCIL_OT_vertex_group_deselect(struct wmOperatorType *ot); | |||||
| /* ****************************************************** */ | /* ****************************************************** */ | ||||
| /* FILTERED ACTION DATA - TYPES ---> XXX DEPRECEATED OLD ANIM SYSTEM CODE! */ | /* FILTERED ACTION DATA - TYPES ---> XXX DEPRECEATED OLD ANIM SYSTEM CODE! */ | ||||
| Context not available. | |||||
| */ | */ | ||||
| #define GP_EDITABLE_STROKES_BEGIN(C, gpl, gps) \ | #define GP_EDITABLE_STROKES_BEGIN(C, gpl, gps) \ | ||||
| { \ | { \ | ||||
| Object *obact_ = CTX_data_active_object(C); \ | |||||
| bGPdata *gpd_ = CTX_data_gpencil_data(C); \ | |||||
| bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd_); \ | |||||
| CTX_DATA_BEGIN(C, bGPDlayer*, gpl, editable_gpencil_layers) \ | CTX_DATA_BEGIN(C, bGPDlayer*, gpl, editable_gpencil_layers) \ | ||||
| { \ | { \ | ||||
| if (gpl->actframe == NULL) \ | bGPDframe *init_gpf = gpl->actframe; \ | ||||
| continue; \ | if (is_multiedit) { \ | ||||
| /* calculate difference matrix if parent object */ \ | init_gpf = gpl->frames.first; \ | ||||
| float diff_mat[4][4]; \ | } \ | ||||
| ED_gpencil_parent_location(gpl, diff_mat); \ | for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) { \ | ||||
| /* loop over strokes */ \ | if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit))) { \ | ||||
| for (bGPDstroke *gps = gpl->actframe->strokes.first; gps; gps = gps->next) { \ | /* calculate difference matrix */ \ | ||||
| /* skip strokes that are invalid for current view */ \ | float diff_mat[4][4]; \ | ||||
| if (ED_gpencil_stroke_can_use(C, gps) == false) \ | ED_gpencil_parent_location(obact_, gpd_, gpl, diff_mat); \ | ||||
| continue; \ | /* loop over strokes */ \ | ||||
| /* check if the color is editable */ \ | for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { \ | ||||
| if (ED_gpencil_stroke_color_use(gpl, gps) == false) \ | /* skip strokes that are invalid for current view */ \ | ||||
| continue; \ | if (ED_gpencil_stroke_can_use(C, gps) == false) \ | ||||
| /* ... Do Stuff With Strokes ... */ | continue; \ | ||||
| /* check if the color is editable */ \ | |||||
| if (ED_gpencil_stroke_color_use(gpl, gps) == false) \ | |||||
| continue; \ | |||||
| /* ... Do Stuff With Strokes ... */ | |||||
| #define GP_EDITABLE_STROKES_END \ | #define GP_EDITABLE_STROKES_END \ | ||||
| } \ | |||||
| } \ | |||||
| if (!is_multiedit) { \ | |||||
| break; \ | |||||
| } \ | |||||
| } \ | } \ | ||||
| } \ | } \ | ||||
| CTX_DATA_END; \ | CTX_DATA_END; \ | ||||
| Context not available. | |||||