|
Blender V5.0
|
#include <optional>#include "blender/attribute_convert.h"#include "blender/sync.h"#include "blender/util.h"#include "scene/attribute.h"#include "scene/camera.h"#include "scene/curves.h"#include "scene/hair.h"#include "scene/object.h"#include "scene/scene.h"#include "util/color.h"#include "util/hash.h"#include "util/log.h"#include "BKE_attribute.hh"#include "BKE_curves.hh"Go to the source code of this file.
Functions | |
| static float | shaperadius (const float shape, const float root, const float tip, const float time) |
| static bool | ObtainCacheParticleData (Hair *hair, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background) |
| static bool | ObtainCacheParticleUV (Hair *hair, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, const int uv_num) |
| static bool | ObtainCacheParticleVcol (Hair *hair, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, const int vcol_num) |
| static void | ExportCurveSegments (Scene *scene, Hair *hair, ParticleCurveData *CData) |
| static float4 | CurveSegmentMotionCV (ParticleCurveData *CData, const int sys, const int curve, const int curvekey) |
| static float4 | LerpCurveSegmentMotionCV (ParticleCurveData *CData, const int sys, const int curve, const float step) |
| static void | export_hair_motion_validate_attribute (Hair *hair, const int motion_step, const int num_motion_keys, bool have_motion) |
| static void | ExportCurveSegmentsMotion (Hair *hair, ParticleCurveData *CData, const int motion_step) |
| template<typename TypeInCycles, typename GetValueAtIndex> | |
| static void | fill_generic_attribute (const int num_curves, const int num_points, TypeInCycles *data, const AttributeElement element, const GetValueAtIndex &get_value_at_index) |
| static void | attr_create_motion_from_velocity (Hair *hair, const blender::Span< blender::float3 > src, const float motion_scale) |
| static void | attr_create_generic (Scene *scene, Hair *hair, const blender::bke::CurvesGeometry &b_curves, const bool need_motion, const float motion_scale) |
| static float4 | curve_point_as_float4 (const blender::Span< blender::float3 > b_positions, const blender::Span< float > b_radius, const int index) |
| static float4 | interpolate_curve_points (const blender::Span< blender::float3 > b_positions, const blender::Span< float > b_radius, const int first_point_index, const int num_points, const float step) |
| static void | export_hair_curves (Scene *scene, Hair *hair, const blender::bke::CurvesGeometry &b_curves, const bool need_motion, const float motion_scale) |
| static void | export_hair_curves_motion (Hair *hair, const blender::bke::CurvesGeometry &b_curves, const int motion_step) |
|
static |
Definition at line 738 of file blender/curves.cpp.
References AttributeSet::add(), attr_create_motion_from_velocity(), ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, ATTR_ELEMENT_NONE, ATTR_STD_UV, blender::bke::CurvesGeometry::attributes(), Geometry::attributes, blender::Span< T >::cast(), blender::bke::attribute_math::convert_to_static_type(), blender::bke::Curve, Attribute::data_float2(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::GAttributeReader::domain, element, AttributeSet::find(), blender::bke::Float2, blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::bke::AttributeIter::name, name, Geometry::need_attribute(), blender::bke::Point, blender::GVArrayCommon::type(), and blender::bke::GAttributeReader::varray.
Referenced by export_hair_curves().
|
static |
Definition at line 709 of file blender/curves.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Attribute::data_float3(), AttributeSet::find(), i, make_float3(), P, and step.
Referenced by attr_create_generic().
|
static |
Definition at line 817 of file blender/curves.cpp.
References blender::Span< T >::is_empty(), make_float4, and float4::w.
Referenced by export_hair_curves_motion(), and interpolate_curve_points().
|
static |
Definition at line 394 of file blender/curves.cpp.
References ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, make_float4, ParticleCurveData::psys_closetip, ParticleCurveData::psys_rootradius, ParticleCurveData::psys_shape, ParticleCurveData::psys_tipradius, shaperadius(), and float4::w.
Referenced by ExportCurveSegmentsMotion(), and LerpCurveSegmentMotionCV().
|
static |
Definition at line 842 of file blender/curves.cpp.
References AttributeSet::add(), attr_create_generic(), ATTR_STD_CURVE_INTERCEPT, ATTR_STD_CURVE_LENGTH, ATTR_STD_CURVE_RANDOM, ATTR_STD_VERTEX_NORMAL, blender::bke::CurvesGeometry::attributes(), Geometry::attributes, blender::bke::curves_normals_point_domain_calc(), blender::offset_indices::OffsetIndices< T >::data(), blender::Span< T >::data(), Attribute::data_float(), Attribute::data_float3(), blender::IndexRange::drop_front(), blender::IndexRange::first(), hash_uint2_to_float(), i, blender::offset_indices::OffsetIndices< T >::index_range(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), len, length(), blender::bke::AttributeAccessor::lookup(), make_float3(), Geometry::need_attribute(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), Hair::resize_curves(), blender::offset_indices::OffsetIndices< T >::size(), blender::Span< T >::size(), and zero_float3().
|
static |
Definition at line 941 of file blender/curves.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, blender::bke::CurvesGeometry::attributes(), Geometry::attributes, curve_point_as_float4(), Attribute::data_float4(), export_hair_motion_validate_attribute(), AttributeSet::find(), Hair::get_curve(), i, blender::IndexRange::index_range(), blender::offset_indices::OffsetIndices< T >::index_range(), interpolate_curve_points(), blender::bke::AttributeAccessor::lookup(), make_float4, Hair::num_curves(), Hair::Curve::num_keys, Hair::num_keys(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions(), blender::IndexRange::size(), blender::IndexRange::start(), step, and float4::w.
|
static |
Definition at line 442 of file blender/curves.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Attribute::data_float4(), AttributeSet::find(), LOG_DEBUG, make_float4, AttributeSet::remove(), step, and float4::w.
Referenced by export_hair_curves_motion(), and ExportCurveSegmentsMotion().
|
static |
Definition at line 293 of file blender/curves.cpp.
References Attribute::add(), AttributeSet::add(), Hair::add_curve(), Hair::add_curve_key(), ATTR_STD_CURVE_INTERCEPT, ATTR_STD_CURVE_LENGTH, ATTR_STD_CURVE_RANDOM, ATTR_STD_VERTEX_NORMAL, Geometry::attributes, Hair::clear(), ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, hash_uint2_to_float(), LOG_ERROR, make_float3(), Geometry::need_attribute(), Hair::num_curves(), ParticleCurveData::psys_closetip, ParticleCurveData::psys_curvenum, ParticleCurveData::psys_firstcurve, ParticleCurveData::psys_rootradius, ParticleCurveData::psys_shader, ParticleCurveData::psys_shape, ParticleCurveData::psys_tipradius, Hair::reserve_curves(), shaperadius(), and array< T, alignment >::size().
|
static |
Definition at line 471 of file blender/curves.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, CurveSegmentMotionCV(), Attribute::data_float4(), export_hair_motion_validate_attribute(), AttributeSet::find(), i, len_squared(), LerpCurveSegmentMotionCV(), make_float4, ParticleCurveData::psys_curvenum, ParticleCurveData::psys_firstcurve, array< T, alignment >::size(), size(), step, and float4::w.
|
static |
Definition at line 683 of file blender/curves.cpp.
References assert, ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, data, element, and i.
|
static |
Definition at line 827 of file blender/curves.cpp.
References clamp(), curve_point_as_float4(), float, min, mix, and step.
Referenced by export_hair_curves_motion().
|
static |
Definition at line 418 of file blender/curves.cpp.
References assert, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, CurveSegmentMotionCV(), floorf, mix, and step.
Referenced by ExportCurveSegmentsMotion().
|
static |
Definition at line 51 of file blender/curves.cpp.
References clamp(), ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, get_transform(), len, ParticleCurveData::psys_closetip, ParticleCurveData::psys_curvenum, ParticleCurveData::psys_firstcurve, ParticleCurveData::psys_rootradius, ParticleCurveData::psys_shader, ParticleCurveData::psys_shape, ParticleCurveData::psys_tipradius, array< T, alignment >::push_back_slow(), array< T, alignment >::reserve(), array< T, alignment >::size(), transform_inverse(), transform_point(), float3::x, and zero_float3().
|
static |
Definition at line 153 of file blender/curves.cpp.
References array< T, alignment >::clear(), ParticleCurveData::curve_uv, l, array< T, alignment >::push_back_slow(), array< T, alignment >::reserve(), array< T, alignment >::size(), float2::x, and zero_float2().
|
static |
Definition at line 223 of file blender/curves.cpp.
References array< T, alignment >::clear(), ParticleCurveData::curve_vcol, l, make_float4, array< T, alignment >::push_back_slow(), array< T, alignment >::reserve(), array< T, alignment >::size(), and float4::x.
Definition at line 32 of file blender/curves.cpp.
Referenced by CurveSegmentMotionCV(), and ExportCurveSegments().