Skip to content

Commit

Permalink
blender: Use cb info type in interactive cb
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoskiv committed Apr 7, 2024
1 parent 80992a4 commit 52a64bb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bindings/blender_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,8 @@ def draw_direct(bitmap):
if texture:
draw_texture_2d(texture, (0, 0), texture.width, texture.height)

def status_update_interactive(renderer_cb_info, args):
def status_update_interactive(cb_info, args):
tag_redraw, update_stats, self = args
ct.pythonapi.PyCapsule_GetPointer.restype = ct.c_void_p
ct.pythonapi.PyCapsule_GetPointer.argtypes = [ct.py_object, ct.c_char_p]
ptr = ct.pythonapi.PyCapsule_GetPointer(renderer_cb_info, "cray.renderer_cb_info".encode())
info = ct.cast(ptr, ct.POINTER(c_ray.cr_cb_info)).contents
if info.finished_passes == self.cr_renderer.prefs.samples:
update_stats("Rendering done", "")
else:
Expand Down

0 comments on commit 52a64bb

Please sign in to comment.