Blender Git Loki

Blender Git "collada2.8" branch commits.

Page: 6 / 7

August 2, 2018, 12:34 (GMT)
Feature: Collada: Added new classes for The Animation exporter

Actually the new classes are not depending on Collada itself.
They coul dbe reused for other purposes as well, for example
as a general helper tool for Animation export.
August 2, 2018, 12:31 (GMT)
fix: Collada: changed scene update for sampling animation data

According to a comment in physics_fluid.c it sounds like the
function BKE_scene_update_for_newframe() does not work in all
cases. According to the comment it seems better to use
ED_update_for_newframe() instead.

This change only affects the export of Animation Data.
I make this change as a precaution. I am not aware that
there was anything wrong here before.
August 2, 2018, 12:25 (GMT)
Feature Collada: Added AnimationCurveCache for exporting sampled animations

Details:
When exporting sampled Animations to Collada we need to create sample
data for every Animation curve. However it turns out to be extremely
slow when we repeatedly step over the entire animation for each curve.

The solution is to only step over the animation once but cache all needed
animation data in a cache. Once the animation has been processed,
all export information is located in the cache and can be easily
read from there.

The AnimationCurveCache is the first try to proof the concept.
This is work in progres and may still change a lot.
August 2, 2018, 12:25 (GMT)
Cleanup Collada: Added #ifdef to avoid duplicate include

This avoids that the include file AnimationExporter.h
gets included more than once.
August 2, 2018, 12:25 (GMT)
Feature Collada: Added new class files to CMakeLists.txt

AnimationClipExporter.cpp and AnimationClipExporter.h both need
to be added to CMakeLists.txt so they are actually built into
Blender
August 2, 2018, 12:25 (GMT)
Feature Collada: Added new Enum and Mappings

* BC_animation_transform_type

Enum that Contains all animation types which can be exported

* BC_ANIMATION_NAME_FROM_TYPE

Map from transform_type to the name that is used in the exported data

* BC_ANIMATION_TYPE_FROM_NAME

Maps to get the animation transformtype from RNA Pathes
and from collada names (also needed for the Importer later)

These maps and Enums will later replace hard coded integer numbers
which are currently used all over the place and make it really hard
to understand what exactly is going on.
August 2, 2018, 12:25 (GMT)
Feature Collada: Added new class for exporting Animation Clips.

This class is work in progres and not yet used. It is
also not yet largely tested and needs some improvements
regarding which actions will be exported for which objects.
August 2, 2018, 12:25 (GMT)
Cleanup Collada: renamed parameters for better reading

I tested and commited each of the documented changes
separately and amended all changes into one single commit:

None of the changes makes a functional change. All changes are
in AnimationExporter.h and AnimationExporter.cpp

* Renamed from transformName to channel_type
* in create_sampled_animation():
renamed label to channel_type
* in export_sampled_transrotloc_animation()
in export_sampled_matrix_animation()
in export_sampled_animation_set()
in create_sampled_animation():
Renamed variable from times to frames
* Fixed Indentation in AnimationExporter.h
* break up function definition into multiple lines.
August 2, 2018, 12:22 (GMT)
Feature Collada: Support for Animation Clip export

1.) 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>

2.) Added support functions for this extra level:

open_animation_container(bool has_container, Object *ob);
close_animation_container(bool has_container);

3.) Added Function for organizing unassigned exported animations

openAnimationWithClip() (not uesed yet)

4.) Added support function to check if a sampled matrix animation
is actually animating

bool is_flat_line() (not used yet)
August 2, 2018, 12:20 (GMT)
Cleanup: Fixed indentation and added white space lines

Very minor change just for better reading
August 2, 2018, 12:16 (GMT)
Feature Collada: Prepare for exporting all actions of a scene

bc_getSceneActions(Object *ob, bool all_actions)

This function is supposed to return the list of actions
to be exported for the given object. However the function
is not yet used. Also it needs an improvement such that only
actions which match the active object will be exported.
This is still work in progress.
August 2, 2018, 12:13 (GMT)
Cleanup Collada: changed import stage names for better reading.

The Collada Importer processes the imported files twice. It is still
not clear to me why it needs to do that. However i renamed the
Import stages for now to clarify a bit what really happens:

General -> Fetching_Scene_data
Controller -> Fetching_Controller_data

This change makes it more clear that when the controller data is
fetched these methods are not needed. Before it was much harder
to understand what this is all about.
August 2, 2018, 12:11 (GMT)
Fix: Collada Exporter/Import break Object hierarchy

Exporter:
Children of Armatures where not exported as children but as sibblings.

Importer:
When an object is linked to an armature then the Importer
unconditionally makes the child a direct child of Armature.
Actually, if the child is already a child of the armature, then
there is no need to reparent it.
August 2, 2018, 12:11 (GMT)
cleanup: Collada remove unused function

This was a function introduced earlier,
but it is no longer needed.
August 2, 2018, 12:11 (GMT)
Cleanup Collada: Added new low level functions for later usage

bc_get_action_id() : To create unique Collada conform identifiers

The following new functions handle conversions of matrices
to various forms:

bc_copy_darray_m4d() : Copy matrix to an array of floats
bc_copy_v44_m4d() : Copy matrix to a vector of vectors of floats
bc_copy_m4d_v44() : opposite of previous function

Note: The vector<vector<double>> matrix is needed so that i later can
easily store matrix data in another vector (containing matrix curves)
August 2, 2018, 12:11 (GMT)
Cleanup: Added comment to clarify

The exporter does not export invisible and hidden objects!
This may cause issues. I added the comment to make this clear in
the code. This behavior may later be improved.
August 2, 2018, 12:09 (GMT)
Collada: Added Option "All actions" for exporting animation libs

This is work in progress. The follow up changes in
the exporter will eventually make use of the new options.
Currently the new option does nothing.
August 2, 2018, 12:06 (GMT)
Cleanup: renamed transformName to channel_type

This makes it more clear what the parameter is about.
Especially it is not just a name but the paramter also
controls what type of data is exactly created by the exporter.
August 2, 2018, 12:06 (GMT)
Cleanup: Added back explicit object type checks in Animation Exporter

For exporting Lamp Animation or Camera Animation i added utility functions
to fetch the related actions. And only if a matching action was found, the
export was processed for the object. However it turned out that the code
became less clear by this change. So i reverted it back to first check
the object type and only fetch the related action if the object type matches.
August 2, 2018, 12:05 (GMT)
Cleanup: prepended bc_ to utility functions (satisfy name convention)

All utility functions from collada should contain the prependix bc_
Some of the new added functions did not comply to the convention.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021