Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use of external bpy package from python environment #1158

Merged
merged 20 commits into from
Dec 22, 2024

Conversation

Griperis
Copy link
Contributor

@Griperis Griperis commented Nov 7, 2024

Allow BlenderProc to use bpy python module without installing Blender.

Controlled by the USE_EXTERNAL_BPY_MODULE environmental variable, to distinguish between the normal and this BlenderProc behavior. Allows plugging BlenderProc inside any python pipeline without having to run the whole thing through blenderproc run (but still allowed).

Code / CLI changes:

  • One method is_using_external_bpy_module in SetupUtility to infer the mode from one place
  • Currently using blenderproc pip [install, uninstall] prints the command supposed to be used in the environment
  • blenderproc debug prints that it's not available
  • Setup code that shouldn't be executed in this mode raises exceptions (like determine_blender_install_path, determine_python_paths).
  • Informative prints about blenderproc running in this mode + e. g. in case when versions mismatch

Limitations:

  • BlenderProc's Blender pip dependencies have to be installed manually with the correct versions into the python environment (see Further design decisions)
  • Debug mode is not enabled in this mode, as bpy module doesn't have UI.
  • All limitations imposed by the bpy moule itself
  • Python version of the environment is bound to the version bpy requires.

Additional tweaks:

Testing:

  • create and enter virtual environment
  • pip install bpy==4.2.0
  • Install additional internal Blenderproc dependencies pip install -r external_bpy_requirements.txt
  • export USE_EXTERNAL_BPY_MODULE="1"
  • python script_using_blenderproc.py or blenderproc run script_using_blenderproc.py

external_bpy_requirements.txt

Tested (automagically) all the combinations of calls with and without external bpy.

Closes #901 #840

@cla-bot cla-bot bot added the cla-signed label Nov 7, 2024
@Griperis Griperis force-pushed the blenderproc-without-run branch from 2b5e1f2 to 6bf5ba5 Compare November 22, 2024 11:40
…r "datafiles"

This should be independent on the OS and installation.
- this allows usage of bpy provided from the external python environment
specified by the USE_EXTERNAL_BPY_MODULE environment
- allows using BlenderProc within standard python scripts (no need to run it through blenderproc run)
- debug mode is not allowed with this flag
- there might be limitations originating from this usage of bpy https://docs.blender.org/api/current/info_advanced_blender_as_bpy.html#limitations
- installation of Blender's python environment pip (DefaultConfig.default_pip_packages) dependencies has to be handled manually
Otherwise even if your environment is correct and
you forget to set the env var, the output is super confusing.
@Griperis Griperis force-pushed the blenderproc-without-run branch from 6bf5ba5 to 97addad Compare December 3, 2024 09:48
…ocal install

This is a valid use case, and the 'file_names_of_stack' content
is a different one than the previously expected.
The path has to be passed through argument,
as it can't be inferred from the passed arguments,
as there are none.
This only happens when working with 'blenderproc' commands when
using external bpy package, but we notify the caller transparently anyways.
@Griperis Griperis marked this pull request as ready for review December 3, 2024 18:38
Copy link
Member

@cornerfarmer cornerfarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great so far. Just a few minor comments. I will try to make the tests work in external mode

Comment on lines 24 to 40
wheel
pyyaml==6.0.1
imageio==2.34.1
gitpython==3.1.43
scikit-image==0.23.2
pypng==0.20220715.0
scipy==1.13.1
matplotlib==3.9.0
pytz==2024.1
h5py==3.11.0
Pillow==10.3.0
opencv-contrib-python==4.10.*
scikit-learn==1.5.0
python-dateutil==2.9.0.post0
rich==13.7.1
trimesh==4.4.0
pyrender==0.1.45
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes more sense to given them directly as a command otherwise one needs to do that manually

Suggested change
wheel
pyyaml==6.0.1
imageio==2.34.1
gitpython==3.1.43
scikit-image==0.23.2
pypng==0.20220715.0
scipy==1.13.1
matplotlib==3.9.0
pytz==2024.1
h5py==3.11.0
Pillow==10.3.0
opencv-contrib-python==4.10.*
scikit-learn==1.5.0
python-dateutil==2.9.0.post0
rich==13.7.1
trimesh==4.4.0
pyrender==0.1.45
pip install wheel pyyaml==6.0.1 imageio==2.34.1 gitpython==3.1.43 scikit-image==0.23.2 pypng==0.20220715.0 scipy==1.13.1 matplotlib==3.9.0 pytz==2024.1 h5py==3.11.0 Pillow==10.3.0 opencv-contrib-python==4.10.* scikit-learn==1.5.0 python-dateutil==2.9.0.post0 rich==13.7.1 trimesh==4.4.0 pyrender==0.1.45

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, also note for myself - PyQT5 might be required (at least on Win) to prevent

c:\users\gripe\polygoniq_projects\blenderproc\blenderproc\scripts\visHdf5Files.py:260: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
  plt.show()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, the PyQT5 didn't solve my problem, it might be related to my venv setup, as in both modes now vis reports this error. Keeping the thread open, will investigate.

Can you please try using the vis command in your env, thanks?

blenderproc/python/utility/SetupUtility.py Outdated Show resolved Hide resolved
blenderproc/command_line.py Outdated Show resolved Hide resolved
blenderproc/python/utility/SetupUtility.py Outdated Show resolved Hide resolved
And signal handlers, so everything works the same when using blenderproc module
in standalone script.
Run SetupUtility.setup() only when using Blender, otherwise
it's not neccessary.

Adjusted the code so CLI doens't depend in any way on bpy.
There are now two methods that clean temporary directories.
This is a better solution than having one reused code, because
either initialized blenderproc used through external bpy cleans
after itself, or the CLI process cleans after blender process is
finished.
No run commands (run, quickstart, debug) are
available now, hints are printed. This allows
to simplify the CLI code a lot.
@Griperis Griperis force-pushed the blenderproc-without-run branch from 78d0bf2 to 993b5de Compare December 13, 2024 16:51
@cornerfarmer
Copy link
Member

cornerfarmer commented Dec 16, 2024

BlenderProcHelper result for run 642:

Done with: [amass_human_poses 28s, amass_human_poses_bpy 25s, auto_shading 10s, auto_shading_bpy 9s, basic 13s, basic_bpy 13s, blenderkit 20s, blenderkit_bpy 19s, bop_object_on_surface_sampling 83s, bop_object_on_surface_sampling_bpy 84s, bop_object_physics_positioning 109s, bop_object_physics_positioning_bpy 113s, bop_object_pose_sampling 37s, bop_object_pose_sampling_bpy 37s, bop_scene_replication 171s, bop_scene_replication_bpy 167s, camera_depth_of_field 21s, camera_depth_of_field_bpy 20s, camera_object_pose 10s, camera_object_pose_bpy 10s, camera_random_trajectories 60s, camera_random_trajectories_bpy 59s, camera_sampling 21s, camera_sampling_bpy 20s, coco_annotations 15s, coco_annotations_bpy 13s, diffuse_color_image 22s, diffuse_color_image_bpy 20s, dust 30s, dust_bpy 19s, entity_displacement_modifier 15s, entity_displacement_modifier_bpy 15s, entity_manipulation 10s, entity_manipulation_bpy 11s, front_3d 91s, front_3d_bpy 91s, front_3d_object_sampling 87s, front_3d_object_sampling_bpy 91s, front_3d_with_improved_mat 107s, front_3d_with_improved_mat_bpy 112s, git_log 1s, haven 24s, haven_bpy 22s, ikea 18s, ikea_bpy 18s, kinect_azure_noise 15s, kinect_azure_noise_bpy 13s, lens_distortion 20s, lens_distortion 12s, lens_distortion_bpy 25s, lens_distortion_bpy 12s, light_sampling 14s, light_sampling_bpy 12s, material_manipulation 10s, material_manipulation_bpy 20s, material_randomizer 12s, material_randomizer_bpy 12s, matterport3d 65s, matterport3d_bpy 70s, motion_blur_rolling_shutter 34s, motion_blur_rolling_shutter 28s, motion_blur_rolling_shutter_bpy 27s, motion_blur_rolling_shutter_bpy 24s, multi_render 292s, multi_render_bpy 334s, nocs 20s, nocs_bpy 19s, object_pose_sampling 10s, object_pose_sampling_bpy 10s, on_surface_object_sampling 10s, on_surface_object_sampling_bpy 11s, optical_flow 20s, optical_flow_bpy 26s, physics_convex_decomposition 42s, physics_convex_decomposition_bpy 144s, physics_positioning 24s, physics_positioning_bpy 24s, pix3d 17s, pix3d_bpy 17s, point_clouds 12s, point_clouds_bpy 23s, random_backgrounds 20s, random_backgrounds_bpy 19s, random_room_constructor 74s, random_room_constructor_bpy 75s, replica 219s, replica_bpy 212s, scenenet 50s, scenenet_bpy 49s, scenenet_with_cctextures 63s, scenenet_with_cctextures_bpy 64s, semantic_segmentation 16s, semantic_segmentation_bpy 14s, shapenet 20s, shapenet_bpy 19s, shapenet_with_scenenet 55s, shapenet_with_scenenet_bpy 55s, shapenet_with_suncg 56s, shapenet_with_suncg_bpy 67s, spotlight 20s, spotlight_bpy 20s, stereo_matching 49s, stereo_matching_bpy 51s, stereo_matching_with_projector 146s, stereo_matching_with_projector_bpy 151s, suncg_basic 34s, suncg_basic_bpy 40s, suncg_with_cam_sampling 58s, suncg_with_cam_sampling_bpy 59s, suncg_with_improved_mat 68s, suncg_with_improved_mat_bpy 70s, suncg_with_object_replacer 58s, suncg_with_object_replacer_bpy 61s, tests 25s, tests_bpy 25s, urdf_loading_and_manipulation 49s, urdf_loading_and_manipulation_bpy 48s]
Done with 117 of 118 tests.
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 99.2%
There were errors:
Unit tests output:

