From fc07b1fce3a6f1d6962840859c763bd192fbdcd7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 8 Jun 2012 07:54:46 +0000 Subject: Mask editing: remove use_parent property and use check if paren't id is set instead --- source/blender/blenkernel/intern/mask.c | 3 --- source/blender/editors/mask/mask_draw.c | 2 +- source/blender/editors/mask/mask_relationships.c | 4 +--- source/blender/makesdna/DNA_mask_types.h | 5 +++-- source/blender/makesrna/intern/rna_mask.c | 7 ------- 5 files changed, 5 insertions(+), 16 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index b942b633aef..66f10aca652 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -1143,9 +1143,6 @@ static int BKE_mask_evaluate_parent(MaskParent *parent, float ctime, float r_co[ if (!parent) return FALSE; - if ((parent->flag & MASK_PARENT_ACTIVE) == 0) - return FALSE; - if (parent->id_type == ID_MC) { if (parent->id) { MovieClip *clip = (MovieClip *) parent->id; diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index a26ae5ea3c0..e1efb6d841b 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -100,7 +100,7 @@ static void draw_spline_parents(MaskLayer *UNUSED(masklay), MaskSpline *spline) MaskSplinePoint *point = &points_array[i]; BezTriple *bezt = &point->bezt; - if (point->parent.flag & MASK_PARENT_ACTIVE) { + if (point->parent.id) { glVertex2f(bezt->vec[1][0], bezt->vec[1][1]); diff --git a/source/blender/editors/mask/mask_relationships.c b/source/blender/editors/mask/mask_relationships.c index 0e893ee2f9f..7c0a598ba9f 100644 --- a/source/blender/editors/mask/mask_relationships.c +++ b/source/blender/editors/mask/mask_relationships.c @@ -66,7 +66,7 @@ static int mask_parent_clear_exec(bContext *C, wmOperator *UNUSED(op)) MaskSplinePoint *point = &spline->points[i]; if (MASKPOINT_ISSEL_ANY(point)) { - point->parent.flag &= ~MASK_PARENT_ACTIVE; + point->parent.id = NULL; } } } @@ -141,8 +141,6 @@ static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op)) strcpy(point->parent.parent, tracking->name); strcpy(point->parent.sub_parent, track->name); - point->parent.flag |= MASK_PARENT_ACTIVE; - copy_v2_v2(point->parent.parent_orig, parmask_pos); } } diff --git a/source/blender/makesdna/DNA_mask_types.h b/source/blender/makesdna/DNA_mask_types.h index 626242c1a8d..e4c27a57d85 100644 --- a/source/blender/makesdna/DNA_mask_types.h +++ b/source/blender/makesdna/DNA_mask_types.h @@ -51,7 +51,8 @@ typedef struct Mask { } Mask; typedef struct MaskParent { - int flag; /* parenting flags */ + // int flag; /* parenting flags */ /* not used */ + int pad; int id_type; /* type of parenting */ ID *id; /* ID block of entity to which mask/spline is parented to * in case of parenting to movie tracking data set to MovieClip datablock */ @@ -130,7 +131,7 @@ typedef struct MaskLayer { } MaskLayer; /* MaskParent->flag */ -#define MASK_PARENT_ACTIVE (1 << 0) +/* #define MASK_PARENT_ACTIVE (1 << 0) */ /* UNUSED */ /* MaskSpline->flag */ /* reserve (1 << 0) for SELECT */ diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index f25aba6193b..42c893eca16 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -349,13 +349,6 @@ static void rna_def_maskParent(BlenderRNA *brna) srna = RNA_def_struct(brna, "MaskParent", NULL); RNA_def_struct_ui_text(srna, "Mask Parent", "Parenting settings for masking element"); - /* use_parent */ - prop = RNA_def_property(srna, "use_parent", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", MASK_PARENT_ACTIVE); - RNA_def_property_ui_text(prop, "Use Parent", "Use parenting for this layer"); - RNA_def_property_update(prop, 0, "rna_Mask_update_data"); - /* Target Properties - ID-block to Drive */ prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ID"); -- cgit v1.2.3