This one is a bit out there, and not sure if this is the right place to ask this question, but I’ve been working on getting an Arnold renderer plugin to work with Blender, so far it works, except for the fact the display driver needs to be set up properly and without it, you cannot see buckets rendering images or the IPR from within Blender’s viewport… it’s an update from a couple years ago as the previous build was set up for Arnold 4, I’m working on getting this to work with Arnold 5. You can find the github repo here: Barnold
The issue I’m faced with is this bit here:
def _callback(x, y, width, height, buffer, data): #print("+++ _callback:", x, y, width, height, ctypes.cast(buffer, ctypes.c_void_p)) if buffer: try: if new_data.poll(): arnold.AiRenderInterrupt() else: #print("+++ _callback: tile", x, y, width, height) _buffer = ctypes.cast(buffer, ctypes.POINTER(ctypes.c_float)) a = numpy.ctypeslib.as_array(_buffer, shape=(height, width, 4)) rect[y : y + height, x : x + width] = a redraw_event.set() return finally: arnold.AiFree(buffer) elif not new_data.poll(): return arnold.AiRenderAbort() print("+++ _callback: abort") # Here is where the issue is... cb = arnold.AtDisplayCallBack(_callback) #AtDisplayCallBack is not an attribute of Arnold arnold.AiNodeSetPtr(driver, "callback", cb)
I understand this is specific to arnold’s SDK, but have found nothing on their docs discussing this… I was curious if any of you had any idea how I could just rewrite this display callback to work well with blender? It’s essentially the last step to get Arnold to display in both the rendered viewport as Arnold’s IPR and to display buckets while rendering in the UV/Image Editor in Blender.
Many thanks, I know this is a shot in the dark here.