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

Fix io_mesh_atomic: surface of sticks were not smooth although option was set

Reason: hidden objects cannot be modified by 'bpy.ops.object.shade_smooth()'

The surface of sticks, which are in an instancing vertice structure,
are now correctly smoothened when option 'Smooth' of the PDB importer is
selected.
parent 7f5d0ab6
No related branches found
No related tags found
No related merge requests found
...@@ -924,12 +924,6 @@ def draw_sticks_dupliverts(all_atoms, ...@@ -924,12 +924,6 @@ def draw_sticks_dupliverts(all_atoms,
coll.objects.link(object_stick[0]) coll.objects.link(object_stick[0])
coll.objects.link(object_stick[1]) coll.objects.link(object_stick[1])
# Hide these objects because their appearance has no meaning. They are
# just the representative objects. The cylinder and cups are visible at
# the vertices of the mesh. Rememmber, this is a dupliverts construct!
object_stick[0].hide_set(True)
object_stick[1].hide_set(True)
stick_cylinder = object_stick[0] stick_cylinder = object_stick[0]
stick_cylinder.active_material = stick[3] stick_cylinder.active_material = stick[3]
stick_cups = object_stick[1] stick_cups = object_stick[1]
...@@ -942,6 +936,12 @@ def draw_sticks_dupliverts(all_atoms, ...@@ -942,6 +936,12 @@ def draw_sticks_dupliverts(all_atoms,
stick_cups.select_set(True) stick_cups.select_set(True)
bpy.ops.object.shade_smooth() bpy.ops.object.shade_smooth()
# Hide these objects because their appearance has no meaning. They are
# just the representative objects. The cylinder and cups are visible at
# the vertices of the mesh. Rememmber, this is a dupliverts construct!
stick_cylinder.hide_set(True)
stick_cups.hide_set(True)
# Parenting the mesh to the cylinder. # Parenting the mesh to the cylinder.
stick_cylinder.parent = new_mesh stick_cylinder.parent = new_mesh
stick_cups.parent = new_mesh stick_cups.parent = new_mesh
......
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