Krakatoa v0.9.17.28563
Max 8 sp 3
TP 2.5
If we have already specified saving to .bin and then change the Path it will auto-add the .prt extension again… (while keeping the previous .bin)
Krakatoa v0.9.17.28563
Max 8 sp 3
TP 2.5
If we have already specified
saving to .bin and then change
the Path it will auto-add the
.prt extension again… (while
keeping the previous .bin)
Thanks for the report, will try to fix it tomorrow before posting a patch for the other problems!
Ok, I don’t really know the solution of this one.
If you do what you did and then press […] to open the File Dialog, the type drop-down list is by default set to .PRT and I have no way to set it to anything else via MAXScript. So your file becomes a PRT immediately. The dialog itself adds the .PRT extension if the file does not have it, because you never selected BIN from the drop-down list, just assumed it will stay there.
Possible solutions:
- I can remove the extension when opening the dialog, the result will be a file with only .prt as extension, the .bin would be gone (unless you explicitly select BIN files from the list of types)
Showing "All Files (.)" would not add any extension. Having "All Particle Files (.prt;.csv;.bin)" does not work in MAXScript - this is a Save dialog, and it adds the extension from the list, in this case specifying a file particles_ results in “particles_.prt;.csv;*.bin” which is definitely wrong and might be a Windows bug or a MAX bug, don’t know.
*Adding my own checks for double extensions, so .bin.prt would be filtered out to .bin only after the dialog closes. Not sure I want to add that…
In a way, this is “User Error”, but I would prefer to avoid it from happening, I just don’t know how… yet.
Spoke to soon. Had lunch, thought more about it, fixed it in a slightly strange way.
In short, when you press the […] button, the file name will be displayed without extension, but the extension will be checked and a different dialog will open, with the current extension in the beginning of the types list.
So if your file was particles_00000.bin, pressing […] will open a file save dialog where the file types are specified as BIN|PRT|CSV. If your file was a PRT, the list will be PRT|CSV|BIN.
Since the file name is shown without extension, the top extension from the type list will be added back when you close the dialog, but if you changed the type drop-down list, the new extension will be added.
I think this is a pretty good workaround to the limitations of the GetSaveFileDialog() method and should avoid double extensions in almost all cases unless you type in your own wrong extension. ;o)
The updated KrakatoaGUI files have been posted to the Builds / Beta 17 thread.
uh-oh… Now with the GUI SP1 it will not respond when we click the Path’s “…” button.
We have to manually type a path in and then it will open the “choose directory” interface…
uh-oh indeed! I am officially a moron :o)
The default test should have been called default:, not #prt. It was one single word that broke it.
Please download SP2 and see if it fixes the problem.
lol – if that makes anyone a moron, I fear what it makes the rest of us…