2D Stabilzier: Don't use len() for checking whether something is enabled or not
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 17 Aug 2016 08:33:54 +0000 (10:33 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 17 Aug 2016 08:37:55 +0000 (10:37 +0200)
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

index a9db1266bc68a7d4e2d97957e9034dcaeffa2279..afa9db1f33605ed54d023efe766911512f540244 100644 (file)
@@ -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()