Added a bunch of additional particle state attributes to the Cycles particle info...
[blender.git] / intern / cycles / blender / blender_mesh.cpp
index f9d26c40a741bd4b8e38035a85b6737b2c4d7c32..16e4ceded89bfa7d0f29be860d32352617388d38 100644 (file)
@@ -46,7 +46,7 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
        float3 *N = attr_N->data_float3();
 
        for(b_mesh.vertices.begin(v); v != b_mesh.vertices.end(); ++v, ++N)
-               *N= get_float3(v->normal());
+               *N = get_float3(v->normal());
 
        /* create faces */
        BL::Mesh::tessfaces_iterator f;
@@ -82,7 +82,6 @@ static void create_mesh(Scene *scene, Mesh *mesh, BL::Mesh b_mesh, const vector<
                loc = loc*size - make_float3(0.5f, 0.5f, 0.5f);
 
                float3 *fdata = attr->data_float3();
-               BL::Mesh::vertices_iterator v;
                size_t i = 0;
 
                for(b_mesh.vertices.begin(v); v != b_mesh.vertices.end(); ++v)
@@ -176,7 +175,7 @@ static void create_subd_mesh(Mesh *mesh, BL::Mesh b_mesh, PointerRNA *cmesh, con
 
        for(b_mesh.tessfaces.begin(f); f != b_mesh.tessfaces.end(); ++f) {
                int4 vi = get_int4(f->vertices_raw());
-               int n= (vi[3] == 0)? 3: 4;
+               int n = (vi[3] == 0) ? 3: 4;
                //int shader = used_shaders[f->material_index()];
 
                if(n == 4)
@@ -212,8 +211,6 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated)
 
        BL::Object::material_slots_iterator slot;
        for(b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); ++slot) {
-               BL::Material material_override = render_layer.material_override;
-
                if(material_override)
                        find_shader(material_override, used_shaders, scene->default_surface);
                else
@@ -321,7 +318,7 @@ void BlenderSync::sync_mesh_motion(BL::Object b_ob, Mesh *mesh, int motion)
                AttributeStandard std = (motion == -1)? ATTR_STD_MOTION_PRE: ATTR_STD_MOTION_POST;
                Attribute *attr_M = mesh->attributes.add(std);
                float3 *M = attr_M->data_float3();
-               size_t i = 0, size = mesh->verts.size();
+               size_t i = 0;
 
                for(b_mesh.vertices.begin(v); v != b_mesh.vertices.end() && i < size; ++v, M++, i++)
                        *M = get_float3(v->co());