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.