Skip to content

Commit

Permalink
add changes from internal repo to COLLADAMaya
Browse files Browse the repository at this point in the history
  • Loading branch information
opencollada-sebastian committed Nov 6, 2009
1 parent bd3b5c2 commit b5e5ea0
Show file tree
Hide file tree
Showing 102 changed files with 15,611 additions and 6,315 deletions.
8 changes: 6 additions & 2 deletions COLLADAMaya/BUGS.TXT
@@ -1,6 +1,10 @@
Please go to http://sourceforge.net/projects/COLLADAMaya for a full
list of known bugs.
Please go to http://sourceforge.net/projects/COLLADAMaya
for a full list of known bugs.

Have a look on the TODO file!

You can report new bugs on
http://code.google.com/p/opencollada/issues/list



7 changes: 5 additions & 2 deletions COLLADAMaya/BUILD_MAC.TXT
Expand Up @@ -6,8 +6,9 @@ To build the COLLADAMaya plug-in, you need following installations:
- libxml

Supported versions of Autodesk Maya are:
- Autodesk Maya 2008
- Autodesk Maya 2010
- Autodesk Maya 2009
- Autodesk Maya 2008

Supported and tested versions of boost c++ libraries:
- Boost 1.35
Expand All @@ -29,10 +30,12 @@ can find the XCode project file in
Build:
------
Download and compile the sources of COLLADAMaya from
https://colladamaya.svn.sourceforge.net/svnroot/colladamaya/branches/nextgen.
http://code.google.com/p/opencollada/source/checkout

Open the project from ~project_dir/COLLADAMaya/COLLADAMaya.xcodeproj
The solution configurations
- Release 2010
- Debug 2010
- Release 2009
- Debug 2009
- Release 2008
Expand Down
9 changes: 7 additions & 2 deletions COLLADAMaya/BUILD_WIN.TXT
Expand Up @@ -7,6 +7,7 @@ To build the COLLADAMaya plug-in, you need following installations:
Supported versions of Autodesk Maya are:
- Autodesk Maya 2008
- Autodesk Maya 2009
- Autodesk Maya 2010

Supported and tested versions of boost c++ libraries:
- Boost 1.35
Expand All @@ -33,6 +34,8 @@ variables for a win32, respectively a x64 system:

NOTE: The "YOUR_MAYA_PATH" used in the following section depends on your Maya
version. Following environment variables to your Maya location are supported:
- MAYA_PATH2010
- MAYA_PATH2010_X64
- MAYA_PATH2009
- MAYA_PATH2009_X64
- MAYA_PATH2008
Expand All @@ -57,10 +60,12 @@ x64:
lib directory of boost.

Download and compile the sources of COLLADAMaya from
https://colladamaya.svn.sourceforge.net/svnroot/colladamaya/branches/nextgen.
http://code.google.com/p/opencollada/source/checkout

Open the solution in ~project_dir/COLLADAMaya/COLLADAMaya.sln
The solution configurations
- ReleasePlugin2010
- DebugPlugin2010
- ReleasePlugin2009
- DebugPlugin2009
- ReleasePlugin2008
Expand All @@ -73,7 +78,7 @@ created "COLLADAMaya.mll" file into this directory.

The solution configuration "ReleaseConsole2008" and "DebugConsole2008" create
the "COLLADAMaya.exe" file in the output folder and will be copied into the
"./nextgen/COLLADAMaya/testsuite" folder. If you start the "testAllFiles.bat",
"./OpenCOLLADA/COLLADAMaya/testsuite" folder. If you start the "testAllFiles.bat",
all maya files in the current directory and all sub-directories will be
converted to collada "dae" files and checked with the coherency checker.

Expand Down
282 changes: 280 additions & 2 deletions COLLADAMaya/COLLADAMaya.sln

Large diffs are not rendered by default.

