Commit Graph

54 Commits

Author SHA1 Message Date
Gaia Clary
bc055258d5 fix: collada transformtype must be identical for animation export and object export
When exporting an object we can choose the transformation type 'Matrix'
or 'trans/rot/scale' When exporting an animation we have the same choice
regarding the used transformation type.

However we must make sure that animations and objects use the same
transformation type within one colleda export. The user interface is
now reworked such that the correct settings are always guaranteed.

I also reworked the tool tips
2019-05-27 16:00:32 +02:00
Gaia Clary
4db3916b60 refactor collada: rename add_node_transform() to add_joint_transform() 2019-05-27 16:00:32 +02:00
Gaia Clary
b3f96da2e6 fix unreported Collada exporter Regression: Added back minimal support for Maya bindpose 2019-05-23 22:37:26 +02:00
Gaia Clary
6be9d19951 Collada exporter update
Added new feature: Collada: global axis rotation upon export (UI)

The new feature allows to specify the target rest coordinate system upon export.
This allows for example to export a character that is in Blender orientation (Y forward)
to match the Secondlife orientation where (-X forward)

- Refactor:Added new utility methods to collada_utils
           Made BCMatrix class more powerfull
           moved Blender related structures into new BlenderContext class
           added class wrapper to encapsulate ExportSettings structure
           Added blender context getters to ExportSettings
           added access methods to BlenderContext into ExportSettings class
           Moved class BCMatrix into BlenderContext
           moved utility functions from collada_util into BlenderContext
           replace own function for parenting by a call to ED_object_parent_set()

- Cleanup: removed obsolete parameters from methods
           renamed parameters for better understanding
           cleanup whitespace and indentation
           removed obsolete comments
2019-05-23 12:29:20 +02:00
Campbell Barton
5d7ee02b17 Cleanup: comments (long lines) in collada 2019-04-30 13:41:21 +10:00
Campbell Barton
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton
cc10d86535 DNA: rename Object.size -> scale
Resolves a common cause of confusion.
2019-02-18 15:43:55 +11:00
Campbell Barton
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton
36da85ebeb Cleanup: style 2018-11-28 11:24:45 +11:00
Gaia Clary
65874d3f33 fix: Collada: The limit precision option does nothing 2018-11-26 23:14:45 +01:00
Campbell Barton
908b6960c0 Merge branch 'master' into blender2.8 2018-06-08 08:10:35 +02:00
Campbell Barton
a25c11fd8d Cleanup: trailing space
Remove from blender/nodes, collada, blenfont & render.
2018-06-08 08:07:48 +02:00
Brecht Van Lommel
ad797ed39a Fix blenderplayer and collada build. 2018-04-17 11:01:52 +02:00
Luca Rood
1c4c288727 Pass EvaluationContext argument everywhere
Note that some little parts of code have been dissabled because eval_ctx
was not available there. This should be resolved once DerivedMesh is
replaced.
2017-07-21 14:47:26 +02:00
Gaia Clary
6cfa962986 Collada - removed TransformBase baseclass (not needed for anything) 2017-03-23 14:14:22 +01:00
Gaia Clary
dac5438562 COLLADA: Removed obsolete Export select option 'Both' which created invalid data (duplicate transformation information for nodes) 2016-11-02 14:11:46 +01:00
Bastien Montagne
64a6a86d57 Fix two memleaks found by coverity. 2016-08-16 16:16:22 +02:00
Bastien Montagne
fb7ff31315 Fix stupid handling of 'Object.matrix_local' in RNA.
The getter of this matrix (actually, `BKE_object_matrix_local_get()`) was only correct
in case of pure-object parenting, bone parenting and such did not gave valid results.

Also cleaned up a bit setter code, was using as temp storage ob->obmat itself,
which is supposed to be a world matrix!

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D958
2014-12-29 15:26:38 +01:00
Campbell Barton
8489b94e07 Math Lib: rename mul_serie_m3 to mul_m3_series & reorder args
Importantly, reversed mul_serie_m3 argument order (so it matches the m4 function)
2014-07-21 18:57:35 +10:00
Campbell Barton
7c7b7302d3 Math Lib: use variable length args for mul_serie_m3,m4 (instead of trailing NULL's) 2014-07-20 14:01:42 +10:00
Campbell Barton
824ec5a388 code cleanup: case & brace placement 2013-07-19 10:40:43 +00:00
Gaia Clary
ce6cfeca40 minor: commented fallthrough 2013-07-14 12:30:05 +00:00
Gaia Clary
f5033303e1 fix: #34823 Collada: nodes exporting world matrices 2013-07-14 00:34:21 +00:00
Campbell Barton
cda5770160 code cleanup: also fix crash in GPU_state_print(). and confine to debug mode builds. 2013-06-13 11:59:28 +00:00
Campbell Barton
ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
Campbell Barton
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
Campbell Barton
0807c976f4 code cleanup: rename BKE_mesh_to_curve_ex --> BKE_mesh_to_curve_nurblist,
also correct odd indentation.
2013-03-15 10:48:48 +00:00
Gaia Clary
8664d4b98b Collada: Added option for how rot,loc,trans data is exported (improves flexibility for support of other 3D tools) 2013-03-06 23:21:52 +00:00
Gaia Clary
eb9c3f6aec [#34062] Collada: fixed redundant transform information and order of creation for the loc/rot/trans 2013-02-11 22:45:48 +00:00
Campbell Barton
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
Gaia Clary
c263753d17 Added gsoc-2012 collada improvements from bratwurst branch 2013-01-21 13:45:49 +00:00
Campbell Barton
7c699a217a define the size of matrix args for both rows/cols. 2012-12-11 14:29:01 +00:00
Campbell Barton
2e8a2f7668 style cleanup 2012-06-12 22:05:33 +00:00
Campbell Barton
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
Campbell Barton
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
Campbell Barton
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Campbell Barton
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
Campbell Barton
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Juha Mäki-Kanto
e6b708b36b Minor change collada export; don't even run the parentinv-test when ob->parent is NULL 2012-02-18 15:41:09 +00:00
Juha Mäki-Kanto
c61e03c229 collada export: Don't write parentinverse if ob->parent is NULL 2012-02-12 15:30:07 +00:00
Domino Marama
2cb3fe3dfd Patch #30050 by Juha Mäki-Kanto (kanttori)
Fixes for Collada exporter.
Adds Second Life compatibility for armatures
Adds objects parentinverse to exported transform if it's non-identity
Fix mismatch between add_inv_bind_mats and add_joints_source accessor counts
Fix bone exports in world space should be local space
2012-02-05 16:19:28 +00:00
Brecht Van Lommel
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
d4898f9c40 use macros RAD2DEG & DEG2RAD rather then multiplying by 180.0/M_PI or M_PI/180.0 2011-09-17 09:43:51 +00:00
Nathan Letwory
1764f2135d Some whitespace changes 2011-09-04 00:15:59 +00:00
Sukhitha Prabhath Jayathilake
f3c05e8eb2 armature animation export fix. 2011-08-17 18:28:01 +00:00
Sukhitha Prabhath Jayathilake
cbec4e2768 export bone transform matrix with sid. 2011-08-08 16:38:57 +00:00
Sukhitha Prabhath Jayathilake
c863cdcaf3 Fixed issues with unit conversion and animation channels. 2011-06-25 07:23:23 +00:00