diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-09 20:57:02 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-09 20:57:02 +0400 |
commit | 9f30c7147cdb726e503ff37ba585f5e35b090d8c (patch) | |
tree | ef90a368102f7a5925d87eaaaa821f024eb107cd /source/blender/makesrna/intern/rna_constraint.c | |
parent | 9a32fd05db015c514aa9af42e380ac1032f1b345 (diff) |
Frame matching methods for follow track constraint
This is needed in cases when using blender camera with different
resolution than original footage. Behaves in the same way as
background picture framing.
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 8d718715e5b..770bdb68e38 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -2207,6 +2207,13 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; + static const EnumPropertyItem frame_method_items[] = { + {FOLLOWTRACK_FRAME_STRETCH, "STRETCH", 0, "Stretch", ""}, + {FOLLOWTRACK_FRAME_FIT, "FIT", 0, "Fit", ""}, + {FOLLOWTRACK_FRAME_CROP, "CROP", 0, "Crop", ""}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "FollowTrackConstraint", "Constraint"); RNA_def_struct_ui_text(srna, "Follow Track Constraint", "Lock motion to the target motion track"); RNA_def_struct_sdna_from(srna, "bFollowTrackConstraint", "data"); @@ -2261,6 +2268,13 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); RNA_def_property_pointer_funcs(prop, NULL, "rna_Constraint_followTrack_depthObject_set", NULL, "rna_Constraint_followTrack_depthObject_poll"); + + /* frame method */ + prop = RNA_def_property(srna, "frame_method", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_bitflag_sdna(prop, NULL, "frame_method"); + RNA_def_property_enum_items(prop, frame_method_items); + RNA_def_property_ui_text(prop, "Frame Method", "How the footage fits in the camera frame"); + RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); } static void rna_def_constraint_camera_solver(BlenderRNA *brna) |