Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Vazquez <venomgfx@gmail.com>2012-06-06 00:01:35 +0400
committerPablo Vazquez <venomgfx@gmail.com>2012-06-06 00:01:35 +0400
commit1e81c6e78b47fee305ecc3316a2d5f083eca3cc3 (patch)
treee0973a8ddec6dda662b40037ed5d93287cf7b62b /space_view3d_screencast_keys.py
parent1fa78760f45d05a71160a4d0f3f6b732aa0a3137 (diff)
Screencast Keys Addon:
Elapsed Time off by default, and little fix in positioning.
Diffstat (limited to 'space_view3d_screencast_keys.py')
-rw-r--r--space_view3d_screencast_keys.py31
1 files changed, 19 insertions, 12 deletions
diff --git a/space_view3d_screencast_keys.py b/space_view3d_screencast_keys.py
index 7fa9740d..5ece787b 100644
--- a/space_view3d_screencast_keys.py
+++ b/space_view3d_screencast_keys.py
@@ -244,15 +244,15 @@ def draw_last_operator(context, pos_x, pos_y):
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 @@ def init_properties():
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,10 +813,17 @@ class OBJECT_PT_keys_status(bpy.types.Panel):
row.prop(sc, "screencast_keys_box_width")
row = layout.row(align=True)
row.prop(sc, "screencast_keys_show_operator", text="Last Operator")
- 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="")
+
+ 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.enabled = sc.screencast_keys_timer_show
row.prop(sc,"screencast_keys_timer_size")