You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, api method arguments are classified as either "in" or "out"* (via "direction"). However, some arguments - ie, MAnimCurveChange / MDgModifier / MDagModifier args - aren't really either in or out, but are just used to record undo information. We currently have special handling for MAnimCurveChange, but we do it through a lot of special case checks. Would like to genericize this work, and use it to also handle MDgModifier and MDagModifier args.
One way to do this would be to mark these args' direction as "undo" (and not "in" or "out"), and this would trigger special handling. If we go this route, would like to not write this into the api cache itself, but automatically applied by by some sort of getter or processing function. (Eventually, would like a class to handle all cache queries, to provide a centralized place for this sort of processing. For instance, factories._getApiOverrideNameAndData would go there). This way, we'd have an untainted "record" of what the maya docs said the arg type was.
Would also like to be able to handle args of these three types that don't have a default value - right now, because they're not in factories.ApiTypeRegister, the wrapping mechanisms assume they don't know how to handle them, and so will only wrap these funcs if they provide a default. Would like to address this by adding them to ApiTypeRegister somehow, but may end up being easier to special-case "undo" arg types.
*Technically, there are some that are also in/out, but I think we currently ignore those.
The text was updated successfully, but these errors were encountered:
Currently, api method arguments are classified as either "in" or "out"* (via "direction"). However, some arguments - ie, MAnimCurveChange / MDgModifier / MDagModifier args - aren't really either in or out, but are just used to record undo information. We currently have special handling for MAnimCurveChange, but we do it through a lot of special case checks. Would like to genericize this work, and use it to also handle MDgModifier and MDagModifier args.
One way to do this would be to mark these args' direction as "undo" (and not "in" or "out"), and this would trigger special handling. If we go this route, would like to not write this into the api cache itself, but automatically applied by by some sort of getter or processing function. (Eventually, would like a class to handle all cache queries, to provide a centralized place for this sort of processing. For instance, factories._getApiOverrideNameAndData would go there). This way, we'd have an untainted "record" of what the maya docs said the arg type was.
Would also like to be able to handle args of these three types that don't have a default value - right now, because they're not in factories.ApiTypeRegister, the wrapping mechanisms assume they don't know how to handle them, and so will only wrap these funcs if they provide a default. Would like to address this by adding them to ApiTypeRegister somehow, but may end up being easier to special-case "undo" arg types.
*Technically, there are some that are also in/out, but I think we currently ignore those.
The text was updated successfully, but these errors were encountered: