195
189
else if (eff->pd->shape == PFIELD_SHAPE_SURFACE) {
196
eff->surmd = (SurfaceModifierData *)modifiers_findByType ( eff->ob, eModifierType_Surface );
190
eff->surmd = (SurfaceModifierData *)modifiers_findByType( eff->ob, eModifierType_Surface );
197
191
if (eff->ob->type == OB_CURVE)
198
192
eff->flag |= PE_USE_NORMAL_DATA;
769
764
mul_m4_v3(eff->ob->imat, tex_co);
772
hasrgb = multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result, NULL);
767
scene_color_manage = BKE_scene_check_color_management_enabled(eff->scene);
769
hasrgb = multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result, NULL, scene_color_manage);
774
771
if (hasrgb && mode==PFIELD_TEX_RGB) {
775
772
force[0] = (0.5f - result->tr) * strength;
782
779
tex_co[0] += nabla;
783
multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+1, NULL);
780
multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+1, NULL, scene_color_manage);
785
782
tex_co[0] -= nabla;
786
783
tex_co[1] += nabla;
787
multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+2, NULL);
784
multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+2, NULL, scene_color_manage);
789
786
tex_co[1] -= nabla;
790
787
tex_co[2] += nabla;
791
multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+3, NULL);
788
multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+3, NULL, scene_color_manage);
793
790
if (mode == PFIELD_TEX_GRAD || !hasrgb) { /* if we don't have rgb fall back to grad */
794
791
/* generate intensity if texture only has rgb value */