Skip to content

Commit

Permalink
feat(blender): bump blender to 4.2.0
Browse files Browse the repository at this point in the history
Adjusted breaking API changes, and adding
of the smooth by angle modifier - which is now
actually less prone to error.
  • Loading branch information
Griperis committed Aug 14, 2024
1 parent 4c3ac3e commit 152100f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion blenderproc/python/types/LightUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def setup_as_projector(self, pattern: np.ndarray, frame: Optional[int] = None):
self.blender_obj.data.use_nodes = True
self.blender_obj.data.shadow_soft_size = 0
self.blender_obj.data.spot_size = 3.14159 # 180deg in rad
self.blender_obj.data.cycles.cast_shadow = False
self.blender_obj.data.use_shadow = False

nodes = self.blender_obj.data.node_tree.nodes
links = self.blender_obj.data.node_tree.links
Expand Down
7 changes: 3 additions & 4 deletions blenderproc/python/types/MeshObjectUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,10 +515,9 @@ def add_auto_smooth_modifier(self, angle: float = 30.0):
"""
with bpy.context.temp_override(object=self.blender_obj):
bpy.ops.object.modifier_add_node_group(
asset_library_type='CUSTOM',
asset_library_identifier="assets",
relative_asset_identifier="geometry_nodes/smooth_by_angle.blend/NodeTree/Smooth by Angle"
)
asset_library_type='ESSENTIALS',
asset_library_identifier="",
relative_asset_identifier="geometry_nodes/smooth_by_angle.blend/NodeTree/Smooth by Angle")

modifier = self.blender_obj.modifiers[-1]
modifier["Input_1"] = float(angle)
Expand Down
6 changes: 3 additions & 3 deletions blenderproc/python/utility/InstallUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def make_sure_blender_is_installed(custom_blender_path: Optional[str], blender_i
blender_install_path = "blender"

# Determine configured version
# right now only support blender-4.1.1
major_version = "4.1"
minor_version = "1"
# right now only support blender-4.2.0
major_version = "4.2"
minor_version = "0"
blender_version = f"blender-{major_version}.{minor_version}"
if platform in ["linux", "linux2"]:
blender_version += "-linux-x64"
Expand Down

0 comments on commit 152100f

Please sign in to comment.