Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/pointdensity.c
| Show First 20 Lines • Show All 939 Lines • ▼ Show 20 Lines | static void particle_system_minmax(EvaluationContext *eval_ctx, | ||||
| if (use_render_params) { | if (use_render_params) { | ||||
| psys_render_restore(object, psys); | psys_render_restore(object, psys); | ||||
| } | } | ||||
| } | } | ||||
| void RE_point_density_cache( | void RE_point_density_cache( | ||||
| Scene *scene, | Scene *scene, | ||||
| SceneLayer *sl, | SceneLayer *scene_layer, | ||||
| PointDensity *pd, | PointDensity *pd, | ||||
| const bool use_render_params) | const bool use_render_params) | ||||
| { | { | ||||
| EvaluationContext eval_ctx = {0}; | EvaluationContext eval_ctx = {0}; | ||||
| float mat[4][4]; | float mat[4][4]; | ||||
| DEG_evaluation_context_init(&eval_ctx, use_render_params ? DAG_EVAL_RENDER | DEG_evaluation_context_init(&eval_ctx, use_render_params ? DAG_EVAL_RENDER | ||||
| : DAG_EVAL_VIEWPORT); | : DAG_EVAL_VIEWPORT); | ||||
| eval_ctx.scene_layer = sl; | eval_ctx.scene_layer = scene_layer; | ||||
| /* Same matricies/resolution as dupli_render_particle_set(). */ | /* Same matricies/resolution as dupli_render_particle_set(). */ | ||||
| unit_m4(mat); | unit_m4(mat); | ||||
| BLI_mutex_lock(&sample_mutex); | BLI_mutex_lock(&sample_mutex); | ||||
| cache_pointdensity_ex(&eval_ctx, scene, pd, mat, mat, 1, 1, use_render_params); | cache_pointdensity_ex(&eval_ctx, scene, pd, mat, mat, 1, 1, use_render_params); | ||||
| BLI_mutex_unlock(&sample_mutex); | BLI_mutex_unlock(&sample_mutex); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines | |||||