diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-23 00:53:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-23 00:54:35 +0300 |
commit | 29448bd99bb05ae61e4d540981026bab87702f90 (patch) | |
tree | ce5797a238562438cfb28832be7197af2f3ee654 /source/blender/editors | |
parent | 7547c6a250cd6f36c9894605b822380a1261febf (diff) |
Fix T48658: Cycles render & render preview corrupts particles
Replaces `G.is_rendering` with `use_render_params` argument.
This is needed for Cycles, which attempts to restore render-preview settings from particles,
after it gets its own particle data, but fails to restore because
`G.is_rendering` was being checked in psys_cache_paths (and other places).
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 8d351826b86..30c102b70c5 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1173,7 +1173,7 @@ static void PE_update_selection(Scene *scene, Object *ob, int useflag) } } - psys_cache_edit_paths(scene, ob, edit, CFRA); + psys_cache_edit_paths(scene, ob, edit, CFRA, G.is_rendering); /* disable update flag */ @@ -1289,7 +1289,7 @@ void PE_update_object(Scene *scene, Object *ob, int useflag) PE_hide_keys_time(scene, edit, CFRA); /* regenerate path caches */ - psys_cache_edit_paths(scene, ob, edit, CFRA); + psys_cache_edit_paths(scene, ob, edit, CFRA, G.is_rendering); /* disable update flag */ LOOP_POINTS { diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 1999ff7a6cf..76c19fbb8d3 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -5018,7 +5018,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv unsigned char tcol[4] = {0, 0, 0, 255}; /* 1. */ - if (part == NULL || !psys_check_enabled(ob, psys)) + if (part == NULL || !psys_check_enabled(ob, psys, G.is_rendering)) return; if (pars == NULL) return; @@ -5726,7 +5726,7 @@ static void draw_update_ptcache_edit(Scene *scene, Object *ob, PTCacheEdit *edit /* create path and child path cache if it doesn't exist already */ if (edit->pathcache == NULL) - psys_cache_edit_paths(scene, ob, edit, CFRA); + psys_cache_edit_paths(scene, ob, edit, CFRA, G.is_rendering); } static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) |