Beispiel #1
0
 public static void conditionChangedCB(object sender, MStateFunctionArgs args)
 {
     // Client data isn't supported in Maya.NET, therefore we have to maintain an original
     // copy of the condition states and manually compare the states here in order to find
     // which state is being changed.
     for (int i = 0; i < conditionNames.length; ++i)
     {
         if (conditionCallbacks[i])
         {
             bool newState = MConditionMessage.getConditionState(conditionNames[i]);
             if (newState != conditionStates[i])
             {
                 displayInfo("condition " + conditionNames[i] + " changed to " + (newState ? "true" : "false"));
                 conditionStates[i] = newState;
             }
         }
     }
 }
Beispiel #2
0
		public static void conditionChangedCB(object sender, MStateFunctionArgs args)
		{
			// Client data isn't supported in Maya.NET, therefore we have to maintain an original
			// copy of the condition states and manually compare the states here in order to find
			// which state is being changed.
			for (int i = 0; i < conditionNames.length; ++i)
			{
				if (conditionCallbacks[i])
				{
					bool newState = MConditionMessage.getConditionState(conditionNames[i]);
					if (newState != conditionStates[i])
					{
						displayInfo("condition " + conditionNames[i] + " changed to " + (newState ? "true" : "false"));
						conditionStates[i] = newState;
					}
				}
			}
		}