From f4745763514a51bf841fc2c344d62242bdc297da Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 14 Nov 2011 06:41:42 +0000 Subject: 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. --- source/blender/makesrna/intern/rna_constraint.c | 23 +++++++++-------------- source/blender/makesrna/intern/rna_space.c | 12 ++++++------ source/blender/makesrna/intern/rna_tracking.c | 4 ++-- 3 files changed, 17 insertions(+), 22 deletions(-) (limited to 'source/blender/makesrna') 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"}, -- cgit v1.2.3