[Bf-blender-cvs] [de28940] master: 2D Stabilzier: Don't use len() for checking whether something is enabled or not
Sergey Sharybin
noreply at git.blender.org
Wed Aug 17 10:37:58 CEST 2016
Commit: de28940b159e71671dc9e426c21704eeeecfd68b
Author: Sergey Sharybin
Date: Wed Aug 17 10:33:54 2016 +0200
Branches: master
https://developer.blender.org/rBde28940b159e71671dc9e426c21704eeeecfd68b
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.
===================================================================
M release/scripts/startup/bl_ui/space_clip.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index a9db126..afa9db1 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()
More information about the Bf-blender-cvs
mailing list