Skip to content

Commit

Permalink
blender: Add a few more remarks
Browse files Browse the repository at this point in the history
Ideally someone more familiar with Blender would be able to point out a
bunch of weirdness in my plugin implementation in 5 minutes. I
constantly feel like I'm doing things the wrong way, and no amount of
browsing the documentation or looking at how Cycles does things has
helped with that.
Cycles mostly just passes the Blender datastructures to the C++ side,
and deals with it there, and I couldn't find many examples of actually
fully using this bpy.types.RenderEngine to integrate a 3rd party
renderer, so this has mostly been (slow) trial and error to get here.
I feel like I've gotten 80% of the way there, but I'm really stuck on
the last 20%
  • Loading branch information
vkoskiv committed Jun 18, 2024
1 parent ece6d60 commit 0b7997c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bindings/blender_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ def partial_update_mesh(self, update):
mesh = update.id
print("Mesh {} was updated".format(mesh.name))
# For now, we only handle transforms.
# I find it frustrating that the only way to inspect these types is by
# dumping them at runtime. It's a really slow way to explore an API.
# Surely there is a better way?
if update.is_updated_transform:
# FIXME: How do I get the actual instance index from Blender?
# Just grabbing the first one for now.
Expand Down Expand Up @@ -451,7 +454,7 @@ def view_update(self, context, depsgraph):
self.cr_renderer.start_interactive()

def display_bitmap(self, bm):
# Get float array from libc-ray
# Get float array from libc-ray containing the raw render buffer, and then build a render result with it
print("Grabbing float array from lib")
start_first = time.time()
float_count = bm.width * bm.height * bm.stride
Expand Down

0 comments on commit 0b7997c

Please sign in to comment.