................
----------------------------------------------------------------------
Ran 16 tests in 20.150s

OK

Unit tests output:

................
----------------------------------------------------------------------
Ran 16 tests in 20.684s

OK

urdf_loading_and_manipulation

The output of urdf_loading_and_manipulation:main:000000_scene_gt_info_json has changed:

Expand
+ root['1'][3]['bbox_visib'][3]: 79
- root['1'][3]['bbox_visib'][3]: 78
+ root['1'][4]['bbox_visib'][0]: 254
- root['1'][4]['bbox_visib'][0]: 253
+ root['1'][4]['bbox_visib'][2]: 34
- root['1'][4]['bbox_visib'][2]: 35
+ root['1'][6]['bbox_visib'][0]: 157
- root['1'][6]['bbox_visib'][0]: 158
+ root['1'][6]['bbox_visib'][2]: 23
- root['1'][6]['bbox_visib'][2]: 22
+ root['8'][7]['visib_fract']: 0.4356060606060606
- root['8'][7]['visib_fract']: 0.45265151515151514

front_3d_object_sampling (bpy)

The output of front_3d_object_sampling:colors has changed: Diff: 0.0073, Pixel diff: 0.1458



Compare image Newly generated image

The output of front_3d_object_sampling:colors has changed: Diff: 0.0092, Pixel diff: 0.4318



Compare image Newly generated image

stereo_matching

The output of stereo_matching:disparity has changed: Diff: 0.0369, Pixel diff: 0.0034



Compare image Newly generated image

stereo_matching_with_projector

The output of stereo_matching_with_projector:disparity has changed: Diff: 0.0112, Pixel diff: 0.0037



Compare image Newly generated image

point_clouds

The output of point_clouds:colors has changed: Diff: 0.0034, Pixel diff: 0.0857



Compare image Newly generated image

The output of point_clouds:colors has changed: Diff: 0.0184, Pixel diff: 0.3803



Compare image Newly generated image

Pylint output

Expand
***The tests are done.*** Check the log:

Last update: 12/16/2024, 18:35:45

@cornerfarmer
Copy link
Member

cornerfarmer commented Dec 17, 2024

BlenderProcHelper result for run 644:

Done with: [amass_human_poses_bpy_python 28s, amass_human_poses_python 29s, auto_shading_bpy_python 10s, auto_shading_python 10s, basic_bpy_python 22s, basic_python 14s, blenderkit_bpy_python 19s, blenderkit_python 20s, bop_object_on_surface_sampling_bpy_python 87s, bop_object_on_surface_sampling_python 80s, bop_object_physics_positioning_bpy_python 123s, bop_object_physics_positioning_python 107s, bop_object_pose_sampling_bpy_python 37s, bop_object_pose_sampling_python 37s, bop_scene_replication_bpy_python 166s, bop_scene_replication_python 172s, camera_depth_of_field_bpy_python 20s, camera_depth_of_field_python 26s, camera_object_pose_bpy_python 12s, camera_object_pose_python 10s, camera_random_trajectories_bpy_python 60s, camera_random_trajectories_python 60s, camera_sampling_bpy_python 20s, camera_sampling_python 22s, coco_annotations_bpy_python 14s, coco_annotations_python 16s, diffuse_color_image_bpy_python 21s, diffuse_color_image_python 22s, dust_bpy_python 20s, dust_python 20s, entity_displacement_modifier_bpy_python 13s, entity_displacement_modifier_python 13s, entity_manipulation_bpy_python 11s, entity_manipulation_python 10s, front_3d_bpy_python 93s, front_3d_object_sampling_bpy_python 91s, front_3d_object_sampling_python 88s, front_3d_python 90s, front_3d_with_improved_mat_bpy_python 112s, front_3d_with_improved_mat_python 109s, haven_bpy_python 24s, haven_python 23s, ikea_bpy_python 18s, ikea_python 19s, kinect_azure_noise_bpy_python 14s, kinect_azure_noise_python 15s, lens_distortion_bpy_python 31s, lens_distortion_bpy_python 12s, lens_distortion_python 17s, lens_distortion_python 12s, light_sampling_bpy_python 13s, light_sampling_python 12s, material_manipulation_bpy_python 18s, material_manipulation_python 13s, material_randomizer_bpy_python 14s, material_randomizer_python 11s, matterport3d_bpy_python 72s, matterport3d_python 66s, motion_blur_rolling_shutter_bpy_python 29s, motion_blur_rolling_shutter_bpy_python 24s, motion_blur_rolling_shutter_python 35s, motion_blur_rolling_shutter_python 25s, multi_render_bpy_python 337s, multi_render_python 226s, nocs_bpy_python 19s, nocs_python 20s, object_pose_sampling_bpy_python 10s, object_pose_sampling_python 10s, on_surface_object_sampling_bpy_python 11s, on_surface_object_sampling_python 11s, optical_flow_bpy_python 25s, optical_flow_python 26s, physics_convex_decomposition_bpy_python 146s, physics_convex_decomposition_python 58s, physics_positioning_bpy_python 24s, physics_positioning_python 24s, pix3d_bpy_python 17s, pix3d_python 17s, point_clouds_bpy_python 20s, point_clouds_python 15s, random_backgrounds_bpy_python 19s, random_backgrounds_python 19s, random_room_constructor_bpy_python 80s, random_room_constructor_python 74s, replica_bpy_python 209s, replica_python 223s, scenenet_bpy_python 49s, scenenet_python 50s, scenenet_with_cctextures_bpy_python 66s, scenenet_with_cctextures_python 64s, semantic_segmentation_bpy_python 12s, semantic_segmentation_python 15s, shapenet_bpy_python 20s, shapenet_python 20s, shapenet_with_scenenet_bpy_python 57s, shapenet_with_scenenet_python 56s, shapenet_with_suncg_bpy_python 71s, shapenet_with_suncg_python 55s, spotlight_bpy_python 21s, spotlight_python 21s, stereo_matching_bpy_python 52s, stereo_matching_python 48s, stereo_matching_with_projector_bpy_python 150s, stereo_matching_with_projector_python 147s, suncg_basic_bpy_python 42s, suncg_basic_python 34s, suncg_with_cam_sampling_bpy_python 60s, suncg_with_cam_sampling_python 57s, suncg_with_improved_mat_bpy_python 71s, suncg_with_improved_mat_python 68s, suncg_with_object_replacer_bpy_python 60s, suncg_with_object_replacer_python 59s, tests_bpy_python 35s, tests_python 27s, urdf_loading_and_manipulation_bpy_python 47s, urdf_loading_and_manipulation_python 50s]
Done with 116 of 116 tests.
There were errors:
Unit tests output:

