[Bf-extensions-cvs] [cbd9e714] master: Change of concept: representative objects (atoms as balls) of a duplivert structure are hidden in the view_port

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


Commit: cbd9e71466cee1bc32377eaa506e50b6702e6fbc
Author: Clemens Barth
Date:   Mon Mar 18 09:59:10 2019 +0100
Branches: master
https://developer.blender.org/rBACcbd9e71466cee1bc32377eaa506e50b6702e6fbc

Change of concept: representative objects (atoms as balls) 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_xyz/import_xyz.py

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

diff --git a/io_mesh_xyz/import_xyz.py b/io_mesh_xyz/import_xyz.py
index 03353062..808795ce 100644
--- a/io_mesh_xyz/import_xyz.py
+++ b/io_mesh_xyz/import_xyz.py
@@ -667,6 +667,11 @@ def import_xyz(Ball_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.radius*Ball_radius_factor,) * 3
 
         if atom.name == "Vacancy":



More information about the Bf-extensions-cvs mailing list