Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2022-01-28 15:28:31 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-28 15:28:31 +0300
commitcdcbdf8ce46d14c753d68ee8dfa533c642376805 (patch)
tree8557864b1f75f6a0a2c80df48692a7723c9e0300 /source/blender/blenkernel
parent7c48196056c88c17c551e3177ef7b6f276f01d77 (diff)
Remove compilation warnings TexResult.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
-rw-r--r--source/blender/blenkernel/intern/effect.c21
-rw-r--r--source/blender/blenkernel/intern/texture.c4
3 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 64e0427a810..ef789d3e39b 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1518,7 +1518,7 @@ static void dynamic_paint_set_init_color_tex_to_vcol_cb(
multitex_ext_safe(tex, uv, &texres, pool, scene_color_manage, false);
if (texres.tin > pPoint[vert].color[3]) {
- copy_v3_v3(pPoint[vert].color, &texres.tr);
+ copy_v3_v3(pPoint[vert].color, texres.trgba);
pPoint[vert].color[3] = texres.tin;
}
}
@@ -1559,7 +1559,7 @@ static void dynamic_paint_set_init_color_tex_to_imseq_cb(
multitex_ext_safe(tex, uv_final, &texres, NULL, scene_color_manage, false);
/* apply color */
- copy_v3_v3(pPoint[i].color, &texres.tr);
+ copy_v3_v3(pPoint[i].color, texres.trgba);
pPoint[i].color[3] = texres.tin;
}
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index bbf9e9edfd2..1f1915f60ca 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -908,9 +908,9 @@ static void do_texture_effector(EffectorCache *eff,
eff->pd->tex, tex_co, NULL, NULL, 0, result, 0, NULL, scene_color_manage, false);
if (hasrgb && mode == PFIELD_TEX_RGB) {
- force[0] = (0.5f - result->tr) * strength;
- force[1] = (0.5f - result->tg) * strength;
- force[2] = (0.5f - result->tb) * strength;
+ force[0] = (0.5f - result->trgba[0]) * strength;
+ force[1] = (0.5f - result->trgba[1]) * strength;
+ force[2] = (0.5f - result->trgba[2]) * strength;
}
else if (nabla != 0) {
strength /= nabla;
@@ -933,7 +933,8 @@ static void do_texture_effector(EffectorCache *eff,
/* generate intensity if texture only has rgb value */
if (hasrgb & TEX_RGB) {
for (int i = 0; i < 4; i++) {
- result[i].tin = (1.0f / 3.0f) * (result[i].tr + result[i].tg + result[i].tb);
+ result[i].tin = (1.0f / 3.0f) *
+ (result[i].trgba[0] + result[i].trgba[1] + result[i].trgba[2]);
}
}
force[0] = (result[0].tin - result[1].tin) * strength;
@@ -943,12 +944,12 @@ static void do_texture_effector(EffectorCache *eff,
else { /*PFIELD_TEX_CURL*/
float dbdy, dgdz, drdz, dbdx, dgdx, drdy;
- dbdy = result[2].tb - result[0].tb;
- dgdz = result[3].tg - result[0].tg;
- drdz = result[3].tr - result[0].tr;
- dbdx = result[1].tb - result[0].tb;
- dgdx = result[1].tg - result[0].tg;
- drdy = result[2].tr - result[0].tr;
+ dbdy = result[2].trgba[2] - result[0].trgba[2];
+ dgdz = result[3].trgba[1] - result[0].trgba[1];
+ drdz = result[3].trgba[0] - result[0].trgba[0];
+ dbdx = result[1].trgba[2] - result[0].trgba[2];
+ dgdx = result[1].trgba[1] - result[0].trgba[1];
+ drdy = result[2].trgba[0] - result[0].trgba[0];
force[0] = (dbdy - dgdz) * strength;
force[1] = (drdz - dbdx) * strength;
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 37d5d732a70..c37e2fb6144 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -723,10 +723,10 @@ void BKE_texture_get_value_ex(const Scene *scene,
* if the texture didn't give an RGB value, copy the intensity across
*/
if (result_type & TEX_RGB) {
- texres->tin = (1.0f / 3.0f) * (texres->tr + texres->tg + texres->tb);
+ texres->tin = (1.0f / 3.0f) * (texres->trgba[0] + texres->trgba[1] + texres->trgba[2]);
}
else {
- copy_v3_fl(&texres->tr, texres->tin);
+ copy_v3_fl(texres->trgba, texres->tin);
}
}