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>2018-09-02 11:28:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-02 11:28:27 +0300
commitae573836483d6acc56761918336cb8d2b0486d08 (patch)
treea9bb8a66c543824ae876c18f299fd176a952619e /source/blender/collada
parent6abb37babc6aad9d7f262b1516b7a0e2972cb8e1 (diff)
Cleanup: comment blocks
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationExporter.cpp6
-rw-r--r--source/blender/collada/ArmatureImporter.cpp54
-rw-r--r--source/blender/collada/DocumentImporter.cpp6
-rw-r--r--source/blender/collada/ErrorHandler.cpp4
-rw-r--r--source/blender/collada/collada_utils.cpp110
-rw-r--r--source/blender/collada/collada_utils.h14
6 files changed, 98 insertions, 96 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 31d0dde567b..0f9d439a454 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -65,9 +65,9 @@ bool AnimationExporter::is_flat_line(std::vector<float> &values, int channel_cou
return true;
}
/*
- * This function creates a complete LINEAR Collada <Animation> Entry with all needed
- * <source>, <sampler>, and <channel> entries.
- * This is is used for creating sampled Transformation Animations for either:
+ * This function creates a complete LINEAR Collada <Animation> Entry with all needed
+ * <source>, <sampler>, and <channel> entries.
+ * This is is used for creating sampled Transformation Animations for either:
*
* 1-axis animation:
* times contains the time points in seconds from within the timeline
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index d3370172f60..a2c367e5076 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -111,7 +111,7 @@ int ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBon
/*
* We use the inv_bind_shape matrix to apply the armature bind pose as its rest pose.
- */
+ */
std::map<COLLADAFW::UniqueId, SkinInfo>::iterator skin_it;
bool bone_is_skinned = false;
@@ -519,32 +519,32 @@ Object *ArmatureImporter::create_armature_bones(Main *bmain, SkinInfo& skin)
* if so, use that skin's armature
*/
- /*
- Pseudocode:
-
- find_node_in_tree(node, root_joint)
-
- skin::find_root_joints(root_joints):
- std::vector root_joints;
- for each root in root_joints:
- for each joint in joints:
- if find_node_in_tree(joint, root):
- if (std::find(root_joints.begin(), root_joints.end(), root) == root_joints.end())
- root_joints.push_back(root);
-
- for (each skin B with armature) {
- find all root joints for skin B
-
- for each joint X in skin A:
- for each root joint R in skin B:
- if (find_node_in_tree(X, R)) {
- shared = 1;
- goto endloop;
- }
- }
-
- endloop:
- */
+ /**
+ * Pseudocode:
+ *
+ * find_node_in_tree(node, root_joint)
+ *
+ * skin::find_root_joints(root_joints):
+ * std::vector root_joints;
+ * for each root in root_joints:
+ * for each joint in joints:
+ * if find_node_in_tree(joint, root):
+ * if (std::find(root_joints.begin(), root_joints.end(), root) == root_joints.end())
+ * root_joints.push_back(root);
+ *
+ * for (each skin B with armature) {
+ * find all root joints for skin B
+ *
+ * for each joint X in skin A:
+ * for each root joint R in skin B:
+ * if (find_node_in_tree(X, R)) {
+ * shared = 1;
+ * goto endloop;
+ * }
+ * }
+ *
+ * endloop:
+ */
SkinInfo *a = &skin;
Object *shared = NULL;
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index ced6e967acf..eea51d1560f 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -695,8 +695,10 @@ finally:
return root_objects;
}
-/** When this method is called, the writer must write the entire visual scene.
- * Return The writer should return true, if writing succeeded, false otherwise. */
+/**
+ * When this method is called, the writer must write the entire visual scene.
+ * Return The writer should return true, if writing succeeded, false otherwise.
+ */
bool DocumentImporter::writeVisualScene(const COLLADAFW::VisualScene *visualScene)
{
if (mImportStage != General)
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp
index 26674445d98..caa73900632 100644
--- a/source/blender/collada/ErrorHandler.cpp
+++ b/source/blender/collada/ErrorHandler.cpp
@@ -50,8 +50,8 @@ ErrorHandler::~ErrorHandler()
bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
{
/* This method must return true when Collada should continue.
- See https://github.com/KhronosGroup/OpenCOLLADA/issues/442
- */
+ * See https://github.com/KhronosGroup/OpenCOLLADA/issues/442
+ */
bool isWarning = false;
if (error->getErrorClass() == COLLADASaxFWL::IError::ERROR_SAXPARSER) {
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 86824800378..3ebe23e120b 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -377,8 +377,8 @@ void bc_match_scale(std::vector<Object *> *objects_done,
}
/*
- Convenience function to get only the needed components of a matrix
-*/
+ * Convenience function to get only the needed components of a matrix
+ */
void bc_decompose(float mat[4][4], float *loc, float eul[3], float quat[4], float *size)
{
if (size) {
@@ -399,17 +399,17 @@ void bc_decompose(float mat[4][4], float *loc, float eul[3], float quat[4], floa
}
/*
-* Create rotation_quaternion from a delta rotation and a reference quat
-*
-* Input:
-* mat_from: The rotation matrix before rotation
-* mat_to : The rotation matrix after rotation
-* qref : the quat corresponding to mat_from
-*
-* Output:
-* rot : the calculated result (quaternion)
-*
-*/
+ * Create rotation_quaternion from a delta rotation and a reference quat
+ *
+ * Input:
+ * mat_from: The rotation matrix before rotation
+ * mat_to : The rotation matrix after rotation
+ * qref : the quat corresponding to mat_from
+ *
+ * Output:
+ * rot : the calculated result (quaternion)
+ *
+ */
void bc_rotate_from_reference_quat(float quat_to[4], float quat_from[4], float mat_to[4][4])
{
float qd[4];
@@ -488,11 +488,11 @@ int bc_set_layer(int bitfield, int layer, bool enable)
return bitfield;
}
-/*
- | This method creates a new extension map when needed.
- | Note: The ~BoneExtensionManager destructor takes care
- | to delete the created maps when the manager is removed.
-*/
+/**
+ * This method creates a new extension map when needed.
+ * \note The ~BoneExtensionManager destructor takes care
+ * to delete the created maps when the manager is removed.
+ */
BoneExtensionMap &BoneExtensionManager::getExtensionMap(bArmature *armature)
{
std::string key = armature->id.name;
@@ -690,8 +690,8 @@ int BoneExtended::get_use_connect()
}
/**
-* Stores a 4*4 matrix as a custom bone property array of size 16
-*/
+ * Stores a 4*4 matrix as a custom bone property array of size 16
+ */
void bc_set_IDPropertyMatrix(EditBone *ebone, const char *key, float mat[4][4])
{
IDProperty *idgroup = (IDProperty *)ebone->prop;
@@ -717,10 +717,10 @@ void bc_set_IDPropertyMatrix(EditBone *ebone, const char *key, float mat[4][4])
#if 0
/**
-* Stores a Float value as a custom bone property
-*
-* Note: This function is currently not needed. Keep for future usage
-*/
+ * Stores a Float value as a custom bone property
+ *
+ * Note: This function is currently not needed. Keep for future usage
+ */
static void bc_set_IDProperty(EditBone *ebone, const char *key, float value)
{
if (ebone->prop == NULL)
@@ -738,19 +738,19 @@ static void bc_set_IDProperty(EditBone *ebone, const char *key, float value)
}
#endif
-/*
-* Get a custom property when it exists.
-* This function is also used to check if a property exists.
-*/
+/**
+ * Get a custom property when it exists.
+ * This function is also used to check if a property exists.
+ */
IDProperty *bc_get_IDProperty(Bone *bone, std::string key)
{
return (bone->prop == NULL) ? NULL : IDP_GetPropertyFromGroup(bone->prop, key.c_str());
}
/**
-* Read a custom bone property and convert to float
-* Return def if the property does not exist.
-*/
+ * Read a custom bone property and convert to float
+ * Return def if the property does not exist.
+ */
float bc_get_property(Bone *bone, std::string key, float def)
{
float result = def;
@@ -774,13 +774,13 @@ float bc_get_property(Bone *bone, std::string key, float def)
}
/**
-* Read a custom bone property and convert to matrix
-* Return true if conversion was succesfull
-*
-* Return false if:
-* - the property does not exist
-* - is not an array of size 16
-*/
+ * Read a custom bone property and convert to matrix
+ * Return true if conversion was succesfull
+ *
+ * Return false if:
+ * - the property does not exist
+ * - is not an array of size 16
+ */
bool bc_get_property_matrix(Bone *bone, std::string key, float mat[4][4])
{
IDProperty *property = bc_get_IDProperty(bone, key);
@@ -795,8 +795,8 @@ bool bc_get_property_matrix(Bone *bone, std::string key, float mat[4][4])
}
/**
-* get a vector that is stored in 3 custom properties (used in Blender <= 2.78)
-*/
+ * get a vector that is stored in 3 custom properties (used in Blender <= 2.78)
+ */
void bc_get_property_vector(Bone *bone, std::string key, float val[3], const float def[3])
{
val[0] = bc_get_property(bone, key + "_x", def[0]);
@@ -805,8 +805,8 @@ void bc_get_property_vector(Bone *bone, std::string key, float val[3], const flo
}
/**
-* Check if vector exist stored in 3 custom properties (used in Blender <= 2.78)
-*/
+ * Check if vector exist stored in 3 custom properties (used in Blender <= 2.78)
+ */
static bool has_custom_props(Bone *bone, bool enabled, std::string key)
{
if (!enabled)
@@ -819,11 +819,11 @@ static bool has_custom_props(Bone *bone, bool enabled, std::string key)
}
/**
-* Check if custom information about bind matrix exists and modify the from_mat
-* accordingly.
-*
-* Note: This is old style for Blender <= 2.78 only kept for compatibility
-*/
+ * Check if custom information about bind matrix exists and modify the from_mat
+ * accordingly.
+ *
+ * Note: This is old style for Blender <= 2.78 only kept for compatibility
+ */
void bc_create_restpose_mat(const ExportSettings *export_settings, Bone *bone, float to_mat[4][4], float from_mat[4][4], bool use_local_space)
{
float loc[3];
@@ -877,8 +877,8 @@ void bc_create_restpose_mat(const ExportSettings *export_settings, Bone *bone, f
}
/*
- Make 4*4 matrices better readable
-*/
+ * Make 4*4 matrices better readable
+ */
void bc_sanitize_mat(float mat[4][4], int precision)
{
for (int i = 0; i < 4; i++)
@@ -908,7 +908,7 @@ void bc_copy_farray_m4(float *r, float a[4][4])
}
-/*
+/**
* Returns name of Active UV Layer or empty String if no active UV Layer defined
*/
std::string bc_get_active_uvlayer_name(Mesh *me)
@@ -923,17 +923,17 @@ std::string bc_get_active_uvlayer_name(Mesh *me)
return "";
}
-/*
-* Returns name of Active UV Layer or empty String if no active UV Layer defined.
-* Assuming the Object is of type MESH
-*/
+/**
+ * Returns name of Active UV Layer or empty String if no active UV Layer defined.
+ * Assuming the Object is of type MESH
+ */
std::string bc_get_active_uvlayer_name(Object *ob)
{
Mesh *me = (Mesh *)ob->data;
return bc_get_active_uvlayer_name(me);
}
-/*
+/**
* Returns UV Layer name or empty string if layer index is out of range
*/
std::string bc_get_uvlayer_name(Mesh *me, int layer)
diff --git a/source/blender/collada/collada_utils.h b/source/blender/collada/collada_utils.h
index 89a5379d3c7..001a2f5fe1b 100644
--- a/source/blender/collada/collada_utils.h
+++ b/source/blender/collada/collada_utils.h
@@ -184,16 +184,16 @@ public:
};
/* a map to store bone extension maps
-| std:string : an armature name
-| BoneExtended * : a map that contains extra data for bones
-*/
+ * std:string : an armature name
+ * BoneExtended * : a map that contains extra data for bones
+ */
typedef std::map<std::string, BoneExtended *> BoneExtensionMap;
/*
-| A class to organise bone extendion data for multiple Armatures.
-| this is needed for the case where a Collada file contains 2 or more
-| separate armatures.
-*/
+ * A class to organise bone extendion data for multiple Armatures.
+ * this is needed for the case where a Collada file contains 2 or more
+ * separate armatures.
+ */
class BoneExtensionManager {
private:
std::map<std::string, BoneExtensionMap *> extended_bone_maps;