................
----------------------------------------------------------------------
Ran 16 tests in 29.600s

OK

Unit tests output:

................
----------------------------------------------------------------------
Ran 16 tests in 22.073s

OK

urdf_loading_and_manipulation

The output of urdf_loading_and_manipulation:main_python:000000_scene_gt_info_json has changed:

Expand
+ root['0'][2]['bbox_visib'][3]: 25
- root['0'][2]['bbox_visib'][3]: 23
+ root['1'][4]['bbox_visib'][0]: 254
- root['1'][4]['bbox_visib'][0]: 253
+ root['1'][4]['bbox_visib'][2]: 34
- root['1'][4]['bbox_visib'][2]: 35
+ root['2'][2]['bbox_visib'][0]: 309
- root['2'][2]['bbox_visib'][0]: 308
+ root['2'][2]['bbox_visib'][2]: 25
- root['2'][2]['bbox_visib'][2]: 26
+ root['3'][3]['px_count_visib']: 1923
- root['3'][3]['px_count_visib']: 1912

The output of urdf_loading_and_manipulation:main_python:000000_scene_gt_coco_json has changed:

Expand
+ root['annotations'][27]['area']: 1923
- root['annotations'][27]['area']: 1912

stereo_matching

The output of stereo_matching:disparity has changed: Diff: 0.0391, Pixel diff: 0.0041



Compare image Newly generated image

stereo_matching_with_projector (bpy)

The output of stereo_matching_with_projector:disparity has changed: Diff: 0.0105, Pixel diff: 0.0047



Compare image Newly generated image

Pylint output

Expand

Messages

Module blenderproc (blenderproc/__init__.py)

Line Col. Type Symbol ID Obj Message
1 0 fatal astroid-error F0002
blenderproc/__init__.py: Fatal error while checking 'blenderproc/__init__.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '${INTERNAL_HOME_FOLDER}/Dominik_Winkelbauer/blender_proc_helper_runs_external/DLR-RM/BlenderProc/1158/pylint_home_folder/pylint-crash-2024-12-21-20-22-01.txt'.
13 0 convention line-too-long C0301
Line too long (169/120)
16 0 convention line-too-long C0301
Line too long (130/120)
19 0 convention line-too-long C0301
Line too long (223/120)
19 8 warning raise-missing-from W0707
Consider explicitly re-raising using 'except ImportError as exc' and 'raise RuntimeError('\n###############\nUSE_EXTERNAL_BPY_MODULE is set, but bpy module could not be imported. Make sure bpy module is present in your python environment.\n\tpip install bpy==4.2.0\n###############\n') from exc'
27 44 convention trailing-whitespace C0303
Trailing whitespace
37 0 convention trailing-whitespace C0303
Trailing whitespace
40 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.__main__ (blenderproc/__main__.py)

Line Col. Type Symbol ID Obj Message
3 0 convention wrong-import-position C0413
Import "import os" should be placed at the top of the module
3 0 convention wrong-import-order C0411
standard import "os" should be placed before local imports "version.__version__", "python.utility.SetupUtility.SetupUtility"
3 0 convention ungrouped-imports C0412
Imports from package os are not grouped
8 0 convention wrong-import-order C0411
third party import "blenderproc.command_line.cli" should be placed before local imports "version.__version__", "python.utility.SetupUtility.SetupUtility"

Module blenderproc.command_line (blenderproc/command_line.py)

Line Col. Type Symbol ID Obj Message
134 111 convention trailing-whitespace C0303
Trailing whitespace
147 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.debug_startup (blenderproc/debug_startup.py)

Line Col. Type Symbol ID Obj Message
41 11 refactor consider-using-assignment-expr R6103 RunBlenderProcOperator.execute
Use 'if (import_path := os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) not in sys.path:' instead
82 11 refactor consider-using-assignment-expr R6103 draw
Use 'if (is_osl := context_text.name.endswith(('.osl', '.osl'))):' instead

Module blenderproc.external.vhacd.decompose (blenderproc/external/vhacd/decompose.py)

Line Col. Type Symbol ID Obj Message
36 0 refactor too-many-positional-arguments R0917 convex_decomposition
Too many positional arguments (11/5)
162 11 refactor consider-using-assignment-expr R6103 convex_decomposition
Use 'if (name := name.replace('#', str(index + 1), 1)) == name_template:' instead

Module blenderproc.python.camera.CameraProjection (blenderproc/python/camera/CameraProjection.py)

Line Col. Type Symbol ID Obj Message
4 0 warning unused-import W0611
Unused create_primitive imported from blenderproc.python.types.MeshObjectUtility
10 0 convention ungrouped-imports C0412
Imports from package blenderproc are not grouped
29 31 convention trailing-whitespace C0303
Trailing whitespace
35 0 convention trailing-whitespace C0303
Trailing whitespace
41 0 convention line-too-long C0301
Line too long (147/120)
85 8 refactor no-else-return R1705 depth_at_points_via_raytracing
Unnecessary "else" after "return", remove the "else" and de-indent the code inside it
89 0 convention trailing-whitespace C0303
Trailing whitespace
90 0 convention line-too-long C0301
Line too long (134/120)
141 0 convention trailing-whitespace C0303
Trailing whitespace
159 7 convention trailing-whitespace C0303
Trailing whitespace
161 33 convention trailing-whitespace C0303
Trailing whitespace
165 0 convention line-too-long C0301
Line too long (132/120)
167 0 convention trailing-newlines C0305
Trailing newlines

Module blenderproc.python.camera.CameraUtility (blenderproc/python/camera/CameraUtility.py)

Line Col. Type Symbol ID Obj Message
1 0 fatal astroid-error F0002
blenderproc/python/camera/CameraUtility.py: Fatal error while checking 'blenderproc/python/camera/CameraUtility.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '${INTERNAL_HOME_FOLDER}/Dominik_Winkelbauer/blender_proc_helper_runs_external/DLR-RM/BlenderProc/1158/pylint_home_folder/pylint-crash-2024-12-21-20-21-58.txt'.

Module blenderproc.python.camera.CameraValidation (blenderproc/python/camera/CameraValidation.py)

Line Col. Type Symbol ID Obj Message
234 23 refactor consider-using-assignment-expr R6103 scene_coverage_score
Use 'if (object_class := hit_object['category_id']) in special_objects:' instead
266 0 refactor too-many-positional-arguments R0917 check_novel_pose
Too many positional arguments (6/5)
287 11 refactor consider-using-assignment-expr R6103 check_novel_pose._variance_constraint
Use 'if (var := np.var(array)) < old_var:' instead

Module blenderproc.python.camera.LensDistortionUtility (blenderproc/python/camera/LensDistortionUtility.py)

Line Col. Type Symbol ID Obj Message
24 0 refactor too-many-positional-arguments R0917 set_lens_distortion
Too many positional arguments (6/5)
318 19 refactor consider-using-assignment-expr R6103 set_camera_parameters_from_config_file
Use 'if (elements := line.split(' ')):' instead
346 15 refactor consider-using-assignment-expr R6103 set_camera_parameters_from_config_file
Use 'if (line := line.replace('=', ':')):' instead

Module blenderproc.python.constructor.RandomRoomConstructor (blenderproc/python/constructor/RandomRoomConstructor.py)

Line Col. Type Symbol ID Obj Message
23 0 refactor too-many-positional-arguments R0917 construct_random_room
Too many positional arguments (13/5)
163 0 refactor too-many-positional-arguments R0917 _construct_random_room
Too many positional arguments (8/5)
407 15 refactor consider-using-assignment-expr R6103 _construct_random_room.extract_plane_from_room
Use 'if (cur_selected_objects := bpy.context.selected_objects):' instead
466 11 refactor consider-using-assignment-expr R6103 _construct_random_room
Use 'if (selected_objects := bpy.context.selected_objects):' instead

Module blenderproc.python.lighting.IntersectingSpotLight (blenderproc/python/lighting/IntersectingSpotLight.py)

Line Col. Type Symbol ID Obj Message
43 0 refactor too-many-positional-arguments R0917 add_intersecting_spot_lights_to_camera_poses
Too many positional arguments (7/5)

Module blenderproc.python.lighting.SuncgLighting (blenderproc/python/lighting/SuncgLighting.py)

