Yes. Nodes are selected, since the script is using thisLayer = thisFont.selectedLayers[0]
thisPath.removeNodeCheckKeepShape_( thisNode )
The problem seems to be with the part within parenthesis ( thisNode ). What value goes there? If I am to remove just a single* Node with this method and type it on my own what should I input for it to work. I recon it will need an x and y value separated by a comma. (instead of the iterator that goes through all selected).
This is not the line where it is assigned. The assignment is the line that starts with thisPath =:
if selection:
selectedNodes = [obj for obj in selection if type(obj)==GSNode and obj.type==35]
if selectedNodes:
thisGlyph.beginUndo() # begin undo grouping
thisLayer.setSelection_( None )
for thisNode in selectedNodes:
thisPath = thisNode.parent
thisPath.removeNodeCheckKeepShape_( thisNode )
thisGlyph.endUndo() # end undo grouping
Traceback (most recent call last):
File âDelete Nodes and Try to Keep Shape.pyâ, line 13, in
selection = thisLayer.selection() # node selection in edit mode
TypeError: âLayerSelectionProxyâ object is not callable