abbreviate mask-editing to mask-edit

This commit is contained in:
Campbell Barton 2012-06-04 17:30:54 +00:00
parent c517247fc6
commit d46a6dc59c
15 changed files with 54 additions and 54 deletions

View File

@ -45,13 +45,13 @@ class CLIP_HT_header(Header):
sub.menu("CLIP_MT_clip")
if clip:
if sc.mode == 'MASKEDITING':
if sc.mode == 'MASKEDIT':
sub.menu("CLIP_MT_mask")
else:
sub.menu("CLIP_MT_track")
sub.menu("CLIP_MT_reconstruction")
if sc.mode != 'MASKEDITING':
if sc.mode != 'MASKEDIT':
layout.prop(sc, "view", text="", expand=True)
if clip:
@ -59,7 +59,7 @@ class CLIP_HT_header(Header):
layout.prop(sc, "mode", text="")
layout.prop(sc, "pivot_point", text="", icon_only=True)
if sc.mode == 'MASKEDITING':
if sc.mode == 'MASKEDIT':
toolsettings = context.tool_settings
row = layout.row(align=True)
@ -85,7 +85,7 @@ class CLIP_HT_header(Header):
row = layout.row()
row.template_ID(sc, "clip", open='clip.open')
if sc.mode == 'MASKEDITING':
if sc.mode == 'MASKEDIT':
row = layout.row()
row.template_ID(sc, "mask", new="mask.new")
@ -127,7 +127,7 @@ class CLIP_PT_mask_view_panel:
sc = context.space_data
clip = sc.clip
return clip and sc.view == 'CLIP' and sc.mode == 'MASKEDITING'
return clip and sc.view == 'CLIP' and sc.mode == 'MASKEDIT'
class CLIP_PT_tracking_panel:
@ -428,7 +428,7 @@ class CLIP_PT_tools_grease_pencil(Panel):
if sc.mode == 'DISTORTION':
return sc.view == 'CLIP'
elif sc.mode == 'MASKEDITING':
elif sc.mode == 'MASKEDIT':
return True
return False
@ -619,7 +619,7 @@ class CLIP_PT_tracking_camera(Panel):
col.prop(clip.tracking.camera, "k3")
class CLIP_PT_mask_objects(Panel):
class CLIP_PT_mask_layers(Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
bl_label = "Mask Layers"
@ -628,7 +628,7 @@ class CLIP_PT_mask_objects(Panel):
def poll(cls, context):
sc = context.space_data
return sc.mask and sc.mode == 'MASKEDITING'
return sc.mask and sc.mode == 'MASKEDIT'
def draw(self, context):
layout = self.layout
@ -667,7 +667,7 @@ class CLIP_PT_active_mask_spline(Panel):
sc = context.space_data
mask = sc.mask
if mask and sc.mode == 'MASKEDITING':
if mask and sc.mode == 'MASKEDIT':
return mask.layers.active and mask.layers.active.splines.active
return False
@ -694,7 +694,7 @@ class CLIP_PT_active_mask_point(Panel):
sc = context.space_data
mask = sc.mask
if mask and sc.mode == 'MASKEDITING':
if mask and sc.mode == 'MASKEDIT':
return mask.layers.active and mask.layers.active.splines.active_point
return False
@ -776,7 +776,7 @@ class CLIP_PT_display(CLIP_PT_clip_view_panel, Panel):
row = col.row()
row.prop(clip, "display_aspect", text="")
if sc.mode == 'MASKEDITING':
if sc.mode == 'MASKEDIT':
col = layout.column()
col.prop(sc, "mask_draw_type", text="")
col.prop(sc, "show_mask_smooth")
@ -791,7 +791,7 @@ class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):
def poll(cls, context):
sc = context.space_data
return sc.mode != 'MASKEDITING'
return sc.mode != 'MASKEDIT'
def draw(self, context):
layout = self.layout
@ -1138,7 +1138,7 @@ class CLIP_MT_select(Menu):
layout = self.layout
sc = context.space_data
if sc.mode == 'MASKEDITING':
if sc.mode == 'MASKEDIT':
layout.operator("mask.select_border")
layout.operator("mask.select_circle")

View File

@ -49,8 +49,8 @@ int ED_space_clip_view_clip_poll(struct bContext *C);
int ED_space_clip_tracking_poll(struct bContext *C);
int ED_space_clip_tracking_size_poll(struct bContext *C);
int ED_space_clip_tracking_frame_poll(struct bContext *C);
int ED_space_clip_maskediting_poll(struct bContext *C);
int ED_space_clip_maskediting_mask_poll(bContext *C);
int ED_space_clip_maskedit_poll(struct bContext *C);
int ED_space_clip_maskedit_mask_poll(bContext *C);
void ED_space_clip_set(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip);
struct MovieClip *ED_space_clip(struct SpaceClip *sc);

