[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3455] trunk/py/scripts/addons/ space_view3d_screencast_keys.py: Screencast Keys Addon:

Pablo Vazquez venomgfx at gmail.com
Tue Jun 5 22:01:36 CEST 2012


Revision: 3455
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3455
Author:   venomgfx
Date:     2012-06-05 20:01:35 +0000 (Tue, 05 Jun 2012)
Log Message:
-----------
Screencast Keys Addon:
Elapsed Time off by default, and little fix in positioning.

Modified Paths:
--------------
    trunk/py/scripts/addons/space_view3d_screencast_keys.py

Modified: trunk/py/scripts/addons/space_view3d_screencast_keys.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_screencast_keys.py	2012-06-05 19:59:21 UTC (rev 3454)
+++ trunk/py/scripts/addons/space_view3d_screencast_keys.py	2012-06-05 20:01:35 UTC (rev 3455)
@@ -244,15 +244,15 @@
 
 def draw_timer(context, pos_x, pos_y):
 
+    sc = context.scene
     #calculate overall time
     overall_time = datetime.timedelta(seconds=int(time.time() - ScreencastKeysStatus.overall_time[0]))
 
-    sc = context.scene
     timer_color_r, timer_color_g, timer_color_b, timer_color_alpha = sc.screencast_keys_timer_color
-    pos_x, pos_y = getDisplayLocation(context)
-    pos_x = context.region.width - pos_x / 3 * sc.screencast_keys_timer_size 
+    pos_x = context.region.width - (sc.screencast_keys_timer_size * 12) + 12
     pos_y = 10
 
+    #draw time
     blf.size(0, sc.screencast_keys_timer_size, 72)
     blf.position(0, pos_x, pos_y, 0)
     bgl.glColor4f(timer_color_r, timer_color_g, timer_color_b, timer_color_alpha)
@@ -716,14 +716,14 @@
     scene.screencast_keys_timer_show = bpy.props.BoolProperty(
         name="Display Timer",
         description = "Counter of the elapsed time in H:MM:SS since the script started",
-        default = True)
+        default = False)
     scene.screencast_keys_timer_size = bpy.props.IntProperty(
-        name="Size",
-        description="Timer text size displayed on 3D View",
+        name="Time Size",
+        description="Time size displayed on 3D View",
         default=12, min=8, max=100)
     scene.screencast_keys_timer_color = bpy.props.FloatVectorProperty(
-        name="Timer Color",
-        description="Color for the timer",
+        name="Time Color",
+        description="Color for the time display",
         default=(1.0, 1.0, 1.0, 0.3),
         min=0,
         max=1,
@@ -813,11 +813,18 @@
             row.prop(sc, "screencast_keys_box_width")
             row = layout.row(align=True)
             row.prop(sc, "screencast_keys_show_operator", text="Last Operator")
+
+            split = layout.split()
+
+            col = split.column()
+            sub = col.column(align=True)
+            sub.prop(sc, "screencast_keys_timer_show", text="Time")
+            col = split.column()
+            sub = col.column(align=True)
+            sub.active = sc.screencast_keys_timer_show
+            sub.prop(sc, "screencast_keys_timer_color", text="")
+
             row = layout.row(align=True)
-            row.prop(sc, "screencast_keys_timer_show", text="Timer")
-            row.active = sc.screencast_keys_timer_show
-            row.prop(sc, "screencast_keys_timer_color", text="")
-            row = layout.row(align=True)
             row.enabled = sc.screencast_keys_timer_show
             row.prop(sc,"screencast_keys_timer_size")
             row = layout.row(align=True)



More information about the Bf-extensions-cvs mailing list