76 if (mpath ==
nullptr) {
98 if (mpath ==
nullptr) {
114 if (mpath_src ==
nullptr) {
118 mpath_dst = MEM_dupalloc(mpath_src);
128 mpath_dst->
runtime = MEM_new<bke::motionpath::Runtime>(__func__);
139 if (
ELEM(
nullptr, scene, ob)) {
161 "Motion path frame extents invalid for %s (%d to %d)%s",
175 if (*dst !=
nullptr) {
197 mpath = MEM_new<bMotionPath>(
"bMotionPath");
198 mpath->
runtime = MEM_new<bke::motionpath::Runtime>(__func__);
205 mpath->
length = expected_length;
222 mpath->
color[0] = 1.0;
223 mpath->
color[1] = 0.0;
224 mpath->
color[2] = 0.0;
234 mpath->
points = MEM_new_array<bMotionPathVert>(mpath->
length,
"bMotionPathVerts");
244 if (mpath ==
nullptr) {
256 if (mpath ==
nullptr) {
266 mpath->
runtime = MEM_new<bke::motionpath::Runtime>(__func__);
Object is a sort of wrapper for general info.
#define GPU_BATCH_DISCARD_SAFE(batch)
#define GPU_VERTBUF_DISCARD_SAFE(verts)
Read Blender memory allocation and freeing.
void settings_init(struct bAnimVizSettings *avs)
void blend_read_data(struct BlendDataReader *reader, struct bMotionPath *mpath)
void free_cache(struct bMotionPath *mpath)
struct bMotionPath * copy(const struct bMotionPath *mpath_src)
void clear_preview_location(bMotionPath &mpath)
void set_preview_location(bMotionPath &mpath, const float location[3])
void free(struct bMotionPath *mpath)
void blend_write(struct BlendWriter *writer, struct bMotionPath *mpath)
struct bMotionPath * ensure(struct ReportList *reports, struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
MINLINE void copy_v3_v3(float r[3], const float a[3])
@ MOTIONPATH_FLAG_BAKE_CAMERA
void BLO_read_array_and_validate_size(BlendDataReader *reader, T **ptr_p, SizeT *array_size, const int elems=1)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
@ MOTIONPATH_BAKE_CAMERA_SPACE
@ MOTIONPATH_BAKE_HAS_PATHS
void write_struct(const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
void write_struct_array(const int64_t array_size, const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
eMotionPath_BakeFlag path_bakeflag
eMotionPaths_ViewFlag path_viewflag
bke::motionpath::Runtime * runtime
gpu::VertBuf * points_vbo
gpu::Batch * batch_points
gpu::VertBuf * vbo_preview
float preview_location[3]
gpu::Batch * batch_preview