View File

@ -624,7 +624,7 @@ void MASK_OT_add_vertex(wmOperatorType *ot)
/* api callbacks */
ot->exec = add_vertex_exec;
ot->invoke = add_vertex_invoke;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -690,7 +690,7 @@ void MASK_OT_add_feather_vertex(wmOperatorType *ot)
/* api callbacks */
ot->exec = add_feather_vertex_exec;
ot->invoke = add_feather_vertex_invoke;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@ -50,23 +50,23 @@
/********************** generic poll functions *********************/
int ED_maskediting_poll(bContext *C)
int ED_maskedit_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc) {
return ED_space_clip_maskediting_poll(C);
return ED_space_clip_maskedit_poll(C);
}
return FALSE;
}
int ED_maskediting_mask_poll(bContext *C)
int ED_maskedit_mask_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc) {
return ED_space_clip_maskediting_mask_poll(C);
return ED_space_clip_maskedit_mask_poll(C);
}
return FALSE;
@ -232,7 +232,7 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
wmKeyMapItem *kmi;
keymap = WM_keymap_find(keyconf, "Mask Editing", 0, 0);
keymap->poll = ED_maskediting_poll;
keymap->poll = ED_maskedit_poll;
WM_keymap_add_item(keymap, "MASK_OT_new", NKEY, KM_PRESS, KM_ALT, 0);

View File

@ -92,8 +92,8 @@ void ED_mask_select_toggle_all(struct Mask *mask, int action);
void ED_mask_select_flush_all(struct Mask *mask);
/* mask_editor.c */
int ED_maskediting_poll(struct bContext *C);
int ED_maskediting_mask_poll(struct bContext *C);
int ED_maskedit_poll(struct bContext *C);
int ED_maskedit_mask_poll(struct bContext *C);
void ED_mask_size(struct bContext *C, int *width, int *height);
void ED_mask_aspect(struct bContext *C, float *aspx, float *aspy);

View File

