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:
authorGreg <gregzzmail@gmail.com>2017-07-11 18:07:06 +0300
committerGreg <gregzzmail@gmail.com>2017-07-11 18:07:06 +0300
commit2316aea462d1d42d3166e849c86e0d3097d7c776 (patch)
treedb040b302ee61d350ec7d78e2a1895425dedb300 /node_wrangler.py
parente787f97fb76234811b6a154f1d79c9dc24f698a9 (diff)
NW: UI cleanup, add todo note for accidental basename matches
Diffstat (limited to 'node_wrangler.py')
-rw-r--r--node_wrangler.py36
1 files changed, 19 insertions, 17 deletions
diff --git a/node_wrangler.py b/node_wrangler.py
index 05d7d726..423bb6f0 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -1072,9 +1072,24 @@ class NWNodeWrangler(bpy.types.AddonPreferences):
col.prop(self, "merge_position")
col.prop(self, "merge_hide")
- box = col.box()
+ box = layout.box()
col = box.column(align=True)
+ col.prop(self, "show_principled_lists", text='Edit tags for auto texture detection in Principled BSDF setup', toggle=True)
+ if self.show_principled_lists:
+ tags = self.principled_tags
+
+ col.prop(tags, "base_color")
+ col.prop(tags, "sss_color")
+ col.prop(tags, "metallic")
+ col.prop(tags, "specular")
+ col.prop(tags, "rough")
+ col.prop(tags, "gloss")
+ col.prop(tags, "normal")
+ col.prop(tags, "bump")
+ col.prop(tags, "displacement")
+ box = layout.box()
+ col = box.column(align=True)
hotkey_button_name = "Show Hotkey List"
if self.show_hotkey_list:
hotkey_button_name = "Hide Hotkey List"
@@ -1098,22 +1113,6 @@ class NWNodeWrangler(bpy.types.AddonPreferences):
keystr = "Ctrl " + keystr
row.label(keystr)
- box = layout.box()
- col = box.column(align=True)
- col.prop(self, "show_principled_lists", text='Show tags for Principled auto setup', toggle=True)
- if self.show_principled_lists:
- tags = self.principled_tags
-
- col.prop(tags, "base_color")
- col.prop(tags, "sss_color")
- col.prop(tags, "metallic")
- col.prop(tags, "specular")
- col.prop(tags, "rough")
- col.prop(tags, "gloss")
- col.prop(tags, "normal")
- col.prop(tags, "bump")
- col.prop(tags, "displacement")
-
def nw_check(context):
@@ -2623,6 +2622,7 @@ class NWAddTextureSetup(Operator, NWBase):
self.report({'WARNING'}, "No free inputs for node: "+t_node.name)
return {'FINISHED'}
+
class NWAddPrincipledSetup(Operator, NWBase, ImportHelper):
bl_idname = "node.nw_add_textures_for_principled"
bl_label = "Principled Texture Setup"
@@ -2710,6 +2710,7 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper):
fname = file.name
filenamecomponents = split_into__components(fname)
matches = set(sname[1]).intersection(set(filenamecomponents))
+ # TODO: ignore basename (if texture is named "fancy_metal_nor", it will be detected as metallic map, not normal map)
if matches:
sname[2] = fname
break
@@ -2873,6 +2874,7 @@ class NWAddPrincipledSetup(Operator, NWBase, ImportHelper):
force_update(context)
return {'FINISHED'}
+
class NWAddReroutes(Operator, NWBase):
"""Add Reroute Nodes and link them to outputs of selected nodes"""
bl_idname = "node.nw_add_reroutes"