maya2022 py2 build numpy
参考
https://medium.com/@1null4null/cython-maya2018-2019-python2-7-17-921c548337b9
https://vaishakp.com/2018/11/21/cython-in-maya-2018-windows/
https://gist.github.com/nrtkbb/5b65d2f5ed42bd9947b5
下载cython源码解压:https://codeload.github.com/cython/cython/zip/refs/heads/master
1234567891011121314151617181920212223242526用mayapy编译会提示找不到python.h# 增加代码extra_include_dirs = []if 'EXTRA_INCLUDE_DIRS' in os.environ: extra_include_dirs = os.environ['EXTRA_INCLUDE_DIRS'].split(';') ...
maya_code
10d79030e8222445804370796b90fca121d84a5651bdfcfb01244e226c595abf41ec1713a23cd1a7c8d2449568e92a2ca9e6480f3ba1dcb5d2175dfb6230de7ad956bc3ee560f75b849599f6cbd30b8b4d5365a10b9ff79d390010d222c7ab9dcf2ed49e40d955bc7e774db95c9a1ac1f2ac1264a71fd598100bd2a3b7083234a157813bbb30d52ba003a23f29e409ff50b59b0a5ebca7b5683cb7124a402ef9a3de7992655bf43571243cf5153455c9baccb65a9114353189b635d3362332c4b1fe26bfb3d646ffb48e8624cb51199965ec36578b0746956af7859634092066a4739f0a78a6e4e4326e0eefcc1a0b57f237d4d5966472659 ...
unity python api 使用
Preview Anim1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283using UnityEngine.Playables;using UnityEngine;using EasyButtons;using UnityEngine.Animations;using Network.Proto;using UnityEditor;using Unity.Entities.UniversalDelegates;using System.Collections.Generic;[ExecuteInEditMode]public class SimpleAnimationPlayer : MonoBehaviour{ private PlayableGraph _graph; private Animat ...
VS2013编译boost
10d79030e8222445804370796b90fca121d84a5651bdfcfb01244e226c595abf60677996a64048a059b160626b215b073cbf3f4d807755996b7435f0a4e0f8039beeb3607aaa8769e520f03455291f2458fc06d6c740972e470ad78380a8ee2b22414d38f7c0c972865c9666aaa42b78cad0f2c10c08fb7c2dfc2c3ce5f8b06633d1b34c12b9d3c2479f75d6bbc792ad80ca052f1d176236c77932f13dc62a960604d07b8f44883032f99c6c7aff38a546e9629e3f27cd4ef3d5acd263a64f69403d521024fa841db754f711ba3f572b60433a3853c05404285d54734d3aa8ea63b768032bc32cf6f76a4a2e2b845c87ce6d771e11af5e32d ...
softSelectionweights
12345678910111213141516171819202122232425262728293031import maya.OpenMaya as OpenMayadef softSelection(): #Grab the soft selection selection = OpenMaya.MSelectionList() softSelection = OpenMaya.MRichSelection() OpenMaya.MGlobal.getRichSelection(softSelection) softSelection.getSelection(selection) dagPath = OpenMaya.MDagPath() component = OpenMaya.MObject() # Filter Defeats the purpose of the else statement iter = OpenMaya.MItSelectionList( selection,OpenMaya.MF ...
DeleteUvSets
Usage: Delete UV Sets and rename last uvset
code:12345678910111213141516171819import maya.cmds as cmdsdef DeleteUvSets(newUVSet,sels): for mesh in sels: set = cmds.polyUVSet(mesh, query=True, allUVSets=1 ) for i in range(len(set)): if i>0: cmds.polyUVSet(mesh, delete=True, uvSet=set[i]) try: cmds.polyUVSet(mesh,rename=True, newUVSet=newUVSet, uvSet= cmds.polyUVSet(mesh, currentLastUVSet=True )[0]) except: pass ...
Adding a QMenu to Maya
Adding a QMenu to Maya
https://groups.google.com/forum/#!forum/python_inside_maya
code:12345678910111213141516171819202122232425import shibokenfrom PySide import QtGui, QtCoreimport maya.OpenMayaUI as apiUIdef getMayaWindow(): ptr = apiUI.MQtUtil.mainWindow() if ptr is not None: return shiboken.wrapInstance(long(ptr), QtGui.QMainWindow)def addMenuItem(mayaWindow=None, title=''): mainMenu = QtGui.QMenu(title) menu = mayaWindow.menuBar().addMenu(mainMenu) retur ...
github tips
删除所有 tag 和 release:123456# 获取所有的 taggit tag -l | xargs -n 1 git push --delete origin# 删除本地的 taggit tag | xargs git tag -d
meta human dna tool
code:12
sqlite3 基础操作
code:12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879import sqlite3DB_FILE_PATH = "W:/shome/chengang/fps.db"conn = sqlite3.connect(DB_FILE_PATH)cursor = conn.cursor()# 添加 tablecursor.execute('create table COMPANY (proj,char,fps)')cursor.rowcountcursor.close()conn.commit()conn.close()# 添加conn = sqlite3.connect(DB_FILE_PATH)cursor = conn.cursor()users = ('wps',' ...