@ -313,7 +313,7 @@ void MASK_OT_layer_new(wmOperatorType *ot)
/* api callbacks */
ot->exec = masklay_new_exec;
ot->poll = ED_maskediting_poll;
ot->poll = ED_maskedit_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -347,7 +347,7 @@ void MASK_OT_layer_remove(wmOperatorType *ot)
/* api callbacks */
ot->exec = masklay_remove_exec;
ot->poll = ED_maskediting_poll;
ot->poll = ED_maskedit_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -754,7 +754,7 @@ void MASK_OT_slide_point(wmOperatorType *ot)
/* api callbacks */
ot->invoke = slide_point_invoke;
ot->modal = slide_point_modal;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -797,7 +797,7 @@ void MASK_OT_cyclic_toggle(wmOperatorType *ot)
/* api callbacks */
ot->exec = cyclic_toggle_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -941,7 +941,7 @@ void MASK_OT_delete(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_operator_confirm;
ot->exec = delete_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -992,7 +992,7 @@ void MASK_OT_switch_direction(wmOperatorType *ot)
/* api callbacks */
ot->exec = mask_switch_direction_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -1051,7 +1051,7 @@ void MASK_OT_handle_type_set(wmOperatorType *ot)
/* api callbacks */
ot->invoke = WM_menu_invoke;
ot->exec = set_handle_type_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -1098,7 +1098,7 @@ void MASK_OT_hide_view_clear(wmOperatorType *ot)
/* api callbacks */
ot->exec = mask_hide_view_clear_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -1159,7 +1159,7 @@ void MASK_OT_hide_view_set(wmOperatorType *ot)
/* api callbacks */
ot->exec = mask_hide_view_set_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@ -88,7 +88,7 @@ void MASK_OT_parent_clear(wmOperatorType *ot)
/* api callbacks */
ot->exec = mask_parent_clear_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -167,7 +167,7 @@ void MASK_OT_parent_set(wmOperatorType *ot)
//ot->invoke = mask_parent_set_invoke;
ot->exec = mask_parent_set_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@ -214,7 +214,7 @@ void MASK_OT_select_all(wmOperatorType *ot)
/* api callbacks */
ot->exec = select_all_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -362,7 +362,7 @@ void MASK_OT_select(wmOperatorType *ot)
/* api callbacks */
ot->exec = select_exec;
ot->invoke = select_invoke;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_UNDO;
@ -454,7 +454,7 @@ void MASK_OT_select_border(wmOperatorType *ot)
ot->invoke = WM_border_select_invoke;
ot->exec = border_select_exec;
ot->modal = WM_border_select_modal;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_UNDO;
@ -550,7 +550,7 @@ void MASK_OT_select_lasso(wmOperatorType *ot)
ot->invoke = WM_gesture_lasso_invoke;
ot->modal = WM_gesture_lasso_modal;
ot->exec = clip_lasso_select_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
ot->cancel = WM_gesture_lasso_cancel;
/* flags */
@ -651,7 +651,7 @@ void MASK_OT_select_circle(wmOperatorType *ot)
ot->invoke = WM_gesture_circle_invoke;
ot->modal = WM_gesture_circle_modal;
ot->exec = circle_select_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -708,7 +708,7 @@ void MASK_OT_select_linked_pick(wmOperatorType *ot)
/* api callbacks */
ot->invoke = mask_select_linked_pick_invoke;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -759,7 +759,7 @@ void MASK_OT_select_linked(wmOperatorType *ot)
/* api callbacks */
ot->exec = mask_select_linked_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@ -85,7 +85,7 @@ void MASK_OT_shape_key_insert(wmOperatorType *ot)
/* api callbacks */
ot->exec = mask_shape_key_insert_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
@ -134,7 +134,7 @@ void MASK_OT_shape_key_clear(wmOperatorType *ot)
/* api callbacks */
ot->exec = mask_shape_key_clear_exec;
ot->poll = ED_maskediting_mask_poll;
ot->poll = ED_maskedit_mask_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;

View File

@ -1951,7 +1951,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc) {
if ((sc->mode == SC_MODE_MASKEDITING) && sc->mask) {
if ((sc->mode == SC_MODE_MASKEDIT) && sc->mask) {
MaskLayer *masklay = BKE_mask_layer_active(sc->mask);
mask_to_keylist(&ads, masklay, &keys);
}

View File

@ -198,7 +198,7 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc
clip_draw_curfra_label(sc, x, 8.0f);
/* movie clip animation */
if ((sc->mode == SC_MODE_MASKEDITING) && sc->mask) {
if ((sc->mode == SC_MODE_MASKEDIT) && sc->mask) {
MaskLayer *masklay = BKE_mask_layer_active(sc->mask);
if (masklay) {
MaskLayerShape *masklay_shape;

View File

@ -129,7 +129,7 @@ int ED_space_clip_tracking_frame_poll(bContext *C)
return FALSE;
}
int ED_space_clip_maskediting_poll(bContext *C)
int ED_space_clip_maskedit_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
@ -140,9 +140,9 @@ int ED_space_clip_maskediting_poll(bContext *C)
return FALSE;
}
int ED_space_clip_maskediting_mask_poll(bContext *C)
int ED_space_clip_maskedit_mask_poll(bContext *C)
{
if (ED_space_clip_maskediting_poll(C)) {
if (ED_space_clip_maskedit_poll(C)) {
MovieClip *clip = CTX_data_edit_movieclip(C);
if (clip) {
@ -681,7 +681,7 @@ int ED_space_clip_show_trackedit(SpaceClip *sc)
int ED_space_clip_show_maskedit(SpaceClip *sc)
{
if (sc) {
return sc->mode == SC_MODE_MASKEDITING;
return sc->mode == SC_MODE_MASKEDIT;
}
return FALSE;

View File

@ -1097,7 +1097,7 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
/* Grease Pencil */
clip_draw_grease_pencil((bContext *)C, 1);
if(sc->mode == SC_MODE_MASKEDITING) {
if(sc->mode == SC_MODE_MASKEDIT) {
int x, y;
int width, height;
float zoomx, zoomy, aspx, aspy;
@ -1323,7 +1323,7 @@ static void clip_header_area_listener(ARegion *ar, wmNotifier *wmn)
/* for proportional editmode only */
case ND_TOOLSETTINGS:
/* TODO - should do this when in mask mode only but no datas available */
// if(sc->mode == SC_MODE_MASKEDITING)
// if(sc->mode == SC_MODE_MASKEDIT)
{
ED_region_tag_redraw(ar);
}

View File

@ -1045,7 +1045,7 @@ typedef enum eSpaceClip_Mode {
SC_MODE_TRACKING = 0,
SC_MODE_RECONSTRUCTION,
SC_MODE_DISTORTION,
SC_MODE_MASKEDITING,
SC_MODE_MASKEDIT,
} eSpaceClip_Mode;
/* SpaceClip->view */

View File

@ -2983,7 +2983,7 @@ static void rna_def_space_clip(BlenderRNA *brna)
{SC_MODE_RECONSTRUCTION, "RECONSTRUCTION", ICON_SNAP_FACE, "Reconstruction",
"Show tracking/reconstruction tools"},
{SC_MODE_DISTORTION, "DISTORTION", ICON_GRID, "Distortion", "Show distortion tools"},
{SC_MODE_MASKEDITING, "MASKEDITING", ICON_MOD_MASK, "Mask editing", "Show mask editing tools"},
{SC_MODE_MASKEDIT, "MASKEDIT", ICON_MOD_MASK, "Mask editing", "Show mask editing tools"},
{0, NULL, 0, NULL, NULL}
};