diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97c7056..4107e62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' cache: 'pip' cache-dependency-path: 'requirements-dev.txt' - name: Dependencies @@ -49,7 +49,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Select Python version - run: echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH + run: echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH - uses: actions-rs/toolchain@v1 with: profile: minimal diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1d88f5..2aa9047 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' cache: 'pip' cache-dependency-path: 'requirements-dev.txt' - name: Dependencies @@ -56,7 +56,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' cache: 'pip' cache-dependency-path: 'requirements-dev.txt' - name: Dependencies @@ -87,7 +87,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Select Python version - run: echo "/opt/python/cp310-cp310/bin" >> $GITHUB_PATH + run: echo "/opt/python/cp312-cp312/bin" >> $GITHUB_PATH - uses: actions-rs/toolchain@v1 with: profile: minimal diff --git a/plumber/asset/brush.py b/plumber/asset/brush.py index 17f4624..b8b95b0 100644 --- a/plumber/asset/brush.py +++ b/plumber/asset/brush.py @@ -33,9 +33,7 @@ def import_solid(collection: Collection, brush_name: str, solid: BuiltSolid) -> mesh.polygons.foreach_set("vertices", solid.polygon_vertices()) mesh.polygons.foreach_set("material_index", solid.polygon_material_indices()) - # Blender 3.6 sets meshes to smooth by default, which looks bad - if bpy.app.version >= (3, 6, 0): - mesh.shade_flat() + mesh.shade_flat() mesh.update() @@ -74,9 +72,7 @@ def import_merged_solids( "material_index", merged_solids.polygon_material_indices() ) - # Blender 3.6 sets meshes to smooth by default, which looks bad - if bpy.app.version >= (3, 6, 0): - mesh.shade_flat() + mesh.shade_flat() mesh.update() diff --git a/plumber/asset/material.py b/plumber/asset/material.py index 3fb02ae..cf8bce2 100644 --- a/plumber/asset/material.py +++ b/plumber/asset/material.py @@ -12,11 +12,10 @@ ".png": "PNG", } -NODE_INPUT_SOCKET_MAP = {} - -if bpy.app.version >= (4, 0, 0): - NODE_INPUT_SOCKET_MAP["Specular"] = "Specular IOR Level" - NODE_INPUT_SOCKET_MAP["Emission"] = "Emission Color" +NODE_INPUT_SOCKET_MAP = { + "Specular": "Specular IOR Level", + "Emission": "Emission Color", +} def import_texture(texture: Texture) -> None: diff --git a/plumber/asset/model.py b/plumber/asset/model.py index c607575..18e0675 100644 --- a/plumber/asset/model.py +++ b/plumber/asset/model.py @@ -177,9 +177,6 @@ def import_mesh( mesh_data.polygons.foreach_set("use_smooth", [True] * polygons_len) mesh_data.update(calc_edges=True) - if bpy.app.version < (4, 1, 0): - mesh_data.use_auto_smooth = True - mesh_data.normals_split_custom_set_from_vertices(mesh.normals()) uv_layer = mesh_data.uv_layers.new() diff --git a/requirements-dev.txt b/requirements-dev.txt index 2ee12b9..f724f8e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -fake-bpy-module-2.82 +fake-bpy-module-4.2 setuptools setuptools-rust black