Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Starke committed Sep 8, 2021
1 parent 23cbe55 commit 6f91bcd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
20 changes: 10 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ AI4Animation/SIGGRAPH_Asia_2019/Unity/UIElementsSchema
AI4Animation/SIGGRAPH_Asia_2019/Unity/Logs
AI4Animation/SIGGRAPH_Asia_2019/Unity/Packages

AI4Animation/SIGGRAPH_Asia_2020/Unity/[Ll]ibrary/
AI4Animation/SIGGRAPH_Asia_2020/Unity/[Tt]emp/
AI4Animation/SIGGRAPH_Asia_2020/Unity/[Oo]bj/
AI4Animation/SIGGRAPH_Asia_2020/Unity/[Bb]uild/
AI4Animation/SIGGRAPH_Asia_2020/Unity/[Bb]uilds/
AI4Animation/SIGGRAPH_Asia_2020/Unity/Assets/AssetStoreTools*
AI4Animation/SIGGRAPH_Asia_2020/Unity/PATCH/
AI4Animation/SIGGRAPH_Asia_2020/Unity/UIElementsSchema
AI4Animation/SIGGRAPH_Asia_2020/Unity/Logs
AI4Animation/SIGGRAPH_Asia_2020/Unity/Packages
AI4Animation/SIGGRAPH_2020/Unity/[Ll]ibrary/
AI4Animation/SIGGRAPH_2020/Unity/[Tt]emp/
AI4Animation/SIGGRAPH_2020/Unity/[Oo]bj/
AI4Animation/SIGGRAPH_2020/Unity/[Bb]uild/
AI4Animation/SIGGRAPH_2020/Unity/[Bb]uilds/
AI4Animation/SIGGRAPH_2020/Unity/Assets/AssetStoreTools*
AI4Animation/SIGGRAPH_2020/Unity/PATCH/
AI4Animation/SIGGRAPH_2020/Unity/UIElementsSchema
AI4Animation/SIGGRAPH_2020/Unity/Logs
AI4Animation/SIGGRAPH_2020/Unity/Packages


# Autogenerated VS/MD/Consulo solution and project files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,21 @@ public float GetContact(Frame frame, bool mirrored) {
return Contacts[frame.Index-1];
}
if(MirrorSensor == null) {
MirrorSensor = Module.GetSensor(Module.Data.Source.Bones[Module.Data.Symmetry[Module.Data.Source.FindBone(ID).Index]].Name);
MotionData.Hierarchy.Bone bone = Module.Data.Source.FindBone(ID);
if(bone != null) {
MirrorSensor = Module.GetSensor(Module.Data.Source.Bones[Module.Data.Symmetry[bone.Index]].Name);
}
}
return MirrorSensor == null ? 0f : MirrorSensor.Contacts[frame.Index-1];
}

public void SetName(string name) {
ID = name;
if(ID != name) {
ID = name;
foreach(Sensor s in Module.Sensors) {
s.MirrorSensor = null;
}
}
}

public void SetBone(int index, int bone) {
Expand Down Expand Up @@ -471,7 +479,7 @@ public void Inspector(MotionEditor editor) {
if(Utility.GUIButton("+", UltiDraw.DarkGrey, UltiDraw.White, 20f, 20f)) {
AddBone(0);
}
EditorGUILayout.LabelField("Name", GUILayout.Width(40f));
EditorGUILayout.LabelField("Group", GUILayout.Width(40f));
SetName(EditorGUILayout.TextField(ID, GUILayout.Width(100f)));
EditorGUILayout.LabelField("Mask", GUILayout.Width(40));
Mask = InternalEditorUtility.ConcatenatedLayersMaskToLayerMask(EditorGUILayout.MaskField(InternalEditorUtility.LayerMaskToConcatenatedLayersMask(Mask), InternalEditorUtility.layers, GUILayout.Width(100f)));
Expand Down

0 comments on commit 6f91bcd

Please sign in to comment.