Fix #36058: Displace Modifier errors using a baked Image and displace baking inconsis...
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 15 Jul 2013 14:47:58 +0000 (14:47 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 15 Jul 2013 14:47:58 +0000 (14:47 +0000)
commit1dd7156c4c1d6a62f17fb6621ec3dc31297ba54a
treef135c227e6ebecee7c44b80aeb55ec0799441f01
parent86ba5c4fc5fd0ae1f1c8610a81026d939fb68404
Fix #36058: Displace Modifier errors using a baked Image and displace baking inconsistency between 2.67/2.68RC and previous versions

This was in fact really nasty bug, caused by multitex_nodes
function using global variable R (which is a copy of current
renderer). this variable is not initialized to anything
meaningful for until first rendering (preview or final)
happened.

Since multitex_nodes might be used outside of render pipeline,
made it so whether CM is on or off as an argument to functions
multitex_ext_safe and multitex_ext. Now multitex_nodes() is
only shall be used for stuff happening from render pipeline!

Also needed to make some changes to other places, so all the
usages of texture sampling knows for the fact whether CM is
on or off.

And one more change is related on behavior of dispalcement,
wave, warp, weightvg modifiers and smoke. They'll be always
using CM off since texture is used for influence, not for
color.

It's rather bigger patch, but it's mostly straightforward
changes, which we really need to be done.

Reviewed by Brecht, thanks!
21 files changed:
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/smoke.c
source/blender/compositor/nodes/COM_TextureNode.cpp
source/blender/compositor/operations/COM_TextureOperation.cpp
source/blender/compositor/operations/COM_TextureOperation.h
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_texture_api.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_util.c
source/blender/modifiers/intern/MOD_util.h
source/blender/modifiers/intern/MOD_warp.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/modifiers/intern/MOD_weightvg_util.c
source/blender/render/extern/include/RE_shader_ext.h
source/blender/render/intern/source/render_texture.c