Skip to content

Instantly share code, notes, and snippets.

View miquelcampos's full-sized avatar

Miquel Campos miquelcampos

View GitHub Profile
@joaen
joaen / debugpy_maya_tutorial.md
Last active September 4, 2025 13:29
How to attach VS Code Python debugger to Autodesk Maya 2022+

If you're having trouble with the MayaPy extension in VS Code note that it still utilizes ptvsd, which Microsoft has deprecated as of 2020.

This tutorial will guide you through the process of setting up debugging with debugpy, the latest and improved Python debugger for VS Code.

Note: This tutorial is primarily intended for users of Python 3 and Maya 2022 (or later).

Note: You need to have the official Python extension installed in VS Code.

Method 1: Remote Attach

@chris-lesage
chris-lesage / example_usage.py
Last active May 29, 2025 12:14
A script to pin an object to a NurbsSurface in Autodesk Maya
import pymel.core as pm
'''
Here are some examples of how to use the pin_to_surface.py script.
'''
# make a nurbsPlane
oNurbs = pm.nurbsPlane(n='nurbsPlane1')
# You can specify the nurbsSurface by string, PyNode transform or PyNode shape.
@chris-lesage
chris-lesage / stepDict_documentation.py
Last active June 14, 2024 07:24
This is a test mGear Shifter POST script that shows how to access the stepDict and all of its information. It's a WIP meant to also act as documentation.
import mgear.shifter.custom_step as cstp
'''
This is a test mGear Shifter POST script that shows how to access the stepDict and all of its information.
It's a WIP meant to also act as documentation.
I'll continue to update it, as I discover more. And hopefully include some of this information in the official mGear docs.
Chris Lesage - [email protected]
Justin Pedersen - [email protected]
Jascha Wohlkinger - [email protected]
@Meatplowz
Meatplowz / performFileDropAction.mel
Last active September 23, 2025 08:02
Override the Maya Drag and Drop Behavior for File Open/Import
// Randall Hess [email protected]
// Instructions: Copy this file over your local maya version to override the default behavior
// Maya 2022 and Higher
// Additional: You can also build and load this as a module and not overwrite the local maya file.
// Location: C:\Program Files\Autodesk\MayaXX\scripts\others\performFileDropAction.mel
global proc int
performFileDropAction (string $theFile)
@csaez
csaez / nonblocking_ui.py
Last active January 4, 2018 14:19
multiprocessing gui example
import sys
import multiprocessing
from PyQt5 import QtWidgets
def calc():
# random cpu bound computation
result = 0
for i in range(10 ** 7):
result += i ** 2