|
Blender V5.3
|
#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 "DNA_meshdata_types.h"#include "DNA_modifier_types.h"#include "DNA_particle_types.h"#include "BLI_listbase.hh"#include "BLI_math_matrix_c.hh"#include "BLI_math_vector_c.hh"#include "BKE_attribute.hh"#include "BKE_curves.hh"#include "BKE_customdata.hh"#include "BKE_mesh_legacy_convert.hh"#include "BKE_particle.h"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Functions | |
| static float | shaperadius (const float shape, const float root, const float tip, const float time) |
| static bool | ObtainCacheParticleData (Hair *hair, const blender::Mesh *b_mesh, const blender::Object *b_ob, ParticleCurveData *CData, bool background) |
| static bool | ObtainCacheParticleUV (Hair *hair, const blender::Mesh *b_mesh, const blender::Object *b_ob, ParticleCurveData *CData, bool background, const int uv_num) |
| static bool | ObtainCacheParticleVcol (Hair *hair, const blender::Mesh *b_mesh, const blender::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) |
| static void | attr_create_motion_from_velocity (Hair *hair, const blender::Span< blender::float3 > src, const float motion_scale) |
| static AttributeElement | blender_domain_to_attr_element (const blender::bke::AttrDomain b_domain) |
| 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 bool | hair_topology_matches (const Hair *hair, const blender::bke::CurvesGeometry &b_curves) |
| static void | export_hair_curves_motion (Hair *hair, const blender::bke::CurvesGeometry &b_curves, const int motion_step) |
|
static |
Definition at line 767 of file blender/curves.cpp.
References AttributeSet::add(), attr_create_generic(), attr_create_motion_from_velocity(), ATTR_STD_UV, blender::bke::CurvesGeometry::attributes(), Geometry::attributes, blender::blender::Span< T >::cast(), blender::bke::Curve, Attribute::data_for_write(), blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, AttributeSet::find(), blender::bke::Float2, blender::bke::AttributeAccessor::foreach_attribute(), blender::bke::AttributeIter::get(), blender::bke::AttributeIter::name, Geometry::need_attribute(), blender::bke::Point, blender::bke::attribute_math::to_static_type(), blender::GVArrayCommon::type(), and blender::bke::GAttributeReader::varray.
Referenced by attr_create_generic(), and export_hair_curves().
|
static |
Definition at line 725 of file blender/curves.cpp.
References Attribute::add_motion(), attr_create_motion_from_velocity(), ATTR_STD_POSITION, Geometry::attributes, Attribute::data_for_write(), AttributeSet::find(), Geometry::get_position(), make_float3(), Hair::num_keys(), P, and step.
Referenced by attr_create_generic(), attr_create_motion_from_velocity(), attr_create_motion_from_velocity(), and copy_attributes().
|
static |
Definition at line 752 of file blender/curves.cpp.
References assert, ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, ATTR_ELEMENT_NONE, blender_domain_to_attr_element(), blender::bke::Curve, and blender::bke::Point.
Referenced by blender_domain_to_attr_element().
|
static |
Definition at line 857 of file blender/curves.cpp.
References curve_point_as_float4(), index, blender::Span< T >::is_empty(), make_float4, and float4::w.
Referenced by curve_point_as_float4(), export_hair_curves_motion(), and interpolate_curve_points().
|
static |
Definition at line 414 of file blender/curves.cpp.
References ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, CurveSegmentMotionCV(), make_float4, ParticleCurveData::psys_closetip, ParticleCurveData::psys_rootradius, ParticleCurveData::psys_shape, ParticleCurveData::psys_tipradius, shaperadius(), and float4::w.
Referenced by CurveSegmentMotionCV(), ExportCurveSegmentsMotion(), and LerpCurveSegmentMotionCV().
|
static |
Definition at line 882 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_POSITION, ATTR_STD_RADIUS, ATTR_STD_VERTEX_NORMAL, blender::bke::CurvesGeometry::attributes(), Geometry::attributes, blender::bke::curves_normals_point_domain_calc(), blender::offset_indices::OffsetIndices< T >::data(), Attribute::data_for_write(), blender::IndexRange::drop_front(), export_hair_curves(), blender::IndexRange::first(), Geometry::get_radius_for_write(), hash_uint2_to_float(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::Span< T >::index_range(), len(), length(), blender::bke::AttributeAccessor::lookup(), make_float3(), Geometry::need_attribute(), packed_normal::packed_normal(), 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(), sync_attribute_from_blender(), Geometry::tag_position_modified(), Geometry::tag_radius_modified(), and zero_float3().
Referenced by export_hair_curves().
|
static |
Definition at line 1009 of file blender/curves.cpp.
References Attribute::add_motion(), ATTR_STD_POSITION, ATTR_STD_RADIUS, blender::bke::CurvesGeometry::attributes(), Geometry::attributes, Hair::copy_center_to_motion_step(), curve_point_as_float4(), Attribute::data(), Attribute::data_for_write(), export_hair_curves_motion(), export_hair_motion_validate_attribute(), AttributeSet::find(), Hair::get_curve(), Geometry::get_position(), Geometry::get_radius(), hair_topology_matches(), Attribute::has_motion(), blender::IndexRange::index_range(), blender::offset_indices::OffsetIndices< T >::index_range(), interpolate_curve_points(), blender::bke::AttributeAccessor::lookup(), make_float3(), 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, sync_attribute_motion_step_from_blender(), and float4::w.
Referenced by export_hair_curves_motion().
|
static |
Definition at line 462 of file blender/curves.cpp.
References ATTR_STD_POSITION, ATTR_STD_RADIUS, Geometry::attributes, Attribute::data_for_write(), export_hair_motion_validate_attribute(), AttributeSet::find(), Geometry::get_position(), Geometry::get_radius(), LOG_DEBUG, Hair::num_keys(), Attribute::remove_motion(), and step.
Referenced by export_hair_curves_motion(), export_hair_motion_validate_attribute(), and ExportCurveSegmentsMotion().
|
static |
Definition at line 301 of file blender/curves.cpp.
References AttributeSet::add(), 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, Attribute::data_for_write(), ExportCurveSegments(), Geometry::get_position_for_write(), Geometry::get_radius_for_write(), hash_uint2_to_float(), LOG_ERROR, make_float3(), Geometry::need_attribute(), Hair::num_curves(), Hair::num_keys(), packed_normal::packed_normal(), ParticleCurveData::psys_closetip, ParticleCurveData::psys_curvenum, ParticleCurveData::psys_firstcurve, ParticleCurveData::psys_rootradius, ParticleCurveData::psys_shader, ParticleCurveData::psys_shape, ParticleCurveData::psys_tipradius, Hair::resize_curves(), shaperadius(), array< T, alignment >::size(), Geometry::tag_position_modified(), and Geometry::tag_radius_modified().
Referenced by ExportCurveSegments().
|
static |
Definition at line 492 of file blender/curves.cpp.
References Attribute::add_motion(), ATTR_STD_POSITION, ATTR_STD_RADIUS, Geometry::attributes, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, CurveSegmentMotionCV(), Attribute::data_for_write(), export_hair_motion_validate_attribute(), ExportCurveSegmentsMotion(), AttributeSet::find(), Geometry::get_position(), Geometry::get_radius(), Attribute::has_motion(), len_squared(), LerpCurveSegmentMotionCV(), make_float3(), make_float4, Hair::num_keys(), ParticleCurveData::psys_curvenum, ParticleCurveData::psys_firstcurve, array< T, alignment >::size(), size(), step, and float4::w.
Referenced by ExportCurveSegmentsMotion().
|
static |
Definition at line 993 of file blender/curves.cpp.
References Hair::get_curve(), hair_topology_matches(), blender::offset_indices::OffsetIndices< T >::index_range(), Hair::num_curves(), Hair::Curve::num_keys, Hair::num_keys(), blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::points_num(), blender::offset_indices::OffsetIndices< T >::size(), and size().
Referenced by export_hair_curves_motion(), and hair_topology_matches().
|
static |
Definition at line 867 of file blender/curves.cpp.
References clamp(), curve_point_as_float4(), float, interpolate_curve_points(), min, mix, and step.
Referenced by export_hair_curves_motion(), and interpolate_curve_points().
|
static |
Definition at line 438 of file blender/curves.cpp.
References assert, ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, CurveSegmentMotionCV(), floorf, LerpCurveSegmentMotionCV(), mix, and step.
Referenced by ExportCurveSegmentsMotion(), and LerpCurveSegmentMotionCV().
|
static |
Definition at line 66 of file blender/curves.cpp.
References blender::ParticleSettings::childtype, clamp(), ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, blender::ParticleSettings::disp, blender::ParticleSettings::draw_step, blender::eModifierMode_Realtime, blender::eModifierMode_Render, blender::eModifierType_ParticleSystem, blender::ParticleSettings::kink, blender::ParticleSettings::kink_extra_steps, len(), blender::ModifierData::mode, blender::Object::modifiers, ObtainCacheParticleData(), blender::ParticleSettings::omat, blender::ParticleSystem::part, blender::PART_DRAW_PATH, blender::PART_HAIR, blender::PART_KINK_SPIRAL, blender::PART_SHAPE_CLOSE_TIP, 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(), blender::ParticleSettings::rad_root, blender::ParticleSettings::rad_scale, blender::ParticleSettings::rad_tip, blender::ParticleSettings::ren_as, blender::ParticleSettings::ren_step, array< T, alignment >::reserve(), blender::ParticleSettings::shape, blender::ParticleSettings::shape_flag, array< T, alignment >::size(), blender::ParticleSystem::totchild, blender::ParticleSystem::totpart, transform_inverse(), transform_point(), blender::ModifierData::type, blender::ParticleSettings::type, float3::x, and zero_float3().
Referenced by ObtainCacheParticleData().
|
static |
Definition at line 171 of file blender/curves.cpp.
References blender::MutableSpan< T >::begin(), blender::ParticleSettings::childtype, array< T, alignment >::clear(), ParticleCurveData::curve_uv, blender::ParticleSettings::disp, blender::eModifierMode_Realtime, blender::eModifierMode_Render, blender::eModifierType_ParticleSystem, blender::MutableSpan< T >::end(), blender::ModifierData::mode, blender::Object::modifiers, ObtainCacheParticleUV(), blender::ParticleSystem::part, blender::PART_DRAW_PATH, blender::PART_HAIR, blender::ParticleSystem::particles, array< T, alignment >::push_back_slow(), blender::ParticleSettings::ren_as, array< T, alignment >::reserve(), array< T, alignment >::size(), blender::ParticleSystem::totchild, blender::ParticleSystem::totpart, blender::ModifierData::type, blender::ParticleSettings::type, float2::x, and zero_float2().
Referenced by ObtainCacheParticleUV().
|
static |
Definition at line 236 of file blender/curves.cpp.
References blender::MutableSpan< T >::begin(), blender::ParticleSettings::childtype, array< T, alignment >::clear(), ParticleCurveData::curve_vcol, blender::ParticleSettings::disp, blender::eModifierMode_Realtime, blender::eModifierMode_Render, blender::eModifierType_ParticleSystem, blender::MutableSpan< T >::end(), make_float4, blender::ModifierData::mode, blender::Object::modifiers, ObtainCacheParticleVcol(), blender::ParticleSystem::part, blender::PART_DRAW_PATH, blender::PART_HAIR, blender::ParticleSystem::particles, array< T, alignment >::push_back_slow(), blender::ParticleSettings::ren_as, array< T, alignment >::reserve(), array< T, alignment >::size(), blender::ParticleSystem::totchild, blender::ParticleSystem::totpart, blender::ModifierData::type, blender::ParticleSettings::type, and float4::x.
Referenced by ObtainCacheParticleVcol().
Definition at line 47 of file blender/curves.cpp.
References assert, powf, and shaperadius().
Referenced by CurveSegmentMotionCV(), ExportCurveSegments(), and shaperadius().