The gist is:
- install the normal python from python.org
- install everything into a venv
- copy the venv into python embed.
unzip python-3.8.0-embed-amd64.zip
// Maya Mel UI Configuration File.Maya Mel UI Configuration File.. | |
// | |
// | |
// This script is machine generated. Edit at your own risk. | |
// | |
// | |
//////////////////////////////////////////////////////////////////// | |
global proc UI_Mel_Configuration_think(){ | |
string $localized_resources_path = `getenv MAYA_LOCATION`+("/resources/l10n/"); | |
string $all_file[]=`getFileList -folder $localized_resources_path`; |
using System; | |
using System.Collections; | |
using System.Runtime.InteropServices; | |
using SFB; | |
using UnityEngine; | |
using VRM; | |
// | |
// Get SFB from https://github.com/gkngkc/UnityStandaloneFileBrowser |
import FbxCommon | |
def fbx_trim_keys(scene, start, end, take_buffer=10): | |
""" | |
Uses the FBX SDK to remove unnecessary keys. | |
:param scene: FBX SDK scene class that hold data to edit | |
:param int start: start frame of animation keys to keep | |
:param int end: end frame of animation keys to keep |
shaderfx | |
Options: | |
-sfxnode | |
Specify the dagPath of the ShaderfxShader you are working on | |
The -sfxnode has to be supplied with (almost) every other flag | |
Example: shaderfx -sfxnode "ShaderfxShader1" -start; | |
using UnityEngine; | |
public class ResettableScriptableObject : ScriptableObject | |
{ | |
#if UNITY_EDITOR | |
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] | |
private static void CallBeforPlayScene() | |
{ | |
// recently, unity editor will crash | |
// recommend SaveProject before playing |
# coding: utf-8 | |
u""" | |
Maya 2017 workspaceControl の問題回避のサンプル。 | |
workspaceControl と workspaceControlState のゴミが残らないようにする。 | |
retain=False の場合でも何故か state のゴミが残ってしまうが、 | |
scriptJob で workspaceControl の削除を監視して state も同時に削除するようにする。 | |
retain=True の場合は、UI が閉じたとしても state は残って良いはずなので監視はしない。 |
def toggle_parallel_settings( func ): | |
def _wrapper( *args, **kwargs ): | |
# Store the initial values. | |
evaluate_manager = pyfbsdk.FBEvaluateManager() | |
p_evaluation = evaluate_manager.ParallelEvaluation | |
p_pipeline = evaluate_manager.ParallelPipeline | |
p_deformation = evaluate_manager.ParallelDeformation | |
# Turn them all off | |
evaluate_manager.ParallelEvaluation = False |
import maya.api.OpenMaya as OpenMaya | |
mesh = OpenMaya.MFnMesh() | |
# Simple unitCube coordinates | |
vertices = [] | |
vertices.append(OpenMaya.MPoint( 1, 1, 1)) # 0 | |
vertices.append(OpenMaya.MPoint( 1, -1, 1)) # 1 | |
vertices.append(OpenMaya.MPoint( 1, -1, -1)) # 2 |
using System; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Purchasing; | |
/// <summary> | |
/// 課金処理を扱うクラスです。 | |
/// 非消費、サブスクリプション型は動作未検証です。 | |
/// Android/iOSのみ動作検証しています。 | |
/// INFO:[iOS]未購入のアイテムがあるとInitialize後すぐに認証ダイアログが表示されるので、呼び出すタイミングを調整してください |