-
Notifications
You must be signed in to change notification settings - Fork 454
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
Blender 4.2.1 #1136
Blender 4.2.1 #1136
Conversation
This comment has been minimized.
This comment has been minimized.
Added 4 commits migrating The @cornerfarmer can you run the tests again? Also I am susceptible to making the changes backward compatible with 3.6 if you consider it viable. My use case for this is so its easily possible to change the major version that's installed with blenderproc and the code will not be the block. The next step is Blender 4.1, which should be easier, as it doesn't have many breaking changes. |
This comment was marked as outdated.
This comment was marked as outdated.
New API in Blender 4.0, the first 'context' argument no longer exists.
…d .inputs The latter was deprecated in favor of the prior.
This is no longer available from Blender 4.1
The 'import_mesh.ply' was replaced by '.wm.ply_import'.
This comment was marked as outdated.
This comment was marked as outdated.
In 4.1 the node group replaces the prior implementation of auto smooth on object data.
This comment was marked as outdated.
This comment was marked as outdated.
…ender 4.1 Since Blender 4.1 the .exr depth outputs are one channel instead of three channels. The imageio.v3.imread using 'opencv' can't open single channel .exr. Thus using nodes we create three channel image output from the depth again. This might be fixed in future versions of Blender, fix to respect the file foramt 'Color' property (that's actually set to RGB) was already merged into master: https://projects.blender.org/blender/blender/commit/40be124184bb571669b7346a36003c33c412cb20
cf01263
to
a66112a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Since Blender 4.1 'AgX' is the new default, but to yield semi-similar results we want to keep the default as 'Filmic'.
d3a15cf
to
4c3ac3e
Compare
Adjusted breaking API changes, and adding of the smooth by angle modifier - which is now actually less prone to error.
This comment was marked as outdated.
This comment was marked as outdated.
Using the 'bpy.ops.modifier_add_node_group' would be superior, but it doesn't work correctly in background mode.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
So the 'bpy.context.collection' can be used afterwards. This worked in Blender 4.1, but in 4.2 deleting the collection objects doesn't make the root collection as the active in context.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This should fix the broken normals.
This comment was marked as outdated.
This comment was marked as outdated.
…ects loaded from ply
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Some minor comments
BlenderProcHelper result for run 614: Done with: [
urdf_loading_and_manipulation (main_python)The output of Expand+ root['0'][2]['bbox_visib'][3]: 25
- root['0'][2]['bbox_visib'][3]: 23
stereo_matching (main_python)The output of
Pylint outputExpandMessagesModule
|
Line | Col. | Type | Symbol | ID | Obj | Message |
---|---|---|---|---|---|---|
12 | 44 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
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.loader.BopLoader
(blenderproc/python/loader/BopLoader.py
)
Line | Col. | Type | Symbol | ID | Obj | Message |
---|---|---|---|---|---|---|
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 |
---|---|---|---|---|---|---|
73 | 0 | convention | line-too-long |
C0301 | Line too long (152/120) |
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.renderer.RendererUtility
(blenderproc/python/renderer/RendererUtility.py
)
Line | Col. | Type | Symbol | ID | Obj | Message |
---|---|---|---|---|---|---|
246 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
314 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
504 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
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 |
---|---|---|---|---|---|---|
125 | 12 | refactor | consider-using-augmented-assign |
R6104 | Light.setup_as_projector | Use '/=' to do an augmented assign directly |
216 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
Module blenderproc.python.types.MeshObjectUtility
(blenderproc/python/types/MeshObjectUtility.py
)
Line | Col. | Type | Symbol | ID | Obj | Message |
---|---|---|---|---|---|---|
520 | 87 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
526 | 0 | convention | line-too-long |
C0301 | Line too long (122/120) |
|
529 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
535 | 68 | warning | unused-variable |
W0612 | MeshObject.add_auto_smooth_modifier | Unused variable 'data_from' |
543 | 16 | warning | self-assigning-variable |
W0127 | MeshObject.add_auto_smooth_modifier | Assigning the same variable 'modifier' to itself |
545 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
555 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 9 spaces, expected 8 |
|
559 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
561 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 9 spaces, expected 8 |
|
562 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
564 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 9 spaces, expected 8 |
|
566 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 13 spaces, expected 12 |
|
567 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 13 spaces, expected 12 |
|
568 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 13 spaces, expected 12 |
|
569 | 90 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
569 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 13 spaces, expected 12 |
|
570 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 13 spaces, expected 12 |
|
571 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 13 spaces, expected 12 |
|
572 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
573 | 23 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
574 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 9 spaces, expected 8 |
|
576 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 9 spaces, expected 8 |
|
577 | 20 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
578 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 9 spaces, expected 8 |
|
579 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
580 | 0 | warning | bad-indentation |
W0311 | Bad indentation. Found 9 spaces, expected 8 |
|
612 | 0 | convention | line-too-long |
C0301 | Line too long (130/120) |
|
623 | 7 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
631 | 8 | warning | unused-variable |
W0612 | create_from_point_cloud | Unused variable 'p' |
659 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
734 | 28 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
Module blenderproc.python.utility.Initializer
(blenderproc/python/utility/Initializer.py
)
Line | Col. | Type | Symbol | ID | Obj | Message |
---|---|---|---|---|---|---|
80 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
Module blenderproc.python.utility.InstallUtility
(blenderproc/python/utility/InstallUtility.py
)
Line | Col. | Type | Symbol | ID | Obj | Message |
---|---|---|---|---|---|---|
129 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
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 "from typing import List, Optional, Dict, Tuple" should be placed before "import trimesh" |
|
10 | 0 | convention | wrong-import-order |
C0411 | standard import "import warnings" should be placed before "import trimesh" |
|
11 | 0 | convention | wrong-import-order |
C0411 | standard import "import datetime" should be placed before "import trimesh" |
|
18 | 0 | convention | wrong-import-order |
C0411 | standard import "import sys" should be placed before "import trimesh" |
|
62 | 0 | convention | line-too-long |
C0301 | Line too long (131/120) |
|
79 | 8 | warning | redefined-outer-name |
W0621 | write_bop | Redefining name 'dataset_objects' from outer scope (line 536) |
172 | 44 | warning | protected-access |
W0212 | write_bop | Access to a protected member _pyrender_init of a client class |
172 | 15 | refactor | consider-using-with |
R1732 | write_bop | Consider using 'with' for resource-allocating operations |
176 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
182 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
305 | 21 | warning | redefined-outer-name |
W0621 | _BopWriterUtility.get_frame_gt | Redefining name 'dataset_objects' from outer scope (line 536) |
392 | 38 | warning | redefined-outer-name |
W0621 | _BopWriterUtility.write_frames | Redefining name 'dataset_objects' from outer scope (line 536) |
518 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
530 | 78 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
534 | 8 | warning | global-variable-undefined |
W0601 | _BopWriterUtility._pyrender_init | Global variable 'renderer' undefined at the module level |
534 | 8 | warning | global-variable-undefined |
W0601 | _BopWriterUtility._pyrender_init | Global variable 'renderer_large' undefined at the module level |
534 | 8 | warning | global-variable-undefined |
W0601 | _BopWriterUtility._pyrender_init | Global variable 'dataset_objects' undefined at the module level |
552 | 0 | convention | line-too-long |
C0301 | Line too long (173/120) |
|
567 | 78 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
573 | 8 | warning | global-variable-not-assigned |
W0602 | _BopWriterUtility._calc_gt_masks_iteration | Using global for 'renderer' but no assignment is done |
573 | 8 | warning | global-variable-not-assigned |
W0602 | _BopWriterUtility._calc_gt_masks_iteration | Using global for 'dataset_objects' but no assignment is done |
580 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
670 | 0 | convention | line-too-long |
C0301 | Line too long (160/120) |
|
671 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
672 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
675 | 0 | convention | line-too-long |
C0301 | Line too long (196/120) |
|
688 | 11 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
690 | 78 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
696 | 8 | warning | global-variable-not-assigned |
W0602 | _BopWriterUtility._calc_gt_info_iteration | Using global for 'renderer_large' but no assignment is done |
696 | 8 | warning | global-variable-not-assigned |
W0602 | _BopWriterUtility._calc_gt_info_iteration | Using global for 'dataset_objects' but no assignment is done |
696 | 8 | warning | global-variable-not-assigned |
W0602 | _BopWriterUtility._calc_gt_info_iteration | Using global for 'renderer' but no assignment is done |
700 | 11 | warning | protected-access |
W0212 | _BopWriterUtility._calc_gt_info_iteration | Access to a protected member _renderer of a client class |
701 | 12 | warning | protected-access |
W0212 | _BopWriterUtility._calc_gt_info_iteration | Access to a protected member _renderer of a client class |
702 | 12 | warning | protected-access |
W0212 | _BopWriterUtility._calc_gt_info_iteration | Access to a protected member _renderer of a client class |
709 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
837 | 0 | convention | line-too-long |
C0301 | Line too long (202/120) |
|
838 | 0 | convention | trailing-whitespace |
C0303 | Trailing whitespace |
|
846 | 44 | warning | redefined-outer-name |
W0621 | _BopWriterUtility.calc_gt_coco | Redefining name 'dataset_objects' from outer scope (line 536) |
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.scripts.quickstart
(blenderproc/scripts/quickstart.py
)
Line | Col. | Type | Symbol | ID | Obj | Message |
---|---|---|---|---|---|---|
1 | 0 | convention | missing-module-docstring |
C0114 | Missing module docstring |
|
11 | -1 | 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 |
Metrics
Count per types
Name | Count |
---|---|
convention | 62 |
refactor | 3 |
warning | 34 |
Count per messages
Name | Count |
---|---|
trailing-whitespace | 39 |
line-too-long | 12 |
trailing-newlines | 1 |
no-else-return | 1 |
ungrouped-imports | 1 |
unused-import | 1 |
consider-using-augmented-assign | 1 |
unidiomatic-typecheck | 1 |
bad-indentation | 13 |
self-assigning-variable | 1 |
unused-variable | 2 |
redefined-outer-name | 4 |
protected-access | 4 |
consider-using-with | 1 |
global-variable-undefined | 3 |
global-variable-not-assigned | 5 |
wrong-import-order | 4 |
wrong-import-position | 3 |
missing-module-docstring | 1 |
pointless-string-statement | 1 |
Count per modules
Name | Count |
---|---|
blenderproc | 1 |
blenderproc.python.camera.CameraProjection | 13 |
blenderproc.python.loader.CCMaterialLoader | 1 |
blenderproc.python.loader.BopLoader | 1 |
blenderproc.python.postprocessing.PostProcessingUtility | 1 |
blenderproc.python.renderer.RendererUtility | 3 |
blenderproc.python.types.LightUtility | 2 |
blenderproc.python.types.EntityUtility | 1 |
blenderproc.python.types.MeshObjectUtility | 31 |
blenderproc.python.utility.InstallUtility | 1 |
blenderproc.python.utility.Initializer | 1 |
blenderproc.python.writer.BopWriterUtility | 38 |
blenderproc.python.writer.GifWriterUtility | 2 |
blenderproc.scripts.quickstart | 3 |
Count per path
Name | Count |
---|---|
blenderproc/__init__.py | 1 |
blenderproc/python/camera/CameraProjection.py | 13 |
blenderproc/python/loader/CCMaterialLoader.py | 1 |
blenderproc/python/loader/BopLoader.py | 1 |
blenderproc/python/postprocessing/PostProcessingUtility.py | 1 |
blenderproc/python/renderer/RendererUtility.py | 3 |
blenderproc/python/types/LightUtility.py | 2 |
blenderproc/python/types/EntityUtility.py | 1 |
blenderproc/python/types/MeshObjectUtility.py | 31 |
blenderproc/python/utility/InstallUtility.py | 1 |
blenderproc/python/utility/Initializer.py | 1 |
blenderproc/python/writer/BopWriterUtility.py | 38 |
blenderproc/python/writer/GifWriterUtility.py | 2 |
blenderproc/scripts/quickstart.py | 3 |
Last update: 09/12/2024, 11:40:33
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.
Thanks a lot!
Transitions
blenderproc
to latest Blender LTS - 4.2.1. This enables to use new Blender features and advantages to its development also in theblenderproc
environment. This enables: