|
Blender V5.0
|
#include <DNA_attribute_types.h>
Public Member Functions | |
| Attribute (ustring name, const TypeDesc type, AttributeElement element, Geometry *geom, AttributePrimitive prim) | |
| Attribute (Attribute &&other)=default | |
| Attribute (const Attribute &other)=delete | |
| Attribute & | operator= (const Attribute &other)=delete |
| ~Attribute () | |
| void | set (ustring name, const TypeDesc type, AttributeElement element) |
| void | resize (Geometry *geom, AttributePrimitive prim, bool reserve_only) |
| void | resize (const size_t num_elements) |
| size_t | data_sizeof () const |
| size_t | element_size (Geometry *geom, AttributePrimitive prim) const |
| size_t | buffer_size (Geometry *geom, AttributePrimitive prim) const |
| char * | data () |
| float2 * | data_float2 () |
| float3 * | data_float3 () |
| float4 * | data_float4 () |
| float * | data_float () |
| uchar4 * | data_uchar4 () |
| Transform * | data_transform () |
| ImageHandle & | data_voxel () |
| const char * | data () const |
| const float2 * | data_float2 () const |
| const float3 * | data_float3 () const |
| const float4 * | data_float4 () const |
| const float * | data_float () const |
| const Transform * | data_transform () const |
| const ImageHandle & | data_voxel () const |
| void | zero_data (void *dst) |
| void | add (const float &f) |
| void | add (const float2 &f) |
| void | add (const float3 &f) |
| void | add (const uchar4 &f) |
| void | add (const Transform &f) |
| void | add (const char *data) |
| void | set_data_from (Attribute &&other) |
| void | get_uv_tiles (Geometry *geom, AttributePrimitive prim, unordered_set< int > &tiles) const |
Static Public Member Functions | |
| static bool | same_storage (const TypeDesc a, const TypeDesc b) |
| static const char * | standard_name (AttributeStandard std) |
| static AttributeStandard | name_standard (const char *name) |
| static AttrKernelDataType | kernel_type (const Attribute &attr) |
Public Attributes | |
| const char * | name |
| int16_t | data_type |
| int8_t | domain |
| int8_t | storage_type |
| char | _pad [4] |
| void * | data |
| ustring | name |
| AttributeStandard | std |
| TypeDesc | type |
| vector< char > | buffer |
| AttributeElement | element |
| uint | flags |
| bool | modified |
DNA data for bke::Attribute.
Definition at line 38 of file DNA_attribute_types.h.
| CCL_NAMESPACE_BEGIN Attribute::Attribute | ( | ustring | name, |
| const TypeDesc | type, | ||
| AttributeElement | element, | ||
| Geometry * | geom, | ||
| AttributePrimitive | prim ) |
Definition at line 18 of file scene/attribute.cpp.
References assert, ATTR_ELEMENT_VOXEL, ATTR_STD_NONE, buffer, element, flags, modified, name, resize(), std, true, type, and TypeRGBA().
Referenced by Attribute(), Attribute(), kernel_type(), operator=(), and set_data_from().
|
default |
References Attribute().
|
delete |
References Attribute().
| Attribute::~Attribute | ( | ) |
Definition at line 39 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, data_voxel(), element, and ImageHandle::~ImageHandle().
| void Attribute::add | ( | const char * | data | ) |
Definition at line 137 of file scene/attribute.cpp.
References buffer, data, data_sizeof(), i, modified, and size().
| void Attribute::add | ( | const float & | f | ) |
Definition at line 67 of file scene/attribute.cpp.
References assert, buffer, data, data_sizeof(), i, modified, and size().
Referenced by ExportCurveSegments().
| void Attribute::add | ( | const float2 & | f | ) |
Definition at line 95 of file scene/attribute.cpp.
References assert, buffer, data, data_sizeof(), i, modified, and size().
| void Attribute::add | ( | const float3 & | f | ) |
Definition at line 109 of file scene/attribute.cpp.
References assert, buffer, data, data_sizeof(), i, modified, and size().
| void Attribute::add | ( | const Transform & | f | ) |
Definition at line 123 of file scene/attribute.cpp.
References assert, buffer, data, data_sizeof(), i, modified, and size().
| void Attribute::add | ( | const uchar4 & | f | ) |
Definition at line 81 of file scene/attribute.cpp.
References assert, buffer, data, data_sizeof(), i, modified, and size().
| size_t Attribute::buffer_size | ( | Geometry * | geom, |
| AttributePrimitive | prim ) const |
Definition at line 284 of file scene/attribute.cpp.
References data_sizeof(), and element_size().
Referenced by Mesh::add_undisplaced(), and resize().
|
inline |
Definition at line 74 of file scene/attribute.h.
References buffer.
|
inline |
Definition at line 116 of file scene/attribute.h.
References buffer.
|
inline |
Definition at line 93 of file scene/attribute.h.
References assert, data, and data_sizeof().
Referenced by AttributeTableBuilder::add(), attr_create_pointiness(), attr_create_random_per_island(), export_hair_curves(), export_pointcloud(), mikk_compute_tangents(), Hair::update_shadow_transparency(), and xml_read_mesh().
|
inline |
Definition at line 135 of file scene/attribute.h.
References assert, data, and data_sizeof().
|
inline |
Definition at line 78 of file scene/attribute.h.
References assert, data, and data_sizeof().
Referenced by AttributeTableBuilder::add(), attr_create_generic(), attr_create_subd_uv_map(), attr_create_uv_map(), get_uv_tiles(), mikk_compute_tangents(), and xml_read_mesh().
|
inline |
Definition at line 120 of file scene/attribute.h.
References assert, data, and data_sizeof().
|
inline |
Definition at line 83 of file scene/attribute.h.
References assert, data, and data_sizeof().
Referenced by AttributeTableBuilder::add(), BVHBuild::add_reference_triangles(), Mesh::add_undisplaced(), Mesh::add_vertex_normals(), Mesh::apply_transform(), attr_create_motion_from_velocity(), attr_create_motion_from_velocity(), Mesh::compute_bounds(), Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), create_mesh(), GeometryManager::displace(), EdgeDice::EdgeDice(), export_hair_curves(), mikk_compute_tangents(), Mesh::pack_normals(), read_shader_output(), BVH2::refit_primitives(), Mesh::update_generated(), and xml_read_mesh().
|
inline |
Definition at line 125 of file scene/attribute.h.
References assert, data, and data_sizeof().
|
inline |
Definition at line 88 of file scene/attribute.h.
References assert, data, and data_sizeof().
Referenced by AttributeTableBuilder::add(), BVHBuild::add_reference_curves(), BVHBuild::add_reference_points(), Hair::apply_transform(), PointCloud::apply_transform(), attr_create_motion_from_velocity(), Hair::compute_bounds(), PointCloud::compute_bounds(), PointCloud::copy_center_to_motion_step(), export_hair_curves_motion(), export_hair_motion_validate_attribute(), export_pointcloud_motion(), and ExportCurveSegmentsMotion().
|
inline |
Definition at line 130 of file scene/attribute.h.
References assert, data, and data_sizeof().
| size_t Attribute::data_sizeof | ( | ) | const |
Definition at line 166 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER_BYTE, ATTR_ELEMENT_VOXEL, element, float, type, and TypeRGBA().
Referenced by add(), add(), add(), add(), add(), add(), buffer_size(), data_float(), data_float(), data_float2(), data_float2(), data_float3(), data_float3(), data_float4(), data_float4(), data_transform(), data_transform(), data_uchar4(), data_voxel(), data_voxel(), resize(), and zero_data().
|
inline |
Definition at line 103 of file scene/attribute.h.
References assert, data, and data_sizeof().
Referenced by AttributeTableBuilder::add(), and create_mesh().
|
inline |
Definition at line 140 of file scene/attribute.h.
References assert, data, and data_sizeof().
|
inline |
Definition at line 98 of file scene/attribute.h.
References assert, data, and data_sizeof().
Referenced by AttributeTableBuilder::add(), and attr_create_generic().
|
inline |
Definition at line 110 of file scene/attribute.h.
References assert, data, and data_sizeof().
Referenced by AttributeTableBuilder::add(), Object::compute_volume_step_size(), GeometryManager::create_volume_mesh(), GeometryManager::device_update_volume_images(), sync_smoke_volume(), sync_volume_object(), and ~Attribute().
|
inline |
Definition at line 145 of file scene/attribute.h.
References assert, data, and data_sizeof().
| size_t Attribute::element_size | ( | Geometry * | geom, |
| AttributePrimitive | prim ) const |
Definition at line 194 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER, ATTR_ELEMENT_CORNER_BYTE, ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, ATTR_ELEMENT_CURVE_KEY_MOTION, ATTR_ELEMENT_FACE, ATTR_ELEMENT_MESH, ATTR_ELEMENT_OBJECT, ATTR_ELEMENT_VERTEX, ATTR_ELEMENT_VERTEX_MOTION, ATTR_ELEMENT_VOXEL, ATTR_PRIM_SUBD, DCHECK_GT, element, Mesh::get_num_subd_base_verts(), Mesh::get_num_subd_faces(), Geometry::is_hair(), Geometry::is_mesh(), Geometry::is_pointcloud(), Geometry::is_volume(), Hair::num_curves(), PointCloud::num_points(), Mesh::num_triangles(), and size().
Referenced by AttributeTableBuilder::add(), buffer_size(), get_uv_tiles(), and AttributeTableBuilder::reserve().
| void Attribute::get_uv_tiles | ( | Geometry * | geom, |
| AttributePrimitive | prim, | ||
| unordered_set< int > & | tiles ) const |
Definition at line 420 of file scene/attribute.cpp.
References data_float2(), element_size(), i, num, tiles, type, v, float2::x, x, float2::y, and y.
Referenced by Hair::get_uv_tiles(), Mesh::get_uv_tiles(), and PointCloud::get_uv_tiles().
|
static |
Definition at line 399 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER, Attribute(), element, FLOAT, FLOAT2, FLOAT3, FLOAT4, type, TypeRGBA(), and UCHAR4.
Referenced by GeometryManager::device_update_attributes(), and update_device_flags_attribute().
|
static |
Definition at line 386 of file scene/attribute.cpp.
References ATTR_STD_NONE, ATTR_STD_NUM, name, standard_name(), and std.
Referenced by AttributeRequestSet::add_standard(), SVMCompiler::attribute_standard(), and AttributeNode::attributes().
References Attribute().
| void Attribute::resize | ( | const size_t | num_elements | ) |
Definition at line 60 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, data_sizeof(), and element.
| void Attribute::resize | ( | Geometry * | geom, |
| AttributePrimitive | prim, | ||
| bool | reserve_only ) |
Definition at line 48 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, buffer_size(), and element.
Referenced by Attribute().
|
static |
Definition at line 289 of file scene/attribute.cpp.
References b.
Referenced by SubdAttributeInterpolation::setup_attribute().
| void Attribute::set | ( | ustring | name, |
| const TypeDesc | type, | ||
| AttributeElement | element ) |
| void Attribute::set_data_from | ( | Attribute && | other | ) |
Definition at line 148 of file scene/attribute.cpp.
References assert, Attribute(), buffer, data, element, flags, modified, std, and type.
Referenced by AttributeSet::update().
|
static |
Definition at line 308 of file scene/attribute.cpp.
References ATTR_STD_CURVE_INTERCEPT, ATTR_STD_CURVE_LENGTH, ATTR_STD_CURVE_RANDOM, ATTR_STD_GENERATED, ATTR_STD_GENERATED_TRANSFORM, ATTR_STD_MOTION_VERTEX_NORMAL, ATTR_STD_MOTION_VERTEX_POSITION, ATTR_STD_NONE, ATTR_STD_NORMAL_UNDISPLACED, ATTR_STD_NOT_FOUND, ATTR_STD_NUM, ATTR_STD_PARTICLE, ATTR_STD_POINT_RANDOM, ATTR_STD_POINTINESS, ATTR_STD_POSITION_UNDEFORMED, ATTR_STD_POSITION_UNDISPLACED, ATTR_STD_PTEX_FACE_ID, ATTR_STD_PTEX_UV, ATTR_STD_RANDOM_PER_ISLAND, ATTR_STD_SHADOW_TRANSPARENCY, ATTR_STD_UV, ATTR_STD_UV_TANGENT, ATTR_STD_UV_TANGENT_SIGN, ATTR_STD_UV_TANGENT_SIGN_UNDISPLACED, ATTR_STD_UV_TANGENT_UNDISPLACED, ATTR_STD_VERTEX_COLOR, ATTR_STD_VERTEX_NORMAL, ATTR_STD_VOLUME_COLOR, ATTR_STD_VOLUME_DENSITY, ATTR_STD_VOLUME_FLAME, ATTR_STD_VOLUME_HEAT, ATTR_STD_VOLUME_TEMPERATURE, ATTR_STD_VOLUME_VELOCITY, ATTR_STD_VOLUME_VELOCITY_X, ATTR_STD_VOLUME_VELOCITY_Y, ATTR_STD_VOLUME_VELOCITY_Z, and std.
Referenced by AttributeSet::add(), BlenderSmokeLoader::get_voxels(), mikk_compute_tangents(), BlenderSmokeLoader::name(), name_standard(), sync_volume_object(), and xml_read_mesh().
| void Attribute::zero_data | ( | void * | dst | ) |
Definition at line 303 of file scene/attribute.cpp.
References data_sizeof().
| char Attribute::_pad[4] |
Definition at line 46 of file DNA_attribute_types.h.
| vector<char> Attribute::buffer |
Definition at line 50 of file scene/attribute.h.
Referenced by add(), add(), add(), add(), add(), add(), ApplyPrimvars(), Attribute(), data(), data(), GeometryManager::device_update_attributes(), resize(), resize(), set_data_from(), and ~Attribute().
| void* Attribute::data |
Type depends on storage type.
Definition at line 49 of file DNA_attribute_types.h.
Referenced by add(), add(), add(), add(), add(), add(), ApplyPrimvars(), blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::blend_read(), CustomData_blend_write_prepare(), data_float(), data_float(), data_float2(), data_float2(), data_float3(), data_float3(), data_float4(), data_float4(), data_transform(), data_transform(), data_uchar4(), data_voxel(), data_voxel(), blender::bke::read_attr_data(), set_data_from(), SubdAttributeInterpolation::setup_attribute_corner_linear(), SubdAttributeInterpolation::setup_attribute_face(), and SubdAttributeInterpolation::setup_attribute_vertex_linear().
| int16_t Attribute::data_type |
Definition at line 41 of file DNA_attribute_types.h.
Referenced by blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::blend_read(), and CustomData_blend_write_prepare().
| int8_t Attribute::domain |
Definition at line 43 of file DNA_attribute_types.h.
Referenced by blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::blend_read(), and CustomData_blend_write_prepare().
| AttributeElement Attribute::element |
Definition at line 51 of file scene/attribute.h.
Referenced by AttributeSet::add(), AttributeTableBuilder::add(), Attribute(), Object::compute_volume_step_size(), AttributeSet::copy(), GeometryManager::create_volume_mesh(), data_sizeof(), ObjectManager::device_update_flags(), GeometryManager::device_update_volume_images(), element_size(), AttributeSet::find_matching(), Geometry::has_voxel_attributes(), VolumeManager::is_homogeneous_volume(), kernel_type(), AttributeTableBuilder::reserve(), resize(), resize(), set(), set_data_from(), SubdAttributeInterpolation::setup_attribute(), SubdAttributeInterpolation::setup_attribute_type(), SubdAttributeInterpolation::support_interp_attribute(), AttributeSet::update(), Mesh::update_tangents(), and ~Attribute().
| uint Attribute::flags |
Definition at line 52 of file scene/attribute.h.
Referenced by attr_create_subd_uv_map(), Attribute(), and set_data_from().
| bool Attribute::modified |
Definition at line 54 of file scene/attribute.h.
Referenced by add(), add(), add(), add(), add(), add(), AttributeTableBuilder::add(), Attribute(), GeometryManager::device_update_attributes(), set_data_from(), and update_device_flags_attribute().
| ustring Attribute::name |
Definition at line 46 of file scene/attribute.h.
| const char* Attribute::name |
Definition at line 39 of file DNA_attribute_types.h.
Referenced by Attribute(), blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::blend_read(), AttributeSet::copy(), CustomData_blend_write_prepare(), AttributeSet::find_matching(), mikk_compute_tangents(), name_standard(), AttributeSet::remove(), set(), AttributeSet::update(), and Mesh::update_tangents().
| AttributeStandard Attribute::std |
Definition at line 47 of file scene/attribute.h.
Referenced by AttributeSet::add(), ApplyPrimvars(), attr_create_generic(), Attribute(), AttributeSet::copy(), GeometryManager::create_volume_mesh(), AttributeSet::find_matching(), mikk_compute_tangents(), name_standard(), AttributeSet::remove(), set_data_from(), SubdAttributeInterpolation::setup_attribute_type(), standard_name(), SubdAttributeInterpolation::support_interp_attribute(), and AttributeSet::update().
| int8_t Attribute::storage_type |
Definition at line 45 of file DNA_attribute_types.h.
Referenced by blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::blend_read(), and CustomData_blend_write_prepare().
| TypeDesc Attribute::type |
Definition at line 49 of file scene/attribute.h.
Referenced by AttributeSet::add(), AttributeTableBuilder::add(), Attribute(), AttributeSet::copy(), data_sizeof(), AttributeSet::find_matching(), get_uv_tiles(), kernel_type(), AttributeTableBuilder::reserve(), set(), set_data_from(), SubdAttributeInterpolation::setup_attribute(), AttributeSet::update(), and Mesh::update_tangents().