Line Col. Type Symbol ID Obj Message
67 19 refactor consider-using-assignment-expr R6103 _SuncgLighting.make_lamp_emissive
Use 'if (old_mat_name := m.get_name()) in collection_of_mats['lamp']:' instead
79 23 refactor consider-using-assignment-expr R6103 _SuncgLighting.make_lamp_emissive
Use 'if not (emission := m.get_nodes_with_type('Emission')):' instead
109 15 refactor consider-using-assignment-expr R6103 _SuncgLighting.make_window_emissive
Use 'if (alpha := principled_node.inputs['Alpha'].default_value) < 1:' instead
111 19 refactor consider-using-assignment-expr R6103 _SuncgLighting.make_window_emissive
Use 'if (mat_name := m.get_name()) in collection_of_mats['window']:' instead
143 15 refactor consider-using-assignment-expr R6103 _SuncgLighting.make_ceiling_emissive
Use 'if (mat_name := material.get_name()) in collection_of_mats['ceiling']:' instead

Module blenderproc.python.loader.AMASSLoader (blenderproc/python/loader/AMASSLoader.py)

Line Col. Type Symbol ID Obj Message
20 0 refactor too-many-positional-arguments R0917 load_AMASS
Too many positional arguments (9/5)
111 4 refactor too-many-positional-arguments R0917 _AMASSLoader.get_pose_parameters
Too many positional arguments (6/5)

Module blenderproc.python.loader.BlendLoader (blenderproc/python/loader/BlendLoader.py)

Line Col. Type Symbol ID Obj Message
27 0 convention line-too-long C0301
Line too long (130/120)
100 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.loader.BopLoader (blenderproc/python/loader/BopLoader.py)

Line Col. Type Symbol ID Obj Message
18 0 refactor too-many-positional-arguments R0917 load_bop_objs
Too many positional arguments (9/5)
73 15 refactor consider-using-assignment-expr R6103 load_bop_objs
Use 'if (random_id := choice(obj_ids)) not in loaded_ids:' instead
98 0 refactor too-many-positional-arguments R0917 load_bop_scene
Too many positional arguments (8/5)
164 61 error possibly-used-before-assignment E0606 load_bop_scene
Possibly using variable 'cam_H_m2w_ref' before assignment
353 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.loader.CCMaterialLoader (blenderproc/python/loader/CCMaterialLoader.py)

Line Col. Type Symbol ID Obj Message
13 0 refactor too-many-positional-arguments R0917 load_ccmaterials
Too many positional arguments (7/5)
73 0 convention line-too-long C0301
Line too long (152/120)
128 4 refactor too-many-positional-arguments R0917 _CCMaterialLoader.create_material
Too many positional arguments (8/5)

Module blenderproc.python.loader.Front3DLoader (blenderproc/python/loader/Front3DLoader.py)

Line Col. Type Symbol ID Obj Message
22 0 refactor too-many-positional-arguments R0917 load_front3d
Too many positional arguments (6/5)
158 15 refactor consider-using-assignment-expr R6103 _Front3DLoader.create_mesh_objects_from_file
Use 'if (used_obj_name := mesh_data['type'].strip()) == '':' instead
282 15 refactor consider-using-assignment-expr R6103 _Front3DLoader.create_mesh_objects_from_file
Use 'if (uv_mesh_data := [float(ele) for ele in mesh_data['uv'] if ele is not None]):' instead

Module blenderproc.python.loader.HavenMaterialLoader (blenderproc/python/loader/HavenMaterialLoader.py)

Line Col. Type Symbol ID Obj Message
60 15 refactor consider-using-assignment-expr R6103 identify_base_color_image_path
Use 'if (search_start := texture_map_path.lower().find(search_string)) != -1:' instead
99 0 refactor too-many-positional-arguments R0917 load_haven_mat
Too many positional arguments (6/5)
165 11 refactor consider-using-assignment-expr R6103 load_haven_mat
Use 'if (texture_map_paths_by_type := identify_texture_maps(str(texture_folder_path))) is None:' instead
213 4 refactor too-many-positional-arguments R0917 HavenMaterialLoader.create_material
Too many positional arguments (9/5)

Module blenderproc.python.loader.IKEALoader (blenderproc/python/loader/IKEALoader.py)

Line Col. Type Symbol ID Obj Message
82 19 refactor consider-using-assignment-expr R6103 load_ikea
Use 'if (file_unit := line.strip().split(' ')[-1]) not in ['inches', 'meters', 'centimeters', 'millimeters']:' instead
181 15 refactor consider-using-assignment-expr R6103 _IKEALoader.get_object_by_type
Use 'if not (object_lst := [obj[0] for (key, obj) in obj_dict.items() if obj_type in key]):' instead
195 15 refactor consider-using-assignment-expr R6103 _IKEALoader.get_object_by_style
Use 'if not (object_lst := [obj[0] for (key, obj) in obj_dict.items() if obj_style in key.lower()]):' instead

Module blenderproc.python.loader.Pix3DLoader (blenderproc/python/loader/Pix3DLoader.py)

Line Col. Type Symbol ID Obj Message
79 31 refactor consider-using-assignment-expr R6103 _Pix3DLoader.get_files_with_category
Use 'if (category := block['category']) == used_category:' instead

Module blenderproc.python.loader.RockEssentialsRockLoader (blenderproc/python/loader/RockEssentialsRockLoader.py)

Line Col. Type Symbol ID Obj Message
75 4 refactor too-many-positional-arguments R0917 RockEssentialsRockLoader.set_rocks_properties
Too many positional arguments (8/5)

Module blenderproc.python.loader.SceneNetLoader (blenderproc/python/loader/SceneNetLoader.py)

Line Col. Type Symbol ID Obj Message
87 27 refactor consider-using-assignment-expr R6103 _SceneNetLoader.random_sample_materials_for_each_obj
Use 'if not (image_paths := glob.glob(os.path.join(texture_folder, mat_name, '*'))):' instead
93 31 refactor consider-using-assignment-expr R6103 _SceneNetLoader.random_sample_materials_for_each_obj
Use 'if not (image_paths := glob.glob(os.path.join(unknown_texture_folder, '*'))):' instead

Module blenderproc.python.loader.SuncgLoader (blenderproc/python/loader/SuncgLoader.py)

Line Col. Type Symbol ID Obj Message
141 4 refactor too-many-positional-arguments R0917 _SuncgLoader.load_room
Too many positional arguments (8/5)
196 4 refactor too-many-positional-arguments R0917 _SuncgLoader.load_ground
Too many positional arguments (7/5)

Module blenderproc.python.loader.URDFLoader (blenderproc/python/loader/URDFLoader.py)

Line Col. Type Symbol ID Obj Message
124 0 refactor too-many-positional-arguments R0917 create_bone
Too many positional arguments (8/5)
387 15 refactor consider-using-assignment-expr R6103 load_visual_collision_obj
Use 'if (color := viscol_tree.material.color) is None:' instead
419 7 refactor consider-using-assignment-expr R6103 load_visual_collision_obj
Use 'if (scale := get_size_from_geometry(viscol_tree.geometry)) is not None:' instead

Module blenderproc.python.material.MaterialLoaderUtility (blenderproc/python/material/MaterialLoaderUtility.py)

Line Col. Type Symbol ID Obj Message
397 15 refactor consider-using-assignment-expr R6103 add_alpha_channel_to_textures
Use 'if (material := slot.material) is None:' instead
521 11 refactor consider-using-assignment-expr R6103 create_procedural_texture
Use 'if (pattern_name := pattern_name.upper()) not in possible_patterns:' instead

Module blenderproc.python.object.FaceSlicer (blenderproc/python/object/FaceSlicer.py)

Line Col. Type Symbol ID Obj Message
71 7 refactor consider-using-assignment-expr R6103 slice_faces_with_normals
Use 'if (selected_objects := bpy.context.selected_objects):' instead
87 0 refactor too-many-positional-arguments R0917 extract_floor
Too many positional arguments (7/5)
207 15 refactor consider-using-assignment-expr R6103 extract_floor
Use 'if (selected_objects := bpy.context.selected_objects):' instead
229 4 refactor too-many-positional-arguments R0917 FaceSlicer.select_at_height_value
Too many positional arguments (6/5)
291 11 refactor consider-using-assignment-expr R6103 FaceSlicer.check_face_angle
Use 'if (normal_face_length := np.linalg.norm(normal_face)) < 1e-07:' instead
298 4 refactor too-many-positional-arguments R0917 FaceSlicer.check_face_with
Too many positional arguments (6/5)

