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; } } } }
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; } } } }