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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2021-09-09 17:39:45 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2021-09-09 17:39:45 +0300
commit62ec88eb846a8c342e046bc5c798022cbe694026 (patch)
tree68bafc0aecb3ea98f229800f42d58144b365fe1b /intern/cycles/render
parent3eb6569b38d7c84ac084117221e475f5a328bf0d (diff)
Cleanup: use NODE_SOCKET_API_ARRAY for array sockets
This prevents copying the arrays when setting new values in the sockets. No functional changes.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/hair.h8
-rw-r--r--intern/cycles/render/nodes.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/intern/cycles/render/hair.h b/intern/cycles/render/hair.h
index 1a8f422e8c4..e4451d70767 100644
--- a/intern/cycles/render/hair.h
+++ b/intern/cycles/render/hair.h
@@ -89,10 +89,10 @@ class Hair : public Geometry {
float4 r_keys[4]) const;
};
- NODE_SOCKET_API(array<float3>, curve_keys)
- NODE_SOCKET_API(array<float>, curve_radius)
- NODE_SOCKET_API(array<int>, curve_first_key)
- NODE_SOCKET_API(array<int>, curve_shader)
+ NODE_SOCKET_API_ARRAY(array<float3>, curve_keys)
+ NODE_SOCKET_API_ARRAY(array<float>, curve_radius)
+ NODE_SOCKET_API_ARRAY(array<int>, curve_first_key)
+ NODE_SOCKET_API_ARRAY(array<int>, curve_shader)
/* BVH */
size_t curvekey_offset;
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 99cb0b779b8..3013e9b1866 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -128,7 +128,7 @@ class ImageTextureNode : public ImageSlotTextureNode {
NODE_SOCKET_API(float, projection_blend)
NODE_SOCKET_API(bool, animated)
NODE_SOCKET_API(float3, vector)
- NODE_SOCKET_API(array<int>, tiles)
+ NODE_SOCKET_API_ARRAY(array<int>, tiles)
protected:
void cull_tiles(Scene *scene, ShaderGraph *graph);
@@ -1554,7 +1554,7 @@ class CurvesNode : public ShaderNode {
return NODE_GROUP_LEVEL_3;
}
- NODE_SOCKET_API(array<float3>, curves)
+ NODE_SOCKET_API_ARRAY(array<float3>, curves)
NODE_SOCKET_API(float, min_x)
NODE_SOCKET_API(float, max_x)
NODE_SOCKET_API(float, fac)
@@ -1588,8 +1588,8 @@ class RGBRampNode : public ShaderNode {
return NODE_GROUP_LEVEL_1;
}
- NODE_SOCKET_API(array<float3>, ramp)
- NODE_SOCKET_API(array<float>, ramp_alpha)
+ NODE_SOCKET_API_ARRAY(array<float3>, ramp)
+ NODE_SOCKET_API_ARRAY(array<float>, ramp_alpha)
NODE_SOCKET_API(float, fac)
NODE_SOCKET_API(bool, interpolate)
};