Skip to content

Instantly share code, notes, and snippets.

View loonghao's full-sized avatar
😀
Vibe Coding

Hal loonghao

😀
Vibe Coding
  • Shenzhen
View GitHub Profile
@marcoshipe
marcoshipe / main.qml
Created April 4, 2018 04:58
pyqtSlot and garbage collector problem examples
import QtQuick 2.9
import QtQuick.Controls 2.2
ApplicationWindow {
id: main_window
visible: true
width: 500
height: 500
Item {
import maya.OpenMaya as OpenMaya
# Get the selection and create a selection list of all the nodes meshes
selection = OpenMaya.MSelectionList()
OpenMaya.MGlobal.getActiveSelectionList(selection);
# Create an MItSelectionList class to iterate over the selection
# Use the MFn class to as a filter to filter node types
iter = OpenMaya.MItSelectionList ( selection, OpenMaya.MFn.kGeometric );
import sys
import os
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property
from PySide2.QtWidgets import QApplication, QSystemTrayIcon, QStyle, QAction, QMenu, QMessageBox
from PySide2.QtQml import QQmlApplicationEngine
my_list = ['here','is','my','list']
class Manager(QObject):
@jagt
jagt / ipython_maya_2018.md
Created June 19, 2018 08:55
Setting up IPython for Maya 2018
  1. Put mayapy on Path
  2. Open a cmd as admin
  3. run mayapy -m ensurepip --default-pip
  4. run mayapy -m pip install --upgrade pip
  5. run mayapy -m pip install ipython==5.7.0
  6. delete C:\Program Files\Autodesk\Maya2018\Python\Lib\site-packages\_scandir.pyd. it's build against original python release version.
  7. test mayapy -c "from IPython import embed; embed()"
@zachlewis
zachlewis / package.py
Last active February 14, 2022 03:25
alternate python rez package
name = "python"
version = "3.8.6"
authors = [
"Guido van Rossum"
]
description = \
"""