clevr-dataset-gen icon indicating copy to clipboard operation
clevr-dataset-gen copied to clipboard

Cannot run render_images.py on Blender 2.81

Open TommasoBendinelli opened this issue 5 years ago • 11 comments

With Blender 2.81, on macOS Mojave I get the following error when I run blender --background --python render_images.py -- --num_images 10

Blender 2.81 (sub 16) (hash f1aa4d18d49d built 2019-12-04 14:33:18) found bundled python: /Applications/Blender.app/Contents/Resources/2.81/python Read blend: data/base_scene.blend Traceback (most recent call last): File "/Users/tommaso/CSEM_repos/clevr-dataset-gen/image_generation/render_images.py", line 568, in main(args) File "/Users/tommaso/CSEM_repos/clevr-dataset-gen/image_generation/render_images.py", line 187, in main output_blendfile=blend_path, File "/Users/tommaso/CSEM_repos/clevr-dataset-gen/image_generation/render_images.py", line 264, in render_scene bpy.ops.mesh.primitive_plane_add(radius=5) File "/Applications/Blender.app/Contents/Resources/2.81/scripts/modules/bpy/ops.py", line 201, in call ret = op_call(self.idname_py(), None, kw) TypeError: Converting py args to operator properties: : keyword "radius" unrecognized

Blender quit

TommasoBendinelli avatar Dec 08 '19 15:12 TommasoBendinelli

I ran through the same issue too, Blender 2.81 changed few configurations, the best is to use Blender 2.78c as the authors did.

oaishi avatar Feb 21 '20 12:02 oaishi

You can use these commits IBM/photorealistic-blocksworld@b6a5cedca8ca79dc83e588cae3baf924355456fd IBM/photorealistic-blocksworld@7816279b43e71e90e70e5c18eb5001136b1172e0 IBM/photorealistic-blocksworld@e930ff0e38c330f58aa8d5304222ec9b1a28d714 IBM/photorealistic-blocksworld@3908f36d117cfb2b5cc4a0c50e7267ef576376bc

guicho271828 avatar Jul 14 '20 16:07 guicho271828

Thanks @guicho271828 for sharing the fixes. As some of the newer graphic cards are not supported by older version of blender, this fix is quite helpful.

maskaravivek avatar Mar 31 '21 07:03 maskaravivek

The fixes above work but then a I get a new error:

old_use_antialiasing = render_args.use_antialiasing AttributeError: 'RenderSettings' object has no attribute 'use_antialiasing'

andrecavalcante avatar Aug 06 '21 19:08 andrecavalcante

probably a new change in blender. Which version is it?

guicho271828 avatar Aug 11 '21 06:08 guicho271828

probably a new change in blender. Which version is it?

2.93.2 and 2.81a

andrecavalcante avatar Aug 11 '21 13:08 andrecavalcante

It is working until 2.91 https://app.travis-ci.com/github/IBM/photorealistic-blocksworld/builds/235932705

guicho271828 avatar Aug 22 '21 15:08 guicho271828

no, actually 2.92

guicho271828 avatar Aug 22 '21 15:08 guicho271828

actually 2.93.3 also worked after I fixed the url.

guicho271828 avatar Aug 22 '21 15:08 guicho271828

Removing radius=5 did it for me

aOlmo avatar Oct 07 '21 18:10 aOlmo

The fixes above work but then a I get a new error:

old_use_antialiasing = render_args.use_antialiasing AttributeError: 'RenderSettings' object has no attribute 'use_antialiasing'

Same here. I try to use Blender 2.8 and 2.9 and this issue always exists. Have you already found the solution?

jackyzyb avatar Jan 14 '22 18:01 jackyzyb