Module blenderproc.python.object.ObjectReplacer (blenderproc/python/object/ObjectReplacer.py)

Line Col. Type Symbol ID Obj Message
12 0 refactor too-many-positional-arguments R0917 replace_objects
Too many positional arguments (7/5)

Module blenderproc.python.object.OnSurfaceSampler (blenderproc/python/object/OnSurfaceSampler.py)

Line Col. Type Symbol ID Obj Message
12 0 refactor too-many-positional-arguments R0917 sample_poses_on_surface
Too many positional arguments (8/5)

Module blenderproc.python.object.PhysicsSimulation (blenderproc/python/object/PhysicsSimulation.py)

Line Col. Type Symbol ID Obj Message
12 0 refactor too-many-positional-arguments R0917 simulate_physics_and_fix_final_poses
Too many positional arguments (9/5)
79 0 refactor too-many-positional-arguments R0917 simulate_physics
Too many positional arguments (9/5)
154 4 refactor too-many-positional-arguments R0917 _PhysicsSimulation.do_simulation
Too many positional arguments (6/5)

Module blenderproc.python.postprocessing.PostProcessingUtility (blenderproc/python/postprocessing/PostProcessingUtility.py)

Line Col. Type Symbol ID Obj Message
15 0 convention line-too-long C0301
Line too long (137/120)

Module blenderproc.python.postprocessing.StereoGlobalMatching (blenderproc/python/postprocessing/StereoGlobalMatching.py)

Line Col. Type Symbol ID Obj Message
12 0 refactor too-many-positional-arguments R0917 stereo_global_matching
Too many positional arguments (7/5)
35 11 refactor consider-using-assignment-expr R6103 stereo_global_matching
Use 'if not (baseline := cam.stereo.interocular_distance):' instead
42 11 refactor consider-using-assignment-expr R6103 stereo_global_matching
Use 'if not (baseline := cam.stereo.interocular_distance):' instead
64 4 refactor too-many-positional-arguments R0917 _StereoGlobalMatching.stereo_global_matching
Too many positional arguments (10/5)

Module blenderproc.python.renderer.FlowRendererUtility (blenderproc/python/renderer/FlowRendererUtility.py)

Line Col. Type Symbol ID Obj Message
15 0 refactor too-many-positional-arguments R0917 render_optical_flow
Too many positional arguments (11/5)

Module blenderproc.python.renderer.RendererUtility (blenderproc/python/renderer/RendererUtility.py)

Line Col. Type Symbol ID Obj Message
70 0 refactor too-many-positional-arguments R0917 set_light_bounces
Too many positional arguments (7/5)
179 0 refactor too-many-positional-arguments R0917 enable_distance_output
Too many positional arguments (6/5)
246 0 convention trailing-whitespace C0303
Trailing whitespace
260 0 refactor too-many-positional-arguments R0917 enable_depth_output
Too many positional arguments (6/5)
314 0 convention trailing-whitespace C0303
Trailing whitespace
440 0 refactor too-many-positional-arguments R0917 enable_segmentation_output
Too many positional arguments (6/5)
504 0 convention trailing-whitespace C0303
Trailing whitespace
587 19 refactor consider-using-assignment-expr R6103 _progress_bar_thread
Use 'if not (char := os.read(pipe_out, 1)):' instead
654 0 refactor too-many-positional-arguments R0917 render
Too many positional arguments (7/5)
732 0 refactor too-many-positional-arguments R0917 set_output_format
Too many positional arguments (8/5)
907 15 refactor consider-using-assignment-expr R6103 set_render_devices
Use 'if (devices := preferences.get_devices_for_type(device_type)):' instead

Module blenderproc.python.renderer.SegMapRendererUtility (blenderproc/python/renderer/SegMapRendererUtility.py)

Line Col. Type Symbol ID Obj Message
17 0 refactor too-many-positional-arguments R0917 render_segmap
Too many positional arguments (10/5)
124 19 refactor consider-using-assignment-expr R6103 render_segmap
Use 'if (max_id := np.max(object_ids)) >= len(objects):' instead
178 40 error used-before-assignment E0601 render_segmap
Using variable 'default_value' before assignment

Module blenderproc.python.sampler.Disk (blenderproc/python/sampler/Disk.py)

Line Col. Type Symbol ID Obj Message
10 0 refactor too-many-positional-arguments R0917 disk
Too many positional arguments (6/5)

Module blenderproc.python.sampler.Front3DPointInRoomSampler (blenderproc/python/sampler/Front3DPointInRoomSampler.py)

Line Col. Type Symbol ID Obj Message
38 19 refactor consider-using-assignment-expr R6103 Front3DPointInRoomSampler.__init__
Use 'if (is_above := floor_obj.position_is_above_object(obj.get_location())):' instead

Module blenderproc.python.sampler.PartSphere (blenderproc/python/sampler/PartSphere.py)

Line Col. Type Symbol ID Obj Message
55 11 refactor consider-using-assignment-expr R6103 part_sphere
Use 'if (length := loc_in_sphere.dot(part_sphere_dir_vector)) > dist_above_center:' instead

Module blenderproc.python.sampler.RandomWalk (blenderproc/python/sampler/RandomWalk.py)

Line Col. Type Symbol ID Obj Message
8 0 refactor too-many-positional-arguments R0917 random_walk
Too many positional arguments (7/5)

Module blenderproc.python.sampler.Shell (blenderproc/python/sampler/Shell.py)

Line Col. Type Symbol ID Obj Message
9 0 refactor too-many-positional-arguments R0917 shell
Too many positional arguments (8/5)

Module blenderproc.python.sampler.SuncgPointInRoomSampler (blenderproc/python/sampler/SuncgPointInRoomSampler.py)

Line Col. Type Symbol ID Obj Message
26 19 refactor consider-using-assignment-expr R6103 SuncgPointInRoomSampler.__init__
Use 'if (floor_obj := self._find_floor(suncg_objects, room_obj)) is not None:' instead

Module blenderproc.python.sampler.UpperRegionSampler (blenderproc/python/sampler/UpperRegionSampler.py)

Line Col. Type Symbol ID Obj Message
13 0 refactor too-many-positional-arguments R0917 upper_region
Too many positional arguments (7/5)
93 15 refactor consider-using-assignment-expr R6103 upper_region
Use 'if (diff_angle := math.acos(normal.dot(upper_dir))) < min_diff_angle:' instead

Module blenderproc.python.types.ArmatureUtility (blenderproc/python/types/ArmatureUtility.py)

Line Col. Type Symbol ID Obj Message
109 11 refactor consider-using-assignment-expr R6103 Armature._clip_value_from_constraint
Use 'if (c := self.get_constraint(constraint_name=constraint_name)) is not None:' instead

Module blenderproc.python.types.BoneUtility (blenderproc/python/types/BoneUtility.py)

Line Col. Type Symbol ID Obj Message
128 0 refactor too-many-positional-arguments R0917 set_ik_constraint
Too many positional arguments (6/5)
165 0 refactor too-many-positional-arguments R0917 set_copy_location_constraint
Too many positional arguments (7/5)

Module blenderproc.python.types.EntityUtility (blenderproc/python/types/EntityUtility.py)

Line Col. Type Symbol ID Obj Message
170 11 convention unidiomatic-typecheck C0123 Entity.duplicate
Use isinstance() rather than type() for a typecheck.

Module blenderproc.python.types.LightUtility (blenderproc/python/types/LightUtility.py)

Line Col. Type Symbol ID Obj Message
126 12 refactor consider-using-augmented-assign R6104 Light.setup_as_projector
Use '/=' to do an augmented assign directly
217 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.types.LinkUtility (blenderproc/python/types/LinkUtility.py)

Line Col. Type Symbol ID Obj Message
116 19 refactor consider-using-assignment-expr R6103 Link._set_rotation_euler
Use 'if (axis := self._determine_rotation_axis(bone=bone)) is not None:' instead
181 11 refactor consider-using-assignment-expr R6103 Link._determine_rotation_axis
Use 'if (c := get_constraint(bone=bone, constraint_name='Limit Rotation')) is None:' instead
212 11 refactor consider-using-assignment-expr R6103 Link._clip_value_from_constraint
Use 'if (c := get_constraint(bone=bone, constraint_name=constraint_name)) is not None:' instead

