How trigger consecutive fiducial placements?

How to trigger the fiducial placement just after the placement of other fiducial nodes and so on?
I had listened to addNode method like below:
Screenshot from 2021-05-21 22-09-35
But when I call the addNode method in the script it’s getting into an infinite loop(because of the functions calling each other probably). Even after I commented addNode method its looping for every mouse moment.

You only need to create single markups fiducial node. You can add any number of control points to it. To keep placement mode active, enable “persistent” option.

I would recommend to put a qSlicerMarkupsPlaceWidget widget on your module GUI to activate/deactivate point placement. It ensures that the correct markups fiducial node is selected, enables/disables placement and persistent option. You can specify persistence by adjusting placeMultipleMarkups property.