I started scripting in Blender not long ago. Even though I have read the API about the dependency graph I still have a question: What is the difference between an instance_object
and a "normal" object
in the dependency graph?
Following code is from template operator_modal_view3d_raycast.py
def visible_objects_and_duplis():
"""Loop over (object, matrix) pairs (mesh only)"""
depsgraph = context.evaluated_depsgraph_get()
for dup in depsgraph.object_instances:
if dup.is_instance: # Real dupli instance
obj = dup.instance_object
yield (obj, dup.matrix_world.copy())
else: # Usual object
obj = dup.object
yield (obj, obj.matrix_world.copy())