~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/intern/effect.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
        return pd;
149
149
}
150
150
 
151
 
/* temporal struct, used for reading return of mesh_get_mapped_verts_nors() */
152
 
 
153
 
typedef struct VeNoCo {
154
 
        float co[3], no[3];
155
 
} VeNoCo;
156
 
 
157
151
/* ***************** PARTICLES ***************** */
158
152
 
159
153
/* -------------------------- Effectors ------------------ */
193
187
                }
194
188
        }
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;
199
193
        }
750
744
        float nabla = eff->pd->tex_nabla;
751
745
        int hasrgb;
752
746
        short mode = eff->pd->tex_mode;
 
747
        bool scene_color_manage;
753
748
 
754
749
        if (!eff->pd->tex)
755
750
                return;
769
764
                mul_m4_v3(eff->ob->imat, tex_co);
770
765
        }
771
766
 
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);
 
768
 
 
769
        hasrgb = multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result, NULL, scene_color_manage);
773
770
 
774
771
        if (hasrgb && mode==PFIELD_TEX_RGB) {
775
772
                force[0] = (0.5f - result->tr) * strength;
780
777
                strength/=nabla;
781
778
 
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);
784
781
 
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);
788
785
 
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);
792
789
 
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 */