Skip to content

Instantly share code, notes, and snippets.

View leestuartx's full-sized avatar

Leeman leestuartx

View GitHub Profile
neutral_P
eyeBlinkLeft_P
eyeLookDownLeft_P
eyeLookInLeft_P
eyeLookOutLeft_P
eyeLookUpLeft_P
eyeSquintLeft_P
eyeWideLeft_P
eyeBlinkRight_P
eyeWideRight_P
/*
*
Steps:
Make sure there is a "_BS" on all the blendshapes
then set the fps to 30
then we are going to set the initial keyframe to 0
set max keyframe to 70
run "SetAllKeyframesToZero()" on the blendshape node
run "KeyAllBlendshapesFromFile("A:/latestPoseList_v2.txt"); on the blendshape node
@leestuartx
leestuartx / BatchImportAssetPackages.cs
Last active August 16, 2023 16:52
Batch import Unity packages
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using System.IO;
public class BatchImportAssetPackages : ScriptableWizard
{
@leestuartx
leestuartx / rotate90Deg
Created June 15, 2015 17:07
Rotate Character 90 Degrees
#Rotates a character 90 degrees without modifying the orientation of the root
#Create new layer, Rotate root 90, Set Key, merge layers, Bake to rig,
#Create new layer, rotate root to 0, set key, merge layers, bake to skeleton
#a script for removing all the keyframes on the root node
from pyfbsdk import *
import os.path, os, inspect, sys
# Find the animation node recurvesive by name.
def findAnimationNode( pName, pNode ):
@leestuartx
leestuartx / StdToRootMotion
Created June 15, 2015 16:14
Standard Anim to Root motion
#a script for moving translations from the hip joint to root joint for root motion animations
from pyfbsdk import *
import os.path, os, inspect, sys
# Find the animation node recurvesive by name.
def findAnimationNode( pName, pNode ):
lResult = None
lName = pName.split( '/' )
for lNode in pNode.Nodes:
if lNode.Name == lName[0]:
@leestuartx
leestuartx / AutoOrientMotionbuilder
Last active August 29, 2015 14:23
Auto orient and character animations in motionsbuilder - Python
#a script for removing all the keyframes on the root node
from pyfbsdk import *
import os.path, os, inspect, sys
# Find the animation node recurvesive by name.
def findAnimationNode( pName, pNode ):
lResult = None
lName = pName.split( '/' )
for lNode in pNode.Nodes:
if lNode.Name == lName[0]:
@leestuartx
leestuartx / RootCleanup -MotionBuilder
Created June 13, 2015 09:18
Remove Keyframes from root and reposition and orient to 0,0,0
#a script for removing all the keyframes on the root node
from pyfbsdk import *
import os.path, os, inspect, sys
#List to populate character template
lScene = FBSystem().Scene
lcharactersList = FBSystem().Scene.Characters
lchar = lcharactersList[0]
#select the first character
@leestuartx
leestuartx / gist:1c2e42d163970be8200d
Created June 13, 2015 06:48
Auto Plot all takes in MotionBuilder
from pyfbsdk import *
lSystem = FBSystem()
lTakeIdx = 1
'''
Actual loop to move through takes
'''
@leestuartx
leestuartx / FaceAnimationPlayer.cpp
Created April 3, 2015 08:02
Blendshape face animation player for Unreal 4 that uses CSV keyframe data
// Candax Productions
#include "BFPOnline.h"
#include "FaceAnimationPlayer.h"
AFaceAnimationPlayer::AFaceAnimationPlayer(const class FObjectInitializer& PCIP)
: Super(PCIP)
{
//Enable Ticking
PrimaryActorTick.bCanEverTick = true;
@leestuartx
leestuartx / DBManip_PHP.cs
Last active August 29, 2015 14:18
Database Manipulation, specifically used in Project Trak application
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class DBManip_PHP : MonoBehaviour {
private string prefixURL = "http://localhost/";
public string getProjectsURL = "getProjectList.php?";