[Maya2osg-users] Maya2OSG preview
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-05-16 21:44:29
|
Hi, I have added a new MEL command to the maya2osg plug-in. It is called "osgpreview" and is a slightly modified version of osgviewer. It accepts the same command-line parameters as osgviewer with the addition of "--noautohomeview that prevents the viewer to reset the camera view matrix to a default one. It is used by the "Preview" buttons in the shelf. Now when pushing any of the two "quick preview" buttons (with or without axes), the scene should be showed in the osgviewer clone using exactly the same configuration of the camera in the selected viewport. If no viewport is selected, a default camera will be used. This is also the built-in viewer that should be used when no custom preview command is supplied. But the preview in the export button is not working yet. I have to fight with maya2osg_export.mel. One thing I have seen is that the behavior is different when using "osg" format than when using "osgt". Also, maya2osg_doExportGUI is called from maya2osg_doExportGUIAndPreview proc passing the camera file name ¿?? this is the reason that the camera file contained the scene instead of the camera data (osgViewer object). Peter, can you take a look at it? Maybe I am missing something, or didn't really understand what you are doing in this script. Btw, pre and post processes are not called yet when using the quick preview buttons, as they assume that exported file is in the path defined by maya2osg_filepath, maya2osg_filename and maya2osg_filetype, and the quick preview script exports the file to the temporary directory. What do you think that should be better: to add a parameter to pre/postExport commands indicating the filepath of the exported file or that the previewer change the maya2osg_filepath maya2osg_filename and maya2osg_filetype? Personally I prefer the first option. By the way, this new exportation scheme is for brave people. It doesn't hesitate in overwriting the exported file without asking :) Regards, -- Javier Taibo |