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 | |
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')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 11 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 23 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 4 |
5 files changed, 21 insertions, 32 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index f904d6e66df..adc3f17f187 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3939,7 +3939,6 @@ static void followtrack_new_data (void *cdata) data->clip= NULL; data->flag|= FOLLOWTRACK_ACTIVECLIP; - data->reference= FOLLOWTRACK_TRACK; } static void followtrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata) @@ -3967,7 +3966,7 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase if(!track) return; - if(data->reference==FOLLOWTRACK_BUNDLE) { + if(data->flag&FOLLOWTRACK_USE_3D_POSITION) { if(track->flag&TRACK_HAS_BUNDLE) { float pos[3], mat[4][4], obmat[4][4]; diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 3620131b8df..c85ef72d337 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -410,7 +410,7 @@ typedef struct bShrinkwrapConstraint { typedef struct bFollowTrackConstraint { struct MovieClip *clip; char track[24]; - int flag, reference; + int flag, pad; } bFollowTrackConstraint; /* Camera Solver constraints */ @@ -751,14 +751,9 @@ typedef enum ePivotConstraint_Flag { PIVOTCON_FLAG_ROTACT_NEG = (1<<1) } ePivotConstraint_Flag; -/* FollowTrack Constraint -> flag */ -typedef enum eFollowTrack_Reference { - FOLLOWTRACK_TRACK = (1<<0), - FOLLOWTRACK_BUNDLE = (1<<1) -} FollowTrack_Reference; - typedef enum eFollowTrack_Flags { - FOLLOWTRACK_ACTIVECLIP = (1<<0) + FOLLOWTRACK_ACTIVECLIP = (1<<0), + FOLLOWTRACK_USE_3D_POSITION = (1<<1) } eFollowTrack_Flags; /* CameraSolver Constraint -> flag */ 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) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 31f3d59e643..d2505fc9775 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1579,16 +1579,16 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Reconstruction", "Display reconstruction data from active movie clip"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); - prop= RNA_def_property(srna, "bundle_draw_size", PROP_FLOAT, PROP_NONE); + prop= RNA_def_property(srna, "tracks_draw_size", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.0, FLT_MAX); RNA_def_property_float_sdna(prop, NULL, "bundle_size"); - RNA_def_property_ui_text(prop, "Bundle Size", "Display size of bundles from reconstructed data"); + RNA_def_property_ui_text(prop, "Tracks Size", "Display size of tracks from reconstructed data"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); - prop= RNA_def_property(srna, "bundle_draw_type", PROP_ENUM, PROP_NONE); + prop= RNA_def_property(srna, "tracks_draw_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "bundle_drawtype"); RNA_def_property_enum_items(prop, bundle_drawtype_items); - RNA_def_property_ui_text(prop, "Bundle Display Type", "Viewport display style for bundles"); + RNA_def_property_ui_text(prop, "Tracks Display Type", "Viewport display style for tracks"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop= RNA_def_property(srna, "show_camera_path", PROP_BOOLEAN, PROP_NONE); @@ -1596,9 +1596,9 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed path of camera"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); - prop= RNA_def_property(srna, "show_bundle_name", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "show_tracks_name", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_BUNDLENAME); - RNA_def_property_ui_text(prop, "Show Bundle Name", "Show names for bundle objects"); + RNA_def_property_ui_text(prop, "Show Tracks Name", "Show names for tracks objects"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* region */ diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 3e783d06dc4..4de39811d0b 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -233,12 +233,12 @@ static void rna_def_trackingSettings(BlenderRNA *brna) {0, "NONE", 0, "Nothing", "Do not refine camera intrinsics"}, {REFINE_FOCAL_LENGTH, "FOCAL_LENGTH", 0, "Focal Length", "Refine focal length"}, {REFINE_FOCAL_LENGTH| - REFINE_PRINCIPAL_POINT, "FOCAL_LENGTH_PRINCIPAL_POINT", 0, "Focal Length, Principal Point", "Refine focal length and principal point"}, + REFINE_PRINCIPAL_POINT, "FOCAL_LENGTH_PRINCIPAL_POINT", 0, "Focal Length, Optical Center", "Refine focal length and optical center"}, {REFINE_FOCAL_LENGTH| REFINE_PRINCIPAL_POINT| REFINE_RADIAL_DISTORTION_K1| REFINE_RADIAL_DISTORTION_K2, - "FOCAL_LENGTH_PRINCIPAL_POINT_RADIAL_K1_K2", 0, "Focal Length, Principal Point, K1, K2", "Refine focal length, principal point and radial distortion K1 and K2"}, + "FOCAL_LENGTH_PRINCIPAL_POINT_RADIAL_K1_K2", 0, "Focal Length, Optical Center, K1, K2", "Refine focal length, optical center and radial distortion K1 and K2"}, {REFINE_FOCAL_LENGTH| REFINE_RADIAL_DISTORTION_K1| REFINE_RADIAL_DISTORTION_K2, "FOCAL_LENGTH_RADIAL_K1_K2", 0, "Focal length, K1. K2", "Refine focal length and radial distortion K1 and K2"}, |