Skip to content
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

EMSUSD-1030 - Persist the default prim selection if its available #3705

Merged
merged 3 commits into from
Apr 11, 2024

Conversation

samuelliu-adsk
Copy link
Collaborator

No description provided.

@samuelliu-adsk samuelliu-adsk added the import-export Related to Import and/or Export label Apr 9, 2024
@samuelliu-adsk samuelliu-adsk self-assigned this Apr 9, 2024
int $count = 1;
for($item in $allItems){
string $labelText = `menuItem -query -label $item`;
if($labelText == $defaultPrimName){
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Select the prim as default prim if it's in the candidates' list.

for($item in $allItems){
string $labelText = `menuItem -query -label $item`;
if($labelText == $defaultPrimName){
optionMenuGrp -e -select $count exportDefaultPrim;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here you could use optionMenuGrp -e -value $defaultPrimName exportDefaultPrim;

to set the menu item by value. Then you don't need to keep track of the count.

You could even just wrap that command in a catchQuiet then you don't even need to check if its in the menus. It will just silently fail if its not present anymore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh thanks! That should be a much better way to do it

@samuelliu-adsk samuelliu-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Apr 11, 2024
@seando-adsk seando-adsk merged commit 0b3fee5 into dev Apr 11, 2024
12 of 13 checks passed
@seando-adsk seando-adsk deleted the samuelliu-adsk/EMSUSD-1030/persist_default_prim branch April 11, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
import-export Related to Import and/or Export ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants