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/AnimationImporter.cpp')
-rw-r--r--source/blender/io/collada/AnimationImporter.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/source/blender/io/collada/AnimationImporter.cpp b/source/blender/io/collada/AnimationImporter.cpp
index cc91c3eeac9..094f62e3c13 100644
--- a/source/blender/io/collada/AnimationImporter.cpp
+++ b/source/blender/io/collada/AnimationImporter.cpp
@@ -74,7 +74,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
float fps = (float)FPS;
size_t dim = curve->getOutDimension();
- unsigned int i;
+ uint i;
std::vector<FCurve *> &fcurves = curve_map[curve->getUniqueId()];
@@ -91,7 +91,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
fcu->array_index = 0;
fcu->auto_smoothing = U.auto_smoothing_new;
- for (unsigned int j = 0; j < curve->getKeyCount(); j++) {
+ for (uint j = 0; j < curve->getKeyCount(); j++) {
BezTriple bez;
memset(&bez, 0, sizeof(BezTriple));
@@ -106,7 +106,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
COLLADAFW::FloatOrDoubleArray &outtan = curve->getOutTangentValues();
/* In-tangent. */
- unsigned int index = 2 * (j * dim + i);
+ uint index = 2 * (j * dim + i);
bez.vec[0][0] = bc_get_float_value(intan, index) * fps;
bez.vec[0][1] = bc_get_float_value(intan, index + 1);
@@ -148,7 +148,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
void AnimationImporter::fcurve_deg_to_rad(FCurve *cu)
{
- for (unsigned int i = 0; i < cu->totvert; i++) {
+ for (uint i = 0; i < cu->totvert; i++) {
/* TODO: convert handles too. */
cu->bezt[i].vec[1][1] *= DEG2RADF(1.0f);
cu->bezt[i].vec[0][1] *= DEG2RADF(1.0f);
@@ -158,7 +158,7 @@ void AnimationImporter::fcurve_deg_to_rad(FCurve *cu)
void AnimationImporter::fcurve_scale(FCurve *cu, int scale)
{
- for (unsigned int i = 0; i < cu->totvert; i++) {
+ for (uint i = 0; i < cu->totvert; i++) {
/* TODO: convert handles too. */
cu->bezt[i].vec[1][1] *= scale;
cu->bezt[i].vec[0][1] *= scale;
@@ -484,7 +484,7 @@ void AnimationImporter::find_frames(std::vector<float> *frames, std::vector<FCur
for (iter = curves->begin(); iter != curves->end(); iter++) {
FCurve *fcu = *iter;
- for (unsigned int k = 0; k < fcu->totvert; k++) {
+ for (uint k = 0; k < fcu->totvert; k++) {
/* get frame value from bezTriple */
float fra = fcu->bezt[k].vec[1][0];
/* if frame already not added add frame to frames */
@@ -649,7 +649,7 @@ void AnimationImporter::Assign_color_animations(const COLLADAFW::UniqueId &listi
const COLLADAFW::AnimationList::AnimationBindings &bindings = animlist->getAnimationBindings();
/* all the curves belonging to the current binding */
std::vector<FCurve *> animcurves;
- for (unsigned int j = 0; j < bindings.getCount(); j++) {
+ for (uint j = 0; j < bindings.getCount(); j++) {
animcurves = curve_map[bindings[j].animation];
switch (bindings[j].animationClass) {
@@ -699,7 +699,7 @@ void AnimationImporter::Assign_float_animations(const COLLADAFW::UniqueId &listi
const COLLADAFW::AnimationList::AnimationBindings &bindings = animlist->getAnimationBindings();
/* all the curves belonging to the current binding */
std::vector<FCurve *> animcurves;
- for (unsigned int j = 0; j < bindings.getCount(); j++) {
+ for (uint j = 0; j < bindings.getCount(); j++) {
animcurves = curve_map[bindings[j].animation];
BLI_strncpy(rna_path, anim_type, sizeof(rna_path));
@@ -756,7 +756,7 @@ void AnimationImporter::Assign_lens_animations(const COLLADAFW::UniqueId &listid
const COLLADAFW::AnimationList::AnimationBindings &bindings = animlist->getAnimationBindings();
/* all the curves belonging to the current binding */
std::vector<FCurve *> animcurves;
- for (unsigned int j = 0; j < bindings.getCount(); j++) {
+ for (uint j = 0; j < bindings.getCount(); j++) {
animcurves = curve_map[bindings[j].animation];
BLI_strncpy(rna_path, anim_type, sizeof(rna_path));
@@ -767,7 +767,7 @@ void AnimationImporter::Assign_lens_animations(const COLLADAFW::UniqueId &listid
for (iter = animcurves.begin(); iter != animcurves.end(); iter++) {
FCurve *fcu = *iter;
- for (unsigned int i = 0; i < fcu->totvert; i++) {
+ for (uint i = 0; i < fcu->totvert; i++) {
fcu->bezt[i].vec[0][1] = convert_to_focal_length(
fcu->bezt[i].vec[0][1], fov_type, aspect, cam->sensor_x);
fcu->bezt[i].vec[1][1] = convert_to_focal_length(
@@ -817,7 +817,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
}
/* new curves to assign matrix transform animation */
FCurve *newcu[10]; /* if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale */
- unsigned int totcu = 10;
+ uint totcu = 10;
const char *tm_str = nullptr;
char rna_path[200];
for (int i = 0; i < totcu; i++) {
@@ -1033,7 +1033,7 @@ void AnimationImporter::translate_Animations(
const COLLADAFW::TransformationPointerArray &nodeTransforms = node->getTransformations();
/* for each transformation in node */
- for (unsigned int i = 0; i < nodeTransforms.getCount(); i++) {
+ for (uint i = 0; i < nodeTransforms.getCount(); i++) {
COLLADAFW::Transformation *transform = nodeTransforms[i];
COLLADAFW::Transformation::TransformationType tm_type = transform->getTransformationType();
@@ -1053,7 +1053,7 @@ void AnimationImporter::translate_Animations(
animlist->getAnimationBindings();
/* all the curves belonging to the current binding */
std::vector<FCurve *> animcurves;
- for (unsigned int j = 0; j < bindings.getCount(); j++) {
+ for (uint j = 0; j < bindings.getCount(); j++) {
animcurves = curve_map[bindings[j].animation];
if (is_matrix) {
apply_matrix_curves(ob, animcurves, root, node, transform);
@@ -1092,7 +1092,7 @@ void AnimationImporter::translate_Animations(
ListBase *AnimCurves = &(act->curves);
const COLLADAFW::InstanceLightPointerArray &nodeLights = node->getInstanceLights();
- for (unsigned int i = 0; i < nodeLights.getCount(); i++) {
+ for (uint i = 0; i < nodeLights.getCount(); i++) {
const COLLADAFW::Light *light = (COLLADAFW::Light *)
FW_object_map[nodeLights[i]->getInstanciatedObjectId()];
@@ -1130,7 +1130,7 @@ void AnimationImporter::translate_Animations(
ListBase *AnimCurves = &(act->curves);
const COLLADAFW::InstanceCameraPointerArray &nodeCameras = node->getInstanceCameras();
- for (unsigned int i = 0; i < nodeCameras.getCount(); i++) {
+ for (uint i = 0; i < nodeCameras.getCount(); i++) {
const COLLADAFW::Camera *camera = (COLLADAFW::Camera *)
FW_object_map[nodeCameras[i]->getInstanciatedObjectId()];
@@ -1184,9 +1184,9 @@ void AnimationImporter::translate_Animations(
}
const COLLADAFW::InstanceGeometryPointerArray &nodeGeoms = node->getInstanceGeometries();
- for (unsigned int i = 0; i < nodeGeoms.getCount(); i++) {
+ for (uint i = 0; i < nodeGeoms.getCount(); i++) {
const COLLADAFW::MaterialBindingArray &matBinds = nodeGeoms[i]->getMaterialBindings();
- for (unsigned int j = 0; j < matBinds.getCount(); j++) {
+ for (uint j = 0; j < matBinds.getCount(); j++) {
const COLLADAFW::UniqueId &matuid = matBinds[j].getReferencedMaterial();
const COLLADAFW::Effect *ef = (COLLADAFW::Effect *)(FW_object_map[matuid]);
if (ef != nullptr) { /* can be NULL T28909. */
@@ -1273,7 +1273,7 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob,
/* new curves to assign matrix transform animation */
FCurve *newcu[10]; /* if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale. */
- unsigned int totcu = 10;
+ uint totcu = 10;
const char *tm_str = nullptr;
char rna_path[200];
for (int i = 0; i < totcu; i++) {
@@ -1381,7 +1381,7 @@ AnimationImporter::AnimMix *AnimationImporter::get_animation_type(
const COLLADAFW::TransformationPointerArray &nodeTransforms = node->getTransformations();
/* for each transformation in node */
- for (unsigned int i = 0; i < nodeTransforms.getCount(); i++) {
+ for (uint i = 0; i < nodeTransforms.getCount(); i++) {
COLLADAFW::Transformation *transform = nodeTransforms[i];
const COLLADAFW::UniqueId &listid = transform->getAnimationList();
@@ -1395,7 +1395,7 @@ AnimationImporter::AnimMix *AnimationImporter::get_animation_type(
}
const COLLADAFW::InstanceLightPointerArray &nodeLights = node->getInstanceLights();
- for (unsigned int i = 0; i < nodeLights.getCount(); i++) {
+ for (uint i = 0; i < nodeLights.getCount(); i++) {
const COLLADAFW::Light *light = (COLLADAFW::Light *)
FW_object_map[nodeLights[i]->getInstanciatedObjectId()];
types->light = setAnimType(&(light->getColor()), (types->light), LIGHT_COLOR);
@@ -1408,7 +1408,7 @@ AnimationImporter::AnimMix *AnimationImporter::get_animation_type(
}
const COLLADAFW::InstanceCameraPointerArray &nodeCameras = node->getInstanceCameras();
- for (unsigned int i = 0; i < nodeCameras.getCount(); i++) {
+ for (uint i = 0; i < nodeCameras.getCount(); i++) {
const COLLADAFW::Camera *camera = (COLLADAFW::Camera *)
FW_object_map[nodeCameras[i]->getInstanciatedObjectId()];
if (camera == nullptr) {
@@ -1440,9 +1440,9 @@ AnimationImporter::AnimMix *AnimationImporter::get_animation_type(
}
const COLLADAFW::InstanceGeometryPointerArray &nodeGeoms = node->getInstanceGeometries();
- for (unsigned int i = 0; i < nodeGeoms.getCount(); i++) {
+ for (uint i = 0; i < nodeGeoms.getCount(); i++) {
const COLLADAFW::MaterialBindingArray &matBinds = nodeGeoms[i]->getMaterialBindings();
- for (unsigned int j = 0; j < matBinds.getCount(); j++) {
+ for (uint j = 0; j < matBinds.getCount(); j++) {
const COLLADAFW::UniqueId &matuid = matBinds[j].getReferencedMaterial();
const COLLADAFW::Effect *ef = (COLLADAFW::Effect *)(FW_object_map[matuid]);
if (ef != nullptr) { /* can be NULL T28909. */
@@ -1490,7 +1490,7 @@ void AnimationImporter::find_frames_old(std::vector<float> *frames,
/* for each <rotate>, <translate>, etc. there is a separate Transformation */
const COLLADAFW::TransformationPointerArray &nodeTransforms = node->getTransformations();
- unsigned int i;
+ uint i;
/* find frames at which to sample plus convert all rotation keys to radians */
for (i = 0; i < nodeTransforms.getCount(); i++) {
COLLADAFW::Transformation *transform = nodeTransforms[i];
@@ -1508,7 +1508,7 @@ void AnimationImporter::find_frames_old(std::vector<float> *frames,
if (bindings.getCount()) {
/* for each AnimationBinding get the fcurves which animate the transform */
- for (unsigned int j = 0; j < bindings.getCount(); j++) {
+ for (uint j = 0; j < bindings.getCount(); j++) {
std::vector<FCurve *> &curves = curve_map[bindings[j].animation];
bool xyz = ((nodeTmType == COLLADAFW::Transformation::TRANSLATE ||
nodeTmType == COLLADAFW::Transformation::SCALE) &&
@@ -1525,7 +1525,7 @@ void AnimationImporter::find_frames_old(std::vector<float> *frames,
fcurve_deg_to_rad(fcu);
}
- for (unsigned int k = 0; k < fcu->totvert; k++) {
+ for (uint k = 0; k < fcu->totvert; k++) {
/* get frame value from bezTriple */
float fra = fcu->bezt[k].vec[1][0];
/* if frame already not added add frame to frames */
@@ -1573,7 +1573,7 @@ Object *AnimationImporter::translate_animation_OLD(
find_frames_old(&frames, node, tm_type);
- unsigned int i;
+ uint i;
float irest_dae[4][4];
float rest[4][4], irest[4][4];
@@ -1632,7 +1632,7 @@ Object *AnimationImporter::translate_animation_OLD(
/* new curves */
FCurve *newcu[10]; /* if tm_type is matrix, then create 10 curves: 4 rot, 3 loc, 3 scale */
- unsigned int totcu = is_matrix ? 10 : (is_rotation ? 4 : 3);
+ uint totcu = is_matrix ? 10 : (is_rotation ? 4 : 3);
for (i = 0; i < totcu; i++) {
@@ -1825,7 +1825,7 @@ void AnimationImporter::evaluate_transform_at_frame(float mat[4][4],
unit_m4(mat);
- for (unsigned int i = 0; i < tms.getCount(); i++) {
+ for (uint i = 0; i < tms.getCount(); i++) {
COLLADAFW::Transformation *tm = tms[i];
COLLADAFW::Transformation::TransformationType type = tm->getTransformationType();
float m[4][4];
@@ -1909,7 +1909,7 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm,
dae_translate_to_v3(tm, vec);
}
- for (unsigned int index = 0; index < bindings.getCount(); index++) {
+ for (uint index = 0; index < bindings.getCount(); index++) {
const COLLADAFW::AnimationList::AnimationBinding &binding = bindings[index];
std::vector<FCurve *> &curves = curve_map[binding.animation];
COLLADAFW::AnimationList::AnimationClass animclass = binding.animationClass;
@@ -2062,7 +2062,7 @@ bool AnimationImporter::calc_joint_parent_mat_rest(float mat[4][4],
}
COLLADAFW::NodePointerArray &children = node->getChildNodes();
- for (unsigned int i = 0; i < children.getCount(); i++) {
+ for (uint i = 0; i < children.getCount(); i++) {
if (calc_joint_parent_mat_rest(mat, m, children[i], end)) {
return true;
}