I'm trying to make a little function in Python that will, upon selecting a mesh create a transform node, parent the selected mesh as well as some others to it, and select the transform node.
A scriptJob pointing to said function seems like it will work well enough. The problem I'm having is how to get that scriptJob to be persistent in the file. Obviously I need to make a scriptNode to recreate the scriptJob at file load, but I'm unsure how to:
a) do the initial import of maya.cmds and
b) import the python script with the function the scriptJob points to
Anyone have any insights into how I might accomplish this?