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
No related tags found
No related merge requests found
...@@ -65,6 +65,14 @@ if ob_plane: ...@@ -65,6 +65,14 @@ if ob_plane:
ob_plane.rotation_euler[0] = 1.0 ob_plane.rotation_euler[0] = 1.0
ob['GRAPH_OBNAME'] = ob_plane.name 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): ...@@ -145,14 +145,14 @@ class HPCMonitor4BMonitoringShowLoad(bpy.types.Operator):
if not math.isnan(fvalue): if not math.isnan(fvalue):
total = total + fvalue / 128.0 total = total + fvalue / 128.0
ivalue = int(fvalue) ivalue = int(fvalue * 100.0 / 128.0)
else: else:
ivalue = 0 ivalue = 0
total_count = total_count + 1 total_count = total_count + 1
if ivalue > 128: if ivalue > 100:
ivalue = 128 ivalue = 100
elif ivalue < 0: elif ivalue < 0:
ivalue = 0 ivalue = 0
...@@ -182,14 +182,14 @@ class HPCMonitor4BMonitoringShowLoad(bpy.types.Operator): ...@@ -182,14 +182,14 @@ class HPCMonitor4BMonitoringShowLoad(bpy.types.Operator):
if not math.isnan(fvalue): if not math.isnan(fvalue):
total = total + fvalue / 800.0 total = total + fvalue / 800.0
ivalue = int(fvalue) ivalue = int(fvalue * 100.0 / 800.0)
else: else:
ivalue = 0 ivalue = 0
total_count = total_count + 1 total_count = total_count + 1
if ivalue > 800: if ivalue > 100:
ivalue = 800 ivalue = 100
elif ivalue < 0: elif ivalue < 0:
ivalue = 0 ivalue = 0
......
...@@ -184,20 +184,20 @@ class HPCMonitor4BPrepareScene: ...@@ -184,20 +184,20 @@ class HPCMonitor4BPrepareScene:
def create_values(self, context): def create_values(self, context):
tex_path = context.scene.view_pg_hpcmonitor4b_prepare_scene.output_path tex_path = context.scene.view_pg_hpcmonitor4b_prepare_scene.output_path
#LOAD_CPU #LOAD_CPU
for i in range(129): for i in range(101):
self.create_value_png(tex_path, 'load_cpu_%d' % i, '%d' % i, float(i) / 128.0 , (150, 33, 33, 255)) 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 #POWER_CPU
for i in range(701): for i in range(701):
self.create_value_png(tex_path, 'power_cpu_%d' % i, '%dW' % self.create_value_png(tex_path, 'power_cpu_%d' % i, '%d W' %
i, float(i) / 700.0, (150, 33, 33, 255)) 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 #POWER_GPU
for i in range(3501): for i in range(3501):
self.create_value_png(tex_path, 'power_gpu_%d' % i, '%dW' % self.create_value_png(tex_path, 'power_gpu_%d' % i, '%d W' %
i, float(i) / 3500.0, (33, 150, 33, 255)) i, float(i) / 3500.0, (33, 150, 33, 255))
def create_value_png(self, tex_path, filename, txt, value, color): def create_value_png(self, tex_path, filename, txt, value, color):
......
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