can anyone educate me on a shelf button that when pressed prompts a dialogue box where automatically saves to a specific directory(without navigation), but first brings up a dialogue box where I can enter the shot number and it saves the file like this:

shot
[????]
ok cancel

saves to directory pre specified
c://yada/yada/yada/shot01.mb 

exactly like the save as, but without directory navigation and only having to enter the shot number in prompt dialogue 

  • created

    Feb '13
  • last reply

    Feb '13
  • 1

    reply

  • 2.3k

    views

  • 1

    user

nevermind i got it.  if anyone wants it

{

string $text;

// create a prompt dialog to request the users name

string $result = `promptDialog

-title "save shot"

-message "shot number:"

-button "OK" -button "Cancel"

-defaultButton "OK" -cancelButton "Cancel"

-dismissString "Cancel"`;

// if OK pressed

if ($result == "OK") {

// query the entry typed by the user

$shot = promptDialog -query -text;

string $fileName = $shot;

string $shot = $fileName;

string $path = "G:/XXXXXX_XX_XXXX/scenes/XXX_XXX_XXX/XXXXX/";

string $fullName = $path + $fileName;

file -rn $fullName;

file -s;

}

else {

print("cancelled");

}

}