diff --git a/io_mesh_atomic/pdb_import.py b/io_mesh_atomic/pdb_import.py index 06a808c00541e987f12e30e62bdef97d4fb2a440..4f0bddd8b794d6a042acc46860909bb68fbcda7c 100644 --- a/io_mesh_atomic/pdb_import.py +++ b/io_mesh_atomic/pdb_import.py @@ -707,7 +707,7 @@ def draw_atoms_one_type(draw_all_atoms_type, elif Ball_type == "1": bpy.ops.mesh.primitive_uv_sphere_add( segments=Ball_azimuth, ring_count=Ball_zenith, - size=1, view_align=False, enter_editmode=False, + view_align=False, enter_editmode=False, location=(0,0,0), rotation=(0, 0, 0)) # Meta balls elif Ball_type == "2": @@ -719,7 +719,9 @@ def draw_atoms_one_type(draw_all_atoms_type, # 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) + # However, hiding does not work with meta balls! + if Ball_type == "0" or Ball_type == "1": + ball.hide_set(True) # Scale up/down the ball radius. ball.scale = (atom[3]*Ball_radius_factor,) * 3 diff --git a/io_mesh_atomic/xyz_import.py b/io_mesh_atomic/xyz_import.py index fe903f4ed1ab511815d737528b8cd0a9f3a1d431..8f6b4c5b0d95f46ffb76aba0540529d940444fe9 100644 --- a/io_mesh_atomic/xyz_import.py +++ b/io_mesh_atomic/xyz_import.py @@ -679,7 +679,7 @@ def import_xyz(Ball_type, elif Ball_type == "1": bpy.ops.mesh.primitive_uv_sphere_add( segments=Ball_azimuth, ring_count=Ball_zenith, - size=1, view_align=False, enter_editmode=False, + view_align=False, enter_editmode=False, location=(0,0,0), rotation=(0, 0, 0)) # Meta balls elif Ball_type == "2": @@ -691,7 +691,9 @@ def import_xyz(Ball_type, # 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) + # However, hiding does not work with meta balls! + if Ball_type == "0" or Ball_type == "1": + ball.hide_set(True) # Scale up/down the ball radius. ball.scale = (atom.radius*Ball_radius_factor,) * 3