maximeraafat/BlenderNeRF

BlenderNeRF Camera not found

RussRobin opened this issue · 5 comments

Hi, thank you for this meaningful tool.

I tried to render .blender models with BlenderNerf and it works well. However, when I made some modifications on the model (e.g. rotation of a part of it), I encounter errors:
sphere_camera = scene.objects[CAMERA_NAME]
KeyError: 'bpy_prop_collection[key]: key 'BlenderNeRF Camera' not found'

May you please look into it? Thank you in advance.

Hi @RussRobin, thanks for your interest in BlenderNeRF and for your patience.

Hmm this is strange, the BlenderNeRF Camera should automatically be created if it has not already been with the corresponding preview button. May I ask you to describe the exact steps you followed in order to replicate the encountered error? If you could share a toy .blend file with the issue, that would also be very helpful!

Hi @maximeraafat , thank you for your timely reply.

The .blend file is uploaded here:
https://drive.google.com/file/d/1ruYWhWqZXZIHbOsQVCQqetm62LBZWvub/view?usp=share_link

The error message goes like:
612B30E16769B0DD1B891C860F31D578

Thank you again for your wonderful project and reply.

Thanks for sharing the file! Interesting, it seems like you somehow managed to invert the behaviour of the BlenderNeRF Camera. In your situation, the camera is only visible when the corresponding preview button is unselected, which breaks the functionality of the COS method.

But no worries, there is a simple fix. First, enable the BlenderNeRF Camera by unselecting the corresponding preview button. Once the camera is visible in your scene, enter the following command in the Blender python console

bpy.data.objects.remove(bpy.data.objects['BlenderNeRF Camera'], do_unlink=True)

That should solve the issue, the preview and PLAY COS buttons should again behave as expected.
Let me know whether you encounter any further issues!

Thank you for your help, the problem has been solved for me!

Glad I could be of help