Module blenderproc.python.types.MaterialUtility (blenderproc/python/types/MaterialUtility.py)

Line Col. Type Symbol ID Obj Message
282 4 refactor too-many-positional-arguments R0917 Material.infuse_texture
Too many positional arguments (7/5)
302 11 refactor consider-using-assignment-expr R6103 Material.infuse_texture
Use 'if (used_mode := mode.lower()) not in ['overlay', 'mix', 'set']:' instead
362 11 refactor consider-using-assignment-expr R6103 Material.infuse_material
Use 'if (used_mode := mode.lower()) not in ['add', 'mix']:' instead

Module blenderproc.python.types.MeshObjectUtility (blenderproc/python/types/MeshObjectUtility.py)

Line Col. Type Symbol ID Obj Message
20 0 warning unused-import W0611
Unused SetupUtility imported from blenderproc.python.utility.SetupUtility
187 4 refactor too-many-positional-arguments R0917 MeshObject.enable_rigidbody
Too many positional arguments (10/5)
245 16 error possibly-used-before-assignment E0606 MeshObject.build_convex_decomposition_collision_shape
Possibly using variable 'convex_decomposition' before assignment
289 15 refactor consider-using-assignment-expr R6103 MeshObject.get_bound_box_volume
Use 'if (dist := np.linalg.norm(point - min_point)) > max_dist:' instead
475 4 refactor too-many-positional-arguments R0917 MeshObject.add_displace_modifier
Too many positional arguments (6/5)
549 87 convention trailing-whitespace C0303
Trailing whitespace
554 0 convention line-too-long C0301
Line too long (123/120)
557 0 convention trailing-whitespace C0303
Trailing whitespace
562 11 refactor consider-using-assignment-expr R6103 MeshObject.add_auto_smooth_modifier
Use 'if (existing_node_group := bpy.data.node_groups.get(smooth_by_angle_node_group_name, None)) is None:' instead
563 68 warning unused-variable W0612 MeshObject.add_auto_smooth_modifier
Unused variable 'data_from'
571 16 warning self-assigning-variable W0127 MeshObject.add_auto_smooth_modifier
Assigning the same variable 'modifier' to itself
573 0 convention trailing-whitespace C0303
Trailing whitespace
584 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
588 0 convention trailing-whitespace C0303
Trailing whitespace
590 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
591 0 convention trailing-whitespace C0303
Trailing whitespace
593 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
595 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
596 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
597 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
598 90 convention trailing-whitespace C0303
Trailing whitespace
598 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
599 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
600 0 warning bad-indentation W0311
Bad indentation. Found 13 spaces, expected 12
601 0 convention trailing-whitespace C0303
Trailing whitespace
602 23 convention trailing-whitespace C0303
Trailing whitespace
603 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
605 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
606 20 convention trailing-whitespace C0303
Trailing whitespace
607 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
608 0 convention trailing-whitespace C0303
Trailing whitespace
609 0 warning bad-indentation W0311
Bad indentation. Found 9 spaces, expected 8
760 28 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.utility.CollisionUtility (blenderproc/python/utility/CollisionUtility.py)

Line Col. Type Symbol ID Obj Message
47 15 refactor consider-using-assignment-expr R6103 CollisionUtility.check_intersections
Use 'if (intersection := CollisionUtility.check_bb_intersection(obj, collision_obj)):' instead

Module blenderproc.python.utility.Initializer (blenderproc/python/utility/Initializer.py)

Line Col. Type Symbol ID Obj Message
10 0 convention wrong-import-order C0411
standard import "typing.Optional" should be placed before third party import "numpy.random"
21 0 convention missing-function-docstring C0116 clean_temp_dir
Missing function or method docstring
31 0 convention missing-function-docstring C0116 handle_sigterm
Missing function or method docstring
43 0 convention line-too-long C0301
Line too long (130/120)
53 25 convention trailing-whitespace C0303
Trailing whitespace
76 7 refactor consider-using-assignment-expr R6103 init
Use 'if (random_seed := os.getenv('BLENDER_PROC_RANDOM_SEED')):' instead
108 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.utility.InstallUtility (blenderproc/python/utility/InstallUtility.py)

Line Col. Type Symbol ID Obj Message
41 0 convention line-too-long C0301
Line too long (140/120)
42 0 convention trailing-whitespace C0303
Trailing whitespace
47 11 refactor consider-using-assignment-expr R6103 InstallUtility.determine_blender_install_path
Use 'if (blender_install_path := used_args.blender_install_path) is None:' instead
66 12 convention import-outside-toplevel C0415 InstallUtility.make_sure_blender_is_installed
Import outside toplevel (bpy)
68 0 convention trailing-whitespace C0303
Trailing whitespace
136 0 convention trailing-whitespace C0303
Trailing whitespace
159 35 refactor consider-using-assignment-expr R6103 InstallUtility.make_sure_blender_is_installed.DownloadProgressBar.__call__
Use 'if (downloaded := block_num * block_size) < total_size:' instead
170 23 error possibly-used-before-assignment E0606 InstallUtility.make_sure_blender_is_installed
Possibly using variable 'URLError' before assignment
186 48 error possibly-used-before-assignment E0606 InstallUtility.make_sure_blender_is_installed
Possibly using variable 'lzma' before assignment

Module blenderproc.python.utility.SetupUtility (blenderproc/python/utility/SetupUtility.py)

Line Col. Type Symbol ID Obj Message
7 0 warning unused-import W0611
Unused import shutil
64 0 convention line-too-long C0301
Line too long (122/120)
65 0 convention trailing-whitespace C0303
Trailing whitespace
73 15 refactor consider-using-assignment-expr R6103 SetupUtility.setup
Use 'if (is_debug_mode := '--background' not in sys.argv):' instead
114 0 convention line-too-long C0301
Line too long (122/120)
115 0 convention trailing-whitespace C0303
Trailing whitespace
150 4 refactor too-many-positional-arguments R0917 SetupUtility.setup_pip
Too many positional arguments (6/5)
150 4 refactor inconsistent-return-statements R1710 SetupUtility.setup_pip
Either all return statements in a function should return an expression, or none of them should.
184 0 convention trailing-whitespace C0303
Trailing whitespace
217 4 refactor too-many-positional-arguments R0917 SetupUtility._pip_install_packages
Too many positional arguments (6/5)
386 0 convention trailing-whitespace C0303
Trailing whitespace

Module blenderproc.python.utility.Utility (blenderproc/python/utility/Utility.py)

Line Col. Type Symbol ID Obj Message
5 0 warning unused-import W0611
Unused import shutil
371 4 refactor too-many-positional-arguments R0917 Utility.register_output
Too many positional arguments (6/5)

Module blenderproc.python.writer.BopWriterUtility (blenderproc/python/writer/BopWriterUtility.py)

