diff options
Diffstat (limited to 'intern/cycles/blender/blender_curves.cpp')
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index 72023d7e69b..dba801fc4df 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -44,8 +44,8 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData); void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, float3 RotCam, bool is_ortho); void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resolution); -void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata); -void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata); +void ExportCurveTriangleUV(ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata); +void ExportCurveTriangleVcol(ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata); ParticleCurveData::ParticleCurveData() { @@ -152,7 +152,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par continue; int ren_step = (1 << draw_step) + 1; - if (b_part.kink() == BL::ParticleSettings::kink_SPIRAL) + if(b_part.kink() == BL::ParticleSettings::kink_SPIRAL) ren_step += b_part.kink_extra_steps(); PointerRNA cpsys = RNA_pointer_get(&b_part.ptr, "cycles"); @@ -233,10 +233,10 @@ bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Parti int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f); int totcurves = totchild; - if (b_part.child_type() == 0) + if(b_part.child_type() == 0) totcurves += totparts; - if (totcurves == 0) + if(totcurves == 0) continue; int pa_no = 0; @@ -287,10 +287,10 @@ bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f); int totcurves = totchild; - if (b_part.child_type() == 0) + if(b_part.child_type() == 0) totcurves += totparts; - if (totcurves == 0) + if(totcurves == 0) continue; int pa_no = 0; @@ -322,11 +322,11 @@ bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par return true; } -static void set_resolution(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, BL::Scene *scene, bool render) +static void set_resolution(BL::Object *b_ob, BL::Scene *scene, bool render) { BL::Object::modifiers_iterator b_mod; for(b_ob->modifiers.begin(b_mod); b_mod != b_ob->modifiers.end(); ++b_mod) { - if ((b_mod->type() == b_mod->type_PARTICLE_SYSTEM) && ((b_mod->show_viewport()) || (b_mod->show_render()))) { + if((b_mod->type() == b_mod->type_PARTICLE_SYSTEM) && ((b_mod->show_viewport()) || (b_mod->show_render()))) { BL::ParticleSystemModifier psmd((const PointerRNA)b_mod->ptr); BL::ParticleSystem b_psys((const PointerRNA)psmd.particle_system().ptr); b_psys.set_resolution(*scene, *b_ob, (render)? 2: 1); @@ -513,7 +513,7 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resol ybasis = normalize(cross(xbasis, v2)); - for (; subv <= 1; subv++) { + for(; subv <= 1; subv++) { float3 ickey_loc = make_float3(0.0f,0.0f,0.0f); float time = 0.0f; @@ -581,7 +581,7 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData) } } - if (num_curves > 0) { + if(num_curves > 0) { VLOG(1) << "Exporting curve segments for mesh " << mesh->name; } @@ -621,7 +621,7 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData) } /* check allocation */ - if((mesh->curve_keys.size() != num_keys) || (mesh->curves.size() != num_curves)) { + if((mesh->curve_keys.size() != num_keys) || (mesh->curves.size() != num_curves)) { VLOG(1) << "Allocation failed, clearing data"; mesh->curve_keys.clear(); mesh->curves.clear(); @@ -629,7 +629,7 @@ void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData) } } -static void ExportCurveSegmentsMotion(Scene *scene, Mesh *mesh, ParticleCurveData *CData, int time_index) +static void ExportCurveSegmentsMotion(Mesh *mesh, ParticleCurveData *CData, int time_index) { VLOG(1) << "Exporting curve motion segments for mesh " << mesh->name << ", time index " << time_index; @@ -705,7 +705,7 @@ static void ExportCurveSegmentsMotion(Scene *scene, Mesh *mesh, ParticleCurveDat } } -void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata) +void ExportCurveTriangleUV(ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata) { if(uvdata == NULL) return; @@ -750,7 +750,7 @@ void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset } } -void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata) +void ExportCurveTriangleVcol(ParticleCurveData *CData, int vert_offset, int resol, uchar4 *cdata) { if(cdata == NULL) return; @@ -886,7 +886,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool ParticleCurveData CData; if(!preview) - set_resolution(mesh, &b_mesh, &b_ob, &b_scene, true); + set_resolution(&b_ob, &b_scene, true); ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, !preview); @@ -917,7 +917,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool } else { if(motion) - ExportCurveSegmentsMotion(scene, mesh, &CData, time_index); + ExportCurveSegmentsMotion(mesh, &CData, time_index); else ExportCurveSegments(scene, mesh, &CData); } @@ -966,7 +966,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool uchar4 *cdata = attr_vcol->data_uchar4(); - ExportCurveTriangleVcol(mesh, &CData, tri_num * 3, used_res, cdata); + ExportCurveTriangleVcol(&CData, tri_num * 3, used_res, cdata); } else { Attribute *attr_vcol = mesh->curve_attributes.add( @@ -1009,7 +1009,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool float3 *uv = attr_uv->data_float3(); - ExportCurveTriangleUV(mesh, &CData, tri_num * 3, used_res, uv); + ExportCurveTriangleUV(&CData, tri_num * 3, used_res, uv); } else { if(active_render) @@ -1032,7 +1032,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool } if(!preview) - set_resolution(mesh, &b_mesh, &b_ob, &b_scene, false); + set_resolution(&b_ob, &b_scene, false); mesh->compute_bounds(); } |