# Emulate the node interaction behaviour from the hinting plugin

**URL:** <https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713>\
**Category:** Scripting\
**Created:** [January 4, 2026, 5:58pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713 "2026-01-04T17:58:02Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 4, 2026, 5:58pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/1 "2026-01-04T17:58:02Z")

</div>

Hello, I would like to emulate the behaviour that the hinting plugin uses: Nodes are selectable, but not editable, and this is reflected in the UI. Is there an easy way to achieve this in a reporter plugin? Thanks!

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 4, 2026, 9:05pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/2 "2026-01-04T21:05:11Z")

</div>

not with a reporter. You need a tool for this.

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 5, 2026, 8:28am UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/3 "2026-01-05T08:28:47Z")

</div>

Sorry, I am not working with a reporter, I have it in a .glyphsTool. How would I do this in a tool?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 5, 2026, 10:40am UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/4 "2026-01-05T10:40:26Z")

</div>

Overwrite the `drawHandle:…` method like this:

```auto
- (void)drawHandle:(GSPath *)path atIndex:(NSUInteger)idx isSelected:(BOOL)selected atPoint:(NSPoint)layerOrigin simple:(BOOL)simple {
	GSNode *node = [path nodeAtIndex:idx];
	[self drawKnob:node.position type:node.type selected:selected atPoint:layerOrigin];
}

```

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 5, 2026, 11:31am UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/5 "2026-01-05T11:31:53Z")

</div>

Thanks. Is this possible in Python?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 5, 2026, 6:33pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/6 "2026-01-05T18:33:19Z")

</div>

Just replace `:` with `_` 😉

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 14, 2026, 8:47pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/7 "2026-01-14T20:47:11Z")

</div>

Hi again, sorry to come back to this. I still don’t understand. In my SelectTool code, I have:

```auto
@obj.python_method
def drawHandle_(self, path, index, isSelected, layerOrigin, simple=False):
    print("Hello world")

```

When I activate my select tool, nothing happens, though. How do I do this correctly? Do you have a sample plugin I can look at with similar code? Thanks!

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 14, 2026, 10:38pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/8 "2026-01-14T22:38:33Z")

</div>

you need the full method name. In objectiveC it is interlaced with the arguments. There are many `:` to replace:

```auto
def drawHandle_atIndex_isSelected_atPoint_simple_(path, idx, selected, layerOrigin, simple):

```

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 14, 2026, 10:44pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/9 "2026-01-14T22:44:43Z")

</div>

I had tried that, but didn’t get it to work.

When I use the @objc.python\_method decorator, nothing happens. The print statement has no effect.

When I don’t use the decorator, I get:

```auto
objc.BadPrototypeError: 
'drawHandle:atIndex:isSelected:atPoint:simple:' expects 5 arguments, 
<function MyPlugin.drawHandle_atIndex_isSelected_atPoint_simple_ 
at 0x156377880> has between 3 and 4 positional arguments

```

For reference, this is my code:

```auto
def drawHandle_atIndex_isSelected_atPoint_simple_(path, index, selected, layerOrigin, simple=False):
    print("Hello World")

```

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 14, 2026, 10:46pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/10 "2026-01-14T22:46:39Z")

</div>

Ah! I need to have `self` as the first argument as well. Now it works. Thanks a lot!

Another question: How do I make the nodes unmovable, like in the hinting plugin?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 14, 2026, 10:53pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/11 "2026-01-14T22:53:39Z")

</div>

you can try to overwrite:

```auto
def moveSelectionWithPoint_withModifier_(self, offset: NSPoint, modifierFlag: int):

```

and only move whatever you need.

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 14, 2026, 11:02pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/12 "2026-01-14T23:02:55Z")

</div>

Thank you very much!

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 26, 2026, 9:05pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/13 "2026-01-26T21:05:41Z")

</div>

I got this to work for oncurve nodes, what is the function name for offcurves? I can’t find the correct function in GlyphsPathPlugin.h. I guess knobs are the extra nodes, right?

---

<div class="post-metadata">

**Author:** ![GeorgSeifert](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/georgseifert/32/259_2.png) [@GeorgSeifert](https://forum.glyphsapp.com/u/GeorgSeifert)\
**Post date:** [January 26, 2026, 9:29pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/14 "2026-01-26T21:29:00Z")

</div>

What do you mean by that? There is no special `move` method for on and offcurve nodes. You move whatever you consider as selected (usually what is in `Layer.selection`).

---

<div class="post-metadata">

**Author:** ![SCarewe](https://forum.glyphsapp.com/user_avatar/forum.glyphsapp.com/scarewe/32/18952_2.png) [@SCarewe](https://forum.glyphsapp.com/u/SCarewe)\
**Post date:** [January 26, 2026, 9:30pm UTC](https://forum.glyphsapp.com/t/emulate-the-node-interaction-behaviour-from-the-hinting-plugin/35713/15 "2026-01-26T21:30:09Z")

</div>

Sorry, I meant the drawing. This only does oncurve nodes:

```auto
drawHandle_atIndex_isSelected_atPoint_simple_()

```
