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
@@ -229,14 +229,18 @@ class POLIIGON_OT_material(Operator):
objs_add_subdiv = [_obj
for _obj in objs_selected
if "Subdivision" not in _obj.modifiers]
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"
return objs_add_subdiv
def add_subdiv_to_objects(self, obj_list: List[bpy.types.Object]) -> None:
"""Adds a Subdivision modifier to all objects in list."""
for _obj in obj_list:
_obj.cycles.use_adaptive_subdivision = True
if bpy.app.version < (5, 0):
# In blender 5.0, there's no special settings for this.
_obj.cycles.use_adaptive_subdivision = True
modifier = _obj.modifiers.new("Subdivision", "SUBSURF")
if modifier is None:
# TODO(Andreas): Would we want to report failure to create modifier?
@@ -284,6 +288,7 @@ class POLIIGON_OT_material(Operator):
def signal_import(self) -> None:
if self.exec_count == 0:
cTB.signal_import_asset(asset_id=self.asset_id)
cTB.set_first_local_asset()
self.exec_count += 1
@reporting.handle_operator()
@@ -330,6 +335,7 @@ class POLIIGON_OT_material(Operator):
did_reuse = self.check_material_reuse()
if did_reuse:
self.signal_import()
return {"FINISHED"}
tex_maps = asset_type_data.get_maps(