Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Dominec <adominec@gmail.com>2021-12-22 13:03:21 +0300
committerAdam Dominec <adominec@gmail.com>2021-12-22 13:03:21 +0300
commit8e194b49d8a20559cac7fc37edb7782bd36d03e7 (patch)
tree350e8e6d114c3c168f256bb4e41162640d320c81 /io_export_paper_model.py
parentc08568cc376d2e4298710c4172fb0c74f0611de1 (diff)
Export Paper Model: fix ambient occlusion
Diffstat (limited to 'io_export_paper_model.py')
-rw-r--r--io_export_paper_model.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/io_export_paper_model.py b/io_export_paper_model.py
index f92d940f..022971f8 100644
--- a/io_export_paper_model.py
+++ b/io_export_paper_model.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# This script is Free software. Please share and reuse.
-# ♡2010-2020 Adam Dominec <adominec@gmail.com>
+# ♡2010-2021 Adam Dominec <adominec@gmail.com>
## Code structure
# This file consists of several components, in this order:
@@ -13,7 +13,7 @@ bl_info = {
"name": "Export Paper Model",
"author": "Addam Dominec",
"version": (1, 2),
- "blender": (2, 83, 0),
+ "blender": (3, 0, 0),
"location": "File > Export > Paper Model",
"warning": "",
"description": "Export printable net of the active mesh",
@@ -253,7 +253,7 @@ class Unfolder:
bk = rd.bake
recall = store_rna_properties(rd, bk, sce.cycles)
rd.engine = 'CYCLES'
- for p in ('ambient_occlusion', 'color', 'diffuse', 'direct', 'emit', 'glossy', 'indirect', 'transmission'):
+ for p in ('color', 'diffuse', 'direct', 'emit', 'glossy', 'indirect', 'transmission'):
setattr(bk, f"use_pass_{p}", (properties.output_type != 'TEXTURE'))
lookup = {'TEXTURE': 'DIFFUSE', 'AMBIENT_OCCLUSION': 'AO', 'RENDER': 'COMBINED', 'SELECTED_TO_ACTIVE': 'COMBINED'}
sce.cycles.bake_type = lookup[properties.output_type]
@@ -266,7 +266,7 @@ class Unfolder:
sce.cycles.samples = properties.bake_samples
if sce.cycles.bake_type == 'COMBINED':
bk.use_pass_direct, bk.use_pass_indirect = True, True
- bk.use_pass_diffuse, bk.use_pass_glossy, bk.use_pass_transmission, bk.use_pass_ambient_occlusion, bk.use_pass_emit = True, False, False, True, True
+ bk.use_pass_diffuse, bk.use_pass_glossy, bk.use_pass_transmission, bk.use_pass_emit = True, False, False, True
if image_packing == 'PAGE_LINK':
self.mesh.save_image(printable_size * ppm, filepath)