Skip to content

SketchUp 2026.2 broke DefinitionList.parent #1112

Description

@dphdave

In SketchUp 2026.1 and earlier, calling the #parent method on a DefinitionList would return the Sketchup::Model object, in SketchUp 2026.2 it appears to now return nil. This is a very esoteric issue, but it causes a huge problem for our extension, because during parsing of the model tree, the parent of objects is queried many times.

The issue can be demonstrated with the generic code snippet below:

module MyModule
    def self.traverse_parent(entity, indent='')
        puts "#{indent}#{entity.inspect}"
        return if !entity.respond_to?(:parent)
        self.traverse_parent(entity.parent, indent << '  ')
    end
end

Create a simple model with some nested entities within groups, then run MyModule.traverse_parent(Sketchup.active_model.selection[0].entities[0]) with a nested entity selected to traverse the model tree to the root and report each element.

In SketchUp 2026.1 and earlier, the root is reported as a the Sketchup::Model object
In SketchUp 2026.2 the root is reported as nil

This is an unexpected change in the API, contract please fix ASAP!

Image Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions