[Bf-extensions-cvs] [2316aea4] master: NW: UI cleanup, add todo note for accidental basename matches
Greg
noreply at git.blender.org
Tue Jul 11 17:07:54 CEST 2017
Commit: 2316aea462d1d42d3166e849c86e0d3097d7c776
Author: Greg
Date: Tue Jul 11 17:07:06 2017 +0200
Branches: master
https://developer.blender.org/rBA2316aea462d1d42d3166e849c86e0d3097d7c776
NW: UI cleanup, add todo note for accidental basename matches
===================================================================
M node_wrangler.py
===================================================================
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"
More information about the Bf-extensions-cvs
mailing list