Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-08 10:28:52 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-13 15:38:59 +0300
commit7b9fb3259157cea2df5e7b461d04f55cfa380031 (patch)
treea54e7d066283aeae384beb2ae99cc9a0e158bec5 /intern/cycles/blender/blender_curves.cpp
parenta1e2415ed51e2da97e3b182f18f462345a02ce14 (diff)
Python API: remove preview/render resolution settings from API functions.
For correct results these must have been set already when the depsgraph was created and evaluated, so all dependencies have appropriate resolutions too. For particle we no longer backup and restore the viewport particles to avoid overwriting them during render, as copy-on-write solves this for us. Even without COW particles seem to work ok. This also removes the particle simplification options based on camera. This was never used much and only available in Blender Internal. Differential Revision: https://developer.blender.org/D3148
Diffstat (limited to 'intern/cycles/blender/blender_curves.cpp')
-rw-r--r--intern/cycles/blender/blender_curves.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index ba936a3f369..f2bb1b0158c 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -326,18 +326,6 @@ static bool ObtainCacheParticleVcol(Mesh *mesh,
return true;
}
-static void set_resolution(BL::Object& b_ob, BL::Scene& scene, BL::ViewLayer& view_layer, 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.set_resolution(scene, view_layer, b_ob, (render)? 2: 1);
- }
- }
-}
-
static void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData,
float3 RotCam, bool is_ortho)
{
@@ -884,8 +872,7 @@ void BlenderSync::sync_curve_settings()
curve_system_manager->tag_update(scene);
}
-void BlenderSync::sync_curves(BL::Depsgraph& b_depsgraph,
- Mesh *mesh,
+void BlenderSync::sync_curves(Mesh *mesh,
BL::Mesh& b_mesh,
BL::Object& b_ob,
bool motion,
@@ -920,10 +907,6 @@ void BlenderSync::sync_curves(BL::Depsgraph& b_depsgraph,
ParticleCurveData CData;
- BL::ViewLayer b_view_layer = b_depsgraph.view_layer();
- if(!preview)
- set_resolution(b_ob, b_scene, b_view_layer, true);
-
ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, !preview);
/* add hair geometry to mesh */
@@ -1066,9 +1049,6 @@ void BlenderSync::sync_curves(BL::Depsgraph& b_depsgraph,
}
}
- if(!preview)
- set_resolution(b_ob, b_scene, b_view_layer, false);
-
mesh->compute_bounds();
}