Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/io/collada/BCAnimationCurve.cpp')
-rw-r--r--source/blender/io/collada/BCAnimationCurve.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/io/collada/BCAnimationCurve.cpp b/source/blender/io/collada/BCAnimationCurve.cpp
index 559a17eda9f..33eaf3376cd 100644
--- a/source/blender/io/collada/BCAnimationCurve.cpp
+++ b/source/blender/io/collada/BCAnimationCurve.cpp
@@ -22,7 +22,7 @@
BCAnimationCurve::BCAnimationCurve()
{
this->curve_key.set_object_type(BC_ANIMATION_TYPE_OBJECT);
- this->fcurve = NULL;
+ this->fcurve = nullptr;
this->curve_is_local_copy = false;
}
@@ -53,7 +53,7 @@ BCAnimationCurve::BCAnimationCurve(BCCurveKey key, Object *ob, FCurve *fcu)
BCAnimationCurve::BCAnimationCurve(const BCCurveKey &key, Object *ob)
{
this->curve_key = key;
- this->fcurve = NULL;
+ this->fcurve = nullptr;
this->curve_is_local_copy = false;
init_pointer_rna(ob);
}
@@ -120,7 +120,7 @@ BCAnimationCurve::~BCAnimationCurve()
if (curve_is_local_copy && fcurve) {
// fprintf(stderr, "removed fcurve %s\n", fcurve->rna_path);
delete_fcurve(fcurve);
- this->fcurve = NULL;
+ this->fcurve = nullptr;
}
}
@@ -169,7 +169,7 @@ std::string BCAnimationCurve::get_animation_name(Object *ob) const
} break;
case BC_ANIMATION_TYPE_BONE: {
- if (fcurve == NULL || fcurve->rna_path == NULL) {
+ if (fcurve == nullptr || fcurve->rna_path == nullptr) {
name = "";
}
else {
@@ -218,7 +218,7 @@ std::string BCAnimationCurve::get_rna_path() const
int BCAnimationCurve::sample_count() const
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return 0;
}
return fcurve->totvert;
@@ -226,11 +226,11 @@ int BCAnimationCurve::sample_count() const
int BCAnimationCurve::closest_index_above(const float sample_frame, const int start_at) const
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return -1;
}
- const int cframe = fcurve->bezt[start_at].vec[1][0]; // inaccurate!
+ const int cframe = fcurve->bezt[start_at].vec[1][0]; /* inaccurate! */
if (fabs(cframe - sample_frame) < 0.00001) {
return start_at;
@@ -240,7 +240,7 @@ int BCAnimationCurve::closest_index_above(const float sample_frame, const int st
int BCAnimationCurve::closest_index_below(const float sample_frame) const
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return -1;
}
@@ -252,7 +252,7 @@ int BCAnimationCurve::closest_index_below(const float sample_frame) const
for (int fcu_index = 0; fcu_index < fcurve->totvert; fcu_index++) {
upper_index = fcu_index;
- const int cframe = fcurve->bezt[fcu_index].vec[1][0]; // inaccurate!
+ const int cframe = fcurve->bezt[fcu_index].vec[1][0]; /* inaccurate! */
if (cframe <= sample_frame) {
lower_frame = cframe;
lower_index = fcu_index;
@@ -304,14 +304,14 @@ FCurve *BCAnimationCurve::get_edit_fcurve()
void BCAnimationCurve::clean_handles()
{
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
fcurve = get_edit_fcurve();
}
/* Keep old bezt data for copy)*/
BezTriple *old_bezts = fcurve->bezt;
int totvert = fcurve->totvert;
- fcurve->bezt = NULL;
+ fcurve->bezt = nullptr;
fcurve->totvert = 0;
for (int i = 0; i < totvert; i++) {
@@ -347,7 +347,7 @@ float BCAnimationCurve::get_value(const float frame)
if (fcurve) {
return evaluate_fcurve(fcurve, frame);
}
- return 0; // TODO: handle case where neither sample nor fcu exist
+ return 0; /* TODO: handle case where neither sample nor fcu exist */
}
void BCAnimationCurve::update_range(float val)
@@ -492,7 +492,7 @@ bool BCAnimationCurve::add_value_from_rna(const int frame_index)
void BCAnimationCurve::get_value_map(BCValueMap &value_map)
{
value_map.clear();
- if (fcurve == NULL) {
+ if (fcurve == nullptr) {
return;
}
@@ -533,7 +533,7 @@ bool BCAnimationCurve::is_animated()
bool BCAnimationCurve::is_keyframe(int frame)
{
- if (this->fcurve == NULL) {
+ if (this->fcurve == nullptr) {
return false;
}