3,360 changes: 2,846 additions & 514 deletions COLLADAMaya/COLLADAMaya.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions COLLADAMaya/INSTALL_LINUX.TXT
Expand Up @@ -15,9 +15,9 @@ version. Following environment variables to your Maya location are supported:
You have to copy following files:
- The COLLADAMaya.so file to your personal Maya plug-in directory.
($YOUR_MAYA_PATH)/plug-ins
- The colladaNextGenExporterOpts.mel file to your Maya scripts directory.
- The openColladaExporterOpts.mel file to your Maya scripts directory.
($YOUR_MAYA_PATH)/scripts
- the colladaNextGenImporterOpts.mel file to your Maya scripts directory.
- the openColladaImporterOpts.mel file to your Maya scripts directory.
($YOUR_MAYA_PATH)/scripts

You can also define a environment variable "MAYA_PLUG_IN_PATH" and put the
Expand Down
21 changes: 13 additions & 8 deletions COLLADAMaya/INSTALL_MAC.TXT
Expand Up @@ -3,8 +3,9 @@ Requirements:
To run the COLLADAMaya plug-in, you need a version of Autodesk Maya installed.

Supported versions are:
Autodesk Maya 2008
Autodesk Maya 2010
Autodesk Maya 2009
Autodesk Maya 2008

For help on build, please read the BUILD file.

Expand All @@ -15,21 +16,25 @@ your Autodesk Maya directories.

NOTE: The "YOUR_MAYA_PATH" used in the following section depends on your Maya
version. Following environment variables to your Maya location are supported:
- MAYA_PATH2008
- MAYA_PATH2010
- MAYA_PATH2009
- MAYA_PATH2008

You have to copy following files:
- ~project_dir/COLLADAMaya/build/Debug/COLLADAMaya.bundle to your personal
Maya plug-in directory. The default directory on OSMac is
/Users/Shared/Autodesk/maya/2008/plug-ins respectively
/Users/Shared/Autodesk/maya/2009/plug-ins
- ~project_dir/COLLADAMaya/scripts/colladaNextGenExporterOpts.mel to your
/Users/Shared/Autodesk/maya/2010/plug-ins respectively
/Users/Shared/Autodesk/maya/2009/plug-ins respectively
/Users/Shared/Autodesk/maya/2008/plug-ins
- ~project_dir/COLLADAMaya/scripts/openColladaExporterOpts.mel to your
personal Maya scripts directory. The default directory on OSMac is
/Users/Shared/Autodesk/maya/2008/scripts respectively
/Users/Shared/Autodesk/maya/2010/scripts respectively
/Users/Shared/Autodesk/maya/2009/scripts respectively
/Users/Shared/Autodesk/maya/2008/scripts
- ~project_dir/COLLADAMaya/scripts/colladaNextGenImporterOpts.mel to your
- ~project_dir/COLLADAMaya/scripts/openColladaImporterOpts.mel to your
personal Maya scripts directory. The default directory on OSMac is
/Users/Shared/Autodesk/maya/2008/scripts respectively
/Users/Shared/Autodesk/maya/2010/scripts respectively
/Users/Shared/Autodesk/maya/2009/scripts respectively
/Users/Shared/Autodesk/maya/2008/scripts

You can also define a environment variable "MAYA_PLUG_IN_PATH" and put the
Expand Down
15 changes: 8 additions & 7 deletions COLLADAMaya/INSTALL_WIN.TXT
Expand Up @@ -3,8 +3,9 @@ Requirements:
To run the COLLADAMaya plug-in, you need a version of Autodesk Maya installed.

Supported versions are:
Autodesk Maya 2008
Autodesk Maya 2010
Autodesk Maya 2009
Autodesk Maya 2008

To run the binary you have to install the Microsoft Visual C++ 2005
Redistributable Package (x86). You can download
Expand All @@ -22,25 +23,25 @@ your Autodesk Maya directories.
NOTE:
The "YOUR_MAYA_PATH" used in the following section depends on your Maya
version. Following environment variables to your Maya location are supported:
- MAYA_PATH2010
- MAYA_PATH2010_X64
- MAYA_PATH2009
- MAYA_PATH2009_X64
- MAYA_PATH2008
- MAYA_PATH2008_X64

