Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Formatting and wording.
Source Link
Robert Gützkow
  • 26k
  • 3
  • 48
  • 82

Question about Difference between instance object and object in dependency grahp blendergraph

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())

Question about dependency grahp blender

I just started scripting on blender no long ago, even tho i have read the API about dependency graph I still have question in what's the difference between "instance_object" and object inside the depsgraph.

Following code 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())

Difference between instance object and object in dependency graph

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())
Source Link

Question about dependency grahp blender

I just started scripting on blender no long ago, even tho i have read the API about dependency graph I still have question in what's the difference between "instance_object" and object inside the depsgraph.

Following code 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())