diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-11-29 21:26:57 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-11-29 21:26:57 +0400 |
commit | fb3f24020126afe843e509f53c985c327a324a23 (patch) | |
tree | 8c9ccba3ab2bd8866c54b1d460d2892bd95c38f6 /source/blender/makesrna/intern/rna_tracking.c | |
parent | 0d24c6f0d034d277feeff2650a8165294a259691 (diff) |
Image wrapping for plane track in clip editor
Summary:
Now it's possible to assign an image to plane tracks
in clip editor. This image is only used for display
in clip editor and this image is being warped into
the plane track rectangle.
Main purpose of this is to get early feedback about
how good image warping matches the footage, before
clip goes to the compositor.
Pretty much straightforward change: just compute
homography from undeformed normalized frame corner
coordinates (unity square) to plane marker corners
and apply this matrix to opengl stack.
Still could improve behavior when perspective
plane transform is degenerate, but that's not so
much critical for now i'd say.
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: sebastian_k
Differential Revision: http://developer.blender.org/D57
Diffstat (limited to 'source/blender/makesrna/intern/rna_tracking.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 6107d4e4a51..871bc159f28 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -1474,6 +1474,20 @@ static void rna_def_trackingPlaneTrack(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", PLANE_TRACK_AUTOKEY); RNA_def_property_ui_text(prop, "Auto Keyframe", "Automatic keyframe insertion when moving plane corners"); RNA_def_property_ui_icon(prop, ICON_REC, 0); + + /* image */ + prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); + RNA_def_property_struct_type(prop, "Image"); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Image", "Image displayed in the track during editing in clip editor"); + RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL); + + /* image opacity */ + prop = RNA_def_property(srna, "image_opacity", PROP_FLOAT, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_text(prop, "Image Opacity", "Opacity of the image"); + RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL); } static void rna_def_trackingStabilization(BlenderRNA *brna) |