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:
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mapping.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c
index cd398cc8264..2044f5390cc 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mapping.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c
@@ -42,6 +42,15 @@ static bNodeSocketTemplate sh_node_mapping_out[] = {
{ -1, 0, "" }
};
+static void *node_shader_initexec_mapping(bNodeExecContext *UNUSED(context),
+ bNode *node,
+ bNodeInstanceKey UNUSED(key))
+{
+ TexMapping *texmap = node->storage;
+ BKE_texture_mapping_init(texmap);
+ return NULL;
+}
+
/* do the regular mapping options for blender textures */
static void node_shader_exec_mapping(void *UNUSED(data), int UNUSED(thread), bNode *node, bNodeExecData *UNUSED(execdata), bNodeStack **in, bNodeStack **out)
{
@@ -103,7 +112,7 @@ void register_node_type_sh_mapping(void)
node_type_size(&ntype, 320, 160, 360);
node_type_init(&ntype, node_shader_init_mapping);
node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage);
- node_type_exec(&ntype, NULL, NULL, node_shader_exec_mapping);
+ node_type_exec(&ntype, node_shader_initexec_mapping, NULL, node_shader_exec_mapping);
node_type_gpu(&ntype, gpu_shader_mapping);
nodeRegisterType(&ntype);