diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-05 17:33:54 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-05 17:33:54 +0400 |
commit | 1ca0d66bd20739132fb43fb07f80edac347ce745 (patch) | |
tree | e2561d451756754fd062d05ea6601db5696dc70b /intern | |
parent | 7ecc9cfdf4a74c7264da7e812736c0f520d02d50 (diff) |
Fix particle child render resolution access not working outside of the render thread,
and rename ToggleRender to set_resolution to follow RNA conventions.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index 8fb4813fab7..5b8d495084d 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -37,7 +37,6 @@ void curveinterp_v3_v3v3v3v3(float3 *p, float3 *v1, float3 *v2, float3 *v3, floa void interp_weights(float t, float data[4], int type); float shaperadius(float shape, float root, float tip, float time); void InterpolateKeySegments(int seg, int segno, int key, int curve, float3 *keyloc, float *time, ParticleCurveData *CData, int interpolation); -void ToggleRender(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, BL::Scene *scene); bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int uv_num); bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int vcol_num); bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background); @@ -380,14 +379,14 @@ bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par } -void ToggleRender(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, BL::Scene *scene) +static void set_resolution(Mesh *mesh, BL::Mesh *b_mesh, 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())) { BL::ParticleSystemModifier psmd((const PointerRNA)b_mod->ptr); BL::ParticleSystem b_psys((const PointerRNA)psmd.particle_system().ptr); - b_psys.ToggleRender(*scene, *b_ob); + b_psys.set_resolution(*scene, *b_ob, (render)? 2: 1); } } } @@ -1017,7 +1016,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool ParticleCurveData CData; if(!preview) - ToggleRender(mesh, &b_mesh, &b_ob, &b_scene); + set_resolution(mesh, &b_mesh, &b_ob, &b_scene, true); ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, use_parents, !preview); @@ -1166,7 +1165,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool } if(!preview) - ToggleRender(mesh, &b_mesh, &b_ob, &b_scene); + set_resolution(mesh, &b_mesh, &b_ob, &b_scene, false); mesh->compute_bounds(); } |