Navigation Menu

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 April 17, 2024 20:47
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 April 14, 2024 20:43
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 April 14, 2023 01:29
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 - chris@rigmarolestudio.com
Justin Pedersen - justin@tcgcape.co.za
Jascha Wohlkinger - jwohlkinger@gmail.com
@Meatplowz
Meatplowz / performFileDropAction.mel
Last active June 28, 2023 14:21
Override the Maya Drag and Drop Behavior for File Open/Import
// Randall Hess randall.hess@gmail.com
// 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