Skip to content
Snippets Groups Projects
Commit 2508f890 authored by Milan Jaros's avatar Milan Jaros
Browse files

fix load, add print screens

parent ce65622c
No related branches found
Tags
No related merge requests found
......@@ -66,5 +66,13 @@ if ob_plane:
ob['GRAPH_OBNAME'] = ob_plane.name
if 'Graph' in bpy.data.collections:
graph_collection = bpy.data.collections['Graph']
else:
graph_collection = bpy.data.collections.new('Graph')
bpy.context.scene.collection.children.link(graph_collection)
graph_collection.objects.link(ob_plane)
......@@ -145,14 +145,14 @@ class HPCMonitor4BMonitoringShowLoad(bpy.types.Operator):
if not math.isnan(fvalue):
total = total + fvalue / 128.0
ivalue = int(fvalue)
ivalue = int(fvalue * 100.0 / 128.0)
else:
ivalue = 0
total_count = total_count + 1
if ivalue > 128:
ivalue = 128
if ivalue > 100:
ivalue = 100
elif ivalue < 0:
ivalue = 0
......@@ -182,14 +182,14 @@ class HPCMonitor4BMonitoringShowLoad(bpy.types.Operator):
if not math.isnan(fvalue):
total = total + fvalue / 800.0
ivalue = int(fvalue)
ivalue = int(fvalue * 100.0 / 800.0)
else:
ivalue = 0
total_count = total_count + 1
if ivalue > 800:
ivalue = 800
if ivalue > 100:
ivalue = 100
elif ivalue < 0:
ivalue = 0
......
......@@ -184,17 +184,17 @@ class HPCMonitor4BPrepareScene:
def create_values(self, context):
tex_path = context.scene.view_pg_hpcmonitor4b_prepare_scene.output_path
#LOAD_CPU
for i in range(129):
self.create_value_png(tex_path, 'load_cpu_%d' % i, '%d' % i, float(i) / 128.0 , (150, 33, 33, 255))
for i in range(101):
self.create_value_png(tex_path, 'load_cpu_%d' % i, '%d %%' % i, float(i) / 100.0 , (150, 33, 33, 255))
#LOAD_GPU
for i in range(101):
self.create_value_png(tex_path, 'load_gpu_%d' % i, '%d %%' % i, float(i) / 100.0 , (33, 150, 33, 255))
#POWER_CPU
for i in range(701):
self.create_value_png(tex_path, 'power_cpu_%d' % i, '%d W' %
i, float(i) / 700.0, (150, 33, 33, 255))
#LOAD_GPU
for i in range(801):
self.create_value_png(tex_path, 'load_gpu_%d' % i, '%d' % i, float(i) / 800.0 , (33, 150, 33, 255))
#POWER_GPU
for i in range(3501):
self.create_value_png(tex_path, 'power_gpu_%d' % i, '%d W' %
......
docs/3dviewport_menu.png

38.5 KiB

docs/blender_screen.png

3.64 MiB

docs/graph.png

3.05 MiB

docs/preferences_menu.png

57.3 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment