Cleanup: Make format
This commit is contained in:
parent
23430f4db8
commit
9aac9254cc
|
@ -73,6 +73,7 @@ batch = batch_for_shader(
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def draw():
|
def draw():
|
||||||
shader.uniform_float("modelMatrix", Matrix.Translation((0, 0, 0)) @ Matrix.Scale(1, 4))
|
shader.uniform_float("modelMatrix", Matrix.Translation((0, 0, 0)) @ Matrix.Scale(1, 4))
|
||||||
shader.uniform_float("viewProjectionMatrix", bpy.context.region_data.perspective_matrix)
|
shader.uniform_float("viewProjectionMatrix", bpy.context.region_data.perspective_matrix)
|
||||||
|
@ -82,11 +83,13 @@ def draw():
|
||||||
compute_shader.uniform_float("time", time.time() - start_time)
|
compute_shader.uniform_float("time", time.time() - start_time)
|
||||||
gpu.compute.dispatch(compute_shader, 128, 128, 1)
|
gpu.compute.dispatch(compute_shader, 128, 128, 1)
|
||||||
|
|
||||||
|
|
||||||
def drawTimer():
|
def drawTimer():
|
||||||
for area in bpy.context.screen.areas:
|
for area in bpy.context.screen.areas:
|
||||||
if area.type == 'VIEW_3D':
|
if area.type == 'VIEW_3D':
|
||||||
area.tag_redraw()
|
area.tag_redraw()
|
||||||
return 1.0 / 60.0
|
return 1.0 / 60.0
|
||||||
|
|
||||||
|
|
||||||
bpy.app.timers.register(drawTimer)
|
bpy.app.timers.register(drawTimer)
|
||||||
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')
|
bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')
|
||||||
|
|
Loading…
Reference in New Issue