Strange… On my side adding printings to the init files work.
There is one thing to keep in mind. If you are making changes to the Init file of a picker and you want your current session of Maya/Synoptic to pick up the changes you need to reload the python module of the picker. The usual way I do it is by searching the Picker tab name on the sys.modules like followed
import sys
to_delete = ["pickerA",
"pickerB","]
for i in sys.modules.keys():
for module in to_delete:
if module in i :
print("deleting module {}".format(i))
del sys.modules[i]
Now here is a full init file example of a button on my picker to key all controls inside the rig_controllers_grp Maya selection set.
# imports
import os
import pymel.core as pm
from mgear.synoptic import utils
from mgear.synoptic.tabs import MainSynopticTab
from mgear.vendor.Qt import QtWidgets
from .widget import Ui_biped_body
class SynopticTab(MainSynopticTab, Ui_biped_body):
description = "humans"
name = "humans"
bgPath = os.path.join(os.path.dirname(__file__), "background.png")
buttons = [
{"name": "keyAllControls"},
]
def __init__(self, parent=None):
super(SynopticTab, self).__init__(self, parent)
self.cbManager.selectionChangedCB(self.name, self.selectChanged)
def keyAllControls_clicked(self):
print("I AM GOIN TO KEY ALL CONTROLS")
model = utils.getModel(self)
namespace = utils.getNamespace(model)
controlers = pm.sets("{}:rig_controllers_grp".format(namespace), query=True)
with pm.UndoChunk():
pm.setKeyframe(controlers)
I added a pint inside the keyAllControls_clicked function and it does work. You could have a loggin python module logger registered to your own needs and call it there as well.
Let me know if this works for you. If not I will need you to send me a message with your picker files attached so that I can take a look.
Cheers