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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-28 09:03:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-28 09:03:24 +0400
commit07065b27b8b37316004f40896f436d26e066f25f (patch)
tree19713fa864612e094f21a881e9816a8e1bf42b7b /source/blender/collada
parentc9f677d24d9600d9ba07f1b258c49455bc348554 (diff)
style cleanup
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationExporter.cpp9
-rw-r--r--source/blender/collada/AnimationImporter.cpp10
-rw-r--r--source/blender/collada/ArmatureImporter.cpp6
-rw-r--r--source/blender/collada/DocumentImporter.cpp2
-rw-r--r--source/blender/collada/EffectExporter.cpp7
-rw-r--r--source/blender/collada/MeshImporter.cpp8
6 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 5f8ceeeebb3..778e3029266 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -153,14 +153,14 @@ float * AnimationExporter::get_eul_source_for_quat(Object *ob )
char * transformName = extract_transform_name( fcu->rna_path );
if ( !strcmp(transformName, "rotation_quaternion") ) {
- for ( int i = 0 ; i < fcu->totvert ; i++){
+ for ( int i = 0 ; i < fcu->totvert ; i++) {
*(quat + ( i * 4 ) + fcu->array_index) = fcu->bezt[i].vec[1][1];
}
}
fcu = fcu->next;
}
- for ( int i = 0 ; i < keys ; i++){
+ for ( int i = 0 ; i < keys ; i++) {
for ( int j = 0;j<4;j++)
temp_quat[j] = quat[(i*4)+j];
@@ -335,8 +335,7 @@ void AnimationExporter::write_bone_animation_matrix(Object *ob_arm, Bone *bone)
return;
//This will only export animations of bones in deform group.
- /*if(!is_bone_deform_group(bone))
- return;*/
+ /* if (!is_bone_deform_group(bone)) return; */
sample_and_write_bone_animation_matrix(ob_arm, bone);
@@ -352,7 +351,7 @@ bool AnimationExporter::is_bone_deform_group(Bone * bone)
//Check child bones
else
{
- for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next){
+ for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next) {
//loop through all the children until deform bone is found, and then return
is_def = is_bone_deform_group(child);
if (is_def) return true;
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 0e66a292e94..3f132eb4212 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -948,7 +948,7 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
}
}
- if ( animType->material != 0){
+ if ( animType->material != 0) {
Material *ma = give_current_material(ob, 1);
if (!ma->adt || !ma->adt->action) act = verify_adt_action((ID*)&ma->id, 1);
else act = ma->adt->action;
@@ -964,25 +964,25 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
if (ef != NULL) { /* can be NULL [#28909] */
const COLLADAFW::CommonEffectPointerArray& commonEffects = ef->getCommonEffects();
COLLADAFW::EffectCommon *efc = commonEffects[0];
- if ((animType->material & MATERIAL_SHININESS) != 0){
+ if ((animType->material & MATERIAL_SHININESS) != 0) {
const COLLADAFW::FloatOrParam *shin = &(efc->getShininess());
const COLLADAFW::UniqueId& listid = shin->getAnimationList();
Assign_float_animations( listid, AnimCurves , "specular_hardness" );
}
- if ((animType->material & MATERIAL_IOR) != 0){
+ if ((animType->material & MATERIAL_IOR) != 0) {
const COLLADAFW::FloatOrParam *ior = &(efc->getIndexOfRefraction());
const COLLADAFW::UniqueId& listid = ior->getAnimationList();
Assign_float_animations( listid, AnimCurves , "raytrace_transparency.ior" );
}
- if ((animType->material & MATERIAL_SPEC_COLOR) != 0){
+ if ((animType->material & MATERIAL_SPEC_COLOR) != 0) {
const COLLADAFW::ColorOrTexture *cot = &(efc->getSpecular());
const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList();
Assign_color_animations( listid, AnimCurves , "specular_color" );
}
- if ((animType->material & MATERIAL_DIFF_COLOR) != 0){
+ if ((animType->material & MATERIAL_DIFF_COLOR) != 0) {
const COLLADAFW::ColorOrTexture *cot = &(efc->getDiffuse());
const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList();
Assign_color_animations( listid, AnimCurves , "diffuse_color" );
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 50ec2985552..a978a4757a7 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -98,7 +98,7 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p
float angle = 0;
// get world-space
- if (parent){
+ if (parent) {
mult_m4_m4m4(mat, parent_mat, obmat);
}
@@ -582,12 +582,12 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node
// object-space
get_node_mat(obmat, root_node, NULL, NULL);
- //if(*edbone)
+ //if (*edbone)
bPoseChannel * pchan = get_pose_channel(ob_arm -> pose , bone_name);
//else fprintf ( "",
// get world-space
- if (parentname){
+ if (parentname) {
mult_m4_m4m4(mat, parent_mat, obmat);
bPoseChannel *parchan = get_pose_channel(ob_arm->pose, parentname);
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 9e604978f64..18e421779cc 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -157,7 +157,7 @@ void DocumentImporter::cancel(const COLLADAFW::String& errorMessage)
// The latter sounds better.
}
-void DocumentImporter::start(){}
+void DocumentImporter::start() {}
void DocumentImporter::finish()
{
diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp
index dd20e7b85b0..9720b92ffae 100644
--- a/source/blender/collada/EffectExporter.cpp
+++ b/source/blender/collada/EffectExporter.cpp
@@ -364,9 +364,10 @@ void EffectsExporter::createTextureIndices(Material *ma, std::vector<int> &indic
for (int a = 0; a < MAX_MTEX; a++) {
if (ma->mtex[a] &&
- ma->mtex[a]->tex &&
- ma->mtex[a]->tex->type == TEX_IMAGE &&
- ma->mtex[a]->texco == TEXCO_UV){
+ ma->mtex[a]->tex &&
+ ma->mtex[a]->tex->type == TEX_IMAGE &&
+ ma->mtex[a]->texco == TEXCO_UV)
+ {
indices.push_back(a);
}
}
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index dc0892f6bed..1c83f0c4081 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -281,7 +281,7 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh) // checks if mesh has sup
COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons*)mp;
COLLADAFW::Polygons::VertexCountArray& vca = mpvc->getGroupedVerticesVertexCountArray();
- for (unsigned int j = 0; j < vca.getCount(); j++){
+ for (unsigned int j = 0; j < vca.getCount(); j++) {
int count = vca[j];
if (count < 3) {
fprintf(stderr, "Primitive %s in %s has at least one face with vertex count < 3\n",
@@ -486,7 +486,7 @@ void MeshImporter::read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) //T
#endif
if (type == COLLADAFW::MeshPrimitive::TRIANGLES) {
- for (j = 0; j < prim_totface; j++){
+ for (j = 0; j < prim_totface; j++) {
set_face_indices(mface, indices, false);
indices += 3;
@@ -527,12 +527,12 @@ void MeshImporter::read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) //T
// The first trifan vertex will be the first vertex in every triangle
if (type == COLLADAFW::MeshPrimitive::TRIANGLE_FANS) {
unsigned grouped_vertex_count = mp->getGroupedVertexElementsCount();
- for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++){
+ for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++) {
unsigned int first_vertex = indices[0]; // Store first trifan vertex
unsigned int first_normal = nind[0]; // Store first trifan vertex normal
unsigned int vertex_count = mp->getGroupedVerticesVertexCount(group_index);
- for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++){
+ for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++) {
// For each triangle store indeces of its 3 vertices
unsigned int triangle_vertex_indices[3]={first_vertex, indices[1], indices[2]};
set_face_indices(mface, triangle_vertex_indices, false);