Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-08 11:54:46 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-08 11:54:46 +0400
commitfc07b1fce3a6f1d6962840859c763bd192fbdcd7 (patch)
tree852e55e25e36e1d46584ebd8b57531193eb24bfa /source/blender
parentb0c868c3b38663817678ae198ad84e7369d7957c (diff)
Mask editing: remove use_parent property and use check if paren't id is set instead
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/mask.c3
-rw-r--r--source/blender/editors/mask/mask_draw.c2
-rw-r--r--source/blender/editors/mask/mask_relationships.c4
-rw-r--r--source/blender/makesdna/DNA_mask_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_mask.c7
5 files changed, 5 insertions, 16 deletions
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");