21 using Alembic::AbcGeom::OCompoundProperty;
22 using Alembic::AbcGeom::OCurves;
23 using Alembic::AbcGeom::OCurvesSchema;
24 using Alembic::AbcGeom::OInt16Property;
25 using Alembic::AbcGeom::ON3fGeomParam;
26 using Alembic::AbcGeom::OV2fGeomParam;
40 abc_curve_schema_ = abc_curve_.getSchema();
43 OCompoundProperty user_props = abc_curve_schema_.getUserProperties();
45 user_prop_resolu.set(cu->
resolu);
62 std::vector<Imath::V3f>
verts;
63 std::vector<int32_t> vert_counts;
64 std::vector<float> widths;
65 std::vector<float> weights;
66 std::vector<float> knots;
67 std::vector<uint8_t> orders;
70 Alembic::AbcGeom::BasisType curve_basis = Alembic::AbcGeom::kNoBasis;
72 Alembic::AbcGeom::CurvePeriodicity periodicity = Alembic::AbcGeom::kNonPeriodic;
75 for (; nurbs; nurbs = nurbs->
next) {
76 const size_t current_point_count =
verts.size();
78 curve_basis = Alembic::AbcGeom::kNoBasis;
79 curve_type = Alembic::AbcGeom::kVariableOrder;
81 const int totpoint = nurbs->
pntsu * nurbs->
pntsv;
85 for (
int i = 0; i < totpoint; i++,
point++) {
87 verts.push_back(temp_vert);
88 weights.push_back(
point->vec[3]);
89 widths.push_back(
point->radius);
92 else if (nurbs->
bezt) {
93 curve_basis = Alembic::AbcGeom::kBezierBasis;
94 curve_type = Alembic::AbcGeom::kCubic;
96 const int totpoint = nurbs->
pntsu;
101 for (
int i = 0; i < totpoint; i++, bezier++) {
103 verts.push_back(temp_vert);
104 widths.push_back(bezier->
radius);
109 periodicity = Alembic::AbcGeom::kNonPeriodic;
112 periodicity = Alembic::AbcGeom::kPeriodic;
118 for (
int i = 0; i < nurbs->
orderu; i++) {
123 if (nurbs->
knotsu !=
nullptr) {
124 const size_t num_knots =
KNOTSU(nurbs);
128 knots.resize(num_knots + 2);
130 for (
int i = 0; i < num_knots; i++) {
131 knots[i + 1] = nurbs->
knotsu[i];
135 knots[0] = nurbs->
knotsu[0];
136 knots[num_knots - 1] = nurbs->
knotsu[num_knots - 1];
139 knots[0] = (2.0f * nurbs->
knotsu[0] - nurbs->
knotsu[1]);
140 knots[num_knots - 1] = (2.0f * nurbs->
knotsu[num_knots - 1] -
141 nurbs->
knotsu[num_knots - 2]);
146 vert_counts.push_back(
verts.size() - current_point_count);
149 Alembic::AbcGeom::OFloatGeomParam::Sample width_sample;
150 width_sample.setVals(widths);
157 OV2fGeomParam::Sample(),
158 ON3fGeomParam::Sample(),
166 abc_curve_schema_.set(
sample);
177 if (mesh_eval !=
nullptr) {
struct Mesh * BKE_mesh_new_nomain_from_curve(const struct Object *ob)
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_evaluated_mesh(const struct Object *object)
#define CLOG_INFO(clg_ref, level,...)
Object is a sort of wrapper for general info.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
Alembic::Abc::OCompoundProperty abc_schema_prop_for_custom_props(T abc_schema)
uint32_t timesample_index_
Imath::Box3d bounding_box_
const ABCWriterConstructorArgs args_
virtual void update_bounding_box(Object *object)
virtual Mesh * get_export_mesh(Object *object_eval, bool &r_needsfree) override
ABCCurveMeshWriter(const ABCWriterConstructorArgs &args)
virtual Alembic::Abc::OObject get_alembic_object() const override
ABCCurveWriter(const ABCWriterConstructorArgs &args)
virtual void create_alembic_objects(const HierarchyContext *context) override
virtual void do_write(HierarchyContext &context) override
Alembic::Abc::OCompoundProperty abc_prop_for_custom_props() override
BLI_INLINE void copy_yup_from_zup(float yup[3], const float zup[3])
const std::string ABC_CURVE_RESOLUTION_U_PROPNAME
Alembic::Abc::OObject abc_parent