2020 "name" : "DKS Substance Painter" ,
2121 "description" : "Substance Painter Pipeline" ,
2222 "author" : "DigiKrafting.Studio" ,
23- "version" : (1 , 8 , 2 ),
23+ "version" : (1 , 8 , 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" ,
@@ -130,11 +130,14 @@ def draw(self, context):
130130
131131 layout = self .layout
132132
133- self . layout .operator (dks_sp .dks_sp_export_scene .bl_idname ,icon = "EXPORT" )
134- self . layout .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'Substance Painter (Scene)' , icon = "IMPORT" ).import_setting = 'scene'
133+ layout .operator (dks_sp .dks_sp_export_scene .bl_idname ,icon = "EXPORT" )
134+ layout .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'Substance Painter (Scene)' , icon = "IMPORT" ).import_setting = 'scene'
135135
136- self .layout .operator (dks_sp .dks_sp_export_sel .bl_idname ,icon = "EXPORT" )
137- self .layout .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'Substance Painter (Selected)' , icon = "IMPORT" ).import_setting = 'selected'
136+ layout .operator (dks_sp .dks_sp_export_sel .bl_idname ,icon = "EXPORT" )
137+ layout .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'Substance Painter (Selected)' , icon = "IMPORT" ).import_setting = 'selected'
138+
139+ layout .operator (dks_sp .dks_sp_export_col .bl_idname ,icon = "EXPORT" )
140+ layout .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'Substance Painter (Collection)' , icon = "IMPORT" ).import_setting = 'collection'
138141
139142def dks_sp_draw_menu (self , context ):
140143
@@ -148,6 +151,14 @@ def dks_sp_menu_func_export_sel(self, context):
148151
149152 self .layout .operator (dks_sp .dks_sp_export_sel .bl_idname )
150153
154+ def dks_sp_menu_func_export_col (self , context ):
155+
156+ self .layout .operator (dks_sp .dks_sp_export_col .bl_idname )
157+
158+ def dks_sp_menu_func_import_col (self , context ):
159+
160+ self .layout .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'Substance Painter (Collection)' ).import_setting = 'collection'
161+
151162def dks_sp_menu_func_import_scene (self , context ):
152163
153164 self .layout .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'Substance Painter (Scene)' ).import_setting = 'scene'
@@ -162,21 +173,27 @@ def dks_sp_draw_btns(self, context):
162173
163174 layout = self .layout
164175 row = layout .row (align = True )
176+ sp_lbl = "SP:"
165177
166178 if bpy .context .preferences .addons [__package__ ].preferences .option_show_sp_toggle :
167179
168180 if bpy .context .preferences .addons [__package__ ].preferences .option_show_sp_toggle_state :
169181 row .operator (dks_sp_toggle .bl_idname ,text = "SP" ,icon = "TRIA_LEFT" )
170182 else :
171183 row .operator (dks_sp_toggle .bl_idname ,text = "SP" ,icon = "TRIA_RIGHT" )
184+
185+ sp_lbl = ""
172186
173187 if bpy .context .preferences .addons [__package__ ].preferences .option_show_sp_toggle_state or not bpy .context .preferences .addons [__package__ ].preferences .option_show_sp_toggle :
174188
175- row .operator (dks_sp .dks_sp_export_scene .bl_idname ,text = "SP:Scene" ,icon = "EXPORT" )
176- row .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'SP:Scene' ,icon = "IMPORT" ).import_setting = 'scene'
189+ row .operator (dks_sp .dks_sp_export_scene .bl_idname ,text = sp_lbl + "Scn" ,icon = "EXPORT" )
190+ row .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = sp_lbl + 'Scn' ,icon = "IMPORT" ).import_setting = 'scene'
191+
192+ row .operator (dks_sp .dks_sp_export_sel .bl_idname ,text = sp_lbl + "Sel" ,icon = "EXPORT" )
193+ row .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = sp_lbl + 'Sel' , icon = "IMPORT" ).import_setting = 'selected'
177194
178- row .operator (dks_sp .dks_sp_export_sel .bl_idname ,text = "SP:Sel " ,icon = "EXPORT" )
179- row .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = 'SP:Sel ' , icon = "IMPORT" ).import_setting = 'selected '
195+ row .operator (dks_sp .dks_sp_export_col .bl_idname ,text = sp_lbl + "Col " ,icon = "EXPORT" )
196+ row .operator (dks_sp .dks_sp_pbr_nodes .bl_idname , text = sp_lbl + 'Col ' , icon = "IMPORT" ).import_setting = 'collection '
180197
181198class dks_sp_toggle (bpy .types .Operator ):
182199
@@ -191,6 +208,7 @@ def execute(self, context):
191208 bpy .context .preferences .addons [__package__ ].preferences .option_show_sp_toggle_state = True
192209 else :
193210 bpy .context .preferences .addons [__package__ ].preferences .option_show_sp_toggle_state = False
211+
194212 return {'FINISHED' }
195213
196214classes = (
@@ -210,6 +228,8 @@ def register():
210228 bpy .types .TOPBAR_MT_file_import .append (dks_sp_menu_func_import_scene )
211229 bpy .types .TOPBAR_MT_file_export .append (dks_sp_menu_func_export_sel )
212230 bpy .types .TOPBAR_MT_file_import .append (dks_sp_menu_func_import_sel )
231+ bpy .types .TOPBAR_MT_file_export .append (dks_sp_menu_func_export_col )
232+ bpy .types .TOPBAR_MT_file_import .append (dks_sp_menu_func_import_col )
213233
214234 bpy .context .preferences .addons [__package__ ].preferences .option_show_sp_toggle_state = False
215235
@@ -230,14 +250,16 @@ def unregister():
230250 bpy .types .TOPBAR_MT_file_import .remove (dks_sp_menu_func_import_scene )
231251 bpy .types .TOPBAR_MT_file_export .remove (dks_sp_menu_func_export_sel )
232252 bpy .types .TOPBAR_MT_file_import .remove (dks_sp_menu_func_import_sel )
253+ bpy .types .TOPBAR_MT_file_export .remove (dks_sp_menu_func_export_col )
254+ bpy .types .TOPBAR_MT_file_import .remove (dks_sp_menu_func_import_col )
233255
234256 if bpy .context .preferences .addons [__package__ ].preferences .option_display_type == 'Buttons' :
235257
236258 bpy .types .TOPBAR_HT_upper_bar .remove (dks_sp_draw_btns )
237259
238260 elif bpy .context .preferences .addons [__package__ ].preferences .option_display_type == 'Menu' :
239261
240- register_class (dks_sp_menu )
262+ unregister_class (dks_sp_menu )
241263 bpy .types .TOPBAR_MT_editor_menus .remove (dks_sp_draw_menu )
242264
243265 from bpy .utils import unregister_class
0 commit comments