Blender  V3.3
BCAnimationCurve.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
4 #include "RNA_path.h"
5 
6 #include "BCAnimationCurve.h"
7 
9 {
11  this->fcurve = nullptr;
12  this->curve_is_local_copy = false;
13 }
14 
16 {
17  this->min = other.min;
18  this->max = other.max;
19  this->fcurve = other.fcurve;
20  this->curve_key = other.curve_key;
21  this->curve_is_local_copy = false;
22  this->id_ptr = other.id_ptr;
23 
24  /* The fcurve of the new instance is a copy and can be modified */
25 
27 }
28 
30 {
31  this->min = 0;
32  this->max = 0;
33  this->curve_key = key;
34  this->fcurve = fcu;
35  this->curve_is_local_copy = false;
36  init_pointer_rna(ob);
37 }
38 
40 {
41  this->curve_key = key;
42  this->fcurve = nullptr;
43  this->curve_is_local_copy = false;
44  init_pointer_rna(ob);
45 }
46 
47 void BCAnimationCurve::init_pointer_rna(Object *ob)
48 {
49  switch (this->curve_key.get_animation_type()) {
51  bArmature *arm = (bArmature *)ob->data;
52  RNA_id_pointer_create(&arm->id, &id_ptr);
53  } break;
55  RNA_id_pointer_create(&ob->id, &id_ptr);
56  } break;
58  Material *ma = BKE_object_material_get(ob, curve_key.get_subindex() + 1);
59  RNA_id_pointer_create(&ma->id, &id_ptr);
60  } break;
62  Camera *camera = (Camera *)ob->data;
63  RNA_id_pointer_create(&camera->id, &id_ptr);
64  } break;
66  Light *lamp = (Light *)ob->data;
67  RNA_id_pointer_create(&lamp->id, &id_ptr);
68  } break;
69  default:
70  fprintf(
71  stderr, "BC_animation_curve_type %d not supported", this->curve_key.get_array_index());
72  break;
73  }
74 }
75 
76 void BCAnimationCurve::delete_fcurve(FCurve *fcu)
77 {
78  BKE_fcurve_free(fcu);
79 }
80 
81 FCurve *BCAnimationCurve::create_fcurve(int array_index, const char *rna_path)
82 {
83  FCurve *fcu = BKE_fcurve_create();
85  fcu->rna_path = BLI_strdupn(rna_path, strlen(rna_path));
86  fcu->array_index = array_index;
87  return fcu;
88 }
89 
90 void BCAnimationCurve::create_bezt(float frame, float output)
91 {
92  FCurve *fcu = get_edit_fcurve();
93  BezTriple bez;
94  memset(&bez, 0, sizeof(BezTriple));
95  bez.vec[1][0] = frame;
96  bez.vec[1][1] = output;
97  bez.ipo = U.ipo_new; /* use default interpolation mode here... */
98  bez.f1 = bez.f2 = bez.f3 = SELECT;
99  bez.h1 = bez.h2 = HD_AUTO;
102 }
103 
105 {
106  if (curve_is_local_copy && fcurve) {
107  // fprintf(stderr, "removed fcurve %s\n", fcurve->rna_path);
108  delete_fcurve(fcurve);
109  this->fcurve = nullptr;
110  }
111 }
112 
114 {
115  return curve_key.get_animation_type() == type;
116 }
117 
119 {
120  const std::string path = curve_key.get_path();
121 
122  if (bc_startswith(path, "pose.bones")) {
123  return bc_string_after(path, "pose.bones");
124  }
125  return bc_string_after(path, ".");
126 }
127 
129 {
130  const std::string channel = get_channel_target();
131  return bc_string_after(channel, ".");
132 }
133 
135 {
136  const std::string channel = get_channel_target();
137  std::string pose_bone_name = bc_string_before(channel, ".");
138  if (pose_bone_name == channel) {
139  pose_bone_name = "";
140  }
141  else {
142  pose_bone_name = bc_string_after(pose_bone_name, "\"[");
143  pose_bone_name = bc_string_before(pose_bone_name, "]\"");
144  }
145  return pose_bone_name;
146 }
147 
149 {
150  std::string name;
151 
152  switch (curve_key.get_animation_type()) {
154  name = id_name(ob);
155  } break;
156 
157  case BC_ANIMATION_TYPE_BONE: {
158  if (fcurve == nullptr || fcurve->rna_path == nullptr) {
159  name = "";
160  }
161  else {
162  char boneName[MAXBONENAME];
163  if (BLI_str_quoted_substr(fcurve->rna_path, "pose.bones[", boneName, sizeof(boneName))) {
164  name = id_name(ob) + "_" + std::string(boneName);
165  }
166  else {
167  name = "";
168  }
169  }
170  } break;
171 
173  Camera *camera = (Camera *)ob->data;
174  name = id_name(ob) + "-" + id_name(camera) + "-camera";
175  } break;
176 
178  Light *lamp = (Light *)ob->data;
179  name = id_name(ob) + "-" + id_name(lamp) + "-light";
180  } break;
181 
183  Material *ma = BKE_object_material_get(ob, this->curve_key.get_subindex() + 1);
184  name = id_name(ob) + "-" + id_name(ma) + "-material";
185  } break;
186 
187  default: {
188  name = "";
189  }
190  }
191 
192  return name;
193 }
194 
196 {
197  return curve_key.get_array_index();
198 }
199 
201 {
202  return curve_key.get_subindex();
203 }
204 
206 {
207  return curve_key.get_path();
208 }
209 
211 {
212  if (fcurve == nullptr) {
213  return 0;
214  }
215  return fcurve->totvert;
216 }
217 
218 int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const
219 {
220  if (fcurve == nullptr) {
221  return -1;
222  }
223 
224  const int cframe = fcurve->bezt[start_at].vec[1][0]; /* inaccurate! */
225 
226  if (fabs(cframe - sample_frame) < 0.00001) {
227  return start_at;
228  }
229  return (fcurve->totvert > start_at + 1) ? start_at + 1 : start_at;
230 }
231 
232 int BCAnimationCurve::closest_index_below(const float sample_frame) const
233 {
234  if (fcurve == nullptr) {
235  return -1;
236  }
237 
238  float lower_frame = sample_frame;
239  float upper_frame = sample_frame;
240  int lower_index = 0;
241  int upper_index = 0;
242 
243  for (int fcu_index = 0; fcu_index < fcurve->totvert; fcu_index++) {
244  upper_index = fcu_index;
245 
246  const int cframe = fcurve->bezt[fcu_index].vec[1][0]; /* inaccurate! */
247  if (cframe <= sample_frame) {
248  lower_frame = cframe;
249  lower_index = fcu_index;
250  }
251  if (cframe >= sample_frame) {
252  upper_frame = cframe;
253  break;
254  }
255  }
256 
257  if (lower_index == upper_index) {
258  return lower_index;
259  }
260 
261  const float fraction = float(sample_frame - lower_frame) / (upper_frame - lower_frame);
262  return (fraction < 0.5) ? lower_index : upper_index;
263 }
264 
265 int BCAnimationCurve::get_interpolation_type(float sample_frame) const
266 {
267  const int index = closest_index_below(sample_frame);
268  if (index < 0) {
269  return BEZT_IPO_BEZ;
270  }
271  return fcurve->bezt[index].ipo;
272 }
273 
275 {
276  return fcurve;
277 }
278 
280 {
281  if (!curve_is_local_copy) {
282  const int index = curve_key.get_array_index();
283  const std::string &path = curve_key.get_path();
284  fcurve = create_fcurve(index, path.c_str());
285 
286  /* Caution here:
287  * Replacing the pointer here is OK only because the original value
288  * of FCurve was a const pointer into Blender territory. We do not
289  * touch that! We use the local copy to prepare data for export. */
290 
291  curve_is_local_copy = true;
292  }
293  return fcurve;
294 }
295 
297 {
298  if (fcurve == nullptr) {
299  fcurve = get_edit_fcurve();
300  }
301 
302  /* Keep old bezt data for copy). */
303  BezTriple *old_bezts = fcurve->bezt;
304  int totvert = fcurve->totvert;
305  fcurve->bezt = nullptr;
306  fcurve->totvert = 0;
307 
308  for (int i = 0; i < totvert; i++) {
309  BezTriple *bezt = &old_bezts[i];
310  float x = bezt->vec[1][0];
311  float y = bezt->vec[1][1];
313  BezTriple *lastb = fcurve->bezt + (fcurve->totvert - 1);
314  lastb->f1 = lastb->f2 = lastb->f3 = 0;
315  }
316 
317  /* now free the memory used by the old BezTriples */
318  if (old_bezts) {
319  MEM_freeN(old_bezts);
320  }
321 }
322 
324 {
325  std::string channel_type = this->get_channel_type();
326  return (is_rotation_curve() || channel_type == "scale" || channel_type == "location");
327 }
328 
330 {
331  std::string channel_type = this->get_channel_type();
332  return (channel_type == "rotation" || channel_type == "rotation_euler" ||
333  channel_type == "rotation_quaternion");
334 }
335 
336 float BCAnimationCurve::get_value(const float frame)
337 {
338  if (fcurve) {
339  return evaluate_fcurve(fcurve, frame);
340  }
341  return 0; /* TODO: handle case where neither sample nor fcu exist */
342 }
343 
344 void BCAnimationCurve::update_range(float val)
345 {
346  if (val < min) {
347  min = val;
348  }
349  if (val > max) {
350  max = val;
351  }
352 }
353 
354 void BCAnimationCurve::init_range(float val)
355 {
356  min = max = val;
357 }
358 
359 void BCAnimationCurve::adjust_range(const int frame_index)
360 {
361  if (fcurve && fcurve->totvert > 1) {
362  const float eval = evaluate_fcurve(fcurve, frame_index);
363 
364  int first_frame = fcurve->bezt[0].vec[1][0];
365  if (first_frame == frame_index) {
366  init_range(eval);
367  }
368  else {
369  update_range(eval);
370  }
371  }
372 }
373 
374 void BCAnimationCurve::add_value(const float val, const int frame_index)
375 {
376  FCurve *fcu = get_edit_fcurve();
377  fcu->auto_smoothing = U.auto_smoothing_new;
379 
380  if (fcu->totvert == 1) {
381  init_range(val);
382  }
383  else {
384  update_range(val);
385  }
386 }
387 
388 bool BCAnimationCurve::add_value_from_matrix(const BCSample &sample, const int frame_index)
389 {
390  int array_index = curve_key.get_array_index();
391 
392  /* transformation curves are fed directly from the transformation matrix
393  * to resolve parent inverse matrix issues with object hierarchies.
394  * Maybe this can be unified with the
395  */
396  const std::string channel_target = get_channel_target();
397  float val = 0;
398  /* Pick the value from the sample according to the definition of the FCurve */
399  bool good = sample.get_value(channel_target, array_index, &val);
400  if (good) {
401  add_value(val, frame_index);
402  }
403  return good;
404 }
405 
406 bool BCAnimationCurve::add_value_from_rna(const int frame_index)
407 {
408  PointerRNA ptr;
409  PropertyRNA *prop;
410  float value = 0.0f;
411  int array_index = curve_key.get_array_index();
412  const std::string full_path = curve_key.get_full_path();
413 
414  /* get property to read from, and get value as appropriate */
415  bool path_resolved = RNA_path_resolve_full(
416  &id_ptr, full_path.c_str(), &ptr, &prop, &array_index);
417  if (!path_resolved && array_index == 0) {
418  const std::string rna_path = curve_key.get_path();
419  path_resolved = RNA_path_resolve_full(&id_ptr, rna_path.c_str(), &ptr, &prop, &array_index);
420  }
421 
422  if (path_resolved) {
423  bool is_array = RNA_property_array_check(prop);
424  if (is_array) {
425  /* array */
426  if ((array_index >= 0) && (array_index < RNA_property_array_length(&ptr, prop))) {
427  switch (RNA_property_type(prop)) {
428  case PROP_BOOLEAN:
429  value = (float)RNA_property_boolean_get_index(&ptr, prop, array_index);
430  break;
431  case PROP_INT:
432  value = (float)RNA_property_int_get_index(&ptr, prop, array_index);
433  break;
434  case PROP_FLOAT:
435  value = RNA_property_float_get_index(&ptr, prop, array_index);
436  break;
437  default:
438  break;
439  }
440  }
441  else {
442  fprintf(stderr,
443  "Out of Bounds while reading data for Curve %s\n",
444  curve_key.get_full_path().c_str());
445  return false;
446  }
447  }
448  else {
449  /* not an array */
450  switch (RNA_property_type(prop)) {
451  case PROP_BOOLEAN:
452  value = (float)RNA_property_boolean_get(&ptr, prop);
453  break;
454  case PROP_INT:
455  value = (float)RNA_property_int_get(&ptr, prop);
456  break;
457  case PROP_FLOAT:
458  value = RNA_property_float_get(&ptr, prop);
459  break;
460  case PROP_ENUM:
461  value = (float)RNA_property_enum_get(&ptr, prop);
462  break;
463  default:
464  fprintf(stderr,
465  "property type %d not supported for Curve %s\n",
466  RNA_property_type(prop),
467  curve_key.get_full_path().c_str());
468  return false;
469  break;
470  }
471  }
472  }
473  else {
474  /* path couldn't be resolved */
475  fprintf(stderr, "Path not recognized for Curve %s\n", curve_key.get_full_path().c_str());
476  return false;
477  }
478 
479  add_value(value, frame_index);
480  return true;
481 }
482 
484 {
485  value_map.clear();
486  if (fcurve == nullptr) {
487  return;
488  }
489 
490  for (int i = 0; i < fcurve->totvert; i++) {
491  const float frame = fcurve->bezt[i].vec[1][0];
492  const float val = fcurve->bezt[i].vec[1][1];
493  value_map[frame] = val;
494  }
495 }
496 
498 {
499  frames.clear();
500  if (fcurve) {
501  for (int i = 0; i < fcurve->totvert; i++) {
502  const float val = fcurve->bezt[i].vec[1][0];
503  frames.push_back(val);
504  }
505  }
506 }
507 
509 {
510  values.clear();
511  if (fcurve) {
512  for (int i = 0; i < fcurve->totvert; i++) {
513  const float val = fcurve->bezt[i].vec[1][1];
514  values.push_back(val);
515  }
516  }
517 }
518 
520 {
521  static float MIN_DISTANCE = 0.00001;
522  return fabs(max - min) > MIN_DISTANCE;
523 }
524 
526 {
527  if (this->fcurve == nullptr) {
528  return false;
529  }
530 
531  for (int i = 0; i < fcurve->totvert; i++) {
532  const int cframe = nearbyint(fcurve->bezt[i].vec[1][0]);
533  if (cframe == frame) {
534  return true;
535  }
536  if (cframe > frame) {
537  break;
538  }
539  }
540  return false;
541 }
542 
543 /* Needed for adding a BCAnimationCurve into a BCAnimationCurveSet */
544 inline bool operator<(const BCAnimationCurve &lhs, const BCAnimationCurve &rhs)
545 {
546  std::string lhtgt = lhs.get_channel_target();
547  std::string rhtgt = rhs.get_channel_target();
548  if (lhtgt == rhtgt) {
549  const int lha = lhs.get_channel_index();
550  const int rha = rhs.get_channel_index();
551  return lha < rha;
552  }
553 
554  return lhtgt < rhtgt;
555 }
556 
558 {
559  this->key_type = BC_ANIMATION_TYPE_OBJECT;
560  this->rna_path = "";
561  this->curve_array_index = 0;
562  this->curve_subindex = -1;
563 }
564 
566  const std::string path,
567  const int array_index,
568  const int subindex)
569 {
570  this->key_type = type;
571  this->rna_path = path;
572  this->curve_array_index = array_index;
573  this->curve_subindex = subindex;
574 }
575 
577 {
578  this->key_type = other.key_type;
579  this->rna_path = other.rna_path;
580  this->curve_array_index = other.curve_array_index;
581  this->curve_subindex = other.curve_subindex;
582 }
583 
584 std::string BCCurveKey::get_full_path() const
585 {
586  return this->rna_path + '[' + std::to_string(this->curve_array_index) + ']';
587 }
588 
589 std::string BCCurveKey::get_path() const
590 {
591  return this->rna_path;
592 }
593 
595 {
596  return this->curve_array_index;
597 }
598 
600 {
601  return this->curve_subindex;
602 }
603 
605 {
606  this->key_type = object_type;
607 }
608 
610 {
611  return this->key_type;
612 }
613 
614 bool BCCurveKey::operator<(const BCCurveKey &other) const
615 {
616  /* needed for using this class as key in maps and sets */
617  if (this->key_type != other.key_type) {
618  return this->key_type < other.key_type;
619  }
620 
621  if (this->curve_subindex != other.curve_subindex) {
622  return this->curve_subindex < other.curve_subindex;
623  }
624 
625  if (this->rna_path != other.rna_path) {
626  return this->rna_path < other.rna_path;
627  }
628 
629  return this->curve_array_index < other.curve_array_index;
630 }
631 
633 {
634 }
635 
637 {
638  return bezt.vec[1][0];
639 }
640 
642 {
643  return FRA2TIME(bezt.vec[1][0]);
644 }
645 
647 {
648  return bezt.vec[1][1];
649 }
650 
652 {
653  return RAD2DEGF(get_value());
654 }
655 
656 void BCBezTriple::get_in_tangent(Scene *scene, float point[2], bool as_angle) const
657 {
658  get_tangent(scene, point, as_angle, 0);
659 }
660 
661 void BCBezTriple::get_out_tangent(Scene *scene, float point[2], bool as_angle) const
662 {
663  get_tangent(scene, point, as_angle, 2);
664 }
665 
666 void BCBezTriple::get_tangent(Scene *scene, float point[2], bool as_angle, int index) const
667 {
668  point[0] = FRA2TIME(bezt.vec[index][0]);
669  if (bezt.ipo != BEZT_IPO_BEZ) {
670  /* We're in a mixed interpolation scenario, set zero as it's irrelevant but value might contain
671  * unused data */
672  point[0] = 0;
673  point[1] = 0;
674  }
675  else if (as_angle) {
676  point[1] = RAD2DEGF(bezt.vec[index][1]);
677  }
678  else {
679  point[1] = bezt.vec[index][1];
680  }
681 }
bool operator<(const BCAnimationCurve &lhs, const BCAnimationCurve &rhs)
std::vector< float > BCValues
typedef float(TangentPoint)[2]
std::map< int, float > BCValueMap
BC_animation_type
@ BC_ANIMATION_TYPE_MATERIAL
@ BC_ANIMATION_TYPE_LIGHT
@ BC_ANIMATION_TYPE_OBJECT
@ BC_ANIMATION_TYPE_BONE
@ BC_ANIMATION_TYPE_CAMERA
std::vector< float > BCFrames
float evaluate_fcurve(struct FCurve *fcu, float evaltime)
Definition: fcurve.c:2135
void BKE_fcurve_free(struct FCurve *fcu)
Definition: fcurve.c:65
void BKE_fcurve_handles_recalc(struct FCurve *fcu)
Definition: fcurve.c:1303
struct FCurve * BKE_fcurve_create(void)
Definition: fcurve.c:53
struct Material * BKE_object_material_get(struct Object *ob, short act)
Definition: material.c:687
#define RAD2DEGF(_rad)
bool bool BLI_str_quoted_substr(const char *__restrict str, const char *__restrict prefix, char *result, size_t result_maxlen)
Definition: string.c:424
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: string.c:33
@ INSERTKEY_NOFLAGS
@ FCURVE_SELECTED
@ FCURVE_VISIBLE
#define MAXBONENAME
@ HD_AUTO
@ BEZT_IPO_BEZ
eBezTriple_KeyframeType
@ BEZT_KEYTYPE_KEYFRAME
#define FRA2TIME(a)
#define BEZKEYTYPE(bezt)
Definition: ED_anim_api.h:969
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
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
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 or normal between camera
@ PROP_FLOAT
Definition: RNA_types.h:61
@ PROP_BOOLEAN
Definition: RNA_types.h:59
@ PROP_ENUM
Definition: RNA_types.h:63
@ PROP_INT
Definition: RNA_types.h:60
unsigned int U
Definition: btGjkEpa3.h:78
std::string get_rna_path() const
FCurve * get_edit_fcurve()
FCurve * get_fcurve() const
float get_value(float frame)
void get_values(BCValues &values) const
void add_value(float val, int frame)
bool add_value_from_matrix(const BCSample &sample, int frame)
std::string get_channel_type() const
void adjust_range(int frame)
bool is_rotation_curve() const
void get_value_map(BCValueMap &value_map)
bool is_keyframe(int frame)
int get_interpolation_type(float sample_frame) const
bool is_of_animation_type(BC_animation_type type) const
int closest_index_below(float sample_frame) const
void get_frames(BCFrames &frames) const
int closest_index_above(float sample_frame, int start_at) const
bool is_transform_curve() const
std::string get_channel_posebone() const
int get_subindex() const
bool add_value_from_rna(int frame)
int sample_count() const
std::string get_channel_target() const
int get_channel_index() const
std::string get_animation_name(Object *ob) const
void get_tangent(Scene *scene, float point[2], bool as_angle, int index) const
float get_frame() const
BezTriple & bezt
BCBezTriple(BezTriple &bezt)
float get_time(Scene *scene) const
void get_out_tangent(Scene *scene, float point[2], bool as_angle) const
void get_in_tangent(Scene *scene, float point[2], bool as_angle) const
float get_value() const
float get_angle() const
std::string get_path() const
int get_subindex() const
std::string get_full_path() const
void set_object_type(BC_animation_type object_type)
int get_array_index() const
void operator=(const BCCurveKey &other)
BC_animation_type get_animation_type() const
bool operator<(const BCCurveKey &other) const
std::string id_name(void *id)
std::string bc_string_after(const std::string &s, const std::string probe)
std::string bc_string_before(const std::string &s, const std::string probe)
bool bc_startswith(std::string const &value, std::string const &starting)
#define SELECT
Scene scene
Light lamp
ccl_global KernelShaderEvalInput ccl_global float * output
int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType keyframe_type, eInsertKeyFlags flag)
Main Key-framing API call.
Definition: keyframing.c:545
int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
Definition: keyframing.c:410
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
ccl_device_inline float2 fabs(const float2 &a)
Definition: math_float2.h:222
std::string to_string(const T &n)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2767
bool RNA_property_array_check(PropertyRNA *prop)
Definition: rna_access.c:1080
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
Definition: rna_access.c:112
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_access.c:2581
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_access.c:2954
PropertyType RNA_property_type(PropertyRNA *prop)
Definition: rna_access.c:1010
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2153
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2429
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:1075
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:3402
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_access.c:2275
bool RNA_path_resolve_full(const PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
Definition: rna_path.cc:515
uint8_t h1
uint8_t f3
float vec[3][3]
uint8_t f1
uint8_t f2
uint8_t h2
char * rna_path
BezTriple * bezt
int array_index
short flag
unsigned int totvert
char auto_smoothing
void * data
PointerRNA * ptr
Definition: wm_files.c:3480