[Bf-blender-cvs] [4755c234585] collada: Merge branch 'master' into collada
Gaia Clary
noreply at git.blender.org
Thu May 23 11:55:29 CEST 2019
Commit: 4755c2345854dd97234de2438e00008311537dde
Author: Gaia Clary
Date: Wed May 22 22:35:40 2019 +0200
Branches: collada
https://developer.blender.org/rB4755c2345854dd97234de2438e00008311537dde
Merge branch 'master' into collada
===================================================================
===================================================================
diff --cc source/blender/collada/AnimationExporter.cpp
index 2c9865bcd95,eaa1626f7d8..ba878a28e50
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@@ -77,20 -77,24 +77,20 @@@ void AnimationExporter::close_animation
bool AnimationExporter::exportAnimations()
{
- Scene *sce = blender_context.get_scene();
+ Scene *sce = export_settings.get_scene();
- LinkNode &export_set = *this->export_settings.get_export_set();
+ LinkNode *export_set = this->export_settings->export_set;
bool has_anim_data = bc_has_animations(sce, export_set);
int animation_count = 0;
if (has_anim_data) {
BCObjectSet animated_subset;
- BCAnimationSampler::get_animated_from_export_set(animated_subset, export_set);
+ BCAnimationSampler::get_animated_from_export_set(animated_subset, *export_set);
animation_count = animated_subset.size();
- BCAnimationSampler animation_sampler(blender_context, animated_subset);
+ BCAnimationSampler animation_sampler(export_settings, animated_subset);
try {
- animation_sampler.sample_scene(export_settings->sampling_rate,
- /*keyframe_at_end = */ true,
- export_settings->open_sim,
- export_settings->keep_keyframes,
- export_settings->export_animation_type);
+ animation_sampler.sample_scene(export_settings, /*keyframe_at_end = */ true);
openLibrary();
diff --cc source/blender/collada/GeometryExporter.cpp
index 926d85e7fb2,bda6fec70a8..c0573dcc081
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@@ -127,14 -126,9 +127,9 @@@ void GeometryExporter::operator()(Objec
closeMesh();
- if (me->flag & ME_TWOSIDED) {
- mSW->appendTextBlock(
- "<extra><technique profile=\"MAYA\"><double_sided>1</double_sided></technique></extra>");
- }
-
closeGeometry();
- if (this->export_settings->include_shapekeys) {
+ if (this->export_settings.get_include_shapekeys()) {
Key *key = BKE_key_from_object(ob);
if (key) {
KeyBlock *kb = (KeyBlock *)key->block.first;
diff --cc source/blender/collada/collada_utils.h
index 8fe64a19401,522aeb1ad1e..acbf6f94add
--- a/source/blender/collada/collada_utils.h
+++ b/source/blender/collada/collada_utils.h
@@@ -227,58 -235,15 +227,58 @@@ extern bool bc_get_property_matrix(Bon
extern void bc_enable_fcurves(bAction *act, char *bone_name);
extern bool bc_bone_matrix_local_get(Object *ob, Bone *bone, Matrix &mat, bool for_opensim);
extern bool bc_is_animated(BCMatrixSampleMap &values);
- extern bool bc_has_animations(Scene *sce, LinkNode &node);
+ extern bool bc_has_animations(Scene *sce, LinkNode *node);
extern bool bc_has_animations(Object *ob);
-extern void bc_create_restpose_mat(const ExportSettings *export_settings,
+void bc_add_global_transform(Matrix &to_mat,
+ const Matrix &from_mat,
+ const BCMatrix &global_transform,
+ const bool invert = false);
+void bc_add_global_transform(Vector &to_vec,
+ const Vector &from_vec,
+ const BCMatrix &global_transform,
+ const bool invert = false);
+
+void bc_add_global_transform(Vector &to_vec,
+ const BCMatrix &global_transform,
+ const bool invert = false);
+void bc_add_global_transform(Matrix &to_mat,
+ const BCMatrix &global_transform,
+ const bool invert = false);
+
+extern void bc_create_restpose_mat(BCExportSettings &export_settings,
Bone *bone,
float to_mat[4][4],
- float world[4][4],
+ float from_mat[4][4],
bool use_local_space);
+class ColladaBaseNodes {
+ private:
+ std::vector<Object *> base_objects;
+
+ public:
+ void add(Object *ob)
+ {
+ base_objects.push_back(ob);
+ }
+
+ bool contains(Object *ob)
+ {
+ std::vector<Object *>::iterator it = std::find(base_objects.begin(), base_objects.end(), ob);
+ return (it != base_objects.end());
+ }
+
+ int size()
+ {
+ return base_objects.size();
+ }
+
+ Object *get(int index)
+ {
+ return base_objects[index];
+ }
+};
+
class BCPolygonNormalsIndices {
std::vector<unsigned int> normal_indices;
More information about the Bf-blender-cvs
mailing list