Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
1e81c6e7
Commit
1e81c6e7
authored
12 years ago
by
Pablo Vazquez
Browse files
Options
Downloads
Patches
Plain Diff
Screencast Keys Addon:
Elapsed Time off by default, and little fix in positioning.
parent
1fa78760
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
space_view3d_screencast_keys.py
+19
-12
19 additions, 12 deletions
space_view3d_screencast_keys.py
with
19 additions
and
12 deletions
space_view3d_screencast_keys.py
+
19
−
12
View file @
1e81c6e7
...
@@ -244,15 +244,15 @@ def draw_last_operator(context, pos_x, pos_y):
...
@@ -244,15 +244,15 @@ def draw_last_operator(context, pos_x, pos_y):
def
draw_timer
(
context
,
pos_x
,
pos_y
):
def
draw_timer
(
context
,
pos_x
,
pos_y
):
sc
=
context
.
scene
#calculate overall time
#calculate overall time
overall_time
=
datetime
.
timedelta
(
seconds
=
int
(
time
.
time
()
-
ScreencastKeysStatus
.
overall_time
[
0
]))
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
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
-
(
sc
.
screencast_keys_timer_size
*
12
)
+
12
pos_x
=
context
.
region
.
width
-
pos_x
/
3
*
sc
.
screencast_keys_timer_size
pos_y
=
10
pos_y
=
10
#draw time
blf
.
size
(
0
,
sc
.
screencast_keys_timer_size
,
72
)
blf
.
size
(
0
,
sc
.
screencast_keys_timer_size
,
72
)
blf
.
position
(
0
,
pos_x
,
pos_y
,
0
)
blf
.
position
(
0
,
pos_x
,
pos_y
,
0
)
bgl
.
glColor4f
(
timer_color_r
,
timer_color_g
,
timer_color_b
,
timer_color_alpha
)
bgl
.
glColor4f
(
timer_color_r
,
timer_color_g
,
timer_color_b
,
timer_color_alpha
)
...
@@ -716,14 +716,14 @@ def init_properties():
...
@@ -716,14 +716,14 @@ def init_properties():
scene
.
screencast_keys_timer_show
=
bpy
.
props
.
BoolProperty
(
scene
.
screencast_keys_timer_show
=
bpy
.
props
.
BoolProperty
(
name
=
"
Display Timer
"
,
name
=
"
Display Timer
"
,
description
=
"
Counter of the elapsed time in H:MM:SS since the script started
"
,
description
=
"
Counter of the elapsed time in H:MM:SS since the script started
"
,
default
=
Tru
e
)
default
=
Fals
e
)
scene
.
screencast_keys_timer_size
=
bpy
.
props
.
IntProperty
(
scene
.
screencast_keys_timer_size
=
bpy
.
props
.
IntProperty
(
name
=
"
Size
"
,
name
=
"
Time
Size
"
,
description
=
"
Time
r text
size displayed on 3D View
"
,
description
=
"
Time size displayed on 3D View
"
,
default
=
12
,
min
=
8
,
max
=
100
)
default
=
12
,
min
=
8
,
max
=
100
)
scene
.
screencast_keys_timer_color
=
bpy
.
props
.
FloatVectorProperty
(
scene
.
screencast_keys_timer_color
=
bpy
.
props
.
FloatVectorProperty
(
name
=
"
Time
r
Color
"
,
name
=
"
Time Color
"
,
description
=
"
Color for the time
r
"
,
description
=
"
Color for the time
display
"
,
default
=
(
1.0
,
1.0
,
1.0
,
0.3
),
default
=
(
1.0
,
1.0
,
1.0
,
0.3
),
min
=
0
,
min
=
0
,
max
=
1
,
max
=
1
,
...
@@ -813,10 +813,17 @@ class OBJECT_PT_keys_status(bpy.types.Panel):
...
@@ -813,10 +813,17 @@ class OBJECT_PT_keys_status(bpy.types.Panel):
row
.
prop
(
sc
,
"
screencast_keys_box_width
"
)
row
.
prop
(
sc
,
"
screencast_keys_box_width
"
)
row
=
layout
.
row
(
align
=
True
)
row
=
layout
.
row
(
align
=
True
)
row
.
prop
(
sc
,
"
screencast_keys_show_operator
"
,
text
=
"
Last Operator
"
)
row
.
prop
(
sc
,
"
screencast_keys_show_operator
"
,
text
=
"
Last Operator
"
)
row
=
layout
.
row
(
align
=
True
)
row
.
prop
(
sc
,
"
screencast_keys_timer_show
"
,
text
=
"
Timer
"
)
split
=
layout
.
split
()
row
.
active
=
sc
.
screencast_keys_timer_show
row
.
prop
(
sc
,
"
screencast_keys_timer_color
"
,
text
=
""
)
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
=
layout
.
row
(
align
=
True
)
row
.
enabled
=
sc
.
screencast_keys_timer_show
row
.
enabled
=
sc
.
screencast_keys_timer_show
row
.
prop
(
sc
,
"
screencast_keys_timer_size
"
)
row
.
prop
(
sc
,
"
screencast_keys_timer_size
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment