- added name field for renderlayer
authorCampbell Barton <ideasman42@gmail.com>
Wed, 14 Oct 2009 15:06:42 +0000 (15:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 14 Oct 2009 15:06:42 +0000 (15:06 +0000)
- skin/loft now adds faces with active material
- defailt for scene panels isnt closed anymore since there is a lot of room there now.

release/scripts/io/mesh_skin.py
release/scripts/ui/buttons_render.py
release/scripts/ui/buttons_scene.py

index 79b78c152744aebc4a90d1780024827750b63910..f6fafc411114b7e82c9ba98d15243bdf2458cacc 100644 (file)
@@ -221,7 +221,7 @@ def face_edge_keys(f):
        
        return ord_ind(verts[0], verts[1]),  ord_ind(verts[1], verts[2]),  ord_ind(verts[2], verts[3]),  ord_ind(verts[3], verts[0])
        
-def mesh_faces_extend(me, faces):
+def mesh_faces_extend(me, faces, mat_idx = 0):
        orig_facetot = len(me.faces)
        new_facetot = len(faces)
        me.add_geometry(0, 0, new_facetot)
@@ -233,8 +233,10 @@ def mesh_faces_extend(me, faces):
                f = [v.index for v in faces[i]]
                if len(f)==4 and f[3]==0:
                        f = f[1], f[2], f[3], f[0]
-                       
-               me_faces[orig_facetot+i].verts_raw =  f
+               
+               mf = me_faces[orig_facetot+i]
+               mf.verts_raw =  f
+               mf.material_index = mat_idx
                i+=1
 # end utils
 
@@ -605,7 +607,7 @@ def main(context):
                except: pass
        
        if 1: # 2.5
-               mesh_faces_extend(me, faces)
+               mesh_faces_extend(me, faces, ob.active_material_index)
                me.update(calc_edges=True)
        else:
                me.faces.extend(faces, smooth = True)
index 379326510bf97541c2a7d19d79e21e7845e7ff6d..699fd8d73919f46c850c85e5b848a033ceac92b9 100644 (file)
@@ -45,6 +45,9 @@ class RENDER_PT_layers(RenderButtonsPanel):
                col.itemO("scene.render_layer_remove", icon='ICON_ZOOMOUT', text="")
 
                rl = rd.layers[rd.active_layer_index]
+               
+               if rl:
+                       layout.itemR(rl, "name")
 
                split = layout.split()
                
index 964e06d017d8d8138df013067ea7a1d3ff078325..b3b3d8b6672ff2177fa6630af968abd7c287b047 100644 (file)
@@ -23,7 +23,6 @@ class SCENE_PT_scene(SceneButtonsPanel):
 
 class SCENE_PT_unit(SceneButtonsPanel):
        __label__ = "Units"
-       __default_closed__ = True
        COMPAT_ENGINES = set(['BLENDER_RENDER'])
 
        def draw(self, context):
@@ -41,7 +40,6 @@ class SCENE_PT_unit(SceneButtonsPanel):
                
 class SCENE_PT_keying_sets(SceneButtonsPanel):
        __label__ = "Keying Sets"
-       __default_closed__ = True
        
        def draw(self, context):
                layout = self.layout
@@ -75,7 +73,6 @@ class SCENE_PT_keying_sets(SceneButtonsPanel):
                        
 class SCENE_PT_keying_set_paths(SceneButtonsPanel):
        __label__ = "Active Keying Set"
-       __default_closed__ = True
        
        def poll(self, context):
                return (context.scene != None) and (context.scene.active_keying_set != None)