I just started scripting on blender noin Blender not long ago, even tho i. Even though I have read the API about the dependency graph I still have a question in what's: What is the difference between "instance_object"an instance_object
and object insidea "normal" object
in the depsgraph.dependency graph?
Following code is from template operator_modal_view3d_raycast.pyoperator_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())