diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-07-15 18:47:58 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-07-15 18:47:58 +0400 |
commit | 1dd7156c4c1d6a62f17fb6621ec3dc31297ba54a (patch) | |
tree | f135c227e6ebecee7c44b80aeb55ec0799441f01 /source/blender/compositor/nodes | |
parent | 86ba5c4fc5fd0ae1f1c8610a81026d939fb68404 (diff) |
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!
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r-- | source/blender/compositor/nodes/COM_TextureNode.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/compositor/nodes/COM_TextureNode.cpp b/source/blender/compositor/nodes/COM_TextureNode.cpp index 5b386a504e4..6f2baa63b0e 100644 --- a/source/blender/compositor/nodes/COM_TextureNode.cpp +++ b/source/blender/compositor/nodes/COM_TextureNode.cpp @@ -34,11 +34,14 @@ void TextureNode::convertToOperations(ExecutionSystem *system, CompositorContext bNode *editorNode = this->getbNode(); Tex *texture = (Tex *)editorNode->id; TextureOperation *operation = new TextureOperation(); + const ColorManagedDisplaySettings *displaySettings = context->getDisplaySettings(); + bool sceneColorManage = strcmp(displaySettings->display_device, "None") != 0; this->getOutputSocket(1)->relinkConnections(operation->getOutputSocket()); this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, system); this->getInputSocket(1)->relinkConnections(operation->getInputSocket(1), 1, system); operation->setTexture(texture); operation->setRenderData(context->getRenderData()); + operation->setSceneColorManage(sceneColorManage); system->addOperation(operation); addPreviewOperation(system, context, operation->getOutputSocket()); @@ -49,6 +52,7 @@ void TextureNode::convertToOperations(ExecutionSystem *system, CompositorContext addLink(system, operation->getInputSocket(1)->getConnection()->getFromSocket(), alphaOperation->getInputSocket(1)); alphaOperation->setTexture(texture); alphaOperation->setRenderData(context->getRenderData()); + alphaOperation->setSceneColorManage(sceneColorManage); system->addOperation(alphaOperation); } } |