Skip to content

Commit 1cd1edd

Browse files
committed
Fix node location so it look better
1 parent 257a95d commit 1cd1edd

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

dks_sp.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def execute(self, context):
149149
_material_output = _nodes.new('ShaderNodeOutputMaterial')
150150

151151
if not _file_Emissive:
152-
_material_output.location = 600,0
152+
_material_output.location = 800,0
153153
else:
154154
_material_output.location = 1600,0
155155

@@ -242,7 +242,7 @@ def execute(self, context):
242242
# Base Color
243243

244244
node=_nodes.new('ShaderNodeTexImage')
245-
node.location = 0,250
245+
node.location = -140,261
246246
node.name='dks_pbr_texture_base_color'
247247
_material_links.new(node.outputs['Color'], node_mix.inputs['Color1'])
248248

@@ -256,7 +256,7 @@ def execute(self, context):
256256
# Ambient Occlusion
257257

258258
node=_nodes.new('ShaderNodeTexImage')
259-
node.location = 0,0
259+
node.location = -140,0
260260
node.name='dks_pbr_texture_ao'
261261
_material_links.new(node.outputs['Color'], node_mix.inputs['Color2'])
262262
node.image = bpy.data.images.load(_file_Ambient_occlusion)
@@ -294,7 +294,7 @@ def execute(self, context):
294294
if _file_Specular:
295295

296296
node=_nodes.new('ShaderNodeTexImage')
297-
node.location = 0,-250
297+
node.location = -280,-180
298298
node.name='dks_pbr_texture_Specular'
299299
_material_links.new(node.outputs['Color'], node_shader.inputs['Specular'])
300300
node.image = bpy.data.images.load(_file_Specular)
@@ -304,7 +304,7 @@ def execute(self, context):
304304
# Roughness Invert
305305

306306
node_invert=_nodes.new('ShaderNodeInvert')
307-
node_invert.location = 200,-450
307+
node_invert.location = 100,-520
308308
node_invert.name='dks_pbr_invert'
309309
_material_links.new(node_invert.outputs['Color'], node_shader.inputs['Roughness'])
310310

@@ -313,7 +313,7 @@ def execute(self, context):
313313
if _file_Roughness!="":
314314

315315
node=_nodes.new('ShaderNodeTexImage')
316-
node.location = 0,-500
316+
node.location = -280,-520
317317
node.name='dks_pbr_texture_roughness'
318318
_material_links.new(node.outputs['Color'], node_invert.inputs['Color'])
319319
node.image = bpy.data.images.load(_file_Glossiness)
@@ -334,25 +334,31 @@ def execute(self, context):
334334
# Height
335335
if _file_Height:
336336

337+
frame_1= _nodes.new('NodeFrame')
338+
frame_1.location = -390, -837
339+
frame_1.width = 802
340+
frame_1.height = 628
341+
frame_1.label = 'Normal and Height'
342+
337343
node_Bump=_nodes.new('ShaderNodeBump')
338-
node_Bump.location = 250,-770
344+
node_Bump.location = 250,-870
339345
node_Bump.name='dks_pbr_Bump'
340346
_material_links.new(node_Bump.outputs['Normal'], node_shader.inputs['Normal'])
341347

342348
node_map=_nodes.new('ShaderNodeNormalMap')
343-
node_map.location = -20,-1050
349+
node_map.location = -20,-1150
344350
node_map.name='dks_pbr_normal_map'
345351
_material_links.new(node_map.outputs['Normal'], node_Bump.inputs['Normal'])
346352

347353
node=_nodes.new('ShaderNodeTexImage')
348-
node.location = -360,-1080
354+
node.location = -360,-1180
349355
node.name='dks_pbr_texture_normal'
350356
_material_links.new(node.outputs['Color'], node_map.inputs['Color'])
351357
node.image = bpy.data.images.load(_file_Normal)
352358
node.image.colorspace_settings.name = 'Non-Color'
353359

354360
node=_nodes.new('ShaderNodeTexImage')
355-
node.location = -360,-770
361+
node.location = -360,-870
356362
node.name='dks_pbr_texture_Height'
357363
_material_links.new(node.outputs['Color'], node_Bump.inputs['Height'])
358364
node.image = bpy.data.images.load(_file_Height)

0 commit comments

Comments
 (0)