Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions plugin/adsk/scripts/mayaUsdTranslatorExport.mel
Original file line number Diff line number Diff line change
Expand Up @@ -687,18 +687,6 @@ global proc mayaUsdTranslatorExport_contextOptionsButtonCB(string $contextLabel)
"mayaUsdTranslatorExport_contextOptionsShowExportUI");
}

// Callback called when the animation frame layout is expanded.
// Set the animOptsCol layout visibility status based on the
// animationCheckBox checkbox value. By default, maya look
// to set all childs widget of frameLayout visible when the
// frameLayout is expanded.
global proc mayaUsdTranslatorExport_AnimationFrameLayoutExpandCB() {
if (`checkBoxGrp -exists animationCheckBox` == 0)
return;

columnLayout -e -visible (`checkBoxGrp -q -v1 animationCheckBox`) animOptsCol;
}

global proc mayaUsdTranslatorExport_AnimationRangeCB() {
if (`intFieldGrp -exists frameRangeFields` == 0)
return;
Expand Down Expand Up @@ -1308,8 +1296,7 @@ global proc int mayaUsdTranslatorExport (string $parent,
if (stringArrayContains("animation", $sectionNames)) {
// The default state for this frame is expanded, unless the caller explictly wants it collapsed.
int $collapse = stringArrayContains("animation", $collapsedSections) ? true : false;
frameLayout -label `getMayaUsdString("kExportFrameAnimationLbl")` -collapsable true -collapse $collapse
-expandCommand("mayaUsdTranslatorExport_AnimationFrameLayoutExpandCB") animationFrameLayout;
frameLayout -label `getMayaUsdString("kExportFrameAnimationLbl")` -collapsable true -collapse $collapse animationFrameLayout;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the behavior I think another way to fix would be to set the visibility of the column layout when toggling the checkbox?

IOW, have a -changeCommand on the animationCheckBox that would call the mayaUsdTranslatorExport_AnimationFrameLayoutExpandCB

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, call tha CB when initially creating / filling the UI with values. IDK if when setting value if the CB gets called. Just test it by hand in Maya once the changes are done, maybe you don't need to explicitly call the CB when filling the values, maybe the CB is also called then, but I'm not sure.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, there is already a CB for the check-box. Just need to toggle visibility too in that CB. (mayaUsdTranslatorExport_AnimationCB)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...but honestly, liek I initally said, IDK why we were hiding the UI?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not doing that for materials, and other sections. 🤷

separator -style "none";

if (stringArrayContains("animation-data", $sectionNames)) {
Expand Down
Loading