diff options
author | Sergey Sharybin <sergey@blender.org> | 2020-11-12 11:26:20 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2020-11-12 11:26:20 +0300 |
commit | de6cee4fc1913982b0b2bd786bfd813c935bbe73 (patch) | |
tree | a726c0c63bbd1d6c47c90c32119ce14c8048cddc /intern/cycles/render/object.h | |
parent | e4d432500a0e2f978fe019da43deb843da405032 (diff) | |
parent | 88bb29dea668df8cc46aa7f55895f229748bdbb4 (diff) |
Merge branch 'master' into codesign_error_tracker
Diffstat (limited to 'intern/cycles/render/object.h')
-rw-r--r-- | intern/cycles/render/object.h | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/intern/cycles/render/object.h b/intern/cycles/render/object.h index ac9b4c331f5..76c9c30abb0 100644 --- a/intern/cycles/render/object.h +++ b/intern/cycles/render/object.h @@ -18,6 +18,11 @@ #define __OBJECT_H__ #include "graph/node.h" + +/* included as Object::set_particle_system defined through NODE_SOCKET_API does + * not select the right Node::set overload as it does not know that ParticleSystem + * is a Node */ +#include "render/particles.h" #include "render/scene.h" #include "util/util_array.h" @@ -46,26 +51,26 @@ class Object : public Node { public: NODE_DECLARE - Geometry *geometry; - Transform tfm; + NODE_SOCKET_API(Geometry *, geometry) + NODE_SOCKET_API(Transform, tfm) BoundBox bounds; - uint random_id; - int pass_id; - float3 color; - ustring asset_name; + NODE_SOCKET_API(uint, random_id) + NODE_SOCKET_API(int, pass_id) + NODE_SOCKET_API(float3, color) + NODE_SOCKET_API(ustring, asset_name) vector<ParamValue> attributes; - uint visibility; - array<Transform> motion; - bool hide_on_missing_motion; - bool use_holdout; - bool is_shadow_catcher; - float shadow_terminator_offset; + NODE_SOCKET_API(uint, visibility) + NODE_SOCKET_API_ARRAY(array<Transform>, motion) + NODE_SOCKET_API(bool, hide_on_missing_motion) + NODE_SOCKET_API(bool, use_holdout) + NODE_SOCKET_API(bool, is_shadow_catcher) + NODE_SOCKET_API(float, shadow_terminator_offset) - float3 dupli_generated; - float2 dupli_uv; + NODE_SOCKET_API(float3, dupli_generated) + NODE_SOCKET_API(float2, dupli_uv) - ParticleSystem *particle_system; - int particle_index; + NODE_SOCKET_API(ParticleSystem *, particle_system); + NODE_SOCKET_API(int, particle_index); Object(); ~Object(); @@ -106,7 +111,12 @@ class Object : public Node { * in the device vectors. Gets set in device_update. */ int index; + /* Reference to the attribute map with object attributes, + * or 0 if none. Set in update_svm_attributes. */ + size_t attr_map_offset; + friend class ObjectManager; + friend class GeometryManager; }; /* Object Manager */ |