Skip to content

Commit 4b46d8c

Browse files
committed
1_7_5
Merged commits by @chri11g6 (Thank You) that add optional height texture and fix node locations so the node layout looks better.
1 parent 0f8d171 commit 4b46d8c

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Pipeline/Workflow import/export for Substance Painter.
1414
- Autosave before export option.
1515
- Use Relative Paths option.
1616
- Creates nodes for Unreal Engine Textures. * (On detection of OcclusionRoughnessMetallic texture)
17+
- Optional Height Maps (Combines Height and Normal maps using the Bump Node, use with care, see screenshots below)
1718

1819
## Selected Mesh
1920

@@ -64,4 +65,10 @@ Installing an Addon in Blender
6465

6566
![alt](/screenshots/sp_prefs.png)
6667

68+
## Normal Map (* Eevee with Ambient Occlusion enabled)
6769

70+
![alt](/screenshots/sp_Map_Normal.png)
71+
72+
## Height Map combined with Normal Map (* Eevee with Ambient Occlusion enabled)
73+
74+
![alt](/screenshots/sp_Map_Normal_Height.png)

__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"name": "DKS Substance Painter",
2121
"description": "Substance Painter Pipeline",
2222
"author": "DigiKrafting.Studio",
23-
"version": (1, 7, 2),
23+
"version": (1, 7, 5),
2424
"blender": (2, 80, 0),
2525
"location": "Info Toolbar, File -> Import, File -> Export, Menu",
2626
"wiki_url": "https://github.com/DigiKrafting/blender_addon_substance_painter/wiki",
@@ -79,13 +79,18 @@ class dks_sp_addon_prefs(bpy.types.AddonPreferences):
7979
option_relative : bpy.props.BoolProperty(
8080
name="Relative Paths",
8181
description="Use Relative Paths for images.",
82-
default = True
82+
default=True
8383
)
8484
option_no_new : bpy.props.BoolProperty(
8585
name="2018.0.1-2018.3.0 Project File Fix",
8686
description="Exclude from path for SP 2018.0.1-2018.3.0 to avoid it being added to the textures path.",
87-
default = False
88-
)
87+
default=False
88+
)
89+
option_use_height_maps : bpy.props.BoolProperty(
90+
name="Use Height Maps",
91+
description="Combines Height and Normal maps using the Bump Node.",
92+
default=False,
93+
)
8994
def draw(self, context):
9095

9196
layout = self.layout
@@ -104,6 +109,7 @@ def draw(self, context):
104109
box.prop(self, 'option_relative')
105110
box.prop(self, 'option_no_new')
106111
box.prop(self, 'option_save_before_export')
112+
box.prop(self, 'option_use_height_maps')
107113

108114
class dks_sp_menu(bpy.types.Menu):
109115

dks_sp.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ def execute(self, context):
332332
node.image.colorspace_settings.name = 'Non-Color'
333333

334334
# Height
335-
if _file_Height:
335+
336+
if bpy.context.preferences.addons[__package__].preferences.option_use_height_maps and _file_Height:
336337

337338
frame_1= _nodes.new('NodeFrame')
338339
frame_1.location = -390, -837
@@ -365,7 +366,9 @@ def execute(self, context):
365366
node.image.colorspace_settings.name = 'Non-Color'
366367

367368
else:
369+
368370
# Normal
371+
369372
node_map=_nodes.new('ShaderNodeNormalMap')
370373
node_map.location = 200,-700
371374
node_map.name='dks_pbr_normal_map'

screenshots/sp_Map_Normal.png

1.73 MB
Loading
1.89 MB
Loading

0 commit comments

Comments
 (0)