Re: [Maya2osg-users] osgpreview, UI and flags
Status: Alpha
Brought to you by:
jtaibo
From: Peter W. <pp...@cg...> - 2011-05-25 20:15:34
|
Hi Javier, > What I mean is: when you start Maya, the procs in these files are > not available. When you call for example the "maya2osg_export" proc, > as there is still not available, Maya looks for a > "maya2osg_export.mel" file in the scripts directories. When Maya > founds it and loads it, the procedure is available and executed. From > this moment, as the file is already loaded, all global procs in this > file are available, but they were not if you haven't called > "maya2osg_export" first. > Ah, I see. So for this there is the userSetup.mel, I guess you didn't get in touch with it till now. It gets executed at startup, and is, as the name says, a way to customize maya. This file doesn't exist by default, but only if one requires it. If it exists, user settings should be appended to the command s which are there already. In our case, we could source all the scripts with it. A more elegant way is to create a maya2osg_setup.mel ( will commit it soon ) and add the command source maya2osg_setup.mel to userSetup.mel. Within maya2osg_setup, we can source all the scripts, and maybe do some other setup stuff if requied. With this the preview command would available. I must admit, that I like the fact that there is now a seperated osgFileExportOptions.mel, which is sourced by Maya at plugin load. I would like to keep this seperated, as there might be additional edits. A preview field does not make sens, but the pre and post export commands do. > What have you merged? maya2osg_export and maya2osg_preview? If there > are not the two files, then try to call (just after starting Maya, > before calling anything else) the proc that has no file with its name > and see if it is executed. I think it will not. > Yes, see above. It works in my case, because I added a source m20_export.mel into any shelf icon which requires the sourcing of the script. This makes sens for development, so I was not aware that there is an issue. >> The only case is, when the whole system is installed, and no envVars are >> created, so we can catch this case, and generate the default ones. > I think I am not understanding you. It's not about envVars, its > about MEL procs. > Here I assumed, that all scripts do run, but I noticed issues, errors hen envVars were not setup properly. Point is that the preview command can and should use the envVars, which means that the export and preview and the quick preview in the shelf should basically be the same commands. > OK. Commit it then and let's try it. If it works, it's OK. I just > thought it wouldn't work, but I am not a Maya expert anyway :) > Fine, unfortunatelly again not so much time for committing, as preaseure is going on again. But its not so horrible like the last week any more. I try to get all the discussed stuff checked in comming weekend. I will also add more options to the polygon exporter. Btw, now that custom glsl is supported, are you aware, that we can "paint" VertexAttributes with Maya VertexColor tool ? Cheers, PP |