projectile icon indicating copy to clipboard operation
projectile copied to clipboard

AttributeError: 'NoneType' object has no attribute 'objects'

Open JVimes opened this issue 2 years ago • 5 comments

I installed the add-on, selected default cube, clicked "New Emitter" and got the following error. I'm using Blender 3.4.1 on Windows 10.

bpy.ops.rigidbody.object_add()
Python: Traceback (most recent call last):
  File "C:\Users\username\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\projectile\ops.py", line 66, in execute
    object_collection.objects.link(empty)
AttributeError: 'NoneType' object has no attribute 'objects'

JVimes avatar Jan 20 '23 03:01 JVimes

Hi @JVimes thanks for reporting! I don't keep up-to-date with Blender as much as I should, so it's possible the latest version introduced some incompatibilities. I'll look into this later today!

natecraddock avatar Jan 20 '23 13:01 natecraddock

Thanks! No rush of course.

JVimes avatar Jan 20 '23 14:01 JVimes

Hi @JVimes, sorry for the delay. I think I found the issue. Can you confirm?

I think what happened is that the cube was under the scene collection rather than the built-in default collection right? I can fix that easily if that is the case.

natecraddock avatar Jan 25 '23 04:01 natecraddock

Oh, yes, I got rid of the nested collection in my default scene. Sounds like a likely culprit.

JVimes avatar Jan 25 '23 04:01 JVimes

Thanks! Short-term workaround is to put your object in a collection. I'll make some code changes to handle the scene collection soon

natecraddock avatar Jan 25 '23 05:01 natecraddock