-
Notifications
You must be signed in to change notification settings - Fork 457
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
Conversation
2b5e1f2
to
6bf5ba5
Compare
…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.
6bf5ba5
to
97addad
Compare
…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.
There was a problem hiding this 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
docs/tutorials/bpy_module.md
Outdated
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 |
There was a problem hiding this comment.
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
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 |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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?
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.
78d0bf2
to
993b5de
Compare
Allows specifying custom directory when running in external mode.
BlenderProcHelper result for run 644: Done with: [
Unit tests output:
urdf_loading_and_manipulationThe output of 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 Expand+ root['annotations'][27]['area']: 1923
- root['annotations'][27]['area']: 1912
stereo_matchingThe output of
stereo_matching_with_projector (bpy)The output of
Pylint outputExpandMessagesModule
|
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 |
Last update: 12/21/2024, 20:56:53
There was a problem hiding this 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!
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 anypython
pipeline without having to run the whole thing throughblenderproc run
(but still allowed).Code / CLI changes:
is_using_external_bpy_module
inSetupUtility
to infer the mode from one placeblenderproc pip
[install, uninstall]
prints the command supposed to be used in the environmentblenderproc debug
prints that it's not availabledetermine_blender_install_path
,determine_python_paths
).Limitations:
BlenderProc's
Blender pip dependencies have to be installed manually with the correct versions into the python environment (see Further design decisions)bpy
module doesn't have UI.bpy
moule itselfbpy
requires.Additional tweaks:
bpy_utils.resource_path
to infer theAutoSmooth
modifier asset pathnp.string_
Testing:
pip install bpy==4.2.0
pip install -r external_bpy_requirements.txt
export USE_EXTERNAL_BPY_MODULE="1"
python script_using_blenderproc.py
orblenderproc run script_using_blenderproc.py
external_bpy_requirements.txt
Tested (automagically) all the combinations of calls with and without external bpy.
Closes #901 #840