Mask editing: remove use_parent property and use check if paren't id is set instead
[blender.git] / source / blender / editors / mask / mask_relationships.c
index eaec5ad9a8f961dd9137f021b24b732c7dbf3783..7c0a598ba9f8a8f9c5c76bf9433c071fc44ee287 100644 (file)
@@ -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;
                                }
                        }
                }
@@ -82,13 +82,13 @@ void MASK_OT_parent_clear(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name = "Clear Parent";
-       ot->description = "Clear the masks parenting";
+       ot->description = "Clear the mask's parenting";
        ot->idname = "MASK_OT_parent_clear";
 
        /* 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;
@@ -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);
                                }
                        }
@@ -160,14 +158,14 @@ void MASK_OT_parent_set(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name = "Make Parent";
-       ot->description = "Set the masks parenting";
+       ot->description = "Set the mask's parenting";
        ot->idname = "MASK_OT_parent_set";
 
        /* api callbacks */
        //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;