Line Col. Type Symbol ID Obj Message
9 0 convention wrong-import-order C0411
standard import "typing.List" should be placed before third party import "trimesh"
10 0 convention wrong-import-order C0411
standard import "warnings" should be placed before third party import "trimesh"
11 0 convention wrong-import-order C0411
standard import "datetime" should be placed before third party import "trimesh"
18 0 convention wrong-import-order C0411
standard import "sys" should be placed before third party imports "trimesh", "numpy", "png", "cv2", "bpy", "mathutils.Matrix"
31 0 refactor too-many-positional-arguments R0917 write_bop
Too many positional arguments (17/5)
62 0 convention line-too-long C0301
Line too long (131/120)
80 8 warning redefined-outer-name W0621 write_bop
Redefining name 'dataset_objects' from outer scope (line 544)
175 12 warning protected-access W0212 write_bop
Access to a protected member _pyrender_init of a client class
177 0 convention line-too-long C0301
Line too long (124/120)
177 48 warning protected-access W0212 write_bop
Access to a protected member _pyrender_init of a client class
177 19 refactor consider-using-with R1732 write_bop
Consider using 'with' for resource-allocating operations
181 0 convention trailing-whitespace C0303
Trailing whitespace
187 0 convention trailing-whitespace C0303
Trailing whitespace
193 12 warning protected-access W0212 write_bop
Access to a protected member _pyrender_cleanup of a client class
313 21 warning redefined-outer-name W0621 _BopWriterUtility.get_frame_gt
Redefining name 'dataset_objects' from outer scope (line 544)
400 4 refactor too-many-positional-arguments R0917 _BopWriterUtility.write_frames
Too many positional arguments (11/5)
400 38 warning redefined-outer-name W0621 _BopWriterUtility.write_frames
Redefining name 'dataset_objects' from outer scope (line 544)
526 0 convention trailing-whitespace C0303
Trailing whitespace
538 78 convention trailing-whitespace C0303
Trailing whitespace
542 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_init
Global variable 'renderer' undefined at the module level
542 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_init
Global variable 'renderer_large' undefined at the module level
542 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_init
Global variable 'dataset_objects' undefined at the module level
564 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_cleanup
Global variable 'renderer' undefined at the module level
564 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_cleanup
Global variable 'renderer_large' undefined at the module level
564 8 warning global-variable-undefined W0601 _BopWriterUtility._pyrender_cleanup
Global variable 'dataset_objects' undefined at the module level
570 0 convention line-too-long C0301
Line too long (173/120)
570 4 refactor too-many-positional-arguments R0917 _BopWriterUtility._calc_gt_masks_iteration
Too many positional arguments (7/5)
585 78 convention trailing-whitespace C0303
Trailing whitespace
591 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_masks_iteration
Using global for 'renderer' but no assignment is done
591 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_masks_iteration
Using global for 'dataset_objects' but no assignment is done
598 0 convention trailing-whitespace C0303
Trailing whitespace
689 0 convention line-too-long C0301
Line too long (165/120)
690 0 convention trailing-whitespace C0303
Trailing whitespace
693 0 convention line-too-long C0301
Line too long (196/120)
693 4 refactor too-many-positional-arguments R0917 _BopWriterUtility._calc_gt_info_iteration
Too many positional arguments (9/5)
706 11 convention trailing-whitespace C0303
Trailing whitespace
708 78 convention trailing-whitespace C0303
Trailing whitespace
714 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_info_iteration
Using global for 'renderer_large' but no assignment is done
714 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_info_iteration
Using global for 'dataset_objects' but no assignment is done
714 8 warning global-variable-not-assigned W0602 _BopWriterUtility._calc_gt_info_iteration
Using global for 'renderer' but no assignment is done
718 11 warning protected-access W0212 _BopWriterUtility._calc_gt_info_iteration
Access to a protected member _renderer of a client class
719 12 warning protected-access W0212 _BopWriterUtility._calc_gt_info_iteration
Access to a protected member _renderer of a client class
720 12 warning protected-access W0212 _BopWriterUtility._calc_gt_info_iteration
Access to a protected member _renderer of a client class
727 0 convention trailing-whitespace C0303
Trailing whitespace
856 0 convention line-too-long C0301
Line too long (207/120)
857 0 convention trailing-whitespace C0303
Trailing whitespace
865 44 warning redefined-outer-name W0621 _BopWriterUtility.calc_gt_coco
Redefining name 'dataset_objects' from outer scope (line 544)

Module blenderproc.python.writer.CocoWriterUtility (blenderproc/python/writer/CocoWriterUtility.py)

Line Col. Type Symbol ID Obj Message
17 0 refactor too-many-positional-arguments R0917 write_coco_annotations
Too many positional arguments (12/5)
147 4 refactor too-many-positional-arguments R0917 _CocoWriterUtility.generate_coco_annotations
Too many positional arguments (7/5)
310 4 refactor too-many-positional-arguments R0917 _CocoWriterUtility.create_annotation_info
Too many positional arguments (6/5)
323 11 refactor consider-using-assignment-expr R6103 _CocoWriterUtility.create_annotation_info
Use 'if (area := _CocoWriterUtility.calc_binary_mask_area(binary_mask)) < 1:' instead
332 19 refactor consider-using-assignment-expr R6103 _CocoWriterUtility.create_annotation_info
Use 'if not (segmentation := _CocoWriterUtility.binary_mask_to_polygon(binary_mask, tolerance)):' instead

Module blenderproc.python.writer.GifWriterUtility (blenderproc/python/writer/GifWriterUtility.py)

Line Col. Type Symbol ID Obj Message
13 0 convention wrong-import-position C0413
Import "from blenderproc.scripts.visHdf5Files import vis_data" should be placed at the top of the module
14 0 convention wrong-import-position C0413
Import "from blenderproc.python.utility.Utility import Utility" should be placed at the top of the module

Module blenderproc.python.writer.WriterUtility (blenderproc/python/writer/WriterUtility.py)

Line Col. Type Symbol ID Obj Message
90 15 refactor consider-using-assignment-expr R6103 write_hdf5
Use 'if (blender_proc_version := Utility.get_current_version()) is not None:' instead
263 15 refactor consider-using-assignment-expr R6103 _WriterUtility.get_common_attribute
Use 'if (custom_property_name := attribute_name[len('customprop_'):]) in item:' instead

Module blenderproc.resources.front_3D.find_all_front_3D_labels (blenderproc/resources/front_3D/find_all_front_3D_labels.py)

Line Col. Type Symbol ID Obj Message
61 15 refactor consider-using-assignment-expr R6103
Use 'if (used_obj_name := mesh_data['type'].strip()) == '':' instead

Module blenderproc.scripts.download_haven (blenderproc/scripts/download_haven.py)

Line Col. Type Symbol ID Obj Message
66 15 refactor consider-using-assignment-expr R6103 cli.download_items
Use 'if not (missing_item_ids := list(filter(item_file_exists, map(lambda item_id: item_id, data.keys())))):' instead

Module blenderproc.scripts.download_ikea (blenderproc/scripts/download_ikea.py)

Line Col. Type Symbol ID Obj Message
54 15 refactor consider-using-assignment-expr R6103 split_object_according_to_groups
Use 'if (amount_of_faces := sum((1 for l in final_lins if l.startswith('f ')))) > 10:' instead

Module blenderproc.scripts.quickstart (blenderproc/scripts/quickstart.py)

Line Col. Type Symbol ID Obj Message
1 0 convention missing-module-docstring C0114
Missing module docstring
1 0 fatal astroid-error F0002
blenderproc/scripts/quickstart.py: Fatal error while checking 'blenderproc/scripts/quickstart.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '${INTERNAL_HOME_FOLDER}/Dominik_Winkelbauer/blender_proc_helper_runs_external/DLR-RM/BlenderProc/1158/pylint_home_folder/pylint-crash-2024-12-21-20-23-10.txt'.
2 0 warning pointless-string-statement W0105
String statement has no effect
13 0 convention wrong-import-position C0413
Import "import numpy as np" should be placed at the top of the module

Module blenderproc.scripts.saveAsImg (blenderproc/scripts/saveAsImg.py)

Line Col. Type Symbol ID Obj Message
3 0 convention wrong-import-position C0413
Import "import argparse" should be placed at the top of the module
3 0 convention wrong-import-order C0411
standard import "argparse" should be placed before third party imports "blenderproc", "numpy"
4 0 convention wrong-import-position C0413
Import "import os" should be placed at the top of the module
4 0 convention wrong-import-order C0411
standard import "os" should be placed before third party imports "blenderproc", "numpy"
5 0 convention wrong-import-position C0413
Import "from typing import Optional" should be placed at the top of the module
5 0 convention wrong-import-order C0411
standard import "typing.Optional" should be placed before third party imports "blenderproc", "numpy"
7 0 convention wrong-import-position C0413
Import "import h5py" should be placed at the top of the module
8 0 convention wrong-import-position C0413
Import "import numpy as np" should be placed at the top of the module
8 0 convention ungrouped-imports C0412
Imports from package numpy are not grouped

Module blenderproc.scripts.visHdf5Files (blenderproc/scripts/visHdf5Files.py)

Line Col. Type Symbol ID Obj Message
60 0 refactor too-many-positional-arguments R0917 vis_data
Too many positional arguments (11/5)
157 0 refactor too-many-positional-arguments R0917 vis_file
Too many positional arguments (9/5)

Module blenderproc.scripts.vis_coco_annotation (blenderproc/scripts/vis_coco_annotation.py)

