From b1677201f9af7a3e5f5254817179f12384fbdc44 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 16 Aug 2016 10:32:55 +0200 Subject: Rework 2D stabilizator See this page for motivation and description of concepts: https://github.com/Ichthyostega/blender/wiki See this video for UI explanation and demonstration of usage http://vimeo.com/blenderHack/stabilizerdemo This proposal attempts to improve usability of Blender's image stabilization feature for real-world footage esp. with moving and panning camera. It builds upon the feature tracking to get a measurement of 2D image movement. - Use a weighted average of movement contributions (instead of a median). - Allow for rotation compensation and zoom (image scale) compensation. - Allow to pick a different set of tracks for translation and for rotation/zoom. - Treat translation / rotation / zoom contributions systematically in a similar way. - Improve handling of partial tracking data with gaps and varying start / end points. - Have a user definable anchor frame and interpolate / extrapolate data to avoid jumping back to "neutral" position when no tracking data is available. - Support for travelling and panning shots by including an //intended// position/rotation/zoom ("target position"). The idea is for these parameters to be //animated// by the user, in order to supply an smooth, intended camera movement. This way, we can keep the image content roughly in frame even when moving completely away from the initial view. A known shortcoming is that the pivot point for rotation compensation is set to the translation compensated image center. This can produce spurious rotation on travelling shots, which needs to be compensated manually (by animating the target rotation parameter). There are several possible ways to address that problem, yet all of them are considered beyond the scope of this improvement proposal for now. Own modifications: - Restrict line length, it's really handy for split-view editing - In motion tracking we prefer fully human-readable comments, meaning we don't use doxygen with it's weird markup and comments are supposed to start with capital and end with a full stop, - Add explicit comparison of pointer to NULL. Reviewers: sergey Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung Maniphest Tasks: T49036 Differential Revision: https://developer.blender.org/D583 --- release/scripts/startup/bl_ui/space_clip.py | 92 +++++++++++++++++++++-------- 1 file changed, 69 insertions(+), 23 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 799f1e20dc6..9b1c0a16603 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -621,6 +621,7 @@ class CLIP_PT_track(CLIP_PT_tracking_panel, Panel): text="", toggle=True, icon='IMAGE_ALPHA') layout.prop(act_track, "weight") + layout.prop(act_track, "weight_stab") if act_track.has_bundle: label_text = "Average Error: %.4f" % (act_track.average_error) @@ -907,44 +908,80 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): self.layout.prop(stab, "use_2d_stabilization", text="") def draw(self, context): - layout = self.layout - tracking = context.space_data.clip.tracking stab = tracking.stabilization + layout = self.layout layout.active = stab.use_2d_stabilization - row = layout.row() - row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks", - stab, "active_track_index", rows=2) + layout.prop(stab, "anchor_frame") - sub = row.column(align=True) + box = layout.box() + row = box.row(align=True) + row.prop(stab, "show_tracks_expanded", text="", emboss=False) + + if not stab.show_tracks_expanded: + row.label(text="Tracks For Stabilization") + else: + row.label(text="Tracks For Location") + row = box.row() + row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks", + stab, "active_track_index", rows=2) - sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="") - sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="") + sub = row.column(align=True) - sub.menu('CLIP_MT_stabilize_2d_specials', text="", - icon='DOWNARROW_HLT') + sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="") + sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="") - layout.prop(stab, "influence_location") + sub.menu('CLIP_MT_stabilize_2d_specials', text="", + icon='DOWNARROW_HLT') - layout.prop(stab, "use_autoscale") - col = layout.column() - col.active = stab.use_autoscale - col.prop(stab, "scale_max") - col.prop(stab, "influence_scale") + row = box.row() + row.label(text="Tracks For Rotation / Scale") + row = box.row() + row.active = stab.use_stabilize_rotation + row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks", + stab, "active_rotation_track_index", rows=2) + + sub = row.column(align=True) + + sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="") + sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="") + + sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="", + icon='DOWNARROW_HLT') layout.prop(stab, "use_stabilize_rotation") - col = layout.column() - col.active = stab.use_stabilize_rotation + row = layout.row() + row.active = stab.use_stabilize_rotation + row.prop(stab, "use_stabilize_scale") + if stab.use_autoscale: + row = layout.row(align=True) + row.prop(stab, "use_autoscale") + row.prop(stab, "scale_max", text="Max") + else: + layout.prop(stab, "use_autoscale") - row = col.row(align=True) - row.prop_search(stab, "rotation_track", tracking, "tracks", text="") - row.operator("clip.stabilize_2d_set_rotation", text="", icon='ZOOMIN') + layout.separator() + layout.label(text="Expected Position") + layout.prop(stab, "target_pos", text="") + layout.prop(stab, "target_rot") + if stab.use_autoscale: + layout.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) + else: + layout.prop(stab, "target_zoom") + layout.separator() + row = layout.row() + row.active = 0 < len(stab.tracks.values()) + row.prop(stab, "influence_location") + + col = layout.column() + col.active = stab.use_stabilize_rotation and 0 < len(stab.rotation_tracks.values()) row = col.row() - row.active = stab.rotation_track is not None row.prop(stab, "influence_rotation") + row = col.row() + row.prop(stab, "influence_scale") layout.prop(stab, "filter_type") @@ -1434,7 +1471,7 @@ class CLIP_MT_track_color_specials(Menu): class CLIP_MT_stabilize_2d_specials(Menu): - bl_label = "Track Color Specials" + bl_label = "Translation Track Specials" def draw(self, context): layout = self.layout @@ -1442,5 +1479,14 @@ class CLIP_MT_stabilize_2d_specials(Menu): layout.operator("clip.stabilize_2d_select") +class CLIP_MT_stabilize_2d_rotation_specials(Menu): + bl_label = "Rotation Track Specials" + + def draw(self, context): + layout = self.layout + + layout.operator("clip.stabilize_2d_rotation_select") + + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) -- cgit v1.2.3 From 5e8c09921e58e1f86d61e825bc8f446bb134ed0d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 16 Aug 2016 13:30:47 +0200 Subject: 2D stabilization: Modify interface so dependency goes strictly from top to bottom --- release/scripts/startup/bl_ui/space_clip.py | 89 ++++++++++++----------------- 1 file changed, 37 insertions(+), 52 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 9b1c0a16603..b2263618719 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -916,73 +916,58 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.prop(stab, "anchor_frame") - box = layout.box() - row = box.row(align=True) - row.prop(stab, "show_tracks_expanded", text="", emboss=False) + col = layout.column() + col.label(text="Location") + row = col.row() + row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks", + stab, "active_track_index", rows=2) - if not stab.show_tracks_expanded: - row.label(text="Tracks For Stabilization") - else: - row.label(text="Tracks For Location") - row = box.row() - row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks", - stab, "active_track_index", rows=2) + sub = row.column(align=True) - sub = row.column(align=True) + sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="") + sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="") - sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="") - sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="") + sub.menu('CLIP_MT_stabilize_2d_specials', text="", + icon='DOWNARROW_HLT') - sub.menu('CLIP_MT_stabilize_2d_specials', text="", - icon='DOWNARROW_HLT') + col.label(text="Expected Position") + row = col.row() + row.prop(stab, "target_pos", text="") + col.prop(stab, "influence_location") - row = box.row() - row.label(text="Tracks For Rotation / Scale") - row = box.row() - row.active = stab.use_stabilize_rotation - row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks", - stab, "active_rotation_track_index", rows=2) + layout.separator() + layout.prop(stab, "use_stabilize_rotation") + col = layout.column() + col.active = stab.use_stabilize_rotation + row = col.row() + row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks", + stab, "active_rotation_track_index", rows=2) - sub = row.column(align=True) + sub = row.column(align=True) - sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="") - sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="") + sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="") + sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="") - sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="", - icon='DOWNARROW_HLT') + sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="", + icon='DOWNARROW_HLT') - layout.prop(stab, "use_stabilize_rotation") - row = layout.row() - row.active = stab.use_stabilize_rotation - row.prop(stab, "use_stabilize_scale") - if stab.use_autoscale: - row = layout.row(align=True) - row.prop(stab, "use_autoscale") - row.prop(stab, "scale_max", text="Max") - else: - layout.prop(stab, "use_autoscale") + col.prop(stab, "target_rot") + col.prop(stab, "influence_rotation") layout.separator() - layout.label(text="Expected Position") - layout.prop(stab, "target_pos", text="") - layout.prop(stab, "target_rot") + col = layout.column() + col.active = stab.use_stabilize_rotation + col.prop(stab, "use_stabilize_scale") + col.prop(stab, "use_autoscale") if stab.use_autoscale: - layout.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) + col.prop(stab, "scale_max", text="Max") + col.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) else: - layout.prop(stab, "target_zoom") - - layout.separator() - row = layout.row() - row.active = 0 < len(stab.tracks.values()) - row.prop(stab, "influence_location") + col.prop(stab, "target_zoom") - col = layout.column() - col.active = stab.use_stabilize_rotation and 0 < len(stab.rotation_tracks.values()) - row = col.row() - row.prop(stab, "influence_rotation") - row = col.row() - row.prop(stab, "influence_scale") + col.prop(stab, "influence_scale") + layout.separator() layout.prop(stab, "filter_type") -- cgit v1.2.3 From b7d656c3b24cee4400d8bd4d5e5184e7657227ef Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 16 Aug 2016 14:25:55 +0200 Subject: 2D stabilizer: Revert majority of UI change For now simply reshuffle option so they keep proper dependency flow. Benefits: - Has an ability to hide tracks lists to work with other sliders around. Could be really handy to quickly get rid of lenghty lists. - From a feedback seems to be fitting workflow better. Things to doublecheck on: - Feels a bit misordered: first you define whether one want to have rotation stabilized, then have tracks, then scale options. While this follows dependency flow (which is really good and which we should not violate) it has weird feeling on whether things are really where they have to be. - Autoscale controls visibility of max-scale, can we just make it active/inactive instead? - Autoscale replaces slider with label. Can it be disabled slider instead to reduce visual jumping (disabled slider prevents user input) Hopefully we'll still want to have collapsable box after re-iterating over this points, so we don't waste bits in DNA. --- release/scripts/startup/bl_ui/space_clip.py | 90 +++++++++++++++++------------ 1 file changed, 53 insertions(+), 37 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index b2263618719..a9db1266bc6 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -916,58 +916,74 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.prop(stab, "anchor_frame") - col = layout.column() - col.label(text="Location") - row = col.row() - row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks", - stab, "active_track_index", rows=2) + layout.prop(stab, "use_stabilize_rotation") - sub = row.column(align=True) + box = layout.box() + row = box.row(align=True) + row.prop(stab, "show_tracks_expanded", text="", emboss=False) - sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="") - sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="") + if not stab.show_tracks_expanded: + row.label(text="Tracks For Stabilization") + else: + row.label(text="Tracks For Location") + row = box.row() + row.template_list("UI_UL_list", "stabilization_tracks", stab, "tracks", + stab, "active_track_index", rows=2) - sub.menu('CLIP_MT_stabilize_2d_specials', text="", - icon='DOWNARROW_HLT') + sub = row.column(align=True) - col.label(text="Expected Position") - row = col.row() - row.prop(stab, "target_pos", text="") - col.prop(stab, "influence_location") + sub.operator("clip.stabilize_2d_add", icon='ZOOMIN', text="") + sub.operator("clip.stabilize_2d_remove", icon='ZOOMOUT', text="") - layout.separator() - layout.prop(stab, "use_stabilize_rotation") - col = layout.column() - col.active = stab.use_stabilize_rotation - row = col.row() - row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks", - stab, "active_rotation_track_index", rows=2) + sub.menu('CLIP_MT_stabilize_2d_specials', text="", + icon='DOWNARROW_HLT') - sub = row.column(align=True) + row = box.row() + row.label(text="Tracks For Rotation / Scale") + row = box.row() + row.active = stab.use_stabilize_rotation + row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks", + stab, "active_rotation_track_index", rows=2) - sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="") - sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="") + sub = row.column(align=True) - sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="", - icon='DOWNARROW_HLT') + sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="") + sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="") - col.prop(stab, "target_rot") - col.prop(stab, "influence_rotation") + sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="", + icon='DOWNARROW_HLT') - layout.separator() - col = layout.column() - col.active = stab.use_stabilize_rotation - col.prop(stab, "use_stabilize_scale") - col.prop(stab, "use_autoscale") + row = layout.row() + row.active = stab.use_stabilize_rotation + row.prop(stab, "use_stabilize_scale") if stab.use_autoscale: - col.prop(stab, "scale_max", text="Max") - col.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) + row = layout.row(align=True) + row.prop(stab, "use_autoscale") + row.prop(stab, "scale_max", text="Max") else: - col.prop(stab, "target_zoom") + layout.prop(stab, "use_autoscale") - col.prop(stab, "influence_scale") + layout.separator() + layout.label(text="Expected Position") + layout.prop(stab, "target_pos", text="") + layout.prop(stab, "target_rot") + if stab.use_autoscale: + layout.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) + else: + layout.prop(stab, "target_zoom") layout.separator() + row = layout.row() + row.active = 0 < len(stab.tracks.values()) + row.prop(stab, "influence_location") + + col = layout.column() + col.active = stab.use_stabilize_rotation and 0 < len(stab.rotation_tracks.values()) + row = col.row() + row.prop(stab, "influence_rotation") + row = col.row() + row.prop(stab, "influence_scale") + layout.prop(stab, "filter_type") -- cgit v1.2.3 From d41dfe36e53baa997187e5ca2f9b88e22da645fe Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 16 Aug 2016 22:36:26 +0200 Subject: First set of UI/i18n messages fixes (mostly new GP code). --- release/scripts/modules/bl_i18n_utils/utils_spell_check.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release') diff --git a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py index ba782160edd..d2049eadaa1 100644 --- a/release/scripts/modules/bl_i18n_utils/utils_spell_check.py +++ b/release/scripts/modules/bl_i18n_utils/utils_spell_check.py @@ -197,6 +197,7 @@ class SpellChecker: "unmute", "unpremultiply", "unprojected", + "unprotect", "unreacted", "unregister", "unselected", "unselectable", @@ -493,6 +494,7 @@ class SpellChecker: "musgrave", "nayar", "netravali", + "ogawa", "oren", "preetham", "prewitt", -- cgit v1.2.3 From de28940b159e71671dc9e426c21704eeeecfd68b Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Aug 2016 10:33:54 +0200 Subject: 2D Stabilzier: Don't use len() for checking whether something is enabled or not This code runs on every redraw and iterates the whole tracks list, which is something we should avoid. --- release/scripts/startup/bl_ui/space_clip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index a9db1266bc6..afa9db1f336 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -978,7 +978,7 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): row.prop(stab, "influence_location") col = layout.column() - col.active = stab.use_stabilize_rotation and 0 < len(stab.rotation_tracks.values()) + col.active = stab.use_stabilize_rotation row = col.row() row.prop(stab, "influence_rotation") row = col.row() -- cgit v1.2.3 From 1c633dea1ca48b05057657f90ce29f9159af95b6 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Aug 2016 10:36:38 +0200 Subject: 2D Stabilizer: Use more consistent RNA naming for properties Annoying i did not notice this originally, but for RNA we need to keep things as much consistent as possible. --- release/scripts/startup/bl_ui/space_clip.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index afa9db1f336..5f3b9c76865 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -965,8 +965,8 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.separator() layout.label(text="Expected Position") - layout.prop(stab, "target_pos", text="") - layout.prop(stab, "target_rot") + layout.prop(stab, "target_position", text="") + layout.prop(stab, "target_rotation") if stab.use_autoscale: layout.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) else: -- cgit v1.2.3 From 83d94ef4d054ade1edc5888d6782f096af325e62 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Aug 2016 10:40:34 +0200 Subject: 2D stabilizer: One more occurrence of len() in the drawing code --- release/scripts/startup/bl_ui/space_clip.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 5f3b9c76865..ee6c068dc71 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -973,9 +973,7 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.prop(stab, "target_zoom") layout.separator() - row = layout.row() - row.active = 0 < len(stab.tracks.values()) - row.prop(stab, "influence_location") + layout.prop(stab, "influence_location") col = layout.column() col.active = stab.use_stabilize_rotation -- cgit v1.2.3 From 069bc4086c8afbf03d5fd5e8d63fcd6c46b2864e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Aug 2016 10:45:52 +0200 Subject: 2D stabilizer: Remove redundant rows from the interface --- release/scripts/startup/bl_ui/space_clip.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index ee6c068dc71..c7094109261 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -977,10 +977,8 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): col = layout.column() col.active = stab.use_stabilize_rotation - row = col.row() - row.prop(stab, "influence_rotation") - row = col.row() - row.prop(stab, "influence_scale") + col.prop(stab, "influence_rotation") + col.prop(stab, "influence_scale") layout.prop(stab, "filter_type") -- cgit v1.2.3 From acbef397ac5a0916344dcde87222088ed0f6d200 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 17 Aug 2016 10:55:41 +0200 Subject: 2D stabilizer: Cover rotation tracks label with enabled flag --- release/scripts/startup/bl_ui/space_clip.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index c7094109261..7dfa0693d20 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -938,10 +938,10 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): sub.menu('CLIP_MT_stabilize_2d_specials', text="", icon='DOWNARROW_HLT') - row = box.row() - row.label(text="Tracks For Rotation / Scale") - row = box.row() - row.active = stab.use_stabilize_rotation + col = box.column() + col.active = stab.use_stabilize_rotation + col.label(text="Tracks For Rotation / Scale") + row = col.row() row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks", stab, "active_rotation_track_index", rows=2) -- cgit v1.2.3 From c783e65762aaded75074493fd565a930185f9f78 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Wed, 17 Aug 2016 21:24:13 +0200 Subject: Fix/add some tooltips to 'Object Align' operator options. --- release/scripts/startup/bl_operators/object_align.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py index 5c3d95e113c..a6ee16e6b71 100644 --- a/release/scripts/startup/bl_operators/object_align.py +++ b/release/scripts/startup/bl_operators/object_align.py @@ -365,6 +365,7 @@ class AlignObjects(Operator): ) align_mode = EnumProperty( name="Align Mode:", + description="Side of object to use for alignment", items=(('OPT_1', "Negative Sides", ""), ('OPT_2', "Centers", ""), ('OPT_3', "Positive Sides", ""), @@ -373,10 +374,11 @@ class AlignObjects(Operator): ) relative_to = EnumProperty( name="Relative To:", - items=(('OPT_1', "Scene Origin", ""), - ('OPT_2', "3D Cursor", ""), - ('OPT_3', "Selection", ""), - ('OPT_4', "Active", ""), + description="Reference location to align to", + items=(('OPT_1', "Scene Origin", "Use the Scene Origin as the position for the selected objects to align to"), + ('OPT_2', "3D Cursor", "Use the 3D cursor as the position for the selected objects to align to"), + ('OPT_3', "Selection", "Use the selected objects as the position for the selected objects to align to"), + ('OPT_4', "Active", "Use the active object as the position for the selected objects to align to"), ), default='OPT_4', ) -- cgit v1.2.3 From b10d0058d72da3051895481ae5830a7b668b7d80 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 18 Aug 2016 00:21:55 -0400 Subject: NDOF: compile 3D mouse code only if WITH_INPUT_NDOF When WITH_INPUT_NDOF is disabled, 3D mouse handling code is removed from: - GHOST (was mostly done, finished the job) - window manager - various editors - RNA - keymaps The input tab of user prefs does not show 3D mouse settings. Key map editor does not show NDOF mappings. DNA does not change. On my Mac the compiled binary is 42KB smaller after this change. It runs fine WITH_INPUT_NDOF on or off. --- release/scripts/startup/bl_ui/space_userpref.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 1512f4f4600..dcafac66fca 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1177,15 +1177,16 @@ class USERPREF_PT_input(Panel): sub.prop(walk, "view_height") sub.prop(walk, "jump_height") - col.separator() - col.label(text="NDOF Device:") - sub = col.column(align=True) - sub.prop(inputs, "ndof_sensitivity", text="NDOF Sensitivity") - sub.prop(inputs, "ndof_orbit_sensitivity", text="NDOF Orbit Sensitivity") - sub.prop(inputs, "ndof_deadzone", text="NDOF Deadzone") - sub = col.column(align=True) - sub.row().prop(inputs, "ndof_view_navigate_method", expand=True) - sub.row().prop(inputs, "ndof_view_rotate_method", expand=True) + if inputs.use_ndof: + col.separator() + col.label(text="NDOF Device:") + sub = col.column(align=True) + sub.prop(inputs, "ndof_sensitivity", text="NDOF Sensitivity") + sub.prop(inputs, "ndof_orbit_sensitivity", text="NDOF Orbit Sensitivity") + sub.prop(inputs, "ndof_deadzone", text="NDOF Deadzone") + sub = col.column(align=True) + sub.row().prop(inputs, "ndof_view_navigate_method", expand=True) + sub.row().prop(inputs, "ndof_view_rotate_method", expand=True) row.separator() -- cgit v1.2.3 From 793900d46c4caa695074bbaf9c467c0b0659f5cd Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 19 Aug 2016 12:21:13 +0200 Subject: 2D stabilization: Make interface more compact Joins some things to the same row and uses aligned columns to get minimum use of vertical space. Probably still some tweaks required, but getting there :) --- release/scripts/startup/bl_ui/space_clip.py | 67 +++++++++++++++-------------- 1 file changed, 35 insertions(+), 32 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 7dfa0693d20..8d581e84e25 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -916,7 +916,11 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.prop(stab, "anchor_frame") - layout.prop(stab, "use_stabilize_rotation") + row = layout.row(align=True) + row.prop(stab, "use_stabilize_rotation", text="Rotation", toggle=True) + sub = row.row(align=True) + sub.active = stab.use_stabilize_rotation + sub.prop(stab, "use_stabilize_scale", text="Scale", toggle=True) box = layout.box() row = box.row(align=True) @@ -938,47 +942,46 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): sub.menu('CLIP_MT_stabilize_2d_specials', text="", icon='DOWNARROW_HLT') - col = box.column() - col.active = stab.use_stabilize_rotation - col.label(text="Tracks For Rotation / Scale") - row = col.row() - row.template_list("UI_UL_list", "stabilization_rotation_tracks", stab, "rotation_tracks", - stab, "active_rotation_track_index", rows=2) + # Usually we don't hide things from iterface, but here every pixel of + # vertical space is precious. + if stab.use_stabilize_rotation: + box.label(text="Tracks For Rotation / Scale") + row = box.row() + row.template_list("UI_UL_list", "stabilization_rotation_tracks", + stab, "rotation_tracks", + stab, "active_rotation_track_index", rows=2) - sub = row.column(align=True) + sub = row.column(align=True) - sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="") - sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="") + sub.operator("clip.stabilize_2d_rotation_add", icon='ZOOMIN', text="") + sub.operator("clip.stabilize_2d_rotation_remove", icon='ZOOMOUT', text="") - sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="", - icon='DOWNARROW_HLT') + sub.menu('CLIP_MT_stabilize_2d_rotation_specials', text="", + icon='DOWNARROW_HLT') row = layout.row() row.active = stab.use_stabilize_rotation - row.prop(stab, "use_stabilize_scale") - if stab.use_autoscale: - row = layout.row(align=True) - row.prop(stab, "use_autoscale") - row.prop(stab, "scale_max", text="Max") - else: - layout.prop(stab, "use_autoscale") + row.prop(stab, "use_autoscale") + sub = row.row() + sub.active = stab.use_autoscale + sub.prop(stab, "scale_max", text="Max") - layout.separator() - layout.label(text="Expected Position") - layout.prop(stab, "target_position", text="") - layout.prop(stab, "target_rotation") + col = layout.column(align=True) + row = col.row(align=True) + # Hrm, how to make it more obvious label? + row.prop(stab, "target_position", text="") + col.prop(stab, "target_rotation") if stab.use_autoscale: - layout.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) + col.label(text="Auto Scale Factor: %5.3f" % (1.0 / stab.target_zoom)) else: - layout.prop(stab, "target_zoom") + col.prop(stab, "target_zoom") - layout.separator() - layout.prop(stab, "influence_location") - - col = layout.column() - col.active = stab.use_stabilize_rotation - col.prop(stab, "influence_rotation") - col.prop(stab, "influence_scale") + col = layout.column(align=True) + col.prop(stab, "influence_location") + sub = col.column(align=True) + sub.active = stab.use_stabilize_rotation + sub.prop(stab, "influence_rotation") + sub.prop(stab, "influence_scale") layout.prop(stab, "filter_type") -- cgit v1.2.3 From 67dcad4011bd78be8143d301dfbb22ca2b0a0efe Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 20 Aug 2016 14:48:33 +0200 Subject: Fix T49119: Batch-Generate Previews operator fails. previews render utils needed to be updated slightly against new behavior of maindata.remove. --- release/scripts/modules/bl_previews_utils/bl_previews_render.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'release') diff --git a/release/scripts/modules/bl_previews_utils/bl_previews_render.py b/release/scripts/modules/bl_previews_utils/bl_previews_render.py index 6c29223cf55..f7317184bd2 100644 --- a/release/scripts/modules/bl_previews_utils/bl_previews_render.py +++ b/release/scripts/modules/bl_previews_utils/bl_previews_render.py @@ -169,7 +169,7 @@ def do_previews(do_objects, do_groups, do_scenes, do_data_intern): scene.objects.unlink(bpy.data.objects[render_context.camera, None]) if render_context.lamp: scene.objects.unlink(bpy.data.objects[render_context.lamp, None]) - bpy.data.scenes.remove(scene) + bpy.data.scenes.remove(scene, do_unlink=True) scene = None else: rna_backup_restore(scene, render_context.backup_scene) -- cgit v1.2.3