Commit Graph

24 Commits

Author SHA1 Message Date
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
Gaia Clary 322cf89a14 Partial rewrite of the Collada Module for Blender 2.8
Most important changes are in the Animation exporter and Animation Importer.
There is still some cleaning up to be done. But the Exporter/Importer basically
work within Blender 2.8

Some details:

User Interface:
The interface has been reorganized to look more like the FBX interface.

New options in user interface:

* keep_keyframes:
  When sampling the distance between 2 keyframes is defined by
  the sampling rate. Furthermore the keyframes defined in the
  FCurves are not exported. However when this option is enabled
  then also the defined keyframes will be added to the exported fcurves

* keep_smooth_curves:
  When sampling we do not use FCurves. So we also have no Curve handles
  for smooth exporting. However when this option is enabled, Blender
  does its best to recreate the handles for export. This is a very
  experimental feature and it is know to break when:

  - the exported animated objects have parent inverse matrices
    different from the unit matrix
  - The exported objects have negative scaling

  There may be many other situations when this feature breaks.
  This needs to be further tested. It may be removed later or replaced
  by something less wonky.

BlenderContext:
is a new class that contains the bridge to Blender. It contains
pointers to the current export/import context plus derived values
of Depsgraph, Scene, Main

Reporting:
I reorganized the output on the Blender Console to become more
informative and more readable

Preservation of Item names:
name attributes are now encoded with XML entities. This makes
sure that i can export/import names exactly defined in the tool.
This affects material names, bone names and object names.

Hierarchy export:
* Object and Bone Hierarchies are now exported correctly
  by taking the Blender parent/child hierarchy into account
* Export also not selected intermediate objects

  Problem:
  When we export an Object Hierarchy, then we must export
  all elements of the hierarchy to maintain the transforms. This
  is especially important when exporting animated objects, because the
  animation curves are exported as relative curves based on the
  parent-child hierarchy. If an intermediate animated object is missing
  then the exported animation breaks.

  Solution:
  If the "Selected" Optioon is enabled, then take care
  to also export all objects which are not selected and hidden,
  but which are parents of selected objects.

Node Based Material Importer (wip):
Added basic support for Materials with diffuse color and
diffuse textures. More properties (opacity, emission) need
changes in the used shader.
Note: Materials are all constructed by using the principled BSDF shader.

Animation Exporter:
* Massive optimization of the Animation Bake tool (Animation Sampler).
  Instead of sampling each fcurve separately, i now sample all
  exported fcurves simultaneously. So i avoid many (many!)
  scene updates during animation export.
* Add support for Continuous Acceleration (Fcurve handles)
  This allows us to create smoother FCurves during importing Collada
  Animation curves. Possibly this should become an option ionstead of
  a fixed import feature.
* Add support for sampling curves (to bake animations)
* The animation sampler now can be used for any animation curve.
  Before the sampler only looked at curves which are supported by
  Standard Collada 1.4. However the Collada exporter currently
  ignores all animation curves which are not covered by the 1.4.1
  Collada Standards. There is still some room for improvements
  here (work in progres)

  Known issues:

    * Some exports do currently not work reliably, among those
      are the camera animations, material animations and light animations
      those animations will be added back next (work in progres)

    * Exporting animation curves with keyframes (and tangents)
      sometimes results in odd curves (when parent inverse matrix is involved)
      This needs to be checked in more depth (probably it can not be solved).

    * Export of "all animations in scene" is disabled because the
      Collada Importer can not handle this reliably at the
      moment (work in progres).

* Support for Animation Clip export
  Added one extra level to the exported animations
  such that now all scene animations are enclosed:

  <Animation name="id_name(ob)_Action">
    <Animation>...</Animation>
    ...
  </Animation>

Animation Importer:
* Import of animations for objects with multiple materials
  When importing multiple materials for one object,
  the imported material animation curves have all been
  assigned to the first material in the object.

Error handling (wip):
The Importer was a bit confused as it sometimes ignored fatal
parsing errors and continued to import. I did my best to
unconfuse it, but i believe that this needs to be tested more.

Refactoring:

update : move generation of effect id names into own function
update : adjust importer/exporter for no longer supported HEMI lights
cleanup: Removed no lopnger existing attribute from the exporter presets
cleanup: Removed not needed Context attribute from DocumentExporter
fix    : Avoid duplicate deletion of temporary items
cleanup: fixed indentation and white space issues
update : Make BCAnimation class more self contained
cleanup: Renamed classes, updated comments for better reading
cleanup: Moved static class functions to collada_utils
cleanup: Moved typedefs to more intuitive locations
cleanup: indentation and class method declarations
cleanup: Removed no longer needed methods
update : Moved Classes into separate files
cleanup: Added comments
cleanup: take care of name conventions
...    : many more small changes, not helpful to list them all
2018-11-23 17:08:14 +01:00
Bastien Montagne bb7202495a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/ArmatureExporter.cpp
	source/blender/collada/ArmatureExporter.h
	source/blender/collada/DocumentExporter.cpp
	source/blender/collada/DocumentExporter.h
	source/blender/collada/SceneExporter.cpp
	source/blender/collada/SceneExporter.h
	source/blender/collada/collada.cpp
	source/blender/collada/collada.h
	source/blender/editors/armature/armature_edit.c
	source/blender/editors/armature/editarmature_retarget.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/include/ED_armature.h
	source/blender/editors/include/ED_object.h
	source/blender/editors/include/ED_screen.h
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_transform.c
	source/blender/editors/screen/screen_edit.c
	source/blender/editors/screen/screen_ops.c
	source/blender/windowmanager/intern/wm.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_window.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-06 16:25:28 +02:00
