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/collada')
-rw-r--r--source/blender/collada/AnimationExporter.cpp17
-rw-r--r--source/blender/collada/AnimationImporter.cpp11
-rw-r--r--source/blender/collada/ArmatureExporter.cpp8
-rw-r--r--source/blender/collada/ArmatureImporter.cpp14
-rw-r--r--source/blender/collada/BCAnimationCurve.cpp7
-rw-r--r--source/blender/collada/BCAnimationSampler.cpp34
-rw-r--r--source/blender/collada/BCAnimationSampler.h8
-rw-r--r--source/blender/collada/BCSampleData.cpp6
-rw-r--r--source/blender/collada/DocumentImporter.cpp9
-rw-r--r--source/blender/collada/SceneExporter.cpp11
-rw-r--r--source/blender/collada/collada_utils.cpp11
11 files changed, 63 insertions, 73 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index b88b64e7257..826306fa789 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -184,11 +184,9 @@ void AnimationExporter::export_curve_animation_set(Object *ob,
for (it = curves->begin(); it != curves->end(); ++it) {
BCAnimationCurve &curve = *it->second;
if (curve.get_channel_target() == "rotation_quaternion") {
- /*
- Can not export Quaternion animation in Collada as far as i know)
- Maybe automatically convert to euler rotation?
- Discard for now.
- */
+ /* Can not export Quaternion animation in Collada as far as i know)
+ * Maybe automatically convert to euler rotation?
+ * Discard for now. */
continue;
}
@@ -622,9 +620,9 @@ std::string AnimationExporter::collada_source_from_values(
return source_id;
}
-/*
- * Create a collada matrix source for a set of samples
-*/
+/**
+ * Create a collada matrix source for a set of samples.
+ */
std::string AnimationExporter::collada_source_from_values(BCMatrixSampleMap &samples,
const std::string &anim_id)
{
@@ -802,8 +800,7 @@ std::string AnimationExporter::get_collada_sid(const BCAnimationCurve &curve,
#ifdef WITH_MORPH_ANIMATION
/* TODO: This function needs to be implemented similar to the material animation export
-So we have to update BCSample for this to work.
-*/
+ * So we have to update BCSample for this to work. */
void AnimationExporter::export_morph_animation(Object *ob, BCAnimationSampler &sampler)
{
FCurve *fcu;
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index e7a48ee27da..8a9a8e5eb7b 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -395,12 +395,11 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act)
// make eul relative to bone rest pose
float rot[3][3], rel[3][3], quat[4];
- /*eul_to_mat3(rot, eul);
-
- mul_m3_m3m3(rel, irest, rot);
-
- mat3_to_quat(quat, rel);
- */
+# if 0
+ eul_to_mat3(rot, eul);
+ mul_m3_m3m3(rel, irest, rot);
+ mat3_to_quat(quat, rel);
+# endif
eul_to_quat(quat, eul);
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp
index 5abe0998470..0b84f844dbf 100644
--- a/source/blender/collada/ArmatureExporter.cpp
+++ b/source/blender/collada/ArmatureExporter.cpp
@@ -261,11 +261,13 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
bc_create_restpose_mat(this->export_settings, bone, bone_rest_mat, bone->arm_mat, true);
if (bone->parent) {
- // get bone-space matrix from parent pose
- /*bPoseChannel *parchan = BKE_pose_channel_find_name(ob_arm->pose, bone->parent->name);
+ /* Get bone-space matrix from parent pose. */
+#if 0
+ bPoseChannel *parchan = BKE_pose_channel_find_name(ob_arm->pose, bone->parent->name);
float invpar[4][4];
invert_m4_m4(invpar, parchan->pose_mat);
- mul_m4_m4m4(mat, invpar, pchan->pose_mat);*/
+ mul_m4_m4m4(mat, invpar, pchan->pose_mat);
+#endif
float invpar[4][4];
bc_create_restpose_mat(
this->export_settings, bone->parent, parent_rest_mat, bone->parent->arm_mat, true);
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 315ae91e643..70ee3274d14 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -613,10 +613,8 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo &skin)
// bone_direction_row = 1; // TODO: don't default to Y but use asset and based on it decide on default row
// create bones
- /*
- TODO:
- check if bones have already been created for a given joint
- */
+ /* TODO:
+ * check if bones have already been created for a given joint */
std::vector<COLLADAFW::Node *>::iterator ri;
for (ri = root_joints.begin(); ri != root_joints.end(); ri++) {
@@ -686,9 +684,11 @@ void ArmatureImporter::set_pose(Object *ob_arm,
mul_m4_m4m4(pchan->pose_mat, invObmat, mat);
}
- //float angle = 0.0f;
- ///*mat4_to_axis_angle(ax, &angle, mat);
- //pchan->bone->roll = angle;*/
+#if 0
+ float angle = 0.0f;
+ mat4_to_axis_angle(ax, &angle, mat);
+ pchan->bone->roll = angle;
+#endif
COLLADAFW::NodePointerArray &children = root_node->getChildNodes();
for (unsigned int i = 0; i < children.getCount(); i++) {
diff --git a/source/blender/collada/BCAnimationCurve.cpp b/source/blender/collada/BCAnimationCurve.cpp
index 2eb30d6779c..90da5907c6f 100644
--- a/source/blender/collada/BCAnimationCurve.cpp
+++ b/source/blender/collada/BCAnimationCurve.cpp
@@ -262,10 +262,9 @@ FCurve *BCAnimationCurve::get_edit_fcurve()
fcurve = create_fcurve(index, path.c_str());
/* Caution here:
- Replacing the pointer here is OK only because the original value
- of FCurve was a const pointer into Blender territory. We do not
- touch that! We use the local copy to prepare data for export.
- */
+ * Replacing the pointer here is OK only because the original value
+ * of FCurve was a const pointer into Blender territory. We do not
+ * touch that! We use the local copy to prepare data for export. */
curve_is_local_copy = true;
}
diff --git a/source/blender/collada/BCAnimationSampler.cpp b/source/blender/collada/BCAnimationSampler.cpp
index e8b1015e1c3..ee574e2968b 100644
--- a/source/blender/collada/BCAnimationSampler.cpp
+++ b/source/blender/collada/BCAnimationSampler.cpp
@@ -271,12 +271,11 @@ void BCAnimationSampler::find_depending_animated(std::set<Object *> &animated_ob
void BCAnimationSampler::get_animated_from_export_set(std::set<Object *> &animated_objects,
LinkNode &export_set)
{
- /*
- Check if this object is animated. That is: Check if it has its own action, or
-
- - Check if it has constraints to other objects
- - at least one of the other objects is animated as well
- */
+ /* Check if this object is animated. That is: Check if it has its own action, or:
+ *
+ * - Check if it has constraints to other objects.
+ * - at least one of the other objects is animated as well.
+ */
animated_objects.clear();
std::set<Object *> static_objects;
@@ -320,18 +319,17 @@ bool BCAnimationSampler::get_object_samples(BCMatrixSampleMap &samples, Object *
}
#if 0
-/*
- Add sampled values to FCurve
- If no FCurve exists, create a temporary FCurve;
- Note: The temporary FCurve will later be removed when the
- BCAnimationSampler is removed (by its destructor)
-
- curve: The curve to whioch the data is added
- matrices: The set of matrix values from where the data is taken
- animation_type BC_ANIMATION_EXPORT_SAMPLES: Use all matrix data
- animation_type BC_ANIMATION_EXPORT_KEYS: Only take data from matrices for keyframes
-*/
-
+/**
+ * Add sampled values to FCurve
+ * If no FCurve exists, create a temporary FCurve;
+ * Note: The temporary FCurve will later be removed when the
+ * BCAnimationSampler is removed (by its destructor)
+ *
+ * curve: The curve to whioch the data is added
+ * matrices: The set of matrix values from where the data is taken
+ * animation_type BC_ANIMATION_EXPORT_SAMPLES: Use all matrix data
+ * animation_type BC_ANIMATION_EXPORT_KEYS: Only take data from matrices for keyframes
+ */
void BCAnimationSampler::add_value_set(BCAnimationCurve &curve,
BCFrameSampleMap &samples,
BC_export_animation_type animation_type)
diff --git a/source/blender/collada/BCAnimationSampler.h b/source/blender/collada/BCAnimationSampler.h
index 6be386682e1..9544c6be916 100644
--- a/source/blender/collada/BCAnimationSampler.h
+++ b/source/blender/collada/BCAnimationSampler.h
@@ -68,11 +68,9 @@ typedef std::map<Object *, BCAnimation *> BCAnimationObjectMap;
class BCSampleFrame {
- /*
- Each frame on the timeline that needs to be sampled will have
- one BCSampleFrame where we collect sample information about all objects
- that need to be sampled for that frame.
- */
+ /* Each frame on the timeline that needs to be sampled will have
+ * one BCSampleFrame where we collect sample information about all objects
+ * that need to be sampled for that frame. */
private:
BCSampleMap sampleMap;
diff --git a/source/blender/collada/BCSampleData.cpp b/source/blender/collada/BCSampleData.cpp
index 6e17598469f..868526928b0 100644
--- a/source/blender/collada/BCSampleData.cpp
+++ b/source/blender/collada/BCSampleData.cpp
@@ -129,10 +129,8 @@ void BCMatrix::unit()
unit_m4(matrix);
}
-/*
-We need double here because the OpenCollada API needs it.
-precision = -1 indicates to not limit the precision
-*/
+/* We need double here because the OpenCollada API needs it.
+ * precision = -1 indicates to not limit the precision. */
void BCMatrix::get_matrix(double (&mat)[4][4], const bool transposed, const int precision) const
{
for (int i = 0; i < 4; i++)
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 428678180f6..567f215ac04 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -985,11 +985,14 @@ bool DocumentImporter::writeLight(const COLLADAFW::Light *light)
std::string la_id, la_name;
ExtraTags *et = getExtraTags(light->getUniqueId());
- /*TagsMap::iterator etit;
+#if 0
+ TagsMap::iterator etit;
ExtraTags *et = 0;
etit = uid_tags_map.find(light->getUniqueId().toAscii());
- if (etit != uid_tags_map.end())
- et = etit->second;*/
+ if (etit != uid_tags_map.end()) {
+ et = etit->second;
+ }
+#endif
la_id = light->getOriginalId();
la_name = light->getName();
diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp
index e689cffe470..7cb211c7c35 100644
--- a/source/blender/collada/SceneExporter.cpp
+++ b/source/blender/collada/SceneExporter.cpp
@@ -81,12 +81,11 @@ void SceneExporter::exportHierarchy()
void SceneExporter::writeNodeList(std::vector<Object *> &child_objects, Object *parent)
{
/* TODO: Handle the case where a parent is not exported
- Actually i am not even sure if this can be done at all
- in a good way.
- I really prefer to enforce the export of hidden
- elements in an object hierarchy. When the children of
- the hidden elements are exported as well.
- */
+ * Actually i am not even sure if this can be done at all
+ * in a good way.
+ * I really prefer to enforce the export of hidden
+ * elements in an object hierarchy. When the children of
+ * the hidden elements are exported as well. */
for (int i = 0; i < child_objects.size(); ++i) {
Object *child = child_objects[i];
if (bc_is_marked(child)) {
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 9ce6b399daa..c18f70676bc 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -195,8 +195,7 @@ std::vector<bAction *> bc_getSceneActions(const bContext *C, Object *ob, bool al
for (id = (ID *)bmain->actions.first; id; id = (ID *)(id->next)) {
bAction *act = (bAction *)id;
/* XXX This currently creates too many actions.
- TODO Need to check if the action is compatible to the given object
- */
+ * TODO Need to check if the action is compatible to the given object. */
actions.push_back(act);
}
}
@@ -228,10 +227,8 @@ void bc_update_scene(BlenderContext &blender_context, float ctime)
Scene *scene = blender_context.get_scene();
Depsgraph *depsgraph = blender_context.get_depsgraph();
- /*
- * See remark in physics_fluid.c lines 395...)
- * BKE_scene_update_for_newframe(ev_context, bmain, scene, scene->lay);
- */
+ /* See remark in physics_fluid.c lines 395...) */
+ // BKE_scene_update_for_newframe(ev_context, bmain, scene, scene->lay);
BKE_scene_frame_set(scene, ctime);
ED_update_for_newframe(bmain, depsgraph);
}
@@ -341,7 +338,7 @@ bool bc_is_in_Export_set(LinkNode *export_set, Object *ob, ViewLayer *view_layer
if (!to_export) {
/* Mark this object as to_export even if it is not in the
- export list, but it contains children to export */
+ * export list, but it contains children to export. */
std::vector<Object *> children;
bc_get_children(children, ob, view_layer);