Line Col. Type Symbol ID Obj Message
43 11 refactor consider-using-assignment-expr R6103 cli.get_category
Use 'if (category := [category['name'] for category in categories if category['id'] == _id]):' instead

Metrics

Count per types

Name Count
fatal 3
convention 96
warning 42
refactor 124
error 5

Count per messages

Name Count
astroid-error 3
line-too-long 20
trailing-whitespace 48
raise-missing-from 1
wrong-import-position 9
wrong-import-order 10
ungrouped-imports 3
consider-using-assignment-expr 62
too-many-positional-arguments 58
trailing-newlines 1
no-else-return 1
unused-import 4
possibly-used-before-assignment 4
used-before-assignment 1
unidiomatic-typecheck 1
consider-using-augmented-assign 1
bad-indentation 13
self-assigning-variable 1
unused-variable 1
import-outside-toplevel 1
missing-function-docstring 2
inconsistent-return-statements 1
redefined-outer-name 4
protected-access 6
consider-using-with 1
global-variable-undefined 6
global-variable-not-assigned 5
missing-module-docstring 1
pointless-string-statement 1

Count per modules

Name Count
blenderproc.python.camera.CameraUtility 1
blenderproc 8
blenderproc.__main__ 4
blenderproc.debug_startup 2
blenderproc.command_line 2
blenderproc.external.vhacd.decompose 2
blenderproc.python.camera.CameraProjection 13
blenderproc.python.camera.CameraValidation 3
blenderproc.python.camera.LensDistortionUtility 3
blenderproc.python.constructor.RandomRoomConstructor 4
blenderproc.python.lighting.IntersectingSpotLight 1
blenderproc.python.lighting.SuncgLighting 5
blenderproc.python.loader.HavenMaterialLoader 4
blenderproc.python.loader.IKEALoader 3
blenderproc.python.loader.Pix3DLoader 1
blenderproc.python.loader.RockEssentialsRockLoader 1
blenderproc.python.loader.SceneNetLoader 2
blenderproc.python.loader.SuncgLoader 2
blenderproc.python.loader.CCMaterialLoader 3
blenderproc.python.loader.Front3DLoader 3
blenderproc.python.loader.AMASSLoader 2
blenderproc.python.loader.BopLoader 5
blenderproc.python.loader.BlendLoader 2
blenderproc.python.loader.URDFLoader 3
blenderproc.python.material.MaterialLoaderUtility 2
blenderproc.python.object.FaceSlicer 6
blenderproc.python.object.ObjectReplacer 1
blenderproc.python.object.OnSurfaceSampler 1
blenderproc.python.object.PhysicsSimulation 3
blenderproc.python.postprocessing.PostProcessingUtility 1
blenderproc.python.postprocessing.StereoGlobalMatching 4
blenderproc.python.renderer.FlowRendererUtility 1
blenderproc.python.renderer.SegMapRendererUtility 3
blenderproc.python.renderer.RendererUtility 11
blenderproc.python.sampler.Disk 1
blenderproc.python.sampler.Front3DPointInRoomSampler 1
blenderproc.python.sampler.PartSphere 1
blenderproc.python.sampler.RandomWalk 1
blenderproc.python.sampler.Shell 1
blenderproc.python.sampler.SuncgPointInRoomSampler 1
blenderproc.python.sampler.UpperRegionSampler 2
blenderproc.python.types.ArmatureUtility 1
blenderproc.python.types.BoneUtility 2
blenderproc.python.types.LinkUtility 3
blenderproc.python.types.MaterialUtility 3
blenderproc.python.types.EntityUtility 1
blenderproc.python.types.LightUtility 2
blenderproc.python.types.MeshObjectUtility 33
blenderproc.python.utility.CollisionUtility 1
blenderproc.python.utility.InstallUtility 9
blenderproc.python.utility.Utility 2
blenderproc.python.utility.Initializer 7
blenderproc.python.utility.SetupUtility 11
blenderproc.python.writer.CocoWriterUtility 5
blenderproc.python.writer.BopWriterUtility 47
blenderproc.python.writer.WriterUtility 2
blenderproc.python.writer.GifWriterUtility 2
blenderproc.resources.front_3D.find_all_front_3D_labels 1
blenderproc.scripts.download_haven 1
blenderproc.scripts.download_ikea 1
blenderproc.scripts.quickstart 4
blenderproc.scripts.saveAsImg 9
blenderproc.scripts.visHdf5Files 2
blenderproc.scripts.vis_coco_annotation 1

Count per path

Name Count
blenderproc/python/camera/CameraUtility.py 1
blenderproc/__init__.py 8
blenderproc/__main__.py 4
blenderproc/debug_startup.py 2
blenderproc/command_line.py 2
blenderproc/external/vhacd/decompose.py 2
blenderproc/python/camera/CameraProjection.py 13
blenderproc/python/camera/CameraValidation.py 3
blenderproc/python/camera/LensDistortionUtility.py 3
blenderproc/python/constructor/RandomRoomConstructor.py 4
blenderproc/python/lighting/IntersectingSpotLight.py 1
blenderproc/python/lighting/SuncgLighting.py 5
blenderproc/python/loader/HavenMaterialLoader.py 4
blenderproc/python/loader/IKEALoader.py 3
blenderproc/python/loader/Pix3DLoader.py 1
blenderproc/python/loader/RockEssentialsRockLoader.py 1
blenderproc/python/loader/SceneNetLoader.py 2
blenderproc/python/loader/SuncgLoader.py 2
blenderproc/python/loader/CCMaterialLoader.py 3
blenderproc/python/loader/Front3DLoader.py 3
blenderproc/python/loader/AMASSLoader.py 2
blenderproc/python/loader/BopLoader.py 5
blenderproc/python/loader/BlendLoader.py 2
blenderproc/python/loader/URDFLoader.py 3
blenderproc/python/material/MaterialLoaderUtility.py 2
blenderproc/python/object/FaceSlicer.py 6
blenderproc/python/object/ObjectReplacer.py 1
blenderproc/python/object/OnSurfaceSampler.py 1
blenderproc/python/object/PhysicsSimulation.py 3
blenderproc/python/postprocessing/PostProcessingUtility.py 1
blenderproc/python/postprocessing/StereoGlobalMatching.py 4
blenderproc/python/renderer/FlowRendererUtility.py 1
blenderproc/python/renderer/SegMapRendererUtility.py 3
blenderproc/python/renderer/RendererUtility.py 11
blenderproc/python/sampler/Disk.py 1
blenderproc/python/sampler/Front3DPointInRoomSampler.py 1
blenderproc/python/sampler/PartSphere.py 1
blenderproc/python/sampler/RandomWalk.py 1
blenderproc/python/sampler/Shell.py 1
blenderproc/python/sampler/SuncgPointInRoomSampler.py 1
blenderproc/python/sampler/UpperRegionSampler.py 2
blenderproc/python/types/ArmatureUtility.py 1
blenderproc/python/types/BoneUtility.py 2
blenderproc/python/types/LinkUtility.py 3
blenderproc/python/types/MaterialUtility.py 3
blenderproc/python/types/EntityUtility.py 1
blenderproc/python/types/LightUtility.py 2
blenderproc/python/types/MeshObjectUtility.py 33
blenderproc/python/utility/CollisionUtility.py 1
blenderproc/python/utility/InstallUtility.py 9
blenderproc/python/utility/Utility.py 2
blenderproc/python/utility/Initializer.py 7
blenderproc/python/utility/SetupUtility.py 11
blenderproc/python/writer/CocoWriterUtility.py 5
blenderproc/python/writer/BopWriterUtility.py 47
blenderproc/python/writer/WriterUtility.py 2
blenderproc/python/writer/GifWriterUtility.py 2
blenderproc/resources/front_3D/find_all_front_3D_labels.py 1
blenderproc/scripts/download_haven.py 1
blenderproc/scripts/download_ikea.py 1
blenderproc/scripts/quickstart.py 4
blenderproc/scripts/saveAsImg.py 9
blenderproc/scripts/visHdf5Files.py 2
blenderproc/scripts/vis_coco_annotation.py 1
***The tests are done.*** Check the log:

Last update: 12/21/2024, 20:56:53

Copy link
Member

@cornerfarmer cornerfarmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you!

@cornerfarmer cornerfarmer merged commit 63531e8 into DLR-RM:main Dec 22, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Allow BlenderProc to be used as a Python package
2 participants