Skip to content

Commit

Permalink
1_2_0
Browse files Browse the repository at this point in the history
Added enabling of nodes if none exist.
  • Loading branch information
DigiKrafting committed Jan 11, 2018
1 parent 84132fd commit 3a69ad4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Pipeline/Workflow import/export for Substance Painter.
- One Click Export
- One Click Textures Import

# Required Blender Version
# Min Required Blender Version

2.79.0

\* Mesh import/export will likely work in previous versions but untested.
\* Mesh Export will likely work in previous versions but untested.
\* Texture Import requires the Principled BSDF shader in 2.79.0+.

# IMPORTANT USAGE NOTES
Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"name": "Substance Painter",
"description": "Substance Painter Tools",
"author": "Digiography.Studio",
"version": (1, 1, 0),
"version": (1, 2, 0),
"blender": (2, 79, 0),
"location": "Info Toolbar, File -> Import, File -> Export",
"wiki_url": "https://github.com/Digiography/blender_addon_substance_painter/wiki",
Expand Down
5 changes: 5 additions & 0 deletions ds_sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class ds_sp_pbr_nodes(bpy.types.Operator):

bl_idname = "ds_sp.pbr_nodes"
bl_label = "Import Textures"
bl_context = "material"

import_setting = bpy.props.StringProperty(
name="import_setting",
Expand Down Expand Up @@ -97,6 +98,10 @@ def execute(self, context):
_file_Emissive = ds_sp_get_texture_file(_textures_path,_obj_name,_material_name,'Emissive',_texture_ext)

if _file_Base_Color or _file_Diffuse:

if _material:

_material.use_nodes = True

# Clear Nodes

Expand Down

0 comments on commit 3a69ad4

Please sign in to comment.