[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4412] trunk/py/scripts/addons/ io_mesh_pdb/import_pdb.py:
Clemens Barth
barth at root-1.de
Fri Mar 22 19:41:13 CET 2013
Revision: 4412
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4412
Author: blendphys
Date: 2013-03-22 18:41:13 +0000 (Fri, 22 Mar 2013)
Log Message:
-----------
The new feature: the sticks represented by a skin and subdivision modifier
do also have a material now. - I simply forgot that to include.
Blendphys.
Modified Paths:
--------------
trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py
Modified: trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py
===================================================================
--- trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py 2013-03-22 17:12:43 UTC (rev 4411)
+++ trunk/py/scripts/addons/io_mesh_pdb/import_pdb.py 2013-03-22 18:41:13 UTC (rev 4412)
@@ -794,6 +794,11 @@
new_stick_mesh.modifiers[1].levels = sticks_subdiv_view
new_stick_mesh.modifiers[1].render_levels = sticks_subdiv_render
+ bpy.ops.object.material_slot_add()
+ stick_material = bpy.data.materials.new(ELEMENTS[-1].name)
+ stick_material.diffuse_color = ELEMENTS[-1].color
+ new_stick_mesh.active_material = stick_material
+
# This is for putting the radiu of the sticks onto
# the desired value 'Stick_diameter'
bpy.context.scene.objects.active = new_stick_mesh
More information about the Bf-extensions-cvs
mailing list