Thread: [Maya2osg-users] About the UI
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-05-18 23:39:29
|
Hi, This message is especially for Peter, but everybody is welcome to the discussion. First of all: Peter, you can remove/erase/delete/destroy/anihilate/atomize my old export options UI that look ultra-wide in recent Maya versions and keep with your new version. It is nonsense to maintain two versions of the UI. I think the MEL scripts are complex enough to make it more difficult :) Let's just work on improving the version we keep. I was trying the "Export All" Maya option with OSG format and I have found some problem I don't know how to solve. Maybe someone with more experience in Maya could help. The fact is that I try to export to a file named "model.osgb" and Maya appends the "osgt" extension to the file name, exporting "model.osgb.osgt". If I type "model.osgt", everything is OK. If I type just "model", then it is completed to "model.osgt", this is also fine. But it seems that there is no way to export to a format other than "osgt". What is more weird, I tried even removing the default extension "osgt" from the OSGFileTranslator (in osgfiletranslator.h) and it keeps doing exactly the same. I don't know who is telling Maya to complete it with osgt extension. I gave a quick look at the scripts but it doesn't seem to be there. Any idea? The other choice is using the maya2osg export command (throught the shelf button), I suppose I could get used to the new way of selecting the output file: path, filename and extension. It has advantages of course, I think once I get used to it I'll prefer this way. What I don't like is the file browser that appears when pressing the button "Browse" in the Filepath. Peter, what do you think about using the full browser for selecting the file path? Another weird thing with the exported file selection is that you can type the file path (instead of selecting it in the browser), but you cannot type the file name (!!). Actually, you are forced to write the file name opening a browser. I think having to open two browsers is excessive to select the output file for the exporter. Once you have browsed directories to select the file path, the second field should be just write the file name. Even more, you can type the file format, and this, IMHO, is unnecessary, as we have the selection list with the only possible choices. I would remove the text box here and let the selection list only. Also, an overwrite warning when exporting to an existing file name would be nice, but I could live without it. OK. After some use, you discover that the straight way to use this part of the UI is going directly to the Browse button in the Filename and there you can select at once file path, file name and file type. Well. Then clearly the first textfield file path and especially its Browse button are redundant. One other thing, I saw that the order to delete the UI after exporting is commented. Is this for any reason? I think it should disappear once the export is finished. Well... this is enough for today... I'd like to know your opinions about these subjects. By the way. I think I have solved the problems of the previsualization. Now it is working in the preview quick buttons and in the "Export and Preview" button from the exporter option box. If you have a panel selected, and the camera in this panel has been exported, it is used for the preview. One problem I have found is that new osg format (osgt) does not write the viewer information, so by now the C++ code and the MEL scripts assume that cameras are always exported in ".osg" format. Regards, -- Javier Taibo |
From: Peter W. <pp...@cg...> - 2011-05-19 08:28:32
|
Hi Javier and all, have exams this week, so this will be very short. Will turn more to maya2osg after monday > First of all: Peter, you can > remove/erase/delete/destroy/anihilate/atomize my old export options UI > that look ultra-wide in recent Maya versions and keep with your new > version. It is nonsense to maintain two versions of the UI. I think > the MEL scripts are complex enough to make it more difficult :) > Let's just work on improving the version we keep. Fine, will do that. But for now I added the optionVar through the script, so that it allways opens with the optionMenu version. > I was trying the "Export All" Maya option with OSG format and I have > found some problem I don't know how to solve. Maybe someone with more > experience in Maya could help. > > The fact is that I try to export to a file named "model.osgb" and > Maya appends the "osgt" extension to the file name, exporting > "model.osgb.osgt". If I type "model.osgt", everything is OK. If I type > just "model", then it is completed to "model.osgt", this is also fine. > But it seems that there is no way to export to a format other than > "osgt". So, this is working fine through the ciustom UI, but not through the Maya file dialog. I will check th > What is more weird, I tried even removing the default extension > "osgt" from the OSGFileTranslator (in osgfiletranslator.h) and it > keeps doing exactly the same. I don't know who is telling Maya to > complete it with osgt extension. I gave a quick look at the scripts > but it doesn't seem to be there. > > Any idea? > > Yes, the normal fileTranslator functionality is doing this. When you don't add a file extension, the fileTranslator chooses the first which is assotiated with ... oh I can't check any more, notice now, that all my project and solution files are gone due to the updates :-) and I didn't build it since the cmake project is used. In any case, the fileTranslator is doing this. Will check it. > The other choice is using the maya2osg export command (throught the > shelf button), I suppose I could get used to the new way of selecting > the output file: path, filename and extension. It has advantages of > course, I think once I get used to it I'll prefer this way. > > What I don't like is the file browser that appears when pressing the > button "Browse" in the Filepath. Peter, what do you think about using > the full browser for selecting the file path? Issue, with a file dialog you cannot choose folders, but just files. Will check that one more time, but I think it wasn't possible due to windows. I also prefere the file chooser, instead of the path chooser. But when you browse directly for a file, the script patches the path as well, so you don't need to do this twice. > Another weird thing with the exported file selection is that you can > type the file path (instead of selecting it in the browser), but you > cannot type the file name (!!). Actually, you are forced to write the > file name opening a browser. I think having to open two browsers is > excessive to select the output file for the exporter. Once you have > browsed directories to select the file path, the second field should > be just write the file name. Fixed, this happened when I added the Pre/Post export textfields, was experimenting and forgot to remove flags :-) > Even more, you can type the file format, and this, IMHO, is > unnecessary, as we have the selection list with the only possible > choices. I would remove the text box here and let the selection list > only. > Will do. > Also, an overwrite warning when exporting to an existing file name > would be nice, but I could live without it. This was intended. Testing, tweaking, testing, tweaking, ... you don't want to have those warnings, you just want to overwrite your file. I will generate a warning, but put somewhere an option "subpress overwrite warning", which would ... well subpress this warning :-) > OK. After some use, you discover that the straight way to use this > part of the UI is going directly to the Browse button in the Filename > and there you can select at once file path, file name and file type. > Well. Then clearly the first textfield file path and especially its > Browse button are redundant. Not really, as sometimes you might want to keep filename, filetype, but just change the path. On my to do list is also something like "exportSelectedMeshAsGeode". Now suppose, you want to organize all what you export in different pathes. What's very handey for this is also the recently used paths Popup, when you press right mouse button over the path field. Tried that alreafy ? > One other thing, I saw that the order to delete the UI after > exporting is commented. Is this for any reason? I think it should > disappear once the export is finished. Yes, same reason as above, when you wanna do the Testing, tweaking, testing, tweaking Thingie, its unconfortable to reaopen the dialog again. Same solution idea, either one more button "export and close" or give a Option, "Close After Export" > By the way. I think I have solved the problems of the > previsualization. Now it is working in the preview quick buttons and > in the "Export and Preview" button from the exporter option box. If > you have a panel selected, and the camera in this panel has been > exported, it is used for the preview. So, please ignore my reply to the other thread yesterday, that is answered now :-) > One problem I have found is that new osg format (osgt) does not > write the viewer information, so by now the C++ code and the MEL > scripts assume that cameras are always exported in ".osg" format. And this is most probably the reason why I heve never noticed, that the Export and Preview Button did not work properly. I was testing only with osgt all the time, and I thought that osg and osgt are similar. At least they look similar. So I submit now minor changes, making the text field for filename editable again, and the UI opening with optionMenu by default. Moreover, there is a global proc "maya2osg_removeOptionVars" actually deletes all the optionVars. This means that when reopening the UI, they will be regenarted with default settings. Cheers, PP |
From: Javier T. <jav...@gm...> - 2011-05-19 16:18:18
|
Hi Peter, On Thu, May 19, 2011 at 10:28 AM, Peter Wrobel <pp...@cg...> wrote: > Hi Javier and all, have exams this week, so this will be very short. > Will turn more to maya2osg after monday OK. Just delay the answer to this message until next week. I'm writing it now, because otherwise I will forget :) > Yes, the normal fileTranslator functionality is doing this. When you > don't add a file extension, the fileTranslator chooses the first which > is assotiated with ... oh I can't check any more, notice now, that all Yes, this is the normal (and desirable) behavior, but the problem is that when you explicitly define an extension, it still chooses the default one. There is no way to specify other than the default. I tried for a while, but I didn't find a way to solve it :? But don't worry, anyway, our export command works pretty well :) >> OK. After some use, you discover that the straight way to use this >> part of the UI is going directly to the Browse button in the Filename >> and there you can select at once file path, file name and file type. >> Well. Then clearly the first textfield file path and especially its >> Browse button are redundant. > > Not really, as sometimes you might want to keep filename, filetype, but > just change the path. > On my to do list is also something like "exportSelectedMeshAsGeode". Now > suppose, you want to organize all what you export in different pathes. > What's very handey for this is also the recently used paths Popup, when > you press right mouse button over the path field. Tried that alreafy ? :-) I didn't tried that. Cool! > Yes, same reason as above, when you wanna do the Testing, tweaking, > testing, tweaking Thingie, its unconfortable to reaopen the dialog > again. Same solution idea, either one more button "export and close" or > give a Option, "Close After Export" Personally I prefer the option better than the button. This way you select it once and forget it exists. With the button you have to choose always between all the buttons. > So I submit now minor changes, making the text field for filename > editable again, and the UI opening with optionMenu by default. > Moreover, there is a global proc "maya2osg_removeOptionVars" actually > deletes all the optionVars. This means that when reopening the UI, they > will be regenarted with default settings. Why? I liked very much when you added all the OptionVars because I can store my last export options from one Maya execution to other. I think it is very useful. Please, don't disable now this feature :) Regards, -- Javier Taibo |
From: Peter W. <pp...@cg...> - 2011-05-19 20:10:29
|
Hi, > Why? I liked very much when you added all the OptionVars because I > can store my last export options from one Maya execution to other. I > think it is very useful. Please, don't disable now this feature :) > > no, no, that's not what I meant. I created already a lot of variables and one of them got useless right now, which is "maya2osg_uiType". I'm sure that few more will follow, but once created, this variable will stay forever unless one deletes it manually. That is the intention of the procedure, cleaning up optionVar mess. In any case, if opening the UI the really necessary variables will be recreated. Its more like a reset. Cheers, PP |