Page MenuHome

Replace G.is_rendering with 'use_render_params' argument (fix for T48658)
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Jun 22 2016, 4:17 AM.

Details

Summary

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).

The patch is simple. just changes particle logic so callers can get render/preview params by avoiding G.is_rendering when render/preview context is known.


Think this is fine to commit to master, but will leave open for feedback from other devs who worked here recently, in case they prefer its handled differently.

Diff Detail

Repository
rB Blender
Branch
TEMP-PARTICLE-T48658-FIX

Event Timeline

Campbell Barton (campbellbarton) retitled this revision from to Replace G.is_rendernig with 'use_render_params' argument.
Campbell Barton (campbellbarton) retitled this revision from Replace G.is_rendernig with 'use_render_params' argument to Replace G.is_rendernig with 'use_render_params' argument (fix for T48658).
Campbell Barton (campbellbarton) retitled this revision from Replace G.is_rendernig with 'use_render_params' argument (fix for T48658) to Replace G.is_rendering with 'use_render_params' argument (fix for T48658).
  • Use render-params arg for fluid-sim particles too
  • Use rendering params for psys_thread_context_init_path (needed indirectly by psys_update_path_cache)

Can confirm this fixes T48658

Thanks a mill

Bastien Montagne (mont29) edited edge metadata.

See nothing wrong with this patch, it is a bit invasive, but it also follows our attempt to get rid of globals usage, especially in 'low level' code - that bug seems to be yet another example of how bad globals can be. ;)

This revision is now accepted and ready to land.Jun 22 2016, 6:20 PM