Remove Selected BCP script

I’m trying to create a script that will delete only selected BCP but am not having success.

Here’s the gist. Weird results:

Also I tried using something from the core reference, removeNode. But I have no idea how to use something like this:

removeNode:

Removes Node from path.

  • (void)removeNode:(GSNode *)Node
    Parameters

Node
The node to return from the path.

Are you aware of the script at mekkablue’s repository? *Delete Nodes

1 Like

Thank you! I’ll see how I go with this.

Also, would you, or anyone else reading be able to explain how to read stuff like this in the Core api:

removeNode:

Removes Node from path.

  • (void)removeNode:(GSNode *)Node

Parameters

Node
The node to return from the path.

Edit: I see there is a PyObjC docs I should read…

The removeNode: is low level method. If you remove one offcurve node, you need to make sure to remove the other one as well and to change the node type of the following oncurve node to LINE. Or you can use the method: removeNodeCheck:(GSNode *)Node that does all that for you.