2.64 breaks Render Engine scripts - "cancel" not specified

Hi All,

It looks like 2.64 release is breaking scripts again.

Does anyone understand how to fix the new “cancel” not specified error?

one step forward 2steps back…
it may be job security for someone.
but weak sauce for everyone else.

where does this error occur? in what part of code?

One way to view this error is to visit this link.
http://www.blender.org/documentation/blender_python_api_2_63_release/bpy.types.RenderEngine.html

Run the flat color render engine script in 2.63 and it works fine. Run it in 2.64 and it errors with cancel not specified error mentioned above. So I think it has something to do with events in a class now require something like return{‘cancel’} but I am not sure?

A related link popped up with a solution.
2.64 has added a new required parameter for end_result().
Why the developers did not make it an optional with a False default is beyond me…?
But because of that wisdom, many, if not all 3rd party render systems that worked in 2.63 are now broken.

The fix is simple, locate in the render engine script the term ‘end_result’ and add a False like so. (end_result(result, False)).

What if you see something like this (from Lux):

self.end_result(result)

My guess is it is across the board fix that will be needed for all render engines that make use of end_result. Which is how a final image is transferred to the image buffer and thus presented for compositing.

That is indeed very annoying - good find. I’ve sent a message to the bf-python list about it, but we shall see if anyone responds.

I should have been more clear…

What should the syntax be in the case of:

self.end_result(result)

I’m not very familiar with Python or Blender/Python, so I’m unsure what the exact code replacement would be. If you know, please post it (or if anyone else knows it). I’d be very grateful.

If you are repairing a script try:


self.end_result(result,False)

As a replacement for self.end_result(result)

@mattebb

are you sure you sent that mail ?
didn’t see it passing by
unless i overlooked it, then my apologies :slight_smile:

Now I’m getting an error:

‘RenderSettings’ object has no attribute ‘use_color_management’

I was using Lux before with the exact same .blend file and it worked. Any idea what this is?

I don’t use Lux that often. Perhaps you should report this on the Lux forum? Their maintainers may have a better handle on how to fix it.

Totally guessing here without reading the code but… I’m not sure you can if the function is being called from c code since it would pass in two arguments and the python function is expecting only one.

You could (probably) get away with the other way around – passing one argument to a function expecting two with a default value – maybe.

It’s not like scripts don’t get broken on a semi-regular basis or anything…

Uncle Entity,
If you look at Atom’s Links page, you’ll find he’s been hit very hard, several times with “Unannounced” API changes.

I think I sent from the wrong email address - sent it again :slight_smile: thanks for the headsup