Bastien Montagne 48e871ab1d Cleanup: Nuke moar G.main usages... 2018-06-06 15:50:24 +02:00
Brecht Van Lommel ad797ed39a Fix blenderplayer and collada build. 2018-04-17 11:01:52 +02:00
Brecht Van Lommel 34ab90f546 Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.

This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.

Differential Revision: https://developer.blender.org/D3152
2018-04-16 19:55:33 +02:00
Gaia Clary 4a892adac5 merge from master (needed to fix collada headerfiles which have been modified in master and in blender2.8 slightly different) 2018-02-28 17:29:56 +01:00
Gaia Clary e73fe77ac0 collada: EvaluationContext is now feeded into the class instances of AnimationExporter and DocumentExporter on creation. Also skipped the const qualifier for now because BKE_scene_graph_update_for_newframe() needs it to be not const 2018-02-28 17:10:57 +01:00
Gaia Clary a363324f7f Collada: Make EvaluationContext const as its only used for reading here 2018-02-28 16:05:29 +01:00
Gaia Clary 91c3cfbb6f collada: call from operator to Collada exporter/importer now uses structures instead of passing many parameters 2018-02-28 16:05:29 +01:00
Gaia Clary 01f732d97b Collada: Moved structure definitions for export settings to the exportSettings.h Also make typedefs for import/export structures. 2018-02-28 16:05:28 +01:00
Gaia Clary 7dd0e36dc4 simplified collada integration in Blender. made functions mostly similar with blender2.8 2018-02-26 17:18:31 +01:00
Gaia Clary 4e95807db3 fix T47484: Added proper error reporting for Collada Exporter 2016-02-20 21:42:12 +01:00
Campbell Barton bc8f602601 style cleanup 2012-10-20 18:46:57 +00:00
Gaia Clary 36ed4818e5 patch #31794 Collada: make exporter more robust, now uses BKE_object_relational_superset() 2012-06-12 21:25:29 +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
Nathan Letwory 3dc0ee19c4 Introduce struct for export settings in COLLADA export code. This will make it easier to
add new options without having to change function signatures all over the place.
2011-09-07 18:23:30 +00:00
Nathan Letwory cf43e48fc7 Apply patch 4636051. COLLADA: Export selection.
Original patch by Jan Diederich, adapted by Pelle Johnsen. Review assistance by Daniel Tavares.

This patch adds an option to export only the selection.
2011-07-04 08:59:28 +00:00
Nathan Letwory bcec824299 doxygen: COLLADA entry 2011-02-21 08:38:53 +00:00
Nathan Letwory 82209cdc86 Reorganisation of COLLADA import code. Classes have been split into their own files.
No functional changes.

Where necessary extern "C" {} blocks have been added.
2010-10-05 00:05:14 +00:00
Arystanbek Dyussenov a545998c84 Merge -c 29009,29081,29189 from COLLADA branch into trunk. 2010-06-03 17:41:33 +00:00
Arystanbek Dyussenov 31258507d0 Merge of the COLLADA GSoC branch into trunk.
COLLADA code is disabled by default (it has dependencies requiring manual install).

SCons and CMake builds are supported on Windows and Linux, no Mac building yet. More on building COLLADA code: http://wiki.blender.org/index.php/User:Kazanbas/Building_Collada_Branch.

The detailed command log of the merge (can be useful for educational purposes):

branch=https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-chingachgook
# collada code
svn copy $branch/source/blender/collada source/blender/collada
# operator
svn merge -c 20401,20955,21077,24077,24079 $branch/source/blender/windowmanager/intern/wm_operators.c source/blender/windowmanager/intern/wm_operators.c
# menu
svn merge -c 24079 $branch/release/scripts/ui/space_info.py release/scripts/ui/space_info.py
# scons
svn merge -c 20398 $branch/source/blender/SConscript source/blender/SConscript
svn merge -c 20398,20691,20955,22726 $branch/tools/btools.py tools/btools.py
svn merge -c 20691,20955,22726 $branch/tools/Blender.py tools/Blender.py
svn merge -c 20398,20692,20955 $branch/config/linux2-config.py config/linux2-config.py
svn merge -c 22726 $branch/config/win64-vc-config.py config/win64-vc-config.py
svn merge -c 22726 $branch/config/win32-vc-config.py config/win32-vc-config.py
svn merge -c 24077 $branch/source/blender/windowmanager/SConscript source/blender/windowmanager/SConscript
# cmake
svn merge -c 23319,23905,24077,24158 $branch/CMakeLists.txt CMakeLists.txt
svn merge -c 23319 $branch/source/blender/CMakeLists.txt source/blender/CMakeLists.txt
svn merge -c 23319 $branch/source/creator/CMakeLists.txt source/creator/CMakeLists.txt
svn merge -c 23319 $branch/CMake/macros.cmake CMake/macros.cmake
svn merge -c 24077 $branch/source/blender/windowmanager/CMakeLists.txt source/blender/windowmanager/CMakeLists.txt
2009-10-30 15:35:50 +00:00