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-11-25 00:01:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-25 00:01:53 +0300
commit059c119719e04283808d3c7076886e1a58874f6b (patch)
tree5296776b81111ef62e33687d4a9b4c6ab5e297ff /source/blender/collada
parentfa0fcbe4d6ca3f183f02395fe9ba18fb5ea87748 (diff)
parente742e0934de6384eeaf271ca4cfe99922ddbe3fb (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationCurveCache.cpp8
-rw-r--r--source/blender/collada/AnimationCurveCache.h14
-rw-r--r--source/blender/collada/AnimationExporter.cpp10
-rw-r--r--source/blender/collada/AnimationExporter.h14
-rw-r--r--source/blender/collada/BCAnimationCurve.cpp5
-rw-r--r--source/blender/collada/BCAnimationSampler.cpp4
-rw-r--r--source/blender/collada/BCAnimationSampler.h10
-rw-r--r--source/blender/collada/BCSampleData.cpp2
-rw-r--r--source/blender/collada/ErrorHandler.cpp2
-rw-r--r--source/blender/collada/SceneExporter.cpp4
-rw-r--r--source/blender/collada/collada_utils.cpp6
-rw-r--r--source/blender/collada/collada_utils.h6
12 files changed, 41 insertions, 44 deletions
diff --git a/source/blender/collada/AnimationCurveCache.cpp b/source/blender/collada/AnimationCurveCache.cpp
index 3ad921baffe..f580ffce7bb 100644
--- a/source/blender/collada/AnimationCurveCache.cpp
+++ b/source/blender/collada/AnimationCurveCache.cpp
@@ -127,7 +127,7 @@ void AnimationCurveCache::sampleMain(Scene *scene, BC_export_transformation_type
}
}
- /* When this SamplePoint is not for a Bone,
+ /* When this SamplePoint is not for a Bone,
* then we just store the Object local matrix here
*/
@@ -207,7 +207,7 @@ void AnimationCurveCache::add_sample_point(SamplePoint &point)
* loop over all cached objects
* loop over all fcurves
* record all keyframes
-*
+*
* The vector sample_frames finally contains a list of vectors
* where each vector contains a list of SamplePoints which
* need to be processed when evaluating the animation.
@@ -250,7 +250,7 @@ void AnimationCurveCache::create_sample_frames_generated(float sfra, float efra,
Object *ob = cached_objects[i];
float f = sfra;
- do {
+ do {
int frame_index = int(f);
SamplePoint sample_point(frame_index, ob);
add_sample_point(sample_point);
@@ -388,4 +388,4 @@ int SamplePoint::get_fcurve_index()
std::string &SamplePoint::get_path()
{
return path;
-} \ No newline at end of file
+}
diff --git a/source/blender/collada/AnimationCurveCache.h b/source/blender/collada/AnimationCurveCache.h
index 4a4cc779043..3d74e93758e 100644
--- a/source/blender/collada/AnimationCurveCache.h
+++ b/source/blender/collada/AnimationCurveCache.h
@@ -105,17 +105,17 @@ public:
~AnimationCurveCache();
void addObject(Object *obj);
-
- void sampleMain(Scene *scene,
- BC_export_transformation_type atm_type,
+
+ void sampleMain(Scene *scene,
+ BC_export_transformation_type atm_type,
bool for_opensim);
-
- void sampleScene(Scene *scene,
- BC_export_transformation_type atm_type,
+
+ void sampleScene(Scene *scene,
+ BC_export_transformation_type atm_type,
bool for_opensim,
bool keyframe_at_end = true); // use keys from FCurves, use timeline boundaries
- void sampleScene(Scene *scene,
+ void sampleScene(Scene *scene,
BC_export_transformation_type atm_type,
int sampling_rate, bool for_opensim,
bool keyframe_at_end = true ); // generate keyframes for frames use timeline boundaries
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 4491b7412a6..69a25ac7a82 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -125,7 +125,7 @@ bool AnimationExporter::exportAnimations()
/* TODO: If all actions shall be exported, we need to call the
* AnimationClipExporter which will figure out which actions
* need to be exported for which objects
- */
+ */
if (this->export_settings->include_all_actions) {
AnimationClipExporter ace(eval_ctx, sw, export_settings, anim_meta);
ace.exportAnimationClips(sce);
@@ -247,7 +247,7 @@ void AnimationExporter::export_bone_animations_recursive(Object *ob, Bone *bone,
{
std::vector<float> frames;
sampler.get_bone_frames(frames, ob, bone);
-
+
if (frames.size()) {
BCMatrixSampleMap samples;
bool is_animated = sampler.get_bone_samples(samples, ob, bone);
@@ -478,8 +478,8 @@ std::string AnimationExporter::get_semantic_suffix(COLLADASW::InputSemantic::Sem
void AnimationExporter::add_source_parameters(COLLADASW::SourceBase::ParameterNameList& param,
COLLADASW::InputSemantic::Semantics semantic,
- bool is_rot,
- const std::string axis,
+ bool is_rot,
+ const std::string axis,
bool transform)
{
switch (semantic) {
@@ -633,7 +633,7 @@ std::string AnimationExporter::collada_source_from_values(BCMatrixSampleMap &sam
}
std::string AnimationExporter::collada_interpolation_source(const BCAnimationCurve &curve,
- const std::string& anim_id,
+ const std::string& anim_id,
const std::string axis,
bool *has_tangents)
{
diff --git a/source/blender/collada/AnimationExporter.h b/source/blender/collada/AnimationExporter.h
index 2240449f7ba..969669ef11d 100644
--- a/source/blender/collada/AnimationExporter.h
+++ b/source/blender/collada/AnimationExporter.h
@@ -167,8 +167,8 @@ protected:
/* step through the bone hierarchy */
void export_bone_animations_recursive(
- Object *ob_arm,
- Bone *bone,
+ Object *ob_arm,
+ Bone *bone,
BCAnimationSampler &sampler);
/* Export for one bone */
@@ -205,10 +205,10 @@ protected:
std::string collada_source_from_values(
BC_animation_source_type tm_channel,
COLLADASW::InputSemantic::Semantics semantic,
- std::vector<float> &values,
- const std::string& anim_id,
+ std::vector<float> &values,
+ const std::string& anim_id,
const std::string axis_name);
-
+
/* Output sources (matrix data) */
std::string collada_source_from_values(
BCMatrixSampleMap &samples,
@@ -216,7 +216,7 @@ protected:
/* Interpolation sources */
std::string collada_linear_interpolation_source(
- int tot,
+ int tot,
const std::string& anim_id);
/* source ID = animation_name + semantic_suffix */
@@ -239,7 +239,7 @@ protected:
const std::string axis_name);
std::string collada_interpolation_source(const BCAnimationCurve &curve, const std::string& anim_id, std::string axis_name, bool *has_tangents);
-
+
std::string get_axis_name(std::string channel, int id);
const std::string get_collada_name(std::string channel_target) const;
std::string get_collada_sid(const BCAnimationCurve &curve, const std::string axis_name);
diff --git a/source/blender/collada/BCAnimationCurve.cpp b/source/blender/collada/BCAnimationCurve.cpp
index 903a6eab3bb..87cf07cc21c 100644
--- a/source/blender/collada/BCAnimationCurve.cpp
+++ b/source/blender/collada/BCAnimationCurve.cpp
@@ -386,8 +386,8 @@ void BCAnimationCurve::add_value(const float val, const int frame_index)
FCurve *fcu = get_edit_fcurve();
fcu->auto_smoothing = FCURVE_SMOOTH_CONT_ACCEL;
insert_vert_fcurve(
- fcu,
- frame_index, val,
+ fcu,
+ frame_index, val,
BEZT_KEYTYPE_KEYFRAME,
INSERTKEY_NOFLAGS);
@@ -676,4 +676,3 @@ void BCBezTriple::get_tangent(Scene *scene, float point[2], bool as_angle, int i
point[1] = bezt.vec[index][1];
}
}
-
diff --git a/source/blender/collada/BCAnimationSampler.cpp b/source/blender/collada/BCAnimationSampler.cpp
index e73656976ca..5c0c1b4316d 100644
--- a/source/blender/collada/BCAnimationSampler.cpp
+++ b/source/blender/collada/BCAnimationSampler.cpp
@@ -317,7 +317,7 @@ bool BCAnimationSampler::get_object_samples(BCMatrixSampleMap &samples, Object *
#if 0
/*
- Add sampled values to FCurve
+ 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)
@@ -352,7 +352,7 @@ void BCAnimationSampler::add_value_set(
else {
good = sample->get_value(tm_type, array_index, &val, subindex);
}
-
+
if (good) {
curve.add_value(val, frame_index);
}
diff --git a/source/blender/collada/BCAnimationSampler.h b/source/blender/collada/BCAnimationSampler.h
index 4becafb31fc..8bf2967a44f 100644
--- a/source/blender/collada/BCAnimationSampler.h
+++ b/source/blender/collada/BCAnimationSampler.h
@@ -121,22 +121,22 @@ class BCSampleFrameContainer {
* with the timeline frame as key.
*
* Some details on the purpose:
- * An Animation is made of multiple FCurves where each FCurve can
+ * An Animation is made of multiple FCurves where each FCurve can
* have multiple keyframes. When we want to export the animation we
* also can decide whether we want to export the keyframes or a set
- * of sample frames at equidistant locations (sample period).
- * In any case we must resample first need to resample it fully
+ * of sample frames at equidistant locations (sample period).
+ * In any case we must resample first need to resample it fully
* to resolve things like:
*
* - animations by constraints
* - animations by drivers
*
* For this purpose we need to step through the entire animation and
- * then sample each frame that contains at least one keyFrame or
+ * then sample each frame that contains at least one keyFrame or
* sampleFrame. Then for each frame we have to store the transform
* information for all exported objects in a BCSampleframe
*
- * The entire set of BCSampleframes is finally collected into
+ * The entire set of BCSampleframes is finally collected into
* a BCSampleframneContainer
*/
diff --git a/source/blender/collada/BCSampleData.cpp b/source/blender/collada/BCSampleData.cpp
index 32210c9bf1b..95898bb5429 100644
--- a/source/blender/collada/BCSampleData.cpp
+++ b/source/blender/collada/BCSampleData.cpp
@@ -184,5 +184,3 @@ float(&BCMatrix::quat() const)[4]
{
return q;
}
-
-
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp
index 9076e2555b7..e708cc9fc8c 100644
--- a/source/blender/collada/ErrorHandler.cpp
+++ b/source/blender/collada/ErrorHandler.cpp
@@ -96,7 +96,7 @@ bool ErrorHandler::handleError(const COLLADASaxFWL::IError *error)
*/
isError = (saxFWLError->getSeverity() != COLLADASaxFWL::IError::SEVERITY_ERROR_NONCRITICAL);
-
+
}
else {
error_context = "OpenCollada";
diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp
index defeec9a52d..9a7a3aa673d 100644
--- a/source/blender/collada/SceneExporter.cpp
+++ b/source/blender/collada/SceneExporter.cpp
@@ -88,7 +88,7 @@ void SceneExporter::writeNodeList(std::vector<Object *> &child_objects, Object *
{
/* 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.
+ 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.
@@ -202,7 +202,7 @@ void SceneExporter::writeNodes(Object *ob)
colladaNode.addExtraTechniqueChildParameter("blender", con_tag, "tar_space", con->tarspace);
colladaNode.addExtraTechniqueChildParameter("blender", con_tag, "lin_error", con->lin_error);
- //not ideal: add the target object name as another parameter.
+ //not ideal: add the target object name as another parameter.
//No real mapping in the .dae
//Need support for multiple target objects also.
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_get(con);
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 911d46b5b49..41e661ffd40 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -256,7 +256,7 @@ Object *bc_add_object(Main *bmain, Scene *scene, ViewLayer *view_layer, int type
}
Mesh *bc_get_mesh_copy(
- BlenderContext &blender_context,
+ BlenderContext &blender_context,
Object *ob,
BC_export_mesh_type export_mesh_type,
bool apply_modifiers,
@@ -351,7 +351,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
+ /* Mark this object as to_export even if it is not in the
export list, but it contains children to export */
std::vector<Object *> children;
@@ -1266,7 +1266,7 @@ bNode *bc_add_node(bContext *C, bNodeTree *ntree, int node_type, int locx, int l
static bNodeSocket *bc_group_add_input_socket(bNodeTree *ntree, bNode *to_node, int to_index, std::string label)
{
bNodeSocket *to_socket = (bNodeSocket *)BLI_findlink(&to_node->inputs, to_index);
-
+
//bNodeSocket *socket = ntreeAddSocketInterfaceFromSocket(ntree, to_node, to_socket);
//return socket;
diff --git a/source/blender/collada/collada_utils.h b/source/blender/collada/collada_utils.h
index 873318794a3..14d1948a42b 100644
--- a/source/blender/collada/collada_utils.h
+++ b/source/blender/collada/collada_utils.h
@@ -173,7 +173,7 @@ inline std::string bc_string_after(const std::string& s, const char c)
inline bool bc_startswith(std::string const & value, std::string const & starting)
{
- if (starting.size() > value.size())
+ if (starting.size() > value.size())
return false;
return (value.substr(0, starting.size()) == starting);
}
@@ -184,8 +184,8 @@ inline bool bc_endswith(std::string const & value, std::string const & ending)
return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
}
-extern std::string bc_replace_string(std::string data, const std::string& pattern, const std::string& replacement);
-extern std::string bc_url_encode(std::string data);
+extern std::string bc_replace_string(std::string data, const std::string& pattern, const std::string& replacement);
+extern std::string bc_url_encode(std::string data);
extern void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene);
extern void bc_match_scale(std::vector<Object *> *objects_done, UnitConverter &unit_converter, bool scale_to_scene);