diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-14 10:41:42 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-11-14 10:41:42 +0400 |
commit | f4745763514a51bf841fc2c344d62242bdc297da (patch) | |
tree | c6b6d462a55bfe33381f1a6c340d2e613b00f7cb /source/blender/makesrna/intern/rna_constraint.c | |
parent | 0f82384fd02c0809f55b8b26e4b4ab291b821ff7 (diff) |
Camera tracking: interface cleanup and small buttons renaming
- Move tracking-related constraints to own section in list
Currently there are only two constraints, so can look a bit odd,
but it'll be other constraints like "Object Solver" and so.
- Move motion-tracking parameters from 3D viewport Display panel
to it's own panel.
- Get rid of "Bundle" in 3d viewport. It's quite obvious that it's
a 3D representation of tracks is used in 3D viewport and it shouldn't
be so confusing for artists now.
- Also get rid of "Bundle" in Follow Track constraint.
Old files can change a bit because of changes in DNA.
- Also get rid of "Bundles" in operator which creates vertices cloud
from 3D position of tracks.
- Rename "Principal Point" to "Optical Center" in the interface.
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index e1e4f3929b2..0cd36eb3755 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -43,6 +43,9 @@ #include "WM_types.h" EnumPropertyItem constraint_type_items[] ={ + {0, "", 0, "Motion Tracking", ""}, + {CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""}, + {CONSTRAINT_TYPE_FOLLOWTRACK, "FOLLOW_TRACK", ICON_CONSTRAINT_DATA, "Follow Track", ""}, {0, "", 0, "Transform", ""}, {CONSTRAINT_TYPE_LOCLIKE, "COPY_LOCATION", ICON_CONSTRAINT_DATA, "Copy Location", ""}, {CONSTRAINT_TYPE_ROTLIKE, "COPY_ROTATION", ICON_CONSTRAINT_DATA, "Copy Rotation", ""}, @@ -64,11 +67,9 @@ EnumPropertyItem constraint_type_items[] ={ {CONSTRAINT_TYPE_TRACKTO, "TRACK_TO", ICON_CONSTRAINT_DATA, "Track To", "Legacy tracking constraint prone to twisting artifacts"}, {0, "", 0, "Relationship", ""}, {CONSTRAINT_TYPE_ACTION, "ACTION", ICON_CONSTRAINT_DATA, "Action", ""}, - {CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""}, {CONSTRAINT_TYPE_CHILDOF, "CHILD_OF", ICON_CONSTRAINT_DATA, "Child Of", ""}, {CONSTRAINT_TYPE_MINMAX, "FLOOR", ICON_CONSTRAINT_DATA, "Floor", ""}, {CONSTRAINT_TYPE_FOLLOWPATH, "FOLLOW_PATH", ICON_CONSTRAINT_DATA, "Follow Path", ""}, - {CONSTRAINT_TYPE_FOLLOWTRACK, "FOLLOW_TRACK", ICON_CONSTRAINT_DATA, "Follow Track", ""}, {CONSTRAINT_TYPE_PIVOT, "PIVOT", ICON_CONSTRAINT_DATA, "Pivot", ""}, {CONSTRAINT_TYPE_RIGIDBODYJOINT, "RIGID_BODY_JOINT", ICON_CONSTRAINT_DATA, "Rigid Body Joint", ""}, {CONSTRAINT_TYPE_PYTHON, "SCRIPT", ICON_CONSTRAINT_DATA, "Script", ""}, @@ -2037,11 +2038,6 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem reference_items[] = { - {FOLLOWTRACK_TRACK, "TRACK", 0, "Track", "Use 2D track position as reference"}, - {FOLLOWTRACK_BUNDLE, "BUNDLE", 0, "Bundle", "Use 3D reconstructed bundle position as reference"}, - {0, NULL, 0, NULL, NULL}}; - srna= RNA_def_struct(brna, "FollowTrackConstraint", "Constraint"); RNA_def_struct_ui_text(srna, "Follow Track Constraint", "Locks motion to the target motion track"); RNA_def_struct_sdna_from(srna, "bFollowTrackConstraint", "data"); @@ -2059,18 +2055,17 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Track", "Movie tracking track to follow"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); - /* reference */ - prop= RNA_def_property(srna, "reference", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "reference"); - RNA_def_property_enum_items(prop, reference_items); - RNA_def_property_ui_text(prop, "Reference", "Reference source to follow"); - RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); - /* use default clip */ prop= RNA_def_property(srna, "use_active_clip", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", FOLLOWTRACK_ACTIVECLIP); RNA_def_property_ui_text(prop, "Active Clip", "Use active clip defined in scene"); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); + + /* use 3d position */ + prop= RNA_def_property(srna, "use_3d_position", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", FOLLOWTRACK_USE_3D_POSITION); + RNA_def_property_ui_text(prop, "3D Position", "Use 3D position of track to parent to"); + RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); } static void rna_def_constraint_camera_solver(BlenderRNA *brna) |