This commit is contained in:
2025-04-17 04:52:48 +08:00
commit 9985b73dc1
3708 changed files with 2387532 additions and 0 deletions

View File

@ -0,0 +1,12 @@
'''
this is an example of how you set hotkey or use scripts to drive this plugin's cmds.
if you know python and pyside2,go see codes and .ui file to find what you need.
the most simple usage is to drive a qt pushbutton.(which is exactly what you did when you hit a button in plugin ui.)
and you might need QLineEdit.setText() to set str in those text field.
anyway,go check qt wiki :https://doc.qt.io/qtforpython-5/PySide2/QtWidgets/QWidget.html#qwidget
have fun scripting.
'''
import maya.cmds as cmds
cmds.moCapHelper_eval(s ="ui.arb_stickyDelButton.click()" )

View File

@ -0,0 +1,15 @@
import maya.cmds as cmds
import maya.mel as mel
curlayer = cmds.editDisplayLayerGlobals( query=True, cdl=True )
if curlayer =="defaultLayer" :
raise Exception("using default layer!")
else:
slist = cmds.editDisplayLayerMembers(curlayer,query=True )
print(slist)
cmds.select( clear=True )
cmds.select(slist, visible=True )
mel.eval("syncChannelBoxFcurveEd;")
mel.eval("syncChannelBoxFcurveEd;")
mel.eval("syncChannelBoxFcurveEd;")

View File

@ -0,0 +1,47 @@
import maya.cmds as cmds
objs = cmds.ls(selection = True,type = "dagNode",long = True)
selectobjflag = True
selectmultiobjflag = False
if len(objs) == 0:
selectobjflag = False
else:
if len(objs) != 1:
selectmultiobjflag = True
if objs == None:
selectobjflag = False
curves = cmds.keyframe(query = True , selected = True , name = True)
print(type(curves))
selectkeyflag = True
if curves == None:
selectkeyflag = False
if selectobjflag:
if selectkeyflag:
nodes = set()
for cv in curves:
node = cmds.listConnections(cv)[0]
nodes.add(node)
cmds.select(clear = True)
cmds.select(nodes)
print("TRACE BACK OBJS FROM KEY: " + str(nodes))
else:
obj = cmds.ls(objs[0])[0]
layer = cmds.ls(cmds.listConnections(obj,t = "displayLayer"))
if len(layer) == 0:
print("this obj has no layer,or you have selected multiple objs.")
elif cmds.editDisplayLayerGlobals(cdl = True,q = True) == "defaultLayer":
print("no display layer selected,trace back won\'t work.")
else:
cmds.editDisplayLayerGlobals(cdl = layer[0])
if selectmultiobjflag:
print("TRACE BACK LAYER FROM OBJ: " + layer[0] + "BUT WITH MULTIPLE OBJS SELECTED,SO RESULE IS UNEXPECTED.")
else:
print("TRACE BACK LAYER FROM OBJ: " + layer[0] )
else :
print("no objs selected!")