2020 "name" : "PBR" ,
2121 "description" : "PBR Workflow Tools" ,
2222 "author" : "Digiography.Studio" ,
23- "version" : (1 , 6 , 0 ),
23+ "version" : (1 , 6 , 5 ),
2424 "blender" : (2 , 79 , 0 ),
2525 "location" : "Properties > Material > PBR Material" ,
2626 "wiki_url" : "https://github.com/Digiography/blender_addon_pbr/wiki" ,
@@ -464,23 +464,23 @@ def set_option_relative(self, value):
464464 )
465465 option_texture_base_color_path = StringProperty (
466466 name = "Base Color" ,
467- description = "Add Base Color Node " ,
467+ description = "Base Color Path " ,
468468 )
469469 option_texture_normal_path = StringProperty (
470470 name = "Normal" ,
471- description = "Add Normal Map Node " ,
471+ description = "Normal Path " ,
472472 )
473473 option_texture_ao_path = StringProperty (
474474 name = "Ambient Occlusion" ,
475- description = "Add Ambient Occlusion Node " ,
475+ description = "Ambient Occlusion Path " ,
476476 )
477477 option_texture_metallic_path = StringProperty (
478478 name = "Metallic" ,
479- description = "Add Metallic Node " ,
479+ description = "Metallic Path " ,
480480 )
481481 option_texture_roughness_path = StringProperty (
482482 name = "Roughness" ,
483- description = "Add Roughness Node " ,
483+ description = "Roughness Path " ,
484484 )
485485
486486# File select dialog overrides
@@ -649,14 +649,14 @@ def invoke(self, context, event):
649649
650650class ds_pbr_textures_path_select_clr (bpy .types .Operator ):
651651 bl_idname = "ds_pbr.textures_path_select_clr"
652- bl_label = "Textures"
652+ bl_label = "Auto Textures Path "
653653 def execute (self , context ):
654654 context .material .ds_pbr_material_options .option_textures_path = ''
655655 return {'FINISHED' }
656656
657657class ds_pbr_textures_path_select (bpy .types .Operator ):
658658 bl_idname = "ds_pbr.textures_path_select"
659- bl_label = "Textures"
659+ bl_label = "Auto Textures Path "
660660 directory = bpy .props .StringProperty (subtype = "DIR_PATH" )
661661 option_relative = bpy .props .BoolProperty (name = "Relative" )
662662
@@ -720,10 +720,11 @@ def draw(self, context):
720720 # Base Color
721721
722722 col = layout .row (align = True )
723- box = col .row (). split ( 0.40 )
723+ box = col .row ()
724724 box .label (ds_pbr_texture_base_color_select .bl_label + ':' ,icon = 'IMAGE_DATA' )
725- box .label (_ds_pbr_material_options .option_texture_base_color_path )
726- box = col .row ().split (0.50 )
725+ row = col .row ().split (0.85 )
726+ row .label (_ds_pbr_material_options .option_texture_base_color_path )
727+ box = row .row ().split (0.50 )
727728 box .operator (ds_pbr_texture_base_color_select .bl_idname , icon = "FILE_FOLDER" ,text = "" )
728729 box .operator (ds_pbr_texture_base_color_select_clr .bl_idname , icon = "X" ,text = "" )
729730
@@ -732,10 +733,11 @@ def draw(self, context):
732733 # Metallic
733734
734735 col = layout .row (align = True )
735- box = col .row (). split ( 0.40 )
736+ box = col .row ()
736737 box .label (ds_pbr_texture_metallic_select .bl_label + ':' ,icon = 'IMAGE_DATA' )
737- box .label (_ds_pbr_material_options .option_texture_metallic_path )
738- box = col .row ().split (0.50 )
738+ row = col .row ().split (0.85 )
739+ row .label (_ds_pbr_material_options .option_texture_metallic_path )
740+ box = row .row ().split (0.50 )
739741 box .operator (ds_pbr_texture_metallic_select .bl_idname , icon = "FILE_FOLDER" ,text = "" )
740742 box .operator (ds_pbr_texture_metallic_select_clr .bl_idname , icon = "X" ,text = "" )
741743
@@ -746,50 +748,55 @@ def draw(self, context):
746748 # Ambient Occlusion
747749
748750 col = layout .row (align = True )
749- box = col .row (). split ( 0.40 )
751+ box = col .row ()
750752 box .label (ds_pbr_texture_ao_select .bl_label + ':' ,icon = 'IMAGE_DATA' )
751- box .label (_ds_pbr_material_options .option_texture_ao_path )
752- box = col .row ().split (0.50 )
753+ row = col .row ().split (0.85 )
754+ row .label (_ds_pbr_material_options .option_texture_ao_path )
755+ box = row .row ().split (0.50 )
753756 box .operator (ds_pbr_texture_ao_select .bl_idname , icon = "FILE_FOLDER" ,text = "" )
754757 box .operator (ds_pbr_texture_ao_select_clr .bl_idname , icon = "X" ,text = "" )
755758
756759 # Normal
757760
758761 col = layout .row (align = True )
759- box = col .row (). split ( 0.40 )
762+ box = col .row ()
760763 box .label (ds_pbr_texture_normal_select .bl_label + ':' ,icon = 'IMAGE_DATA' )
761- box .label (_ds_pbr_material_options .option_texture_normal_path )
762- box = col .row ().split (0.50 )
764+ row = col .row ().split (0.85 )
765+ row .label (_ds_pbr_material_options .option_texture_normal_path )
766+ box = row .row ().split (0.50 )
763767 box .operator (ds_pbr_texture_normal_select .bl_idname , icon = "FILE_FOLDER" ,text = "" )
764768 box .operator (ds_pbr_texture_normal_select_clr .bl_idname , icon = "X" ,text = "" )
765769
766770 # Roughness
767771
768772 col = layout .row (align = True )
769- box = col .row (). split ( 0.40 )
773+ box = col .row ()
770774 box .label (ds_pbr_texture_roughness_select .bl_label + ':' ,icon = 'IMAGE_DATA' )
771- box .label (_ds_pbr_material_options .option_texture_roughness_path )
772- box = col .row ().split (0.50 )
775+ row = col .row ().split (0.85 )
776+ row .label (_ds_pbr_material_options .option_texture_roughness_path )
777+ box = row .row ().split (0.50 )
773778 box .operator (ds_pbr_texture_roughness_select .bl_idname , icon = "FILE_FOLDER" ,text = "" )
774779 box .operator (ds_pbr_texture_roughness_select_clr .bl_idname , icon = "X" ,text = "" )
775780
781+ # Check if .blend file is saved
782+
783+ if not bpy .data .filepath and _ds_pbr_material_options .option_relative == True :
784+ layout .label ('Blender file not saved. Required for relative paths.' ,icon = 'ERROR' )
785+
776786 # Relative Paths
777787
778788 col = layout .row (align = True )
779789 box = col .row ()
780-
781- if not bpy .data .filepath and _ds_pbr_material_options .option_relative == True :
782- box .label ('Blender file not saved. Required for relative paths.' ,icon = 'INFO' )
783-
784790 box .prop (_ds_pbr_material_options , "option_relative" )
785791
786792 # Auto Textures Folder
787793
788794 col = layout .row (align = True )
789- box = col .row (). split ( 0.40 )
795+ box = col .row ()
790796 box .label (ds_pbr_textures_path_select .bl_label ,icon = 'FILESEL' )
791- box .prop (_ds_pbr_material_options ,"option_textures_path" ,text = "" )
792- box = col .row ().split (0.50 )
797+ row = col .row ().split (0.85 )
798+ row .prop (_ds_pbr_material_options ,"option_textures_path" ,text = "" )
799+ box = row .row ().split (0.50 )
793800 box .operator (ds_pbr_textures_path_select .bl_idname , icon = "FILE_FOLDER" ,text = "" )
794801 box .operator (ds_pbr_textures_path_select_clr .bl_idname , icon = "X" ,text = "" )
795802
0 commit comments