I have what might be a bug, but I am so new that it might also be correct behavior. Where would I post it?

Hi.

I found what may or may not be a bug in the way Python accesses instances in a Geometry Nodes setup. I am not sure where I should ask whether this is a bug or not. If someone could point me to a forum where I could ask about this behavior and determine whether this is a bug or not, that would be helpful. Thanks!

(In case anyone cares, here is a short summary of the issue. I know that this isn’t the appropriate place to post this, but I am just including it here in case it helps determine where I would make the actual post. I would include more details in the actual post of course.)

Specifically, if I use list comprehension to get a list of instances it returns:

The specific line of code is:

instances = [inst for inst in depsgraph.object_instances if inst.is_instance and inst.parent is eval_obj]

and the output is:

<bpy_struct, DepsgraphObjectInstance invalid>

But if I convert that to a generator, I get the correct results.

Here is that code snippet:

instances = (inst for inst in depsgraph.object_instances if inst.is_instance and inst.parent is eval_obj)

And its output:

<bpy_struct, DepsgraphObjectInstance at 0x294813240>

Most of the examples I see on stack exchange seem to use the list comprehension method so I was wondering whether that is a regression, new design, or that I am completely misunderstanding the examples.

You probably want the Blender Artists Forum, I’d say the Python subforum.

Thanks. They had actually sent me here :smile:

But I will re-post it there with a more descriptive title (my current post was asking how to access instances, and not proposing that it might actually be a bug).

Thanks again!

1 Like

This is a forum for Blender development. For questions about using Blender, feature requests and bugs, please use the links above. Forum rules.