This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import imath | |
| from ctypes import ( | |
| c_bool, c_byte, c_ubyte, c_short, c_ushort, | |
| c_int, c_uint, c_float, c_double | |
| ) | |
| # imathArrayType: (numpyDType, ctype, dim, dataShape) | |
| _CONVERT_DICT = { | |
| # vertices |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setlocal | |
| SET BUILD=mayabuild18 | |
| SET MAYA_VERSION=2018 | |
| SET COMPILER=Visual Studio 15 2017 Win64 | |
| SET PFX=%~dp0 | |
| cd %PFX% | |
| rmdir %BUILD% /s /q | |
| mkdir %BUILD% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from maya import OpenMaya as om | |
| import numpy as np | |
| from ctypes import c_float, c_double, c_int, c_uint | |
| _CONVERT_DICT = { | |
| om.MPointArray: (float, 4, c_double, om.MScriptUtil.asDouble4Ptr), | |
| om.MFloatPointArray: (float, 4, c_float , om.MScriptUtil.asFloat4Ptr), | |
| om.MVectorArray: (float, 3, c_double, om.MScriptUtil.asDouble3Ptr), | |
| om.MFloatVectorArray: (float, 3, c_float , om.MScriptUtil.asFloat3Ptr), | |
| om.MDoubleArray: (float, 1, c_double, om.MScriptUtil.asDoublePtr), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fuzzyfinder(pattern, collection): | |
| results = [] | |
| for item in collection: | |
| key = [] | |
| # Start the find at the beginning of the string | |
| index = -1 | |
| for x in pattern: | |
| # Find the next letter in the pattern after the prevous match |
NewerOlder