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!
This commit is contained in:
Clemens Barth 2019-03-18 09:55:13 +01:00
parent 02522412e2
commit ff29dc782b
1 changed files with 11 additions and 0 deletions

View File

@ -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]