Maya 2023: drag/drop Python script

51 views
Skip to first unread message

Yann Genty

unread,
Nov 21, 2024, 11:12:53 AM11/21/24
to Python Programming for Autodesk Maya
Hello ! Second and last question for me today ;)
I added this function at the end of my python file so that it can be opened by drag n drop in Maya:

def onMayaDroppedPythonFile(args) :
    print(args)

It works the first time, but not the other times on the same Maya session, any ideas? I have a feeling it's linked to the update of python since Maya 2022.

Only this appears in the logs:
import maya.app.general.executeDroppedPythonFile as myTempEDPF
myTempEDPF.executeDroppedPythonFile(“F:/3D/DEV/yg_weightTool.py”, “”)
del myTempEDPF


2024-11-21-17-08-06.gif


Thanks for reading!
-Yann

Reply all
Reply to author
Forward
0 new messages