Hi,
im trying to playblast through python scripting using the mayapy.exe interpreter.
At first i was trying the maya.cmds.headsUpDisplay() command, and whereas this works fine for displaying hud options in Maya GUI, it doesnt work when playblasting through a script running in mayapy.exe.
So, my second attempt has been to try to create a specific plugin node inheriting from MPxLocatorNode and setting the MPxDrawOverride inheriting class of the node which according to docs, controls the way the node is displayed. Thus, using the Maya API and the draw manager I setup HUDS through opengl calls in the plugin. It works in Maya GUI, but, again, it still doesnt work when playblasting in mayapy.......
My question is, am i misunderstood? shouldnt this work when playblasting the node? since the node is a simple locator it should render in playblast according to its MPxDrawOverride derived class.......
Has anyone managed to playblast in batch mode through mayapy.exe and have HUDs displayed (such as frame counter, camera name, animator name, etc..?)
Update on another attempt:
Rendering with hardwareRenderer 2.0 and enable the UI checkbox y objectTypeFilter makes the hud renderable with this engine in maya GUI mode. So maybe rendering with hardware renderer some custom jpgs and then packing up all the files into a mp4 with ffmpeg would do the trick as well.
Tried configuring hardware renderer and it doesnt work either..........
Those are the steps i follow:
import maya.standalone maya.standalone.initialize() import maya.mel maya.mel.eval('OnUICallback 9;') maya.mel.eval('objectTypeFilterAllCallback;') import maya.cmds as mc mc.hwRender('mycamera')
I also tried this:
import maya.standalone maya.standalone.initialize() import maya.mel maya.mel.eval('OnUICallback 9;') maya.mel.eval('objectTypeFilterAllCallback;') import maya.cmds as mc mc.playblast(format='avi', percent=100, quality=100, compression='none', viewer=True, forceOverwrite=True, widthHeight=[1920,1080], sound=None, filename='mycurrentscenemovie.avi')
But with this last try, i get a maya crash as follows:
Initialized VP2.0 renderer { Version : 2016.11.35.12. Feature Level 4. Adapter : Quadro K4000/PCIe/SSE2 Vendor ID: 4318. Device ID : 4602 Driver : . API : OpenGL V.4.5. Max texture size : 16384 * 16384. Max tex coords : 8 Shader versions supported (Vertex: 4, Geometry: 4, Pixel 4). Shader compiler profile : (Best card profile) Active stereo support available : 0 GPU Memory Limit : 3072 MB. CPU Memory Limit: 23338.8 MB. MultiDraw consolidation attempted to enable, but the graphics device does not support it. MultiDraw will be disabled. } OpenCL evaluator is attempting to initialize OpenCL. Detected 1 OpenCL Platforms: 0: NVIDIA Corporation. NVIDIA CUDA. OpenCL 1.2 CUDA 7.5.9. Supported extensions: cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_d3d9_sharing cl_nv_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts OpenCL evaluator choosing OpenCL platform NVIDIA Corporation. OpenCL evaluator is unable to find a GPU device that can share VBOs with OpenGL. Stack trace: 3dGraphics.dll!T3dPort::getColorTable 3dGraphics.dll!T3dPort::getModelViewColorTable 3dGraphics.dll!T3dPort::setModelViewColorTable 3dGraphics.dll!T3dPort::ColorTableGuard::~ColorTableGuard OGSMayaBridge.dll!OGSMayaBaseRenderer::updateUIElements OGSMayaBridge.dll!Ttask::initTbb OGSMayaBridge.dll!OGSApplicationBridge::UpdateScene OGSMayaBridge.dll!OGSMayaRenderer::updateScene OGSMayaBridge.dll!OGSMayaBaseRenderer::performSceneRender OGSMayaBridge.dll!TplayblastOGSBridge::grabPixels AnimUISlice.dll!TanimationEditorCmd::setAnimEditor AnimUISlice.dll!TanimationEditorCmd::setAnimEditor AnimUISlice.dll!TanimationEditorCmd::setAnimEditor AnimUISlice.dll!TanimationEditorCmd::setAnimEditor AnimUISlice.dll!TanimationEditorCmd::setAnimEditor CommandEngine.dll!TmetaCommand::doCommand CommandEngine.dll!TpythonInterpreter::dispatchMayaCommand python27.dll!PyCFunction_Call python27.dll!PyEval_GetFuncDesc python27.dll!PyEval_GetFuncDesc python27.dll!PyEval_EvalFrameEx python27.dll!PyEval_EvalCodeEx python27.dll!PyRun_FileExFlags python27.dll!PyRun_InteractiveOneFlags python27.dll!PyRun_InteractiveLoopFlags python27.dll!PyRun_AnyFileExFlags python27.dll!Py_Main KERNEL32.DLL!BaseThreadInitThunk ntdll.dll!RtlUserThreadStart
Can't find what you're looking for? Ask the community or share your knowledge.