If you install the binary, you have to copy following files:
- "COLLADAMaya.mll" to $(YOUR_MAYA_PATH)/bin/plug-ins
- "colladaNextGenExporterOpts.mel" to $(YOUR_MAYA_PATH)/scripts/others
- "colladaNextGenImporterOpts.mel" to $(YOUR_MAYA_PATH)/scripts/others
- "openColladaExporterOpts.mel" to $(YOUR_MAYA_PATH)/scripts/others
- "openColladaImporterOpts.mel" to $(YOUR_MAYA_PATH)/scripts/others

You can also define a environment variable
"MAYA_PLUG_IN_PATH" and put the
You can also define a environment variable "MAYA_PLUG_IN_PATH" and put the
mll-file into the refered directory. Autodesk Maya will load the plug-ins
from this directory too.

Execute:
--------
When
you start Autodesk Maya, go to the menu
When you start Autodesk Maya, go to the menu
Window > Settings/Preferences > Plug-in Manager
and load the plug-in "COLLADAMaya.mll" from the extended list.

Expand Down
2 changes: 1 addition & 1 deletion COLLADAMaya/LICENSE.TXT
@@ -1,4 +1,4 @@
Copyright (c) 2008 NetAllied Systems GmbH
Copyright (c) 2009 NetAllied Systems GmbH

Portions of the code are:
Copyright (c) 2005-2007 Feeling Software Inc.
Expand Down
4 changes: 0 additions & 4 deletions COLLADAMaya/TODO.TXT
Expand Up @@ -15,10 +15,6 @@
(possible solution could be the animation formula from collada 1.5)
- clip animation import

- Controller
- skin controller import
- morph controller import

- Physical scene import/export

