Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Barth <barth@root-1.de>2022-01-24 23:37:57 +0300
committerClemens Barth <barth@root-1.de>2022-01-24 23:37:57 +0300
commit374e67c8d3b9e737bc2932ac128dd3eeeb94392d (patch)
treee2b85a830c2a336562a0fdbfaeef724cb9a204e1
parent7f5d0ab6beb397051c55c737f601d33bbdbc239d (diff)
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.
-rw-r--r--io_mesh_atomic/pdb_import.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/io_mesh_atomic/pdb_import.py b/io_mesh_atomic/pdb_import.py
index 33df4adc..635c3c09 100644
--- a/io_mesh_atomic/pdb_import.py
+++ b/io_mesh_atomic/pdb_import.py
@@ -924,12 +924,6 @@ def draw_sticks_dupliverts(all_atoms,
coll.objects.link(object_stick[0])
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.active_material = stick[3]
stick_cups = object_stick[1]
@@ -942,6 +936,12 @@ def draw_sticks_dupliverts(all_atoms,
stick_cups.select_set(True)
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.
stick_cylinder.parent = new_mesh
stick_cups.parent = new_mesh