[Bf-extensions-cvs] [ff29dc78] master: Change of concept: representative objects (atoms: balls, sticks: cylinders & cups) of a duplivert structure are hidden in the view_port

Clemens Barth noreply at git.blender.org
Mon Mar 18 09:58:58 CET 2019


Commit: ff29dc782b42701ee11c0e6ed320422684ecbee6
Author: Clemens Barth
Date:   Mon Mar 18 09:55:13 2019 +0100
Branches: master
https://developer.blender.org/rBAff29dc782b42701ee11c0e6ed320422684ecbee6

Change of concept: representative objects (atoms: balls, sticks: cylinders & cups) of a duplivert structure are hidden in the view_port

I'm very happy about the new concepts of Blender 2.80! This is yet another example.
These representative objects of a duplivert structure can now be invisible. Their
presence in a, e.g., 3D view has no meaning. They are anyway reproduced at the mesh
and are visible at the vertices of the mesh. Cool thing!

===================================================================

M	io_mesh_pdb/import_pdb.py

===================================================================

diff --git a/io_mesh_pdb/import_pdb.py b/io_mesh_pdb/import_pdb.py
index dd2f4c80..0566bf34 100644
--- a/io_mesh_pdb/import_pdb.py
+++ b/io_mesh_pdb/import_pdb.py
@@ -702,6 +702,11 @@ def draw_atoms_one_type(draw_all_atoms_type,
                         rotation=(0, 0, 0))
 
     ball = bpy.context.view_layer.objects.active
+    # Hide this ball because its appearance has no meaning. It is just the
+    # representative ball. The ball is visible at the vertices of the mesh.
+    # Rememmber, this is a dupliverts construct!
+    ball.hide_set(True)
+    # Scale up/down the ball radius.
     ball.scale  = (atom[3]*Ball_radius_factor,) * 3
 
     if atom[0] == "Vacancy":
@@ -901,6 +906,12 @@ 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]



More information about the Bf-extensions-cvs mailing list