Blender
V3.3
|
#include <optional>
#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/foreach.h"
#include "util/hash.h"
#include "util/log.h"
Go to the source code of this file.
Functions | |
static float | shaperadius (float shape, float root, float tip, 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, int uv_num) |
static bool | ObtainCacheParticleVcol (Hair *hair, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int vcol_num) |
static void | ExportCurveSegments (Scene *scene, Hair *hair, ParticleCurveData *CData) |
static float4 | CurveSegmentMotionCV (ParticleCurveData *CData, int sys, int curve, int curvekey) |
static float4 | LerpCurveSegmentMotionCV (ParticleCurveData *CData, int sys, int curve, float step) |
static void | export_hair_motion_validate_attribute (Hair *hair, int motion_step, int num_motion_keys, bool have_motion) |
static void | ExportCurveSegmentsMotion (Hair *hair, ParticleCurveData *CData, int motion_step) |
static std::optional< BL::FloatAttribute > | find_curves_radius_attribute (BL::Curves b_curves) |
static BL::FloatVectorAttribute | find_curves_position_attribute (BL::Curves b_curves) |
template<typename TypeInCycles , typename GetValueAtIndex > | |
static void | fill_generic_attribute (BL::Curves &b_curves, TypeInCycles *data, const AttributeElement element, const GetValueAtIndex &get_value_at_index) |
static void | attr_create_motion (Hair *hair, BL::Attribute &b_attribute, const float motion_scale) |
static void | attr_create_uv (AttributeSet &attributes, BL::Curves &b_curves, BL::Attribute &b_attribute, const ustring name) |
static void | attr_create_generic (Scene *scene, Hair *hair, BL::Curves &b_curves, const bool need_motion, const float motion_scale) |
static float4 | hair_point_as_float4 (BL::FloatVectorAttribute b_attr_position, std::optional< BL::FloatAttribute > b_attr_radius, const int index) |
static float4 | interpolate_hair_points (BL::FloatVectorAttribute b_attr_position, std::optional< BL::FloatAttribute > b_attr_radius, const int first_point_index, const int num_points, const float step) |
static void | export_hair_curves (Scene *scene, Hair *hair, BL::Curves b_curves, const bool need_motion, const float motion_scale) |
static void | export_hair_curves_motion (Hair *hair, BL::Curves b_curves, int motion_step) |
|
static |
Definition at line 725 of file blender/curves.cpp.
References AttributeSet::add(), attr_create_motion(), attr_create_uv(), ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, ATTR_ELEMENT_NONE, ATTR_STD_UV, Attribute, Geometry::attributes, data, Attribute::data_float(), Attribute::data_float2(), Attribute::data_float3(), Attribute::data_float4(), element, fill_generic_attribute(), AttributeSet::find(), make_float2, make_float3, make_float4, Geometry::need_attribute(), scene, TypeFloat2(), TypeRGBA(), and v.
Referenced by export_hair_curves().
|
static |
Definition at line 680 of file blender/curves.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Attribute::data_float3(), AttributeSet::find(), get_float3(), and P().
Referenced by attr_create_generic().
|
static |
Definition at line 710 of file blender/curves.cpp.
References AttributeSet::add(), ATTR_ELEMENT_CURVE, ATTR_STD_UV, data, Attribute::data_float2(), fill_generic_attribute(), make_float2, and v.
Referenced by attr_create_generic().
|
static |
Definition at line 349 of file blender/curves.cpp.
References curve, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, float3_to_float4(), ParticleCurveData::psys_closetip, ParticleCurveData::psys_rootradius, ParticleCurveData::psys_shape, ParticleCurveData::psys_tipradius, shaperadius(), and time.
Referenced by ExportCurveSegmentsMotion(), and LerpCurveSegmentMotionCV().
|
static |
Definition at line 865 of file blender/curves.cpp.
References AttributeSet::add(), attr_create_generic(), ATTR_STD_CURVE_INTERCEPT, ATTR_STD_CURVE_LENGTH, ATTR_STD_CURVE_RANDOM, Geometry::attributes, Attribute::data_float(), find_curves_position_attribute(), find_curves_radius_attribute(), get_float3(), hash_uint2_to_float(), len, blender::math::length(), Geometry::need_attribute(), NULL, Hair::resize_curves(), scene, and zero_float3().
|
static |
Definition at line 956 of file blender/curves.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, curve, Attribute::data_float4(), export_hair_motion_validate_attribute(), AttributeSet::find(), find_curves_position_attribute(), find_curves_radius_attribute(), float3_to_float4(), Hair::get_curve(), hair_point_as_float4(), interpolate_hair_points(), Hair::num_curves(), Hair::num_keys(), and point_index.
|
static |
Definition at line 389 of file blender/curves.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Attribute::data_float4(), AttributeSet::find(), float3_to_float4(), AttributeSet::remove(), and VLOG_WORK.
Referenced by export_hair_curves_motion(), and ExportCurveSegmentsMotion().
|
static |
Definition at line 267 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, Geometry::attributes, Hair::clear(), curve, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, hash_uint2_to_float(), Geometry::need_attribute(), NULL, 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(), scene, shaperadius(), array< T, alignment >::size(), time, and VLOG_WARNING.
|
static |
Definition at line 418 of file blender/curves.cpp.
References AttributeSet::add(), ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, curve, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, CurveSegmentMotionCV(), Attribute::data_float4(), export_hair_motion_validate_attribute(), AttributeSet::find(), float3_to_float4(), len_squared(), LerpCurveSegmentMotionCV(), ParticleCurveData::psys_curvenum, ParticleCurveData::psys_firstcurve, and array< T, alignment >::size().
|
static |
Definition at line 653 of file blender/curves.cpp.
References ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, data, and element.
Referenced by attr_create_generic(), and attr_create_uv().
|
static |
Definition at line 633 of file blender/curves.cpp.
References Attribute.
Referenced by export_hair_curves(), and export_hair_curves_motion().
|
static |
Definition at line 616 of file blender/curves.cpp.
References Attribute.
Referenced by export_hair_curves(), and export_hair_curves_motion().
|
static |
Definition at line 841 of file blender/curves.cpp.
References float3_to_float4(), and get_float3().
Referenced by export_hair_curves_motion(), and interpolate_hair_points().
|
static |
Definition at line 850 of file blender/curves.cpp.
References blender::math::clamp(), float(), hair_point_as_float4(), lerp(), min, and t.
Referenced by export_hair_curves_motion().
|
static |
Definition at line 368 of file blender/curves.cpp.
References curve, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, CurveSegmentMotionCV(), floorf, and lerp().
Referenced by ExportCurveSegmentsMotion().
|
static |
Definition at line 48 of file blender/curves.cpp.
References blender::math::clamp(), ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, float(), 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 143 of file blender/curves.cpp.
References array< T, alignment >::clear(), ParticleCurveData::curve_uv, float(), l, array< T, alignment >::push_back_slow(), array< T, alignment >::reserve(), array< T, alignment >::size(), float2::x, and zero_float2().
|
static |
Definition at line 205 of file blender/curves.cpp.
References array< T, alignment >::clear(), ParticleCurveData::curve_vcol, float(), l, make_float4, array< T, alignment >::push_back_slow(), array< T, alignment >::reserve(), and array< T, alignment >::size().
Definition at line 31 of file blender/curves.cpp.
Referenced by CurveSegmentMotionCV(), and ExportCurveSegments().