2025-12-01

This commit is contained in:
2026-03-17 14:58:51 -06:00
parent 183e865f8b
commit 4b82b57113
6846 changed files with 954887 additions and 162606 deletions
@@ -118,7 +118,9 @@ class POLIIGON_OT_apply(Operator):
if do_subdiv or len(objs_selected) > len(objs_add_disp):
bpy.context.scene.render.engine = "CYCLES"
bpy.context.scene.cycles.feature_set = "EXPERIMENTAL"
if bpy.app.version < (5, 0):
# Blender 5.0 no longer has feature sets, adaptive is included
bpy.context.scene.cycles.feature_set = "EXPERIMENTAL"
for _node in mat.node_tree.nodes:
if _node.type != "GROUP":
@@ -161,7 +163,9 @@ class POLIIGON_OT_apply(Operator):
name="Subdivision", type="SUBSURF")
mod_subdiv.subdivision_type = "SIMPLE"
mod_subdiv.levels = 0 # Don't do subdiv in viewport
_obj.cycles.use_adaptive_subdivision = 1
if bpy.app.version < (5, 0):
# In blender 5.0, there's no special settings for this.
_obj.cycles.use_adaptive_subdivision = True
# Scale ...........................................................
# TODO(Andreas): What is this? Did this ever work?
@@ -189,8 +193,4 @@ class POLIIGON_OT_apply(Operator):
bpy.ops.poliigon.poliigon_active(
mode="mat", asset_type=asset_type.name, data=cTB.vActiveMat
)
if self.exec_count == 0:
cTB.signal_import_asset(asset_id=self.asset_id)
self.exec_count += 1
return {"FINISHED"}