2025-12-01
This commit is contained in:
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user