Skip to content
Snippets Groups Projects
Commit efcceb62 authored by Clemens Barth's avatar Clemens Barth
Browse files

The addon gets updated for Eevee/Cycles - part 3: vacancies, as described by an 'X' in

PDB and XYZ files, are shown as transparent cubes. The properties of the transparency
have been changed and are now much better ... . The user can certainly adjust these
properties after the import.
parent c00916b2
No related branches found
No related tags found
No related merge requests found
...@@ -1380,9 +1380,8 @@ def import_pdb(Ball_type, ...@@ -1380,9 +1380,8 @@ def import_pdb(Ball_type,
# comparison of names ... # comparison of names ...
if atom.name in material.name: if atom.name in material.name:
# ... and give the atom its material properties. # ... and give the atom its material properties.
# However, before we check, if it is a vacancy, because then it # However, before we check if it is a vacancy.
# gets some additional preparation. The vacancy is represented # The vacancy is represented by a transparent cube.
# by a transparent cube.
if atom.name == "Vacancy": if atom.name == "Vacancy":
# Some properties for eevee. # Some properties for eevee.
material.metallic = 0.8 material.metallic = 0.8
...@@ -1394,9 +1393,13 @@ def import_pdb(Ball_type, ...@@ -1394,9 +1393,13 @@ def import_pdb(Ball_type,
material.use_nodes = True material.use_nodes = True
mat_P_BSDF = material.node_tree.nodes['Principled BSDF'] mat_P_BSDF = material.node_tree.nodes['Principled BSDF']
mat_P_BSDF.inputs['Metallic'].default_value = 0.1 mat_P_BSDF.inputs['Metallic'].default_value = 0.1
mat_P_BSDF.inputs['Roughness'].default_value = 0.2 mat_P_BSDF.inputs['Specular'].default_value = 0.15
mat_P_BSDF.inputs['Transmission'].default_value = 0.97 mat_P_BSDF.inputs['Roughness'].default_value = 0.0
mat_P_BSDF.inputs['Clearcoat Roughness'].default_value = 0.37
mat_P_BSDF.inputs['IOR'].default_value = 0.8 mat_P_BSDF.inputs['IOR'].default_value = 0.8
mat_P_BSDF.inputs['Transmission'].default_value = 0.6
mat_P_BSDF.inputs['Transmission Roughness'].default_value = 0.0
mat_P_BSDF.inputs['Alpha'].default_value = 0.5
# The atom gets its properties. # The atom gets its properties.
atom.material = material atom.material = material
......
...@@ -537,9 +537,13 @@ def import_xyz(Ball_type, ...@@ -537,9 +537,13 @@ def import_xyz(Ball_type,
material.use_nodes = True material.use_nodes = True
mat_P_BSDF = material.node_tree.nodes['Principled BSDF'] mat_P_BSDF = material.node_tree.nodes['Principled BSDF']
mat_P_BSDF.inputs['Metallic'].default_value = 0.1 mat_P_BSDF.inputs['Metallic'].default_value = 0.1
mat_P_BSDF.inputs['Roughness'].default_value = 0.2 mat_P_BSDF.inputs['Specular'].default_value = 0.15
mat_P_BSDF.inputs['Transmission'].default_value = 0.97 mat_P_BSDF.inputs['Roughness'].default_value = 0.0
mat_P_BSDF.inputs['Clearcoat Roughness'].default_value = 0.37
mat_P_BSDF.inputs['IOR'].default_value = 0.8 mat_P_BSDF.inputs['IOR'].default_value = 0.8
mat_P_BSDF.inputs['Transmission'].default_value = 0.6
mat_P_BSDF.inputs['Transmission Roughness'].default_value = 0.0
mat_P_BSDF.inputs['Alpha'].default_value = 0.5
# The atom gets its properties. # The atom gets its properties.
atom.material = material atom.material = material
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment