Skip to content

Commit

Permalink
Merge branch 'release/v0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
nicloay committed Feb 14, 2014
2 parents b236f0d + cbed08e commit beedb35
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;

namespace CurveExtended{
[Flags]
public enum TangentMode
{
Editable = 0,
Expand Down Expand Up @@ -102,6 +103,14 @@ public static void SetKeyBroken(object keyframe, bool broken)
tangentMode &= -2;
field.SetValue(keyframe, tangentMode);
}

// UnityEditor.CurveUtility.cs (c) Unity Technologies
public static bool isKeyBroken(object keyframe){
Type t = typeof( UnityEngine.Keyframe );
FieldInfo field = t.GetField( "m_TangentMode", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance );
int tangentMode = (int)field.GetValue(keyframe);
return (tangentMode & 1) != 0;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class SpineImporterWizard :ScriptableWizard {
public int pixelsPerUnit = 100;
public bool buildAvatarMask = true;
public AnimationImportType animationImportType = AnimationImportType.MECANIM;
public bool updateResources = true;
[HideInInspector]
public string path;

Expand All @@ -33,7 +34,8 @@ public static bool validateContext(){

void OnWizardUpdate() {
helpString = "Be carefull, don't use small amout of pixels per unit (e.g. 1 or 10) \n" +
"if you are going to use result model with unity 2d physics and gravity";
"if you are going to use result model with unity 2d physics and gravity\n" +
"update resources means - instead of create new animator and new animations update them";
if (pixelsPerUnit <=0)
errorString = "PixelsPerUnit must be greater than zero";
else
Expand Down Expand Up @@ -70,11 +72,10 @@ void OnWizardCreate(){
}

ModelImporterAnimationType modelImporterAnimationType = getModelImporterAnimationType();
SpineUtil.addAnimation(rootGO, directory, spineData, boneGOByName, attachmentGOByNameBySlot, pixelsPerUnit, modelImporterAnimationType);
SpineUtil.addAnimation(rootGO, directory, spineData, boneGOByName, attachmentGOByNameBySlot,
pixelsPerUnit, modelImporterAnimationType, updateResources);
sk.showDefaulSlots();

SpineUtil.buildPrefab(rootGO, directory, name);

GameObject.DestroyImmediate(rootGO);

} catch (SpineMultiatlasCreationException e){
Expand Down
Loading

0 comments on commit beedb35

Please sign in to comment.