1
$\begingroup$
def update_result(engine, width, height, output_file):
    # debug("Reading result %s %d %d" % (output_file, width, height))
    try:
        result = engine.begin_result( 0, 0, width, height)
        lay = result.layers[0]
        lay.load_from_file( output_file)
        engine.end_result( result, cancel=False, do_merge_results=True)
        return True
    except:
        traceback.print_exc()
        engine.end_result( None, cancel=True, do_merge_results=False)
        pass
    return False

result = engine.begin_result( 0, 0, width, height)

here I've got an error like: "begin_result(): error with argument 3, "w" - Function.w expected an int type, not float"

result = engine.begin_result( 0, 0, width, height)

any helps, guys? It works fine in Blender 3.1.0 alpha but with 3.2.0 it gaves me error

$\endgroup$
2

1 Answer 1

2
$\begingroup$

Convert the floats to integers: https://docs.python.org/3/library/functions.html#int

int(width), int(height)

Safest way to convert float to integer in python?

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .