-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-114297 MAYA-114300 Job context UI #1842
Conversation
Add a job context dropdown called "Plug-in Configuration:" in both import and export dialogs when in USD mode. This dropdown will be populated with the available job contexts. Selecting on the the job context will populate the UI with the settings provided by the job context, and these settings will be made read-only.
@@ -245,7 +245,7 @@ MStatus MayaUSDExportCommand::doIt(const MArgList& args) | |||
|
|||
// Read all of the dictionary args first. | |||
const VtDictionary userArgs = UsdMayaUtil::GetDictionaryFromArgDatabase( | |||
argData, UsdMayaJobExportArgs::GetDefaultDictionary()); | |||
argData, UsdMayaJobExportArgs::GetGuideDictionary()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function works best if the dictionary passed contains fully typed values. The "Default" dictionary has a tendency to contain empty vectors for args that take a list, and this does not provide enough information about what goes into the list (especially chaserArgs where the contents are themselves vectors). The newly introduced "Guide" dictionary provides all the information for proper parsing.
const auto _string = VtValue(std::string()); | ||
const auto _stringVector = VtValue(std::vector<VtValue>({ _string })); | ||
const auto _stringTriplet = VtValue(std::vector<VtValue>({ _string, _string, _string })); | ||
const auto _stringTripletVector = VtValue(std::vector<VtValue>({ _stringTriplet })); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value is not important. Only the type.
} else if (value.IsHolding<int>()) { | ||
return std::make_pair(true, std::to_string(value.Get<int>())); | ||
} else if (value.IsHolding<float>()) { | ||
return std::make_pair(true, std::to_string(value.Get<float>())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have int and float values in the args: startTime, endTime, frameStride, so we need a way to unparse them.
@@ -15,25 +15,29 @@ | |||
// limitations under the License. | |||
// | |||
|
|||
proc mayaUsdTranslatorExport_SetCheckbox(string $arg, string $widget) { | |||
proc mayaUsdTranslatorExport_SetCheckbox(string $arg, int $enable, string $widget) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the setters take an extra argument to enable the field or not depending if the value was set from a regular argument, or from an argument provided by a job context.
@@ -61,7 +61,29 @@ REGISTER_EXPORT_JOB_CONTEXT_FCT(Thierry, "Thierry", "Exports for Thierry rendere | |||
|
|||
REGISTER_EXPORT_JOB_CONTEXT_FCT(SceneGrinder, "Scene Grinder", "Exports to Scene Grinder") | |||
{ | |||
return VtDictionary(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For testing interactively in Maya. Provide a few interesting values to make sure the fields are correctly updated and disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for doing the localization work.
Add a job context dropdown called "Plug-in Configuration:" in both
import and export dialogs when in USD mode.
This dropdown will be populated with the available job contexts.
Selecting on the the job context will populate the UI with the settings
provided by the job context, and these settings will be made read-only.