Blender  V2.93
BCAnimationCurve.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #include "BCAnimationCurve.h"
21 
23 {
25  this->fcurve = nullptr;
26  this->curve_is_local_copy = false;
27 }
28 
30 {
31  this->min = other.min;
32  this->max = other.max;
33  this->fcurve = other.fcurve;
34  this->curve_key = other.curve_key;
35  this->curve_is_local_copy = false;
36  this->id_ptr = other.id_ptr;
37 
38  /* The fcurve of the new instance is a copy and can be modified */
39 
41 }
42 
44 {
45  this->min = 0;
46  this->max = 0;
47  this->curve_key = key;
48  this->fcurve = fcu;
49  this->curve_is_local_copy = false;
50  init_pointer_rna(ob);
51 }
52 
54 {
55  this->curve_key = key;
56  this->fcurve = nullptr;
57  this->curve_is_local_copy = false;
58  init_pointer_rna(ob);
59 }
60 
61 void BCAnimationCurve::init_pointer_rna(Object *ob)
62 {
63  switch (this->curve_key.get_animation_type()) {
65  bArmature *arm = (bArmature *)ob->data;
66  RNA_id_pointer_create(&arm->id, &id_ptr);
67  } break;
69  RNA_id_pointer_create(&ob->id, &id_ptr);
70  } break;
72  Material *ma = BKE_object_material_get(ob, curve_key.get_subindex() + 1);
73  RNA_id_pointer_create(&ma->id, &id_ptr);
74  } break;
76  Camera *camera = (Camera *)ob->data;
77  RNA_id_pointer_create(&camera->id, &id_ptr);
78  } break;
80  Light *lamp = (Light *)ob->data;
81  RNA_id_pointer_create(&lamp->id, &id_ptr);
82  } break;
83  default:
84  fprintf(
85  stderr, "BC_animation_curve_type %d not supported", this->curve_key.get_array_index());
86  break;
87  }
88 }
89 
90 void BCAnimationCurve::delete_fcurve(FCurve *fcu)
91 {
92  BKE_fcurve_free(fcu);
93 }
94 
95 FCurve *BCAnimationCurve::create_fcurve(int array_index, const char *rna_path)
96 {
97  FCurve *fcu = BKE_fcurve_create();
99  fcu->rna_path = BLI_strdupn(rna_path, strlen(rna_path));
100  fcu->array_index = array_index;
101  return fcu;
102 }
103 
104 void BCAnimationCurve::create_bezt(float frame, float output)
105 {
106  FCurve *fcu = get_edit_fcurve();
107  BezTriple bez;
108  memset(&bez, 0, sizeof(BezTriple));
109  bez.vec[1][0] = frame;
110  bez.vec[1][1] = output;
111  bez.ipo = U.ipo_new; /* use default interpolation mode here... */
112  bez.f1 = bez.f2 = bez.f3 = SELECT;
113  bez.h1 = bez.h2 = HD_AUTO;
115  calchandles_fcurve(fcu);
116 }
117 
119 {
120  if (curve_is_local_copy && fcurve) {
121  // fprintf(stderr, "removed fcurve %s\n", fcurve->rna_path);
122  delete_fcurve(fcurve);
123  this->fcurve = nullptr;
124  }
125 }
126 
128 {
129  return curve_key.get_animation_type() == type;
130 }
131 
133 {
134  const std::string path = curve_key.get_path();
135 
136  if (bc_startswith(path, "pose.bones")) {
137  return bc_string_after(path, "pose.bones");
138  }
139  return bc_string_after(path, ".");
140 }
141 
143 {
144  const std::string channel = get_channel_target();
145  return bc_string_after(channel, ".");
146 }
147 
149 {
150  const std::string channel = get_channel_target();
151  std::string pose_bone_name = bc_string_before(channel, ".");
152  if (pose_bone_name == channel) {
153  pose_bone_name = "";
154  }
155  else {
156  pose_bone_name = bc_string_after(pose_bone_name, "\"[");
157  pose_bone_name = bc_string_before(pose_bone_name, "]\"");
158  }
159  return pose_bone_name;
160 }
161 
163 {
164  std::string name;
165 
166  switch (curve_key.get_animation_type()) {
168  name = id_name(ob);
169  } break;
170 
171  case BC_ANIMATION_TYPE_BONE: {
172  if (fcurve == nullptr || fcurve->rna_path == nullptr) {
173  name = "";
174  }
175  else {
176  char *boneName = BLI_str_quoted_substrN(fcurve->rna_path, "pose.bones[");
177  if (boneName) {
178  name = id_name(ob) + "_" + std::string(boneName);
179  MEM_freeN(boneName);
180  }
181  else {
182  name = "";
183  }
184  }
185  } break;
186 
188  Camera *camera = (Camera *)ob->data;
189  name = id_name(ob) + "-" + id_name(camera) + "-camera";
190  } break;
191 
193  Light *lamp = (Light *)ob->data;
194  name = id_name(ob) + "-" + id_name(lamp) + "-light";
195  } break;
196 
198  Material *ma = BKE_object_material_get(ob, this->curve_key.get_subindex() + 1);
199  name = id_name(ob) + "-" + id_name(ma) + "-material";
200  } break;
201 
202  default: {
203  name = "";
204  }
205  }
206 
207  return name;
208 }
209 
211 {
212  return curve_key.get_array_index();
213 }
214 
216 {
217  return curve_key.get_subindex();
218 }
219 
221 {
222  return curve_key.get_path();
223 }
224 
226 {
227  if (fcurve == nullptr) {
228  return 0;
229  }
230  return fcurve->totvert;
231 }
232 
233 int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const
234 {
235  if (fcurve == nullptr) {
236  return -1;
237  }
238 
239  const int cframe = fcurve->bezt[start_at].vec[1][0]; /* inaccurate! */
240 
241  if (fabs(cframe - sample_frame) < 0.00001) {
242  return start_at;
243  }
244  return (fcurve->totvert > start_at + 1) ? start_at + 1 : start_at;
245 }
246 
247 int BCAnimationCurve::closest_index_below(const float sample_frame) const
248 {
249  if (fcurve == nullptr) {
250  return -1;
251  }
252 
253  float lower_frame = sample_frame;
254  float upper_frame = sample_frame;
255  int lower_index = 0;
256  int upper_index = 0;
257 
258  for (int fcu_index = 0; fcu_index < fcurve->totvert; fcu_index++) {
259  upper_index = fcu_index;
260 
261  const int cframe = fcurve->bezt[fcu_index].vec[1][0]; /* inaccurate! */
262  if (cframe <= sample_frame) {
263  lower_frame = cframe;
264  lower_index = fcu_index;
265  }
266  if (cframe >= sample_frame) {
267  upper_frame = cframe;
268  break;
269  }
270  }
271 
272  if (lower_index == upper_index) {
273  return lower_index;
274  }
275 
276  const float fraction = float(sample_frame - lower_frame) / (upper_frame - lower_frame);
277  return (fraction < 0.5) ? lower_index : upper_index;
278 }
279 
280 int BCAnimationCurve::get_interpolation_type(float sample_frame) const
281 {
282  const int index = closest_index_below(sample_frame);
283  if (index < 0) {
284  return BEZT_IPO_BEZ;
285  }
286  return fcurve->bezt[index].ipo;
287 }
288 
290 {
291  return fcurve;
292 }
293 
295 {
296  if (!curve_is_local_copy) {
297  const int index = curve_key.get_array_index();
298  const std::string &path = curve_key.get_path();
299  fcurve = create_fcurve(index, path.c_str());
300 
301  /* Caution here:
302  * Replacing the pointer here is OK only because the original value
303  * of FCurve was a const pointer into Blender territory. We do not
304  * touch that! We use the local copy to prepare data for export. */
305 
306  curve_is_local_copy = true;
307  }
308  return fcurve;
309 }
310 
312 {
313  if (fcurve == nullptr) {
314  fcurve = get_edit_fcurve();
315  }
316 
317  /* Keep old bezt data for copy)*/
318  BezTriple *old_bezts = fcurve->bezt;
319  int totvert = fcurve->totvert;
320  fcurve->bezt = nullptr;
321  fcurve->totvert = 0;
322 
323  for (int i = 0; i < totvert; i++) {
324  BezTriple *bezt = &old_bezts[i];
325  float x = bezt->vec[1][0];
326  float y = bezt->vec[1][1];
328  BezTriple *lastb = fcurve->bezt + (fcurve->totvert - 1);
329  lastb->f1 = lastb->f2 = lastb->f3 = 0;
330  }
331 
332  /* now free the memory used by the old BezTriples */
333  if (old_bezts) {
334  MEM_freeN(old_bezts);
335  }
336 }
337 
339 {
340  std::string channel_type = this->get_channel_type();
341  return (is_rotation_curve() || channel_type == "scale" || channel_type == "location");
342 }
343 
345 {
346  std::string channel_type = this->get_channel_type();
347  return (channel_type == "rotation" || channel_type == "rotation_euler" ||
348  channel_type == "rotation_quaternion");
349 }
350 
351 float BCAnimationCurve::get_value(const float frame)
352 {
353  if (fcurve) {
354  return evaluate_fcurve(fcurve, frame);
355  }
356  return 0; /* TODO: handle case where neither sample nor fcu exist */
357 }
358 
359 void BCAnimationCurve::update_range(float val)
360 {
361  if (val < min) {
362  min = val;
363  }
364  if (val > max) {
365  max = val;
366  }
367 }
368 
369 void BCAnimationCurve::init_range(float val)
370 {
371  min = max = val;
372 }
373 
374 void BCAnimationCurve::adjust_range(const int frame_index)
375 {
376  if (fcurve && fcurve->totvert > 1) {
377  const float eval = evaluate_fcurve(fcurve, frame_index);
378 
379  int first_frame = fcurve->bezt[0].vec[1][0];
380  if (first_frame == frame_index) {
381  init_range(eval);
382  }
383  else {
384  update_range(eval);
385  }
386  }
387 }
388 
389 void BCAnimationCurve::add_value(const float val, const int frame_index)
390 {
391  FCurve *fcu = get_edit_fcurve();
392  fcu->auto_smoothing = U.auto_smoothing_new;
394 
395  if (fcu->totvert == 1) {
396  init_range(val);
397  }
398  else {
399  update_range(val);
400  }
401 }
402 
403 bool BCAnimationCurve::add_value_from_matrix(const BCSample &sample, const int frame_index)
404 {
405  int array_index = curve_key.get_array_index();
406 
407  /* transformation curves are fed directly from the transformation matrix
408  * to resolve parent inverse matrix issues with object hierarchies.
409  * Maybe this can be unified with the
410  */
411  const std::string channel_target = get_channel_target();
412  float val = 0;
413  /* Pick the value from the sample according to the definition of the FCurve */
414  bool good = sample.get_value(channel_target, array_index, &val);
415  if (good) {
416  add_value(val, frame_index);
417  }
418  return good;
419 }
420 
421 bool BCAnimationCurve::add_value_from_rna(const int frame_index)
422 {
423  PointerRNA ptr;
424  PropertyRNA *prop;
425  float value = 0.0f;
426  int array_index = curve_key.get_array_index();
427  const std::string full_path = curve_key.get_full_path();
428 
429  /* get property to read from, and get value as appropriate */
430  bool path_resolved = RNA_path_resolve_full(
431  &id_ptr, full_path.c_str(), &ptr, &prop, &array_index);
432  if (!path_resolved && array_index == 0) {
433  const std::string rna_path = curve_key.get_path();
434  path_resolved = RNA_path_resolve_full(&id_ptr, rna_path.c_str(), &ptr, &prop, &array_index);
435  }
436 
437  if (path_resolved) {
438  bool is_array = RNA_property_array_check(prop);
439  if (is_array) {
440  /* array */
441  if ((array_index >= 0) && (array_index < RNA_property_array_length(&ptr, prop))) {
442  switch (RNA_property_type(prop)) {
443  case PROP_BOOLEAN:
444  value = (float)RNA_property_boolean_get_index(&ptr, prop, array_index);
445  break;
446  case PROP_INT:
447  value = (float)RNA_property_int_get_index(&ptr, prop, array_index);
448  break;
449  case PROP_FLOAT:
450  value = RNA_property_float_get_index(&ptr, prop, array_index);
451  break;
452  default:
453  break;
454  }
455  }
456  else {
457  fprintf(stderr,
458  "Out of Bounds while reading data for Curve %s\n",
459  curve_key.get_full_path().c_str());
460  return false;
461  }
462  }
463  else {
464  /* not an array */
465  switch (RNA_property_type(prop)) {
466  case PROP_BOOLEAN:
467  value = (float)RNA_property_boolean_get(&ptr, prop);
468  break;
469  case PROP_INT:
470  value = (float)RNA_property_int_get(&ptr, prop);
471  break;
472  case PROP_FLOAT:
473  value = RNA_property_float_get(&ptr, prop);
474  break;
475  case PROP_ENUM:
476  value = (float)RNA_property_enum_get(&ptr, prop);
477  break;
478  default:
479  fprintf(stderr,
480  "property type %d not supported for Curve %s\n",
481  RNA_property_type(prop),
482  curve_key.get_full_path().c_str());
483  return false;
484  break;
485  }
486  }
487  }
488  else {
489  /* path couldn't be resolved */
490  fprintf(stderr, "Path not recognized for Curve %s\n", curve_key.get_full_path().c_str());
491  return false;
492  }
493 
494  add_value(value, frame_index);
495  return true;
496 }
497 
499 {
500  value_map.clear();
501  if (fcurve == nullptr) {
502  return;
503  }
504 
505  for (int i = 0; i < fcurve->totvert; i++) {
506  const float frame = fcurve->bezt[i].vec[1][0];
507  const float val = fcurve->bezt[i].vec[1][1];
508  value_map[frame] = val;
509  }
510 }
511 
513 {
514  frames.clear();
515  if (fcurve) {
516  for (int i = 0; i < fcurve->totvert; i++) {
517  const float val = fcurve->bezt[i].vec[1][0];
518  frames.push_back(val);
519  }
520  }
521 }
522 
524 {
525  values.clear();
526  if (fcurve) {
527  for (int i = 0; i < fcurve->totvert; i++) {
528  const float val = fcurve->bezt[i].vec[1][1];
529  values.push_back(val);
530  }
531  }
532 }
533 
535 {
536  static float MIN_DISTANCE = 0.00001;
537  return fabs(max - min) > MIN_DISTANCE;
538 }
539 
541 {
542  if (this->fcurve == nullptr) {
543  return false;
544  }
545 
546  for (int i = 0; i < fcurve->totvert; i++) {
547  const int cframe = nearbyint(fcurve->bezt[i].vec[1][0]);
548  if (cframe == frame) {
549  return true;
550  }
551  if (cframe > frame) {
552  break;
553  }
554  }
555  return false;
556 }
557 
558 /* Needed for adding a BCAnimationCurve into a BCAnimationCurveSet */
559 inline bool operator<(const BCAnimationCurve &lhs, const BCAnimationCurve &rhs)
560 {
561  std::string lhtgt = lhs.get_channel_target();
562  std::string rhtgt = rhs.get_channel_target();
563  if (lhtgt == rhtgt) {
564  const int lha = lhs.get_channel_index();
565  const int rha = rhs.get_channel_index();
566  return lha < rha;
567  }
568 
569  return lhtgt < rhtgt;
570 }
571 
573 {
574  this->key_type = BC_ANIMATION_TYPE_OBJECT;
575  this->rna_path = "";
576  this->curve_array_index = 0;
577  this->curve_subindex = -1;
578 }
579 
581  const std::string path,
582  const int array_index,
583  const int subindex)
584 {
585  this->key_type = type;
586  this->rna_path = path;
587  this->curve_array_index = array_index;
588  this->curve_subindex = subindex;
589 }
590 
592 {
593  this->key_type = other.key_type;
594  this->rna_path = other.rna_path;
595  this->curve_array_index = other.curve_array_index;
596  this->curve_subindex = other.curve_subindex;
597 }
598 
599 std::string BCCurveKey::get_full_path() const
600 {
601  return this->rna_path + '[' + std::to_string(this->curve_array_index) + ']';
602 }
603 
604 std::string BCCurveKey::get_path() const
605 {
606  return this->rna_path;
607 }
608 
610 {
611  return this->curve_array_index;
612 }
613 
615 {
616  return this->curve_subindex;
617 }
618 
620 {
621  this->key_type = object_type;
622 }
623 
625 {
626  return this->key_type;
627 }
628 
629 bool BCCurveKey::operator<(const BCCurveKey &other) const
630 {
631  /* needed for using this class as key in maps and sets */
632  if (this->key_type != other.key_type) {
633  return this->key_type < other.key_type;
634  }
635 
636  if (this->curve_subindex != other.curve_subindex) {
637  return this->curve_subindex < other.curve_subindex;
638  }
639 
640  if (this->rna_path != other.rna_path) {
641  return this->rna_path < other.rna_path;
642  }
643 
644  return this->curve_array_index < other.curve_array_index;
645 }
646 
648 {
649 }
650 
652 {
653  return bezt.vec[1][0];
654 }
655 
657 {
658  return FRA2TIME(bezt.vec[1][0]);
659 }
660 
662 {
663  return bezt.vec[1][1];
664 }
665 
667 {
668  return RAD2DEGF(get_value());
669 }
670 
671 void BCBezTriple::get_in_tangent(Scene *scene, float point[2], bool as_angle) const
672 {
673  get_tangent(scene, point, as_angle, 0);
674 }
675 
676 void BCBezTriple::get_out_tangent(Scene *scene, float point[2], bool as_angle) const
677 {
678  get_tangent(scene, point, as_angle, 2);
679 }
680 
681 void BCBezTriple::get_tangent(Scene *scene, float point[2], bool as_angle, int index) const
682 {
683  point[0] = FRA2TIME(bezt.vec[index][0]);
684  if (bezt.ipo != BEZT_IPO_BEZ) {
685  /* We're in a mixed interpolation scenario, set zero as it's irrelevant but value might contain
686  * unused data */
687  point[0] = 0;
688  point[1] = 0;
689  }
690  else if (as_angle) {
691  point[1] = RAD2DEGF(bezt.vec[index][1]);
692  }
693  else {
694  point[1] = bezt.vec[index][1];
695  }
696 }
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:2186
void BKE_fcurve_free(struct FCurve *fcu)
Definition: fcurve.c:81
void calchandles_fcurve(struct FCurve *fcu)
Definition: fcurve.c:1391
struct FCurve * BKE_fcurve_create(void)
Definition: fcurve.c:68
struct Material * BKE_object_material_get(struct Object *ob, short act)
Definition: material.c:697
#define RAD2DEGF(_rad)
char * BLI_strdupn(const char *str, const size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: string.c:54
char * BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict prefix) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:432
@ INSERTKEY_NOFLAGS
@ FCURVE_AUTO_HANDLES
@ FCURVE_SELECTED
@ FCURVE_VISIBLE
@ HD_AUTO
@ BEZT_IPO_BEZ
eBezTriple_KeyframeType
@ BEZT_KEYTYPE_KEYFRAME
#define FRA2TIME(a)
#define BEZKEYTYPE(bezt)
Definition: ED_anim_api.h:789
_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
_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
@ PROP_FLOAT
Definition: RNA_types.h:75
@ PROP_BOOLEAN
Definition: RNA_types.h:73
@ PROP_ENUM
Definition: RNA_types.h:77
@ PROP_INT
Definition: RNA_types.h:74
unsigned int U
Definition: btGjkEpa3.h:78
#define output
std::string get_rna_path() const
FCurve * get_edit_fcurve()
FCurve * get_fcurve() const
int closest_index_below(const float sample_frame) const
bool add_value_from_matrix(const BCSample &sample, const int frame)
float get_value(const float frame)
void get_values(BCValues &values) const
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
void get_frames(BCFrames &frames) const
bool is_transform_curve() const
std::string get_channel_posebone() const
bool add_value_from_rna(const int frame)
int get_subindex() const
int sample_count() const
std::string get_channel_target() const
void add_value(const float val, const int frame)
int get_channel_index() const
std::string get_animation_name(Object *ob) const
int closest_index_above(const float sample_frame, const int start_at) 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
int insert_vert_fcurve(FCurve *fcu, float x, float y, eBezTriple_KeyframeType keyframe_type, eInsertKeyFlags flag)
Definition: keyframing.c:547
int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
Definition: keyframing.c:403
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
static void sample(SocketReader *reader, int x, int y, float color[4])
std::string to_string(const T &n)
float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2941
bool RNA_property_array_check(PropertyRNA *prop)
Definition: rna_access.c:1223
bool RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
Definition: rna_access.c:5416
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
Definition: rna_access.c:122
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_access.c:2759
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_access.c:3108
PropertyType RNA_property_type(PropertyRNA *prop)
Definition: rna_access.c:1155
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2331
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:2607
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:1218
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:3543
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
Definition: rna_access.c:2453
float vec[3][3]
char * rna_path
BezTriple * bezt
int array_index
short flag
unsigned int totvert
char auto_smoothing
void * data
ccl_device_inline float2 fabs(const float2 &a)
PointerRNA * ptr
Definition: wm_files.c:3157