検索 - User list
Full Version: "onCookTask"
Root » PDG/TOPs » "onCookTask"
Waka
Hi so i am Trying to render in maya a batch esentially via the sendCommans In Tops into python i keep getting a
Error:Node Reported failure for callback ‘onCookTask’

I have read throw https://www.sidefx.com/docs/houdini/tops/processors.html [www.sidefx.com]

And dont completely understand what to do to may code to make it work i have tried using the code they said in that but seems i am doing some thing Wrong asistance will be apreciated

This code is coppied that gives the erorr and if i try add it it still dosent work Please help also still very new to houini

Code :
import maya.cmds as cmds

def reportUserLog(*args):
message =
for arg in args:
message.append(str(arg))
message = ‘ ’.join(message)
mel.eval(r'print": %s\n";' % message)



#Load all the elembic plugins into maya
cmds.loadPlugin( ‘AbcExport.mll’ )
cmds.loadPlugin( ‘AbcImport.mll’ )
cmds.loadPlugin( ‘mtoa.mll’ )


#Find all the TransForms objects in the outliner in the top line of outliner
nodes = cmds.ls(type= ‘transform’)

#Gets the maya file location for us of this file so we can see what we need to export or how we need to use it
fileLoc = cmds.file(q = True, exn = True)
fileLocSplit = fileLoc.split('/')

#This will export what it needs from the lighting scene
if ‘render’ == fileLocSplit:
cmds.setAttr(“defaultRenderGlobals.currentRenderer”, “arnold”, type=“string”)
mel.eval('loadPreferredRenderGlobalsPreset(“arnold”);')
import maya.mel
cmds.workspace(dir = ‘O:/houdinie_pdg_test/work/houdini_test_proj/assets/imageSequence’)
cmds.setAttr('defaultRenderGlobals.imageFilePrefix', “O:/houdinie_pdg_test/work/houdini_test_proj/sh_002/render/maya/images/testingRen”, type = “string” )
mel.eval('mayaBatchRender();')
chrisgreb
Is there anything in the Command Send work item log? Right click on work item dot -> Task Info. There may be a “Show Log” at the bottom.

Have you tried copy and pasting your code into the Maya script editor and evaluating it there?
Waka
The node it is running on is giving this log : Log not found

The top node that Reports everything back Is giving this :

Hide log
INFO:__main__:Attempting to connect to sharedserver at ('Bunny', 56254)
AbcImport v1.0 using Alembic 1.7.5 (built Feb 6 2018 18:28:08)
00:00:00 407MB WARNING | mvUsdArnoldProcedural52.dll was compiled against non-compatible Arnold 5.2.2.1
00:00:00 407MB WARNING | mvUsdArnoldProcedural53.dll was compiled against non-compatible Arnold 5.3.0.1
00:00:00 407MB WARNING | mvUsdArnoldProcedural54.dll was compiled against non-compatible Arnold 5.4.0.0
Warning: file: C:\Users\Bunny\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 4: filePathEditor: Attribute ‘aiImage.filename’ is invalid or is not designated ‘usedAsFilename’.
Warning: file: C:\Users\Bunny\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 5: filePathEditor: Attribute ‘aiPhotometricLight.aiFilename’ is invalid or is not designated ‘usedAsFilename’.
Warning: file: C:\Users\Bunny\Documents\maya\2020\prefs\filePathEditorRegistryPrefs.mel line 7: filePathEditor: Attribute ‘aiVolume.filename’ is invalid or is not designated ‘usedAsFilename’.
Warning: line 1: filePathEditor: Attribute ‘aiVolume.filename’ and label ‘VDB’ have been saved already.
Initialized VP2.0 renderer {
Version : 2016.11.53.12. Feature Level 4.
Adapter : GeForce GTX 1070/PCIe/SSE2
Vendor ID: 4318. Device ID : 7041
Driver : .
API : OpenGL V.4.6.
Max texture size : 32768 * 32768.
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 : 8192 MB.
CPU Memory Limit: 31091.4 MB.
}
OpenCL evaluator is attempting to initialize OpenCL.
Detected 1 OpenCL Platforms:
0: NVIDIA Corporation. NVIDIA CUDA. OpenCL 1.2 CUDA 11.0.140.
Supported extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 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_d3d10_sharing cl_khr_d3d10_sharing cl_nv_d3d11_sharing cl_nv_copy_opts cl_nv_create_buffer cl_khr_int64_base_atomics cl_khr_int64_extended_atomics
OpenCL evaluator choosing OpenCL platform NVIDIA Corporation.
OpenCL evaluator is unable to find a GPU device that can share VBOs with OpenGL.
00:00:02 482MB WARNING | mvUsdArnoldProcedural52.dll was compiled against non-compatible Arnold 5.2.2.1
00:00:02 482MB WARNING | mvUsdArnoldProcedural53.dll was compiled against non-compatible Arnold 5.3.0.1
Warning: line 1: filePathEditor: Attribute ‘aiImage.filename’ and label ‘Image’ have been saved already.
Warning: line 1: filePathEditor: Attribute ‘aiPhotometricLight.aiFilename’ and label ‘IES’ have been saved already.
Successfully imported python module ‘arnold’
Successfully imported python module ‘mtoa’
Successfully registered renderer ‘arnold’
Warning: file: O:/houdinie_pdg_test/work/houdini_test_proj/sh_002/render/maya/scenes/TestGeo_Scene_Textures.ma line 1603: Selected nodes were ignored since the ‘scene’ flag was used.
File read in 4.3 seconds.
AbcExport v1.0 using Alembic 1.7.5 (built Feb 6 2018 18:28:08)
Warning: Plug-in, “AbcImport.mll”, is already loaded. Skipped.
Warning: Plug-in, “mtoa.mll”, is already loaded. Skipped.



The thing is I looked and the log i sent really saying eni thing in this matter because the command that is the problem is :mel.eval('mayaBatchRender();')

This command is a render script essentially so i need to tell Houdini to wait before it continues so let it wait for the render essentially
chrisgreb
> so i need to tell Houdini to wait before it continues so let it wait for the render essentially

If `mayaBatchRender` is asynchronous you should wait in the python script until it's done if possible. Maybe you can hook up a post-render script in your Maya `renderGlobals` to notify you when it's done somehow (create a file / set some global variable etc).
Waka
Okay I Will Give that a Try Thank u for your suggestion haven't thought of that will get back to u if I Have more problems with this idea thank u again have a lovely Time Bye
Waka
I tried something like that really fast But node is still Having problems with onCOokTask so is there any documentation i can follow to figure out how the following commands gets implemented and testing them maybe they can work please
Your text to link here… [www.sidefx.com]

Because i Tried jsut taking the example they have there and trying yo tun it in a send command and a python command TOP network but no work so any more assistance will be appreciated and assistance given so far is already appreciated thank u

So to clearify im getting onCookTask error when i run : mel.eval('mayaBatchRender();')


and i Somehow need to tell Houdini this is a rendered inside the top Nodes
chrisgreb
If you are using the Maya Command Chain block you should use the “Command Send” node to send a python script to Maya, not Python Processor with onCookTask. An example of this is found in $HFS/houdini/pdg/examples/top_mayapipeline
Waka
Can u Maybe send me a link To this sorry for the very long time to replay

Was busy with other parts of the program im trying to create

I am using the send command node its just its returning with :Node reported failure for callback “OnCookTask”
chrisgreb
The example is in the Houdini install:
$HFS/houdini/pdg/examples/top_mayapipeline
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB