Jump to content

Finding an element's parents, all the way up


Recommended Posts

import gom

selection = gom.app.project.actual_elements['A | (E-F)[PL]>< | WR']

gom.script.explorer.apply_selection(selection = selection)

elements = list(gom.ElementSelection ({'category': ['key', 'depends_on']}))

print("Te following elements depend on", selection.name, ":")
print()
for item in elements:
	print(item.name)

Issue resolved. ElementSelection with 'depends_on' does the trick.

  • Like! 1
×
×
  • Create New...