Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/effect.c
| Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | static void add_particles_to_effectors(ListBase **effectors, const struct EvaluationContext *eval_ctx, Scene *scene, EffectorWeights *weights, Object *ob, ParticleSystem *psys, ParticleSystem *psys_src, bool for_simulation) | ||||
| } | } | ||||
| } | } | ||||
| /* returns ListBase handle with objects taking part in the effecting */ | /* returns ListBase handle with objects taking part in the effecting */ | ||||
| ListBase *pdInitEffectors( | ListBase *pdInitEffectors( | ||||
| const struct EvaluationContext *eval_ctx, Scene *scene, Object *ob_src, ParticleSystem *psys_src, | const struct EvaluationContext *eval_ctx, Scene *scene, Object *ob_src, ParticleSystem *psys_src, | ||||
| EffectorWeights *weights, bool for_simulation) | EffectorWeights *weights, bool for_simulation) | ||||
| { | { | ||||
| SceneLayer *sl; | ViewLayer *sl; | ||||
| Base *base; | Base *base; | ||||
| unsigned int layer= ob_src->lay; | unsigned int layer= ob_src->lay; | ||||
| ListBase *effectors = NULL; | ListBase *effectors = NULL; | ||||
| /* eval_ctx is NULL during deg build */ | /* eval_ctx is NULL during deg build */ | ||||
| if (eval_ctx) { | if (eval_ctx) { | ||||
| sl = eval_ctx->scene_layer; | sl = eval_ctx->view_layer; | ||||
| } | } | ||||
| else { | else { | ||||
| sl = BKE_scene_layer_context_active_PLACEHOLDER(scene); | sl = BKE_view_layer_context_active_PLACEHOLDER(scene); | ||||
| } | } | ||||
| if (weights->group) { | if (weights->group) { | ||||
| GroupObject *go; | GroupObject *go; | ||||
| for (go= weights->group->gobject.first; go; go= go->next) { | for (go= weights->group->gobject.first; go; go= go->next) { | ||||
| if ( (go->ob->lay & layer) ) { | if ( (go->ob->lay & layer) ) { | ||||
| if ( go->ob->pd && go->ob->pd->forcefield ) | if ( go->ob->pd && go->ob->pd->forcefield ) | ||||
| ▲ Show 20 Lines • Show All 991 Lines • Show Last 20 Lines | |||||