Delete Object SelectionΒΆ

Simple example that iterates over the selected items in the current document and deletes them.

# Import the smile module
import as ls
import litho.core as lc

# get the current document
doc = ls.mainWindow().currentDocument.document;

# make actions undoable
rec = doc.createRecorder()

#get the selected objects
sel = doc.selection.items(lc.selection.Type.Transforms)

#delete all groups
for item in sel:
	if item.isPath:
		print('Deleting :'