what I want to ask can I use script to add node and get progress in python apicould you give some sample code about that ?
I'm try to create python script to add,connect and Sync the node finally do the rendering using python in blender. I'm added a node using the python command but i can't able to connect and sync the node using scripting. Can you give some suggestions to solve this problems
Hi Sebastian, hope you are well, the problem you have is that this operator is firstly part of our add-on that we have not documented or open sourced.... yet! :) So there is no interface defined for use in other scripts at the moment, we're working on an API to our distribution system as well.
However your use case seems to be triggering a render from a script if I understand you right? So, secondly, the operator you are calling has thrown this error because you didn't invoke it. There is a handler added to the operator object in the call to invoke, since you call the operator in your script with no arguments at all, this tells blender to run the operator with its defaults which is to simply run the execute method.
The execute method expects there to be a handler (the 'x' in your error traceback) and thus the error occurs and an exception is thrown. So, I think all you'd need to do to get your script to work properly, is to call the operator with the positional argument 'INVOKE_DEFAULT' which tells blender to run the operator's invoke method first.
The patter for the call should be something like bpy.ops.crowdrender.render('INVOKE_DEFAULT').
FYI, your second attempt works because you've added the button to a panel, which will call the invoke method by default, hence the different behaviour.
Hope this helps and please do share with us what your script is about! We rarely get people wanting to script using our addon so of course we'd like to know more about this use of the addon and what documentation or API would be helpful!
Hope this helped?
Hello :) Is there an update regarding API support? I am asking because I would like to control the crowdrender via python. In detail, can I somehow invoke the Render Still operator by a python command, like bpy.ops.crowdrender.render() Thank you!
Hi there HiYang, we're planning on building an API to do this, and making the current addon to blender open source. This is no where near ready yet though. It might be possible with v014 but I'd have to look into it as a special case since there's no API in place as yet.
We're designing a cleaner version of our system that will have our system available as an API and the blender addon will use the API. Right now they're to tightly bound to each other to do this so we're working to separate this.
All the best!