- Subdivision surfaces import/export
Expand Down
4 changes: 2 additions & 2 deletions COLLADAMaya/include/COLLADAMayaAnimationCurves.h
Expand Up @@ -355,7 +355,7 @@ namespace COLLADAMaya
T* BaseAnimationCurve<T>::getKey ( size_t index ) const
{
if ( mKeys.size() < index )
MGlobal::displayError ( MString ( "Key index not valid! " + index ) );
std::cerr << "Key index not valid! " + index << endl;

return mKeys[index];
}
Expand Down Expand Up @@ -400,7 +400,7 @@ namespace COLLADAMaya
{
if ( currentKey == NULL )
{
MGlobal::displayError ( MString ( "Current key is null!" ) );
std::cerr << "Current key is null!" << endl;
return;
}

Expand Down
5 changes: 3 additions & 2 deletions COLLADAMaya/include/COLLADAMayaAnimationExporter.h
Expand Up @@ -535,8 +535,9 @@ namespace COLLADAMaya
* @param outTangents The list for the output tangent values.
* @param outputList The list with the output values.
*/
void createMultiCurveTangents ( AnimationMKey* key,
uint dimension,
void createMultiCurveTangents ( const AnimationMKey* key,
const uint dimension,
const bool convertUnits,
std::vector<float> &inTangents,
std::vector<float> &outTangents,
float* outputList );
Expand Down
69 changes: 53 additions & 16 deletions COLLADAMaya/include/COLLADAMayaAnimationImporter.h
@@ -1,7 +1,7 @@
/*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADAFramework.
This file is part of COLLADAMaya.
Licensed under the MIT Open Source License,
for details please see LICENSE file or the website
Expand All @@ -13,6 +13,7 @@

#include "COLLADAMayaPrerequisites.h"
#include "COLLADAMayaBaseImporter.h"
#include "COLLADAMayaMayaTransform.h"

#include "COLLADAFWAnimationCurve.h"
#include "COLLADAFWAnimationList.h"
Expand All @@ -39,6 +40,9 @@ namespace COLLADAMaya
/** The standard name for an animation. */
static const String ANIMATION_NAME;

/** The framerate of the animation. */
static const double ANIM_FRAMERATE;

/**
* Most common tangent type of keyframes in this curve. Used as a performance optimization
* during file store/retrieve. The following are legal values:
Expand All @@ -58,12 +62,31 @@ namespace COLLADAMaya
TANGENT_TYPE_STEP_NEXT = 17 // Collada: BEZIER
};

private:

/**
* The list of the unique maya animation names.
* Store the minimum and the maximum animation time.
*/
COLLADABU::IDList mAnimationIdList;
class PlaybackOptions
{
private:
double mMinStartTime;
double mMaxEndTime;
public:
PlaybackOptions () : mMinStartTime (0), mMaxEndTime (0) {}
virtual ~PlaybackOptions () {}

void setTimeValue ( double timeValue )
{
if ( timeValue > mMaxEndTime )
mMaxEndTime = timeValue;
else if ( timeValue < mMinStartTime )
mMinStartTime = timeValue;
}

const double getMinStartTime () const { return mMinStartTime; }
const double getMaxEndTime () const { return mMaxEndTime; }
};

private:

/**
* The list of the unique animation ids.
Expand All @@ -81,8 +104,9 @@ namespace COLLADAMaya
std::map<COLLADAFW::UniqueId, std::vector<MayaDM::AnimCurve*> > mMayaDMAnimationCurves;

/**
* The map holds for every animation curve a list of node ids, which use this connections.
* Store the minimum and the maximum animation time.
*/
PlaybackOptions mPlaybackOptions;

public:

Expand All @@ -98,21 +122,28 @@ namespace COLLADAMaya
void importAnimation ( const COLLADAFW::Animation* animation );

/**
* The map holds for every unique animation id the maya animatio curve.
*/
const std::vector<MayaDM::AnimCurve*>* findMayaDMAnimCurves (
const COLLADAFW::UniqueId& animationId );
* Get the minimum and the maximum time values of the animations to get the start
* time and the end time of the animation. This times we have to set as the
* "playbackOptions" in the "sceneConfigurationScriptNode".
*/
void importPlaybackOptions ();

/**
* Makes the connections between the animations and the animated objects.
*/
void writeConnections ( const COLLADAFW::AnimationList* animationList );

void writeEffectConnections (
private:

void connectMorphControllers (
const COLLADAFW::UniqueId& animationListId,
const COLLADAFW::AnimationList::AnimationBindings& animationBindings );

void connectEffects (
const COLLADAFW::UniqueId& animationListId,
const COLLADAFW::AnimationList::AnimationBindings& animationBindings );

void writeTransformConnections (
void connectTransforms (
const COLLADAFW::UniqueId& animationListId,
const COLLADAFW::AnimationList::AnimationBindings& animationBindings );

Expand All @@ -136,11 +167,11 @@ namespace COLLADAMaya
*/
void writeRotateConnections (
const COLLADAFW::Transformation* transformation,
const MayaTransform::TransformPhase& transformPhase,
const bool isJointTransform,
const COLLADAFW::AnimationList::AnimationBindings& animationBindings,
const MayaDM::Transform* transform );

private:

/**
* Imports the data of an animtion curve (no formula).
*/
Expand All @@ -151,8 +182,7 @@ namespace COLLADAMaya
*/
void writeAnimationCurve (
const COLLADAFW::AnimationCurve* animationCurve,
const TangentType& tangentType = TANGENT_TYPE_DEFAULT,
const TangentType& keyTangentOutType = TANGENT_TYPE_DEFAULT );
const TangentType& tangentType = TANGENT_TYPE_DEFAULT );

/**
* Multiple interpolation types. Curve by keys.
Expand Down Expand Up @@ -282,6 +312,13 @@ namespace COLLADAMaya
*/
const bool findAnimationList ( const COLLADAFW::UniqueId& animationListId );

/**
* The map holds for every unique animation id the maya animatio curve.
*/
const std::vector<MayaDM::AnimCurve*>* findMayaDMAnimCurves (
const COLLADAFW::UniqueId& animationId );


private:

/** Disable default copy ctor. */
Expand Down

0 comments on commit b5e5ea0

Please sign in to comment.