private List <string> getEmoteVarNames() { try { CharacterContext context = CharacterContext.GetCharacterContext(); uint countVars = context.GetCharacter(0).CountVariables(); return(Enumerable.Range(0, (int)countVars).Select(idx => context.GetCharacter(0).GetVariableLabelAt((uint)idx)).ToList()); } catch { } return(null); }
// Triggered execution public override void Execute(object context) { float l_value = value; if (inputValue.IsConnected) { object newContext = new object(); // new exuction node, new execution context NodeDataNumeric InputVal = inputValue.AttachedConnections.Select(connection => { try { object tmp = connection.SourceConnector.ParentNode.GetValue(connection.SourceConnector, context); if (typeof(NodeDataNumeric).IsAssignableFrom(tmp.GetType())) { return((NodeDataNumeric)tmp); } return(null); } catch { return(null); } }).Where(val => val != null).FirstOrDefault(); if (InputVal != null) { l_value = InputVal.GetSingle(); } } charContext.GetCharacter(0).SetVariable(varName, l_value, frameCount, easing); }