Changeset 554

Show
Ignore:
Timestamp:
03/28/08 18:15:49 (9 months ago)
Author:
phill
Message:

o Updating the Maya side of things.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/morph-targets/libx42make/include/x42make-modelbuilder.h

    r545 r554  
    8484        api_tag() { } 
    8585        virtual ~api_tag() { } 
     86}; 
     87 
     88template< typename T > 
     89class simple_api_tag : public api_tag 
     90{ 
     91public: 
     92        explicit simple_api_tag( const T &val ) 
     93                : val( val ) 
     94        { 
     95        } 
     96 
     97        T& value() { return val; } 
     98        const T& value() const { return val; } 
     99        void value( const T &val ) 
     100        { 
     101                this->val = val; 
     102        } 
     103 
     104        static T& get_value( api_tag_ptr tag ) 
     105        { 
     106                simple_api_tag *p = dynamic_cast< simple_api_tag* >( tag.get() ); 
     107 
     108                if( !p ) 
     109                        throw error( "invalid tag type" ); 
     110 
     111                return p->value(); 
     112        } 
     113 
     114        static const T& get_value( const_api_tag_ptr tag ) 
     115        { 
     116                const simple_api_tag *p = dynamic_cast< const simple_api_tag* >( tag.get() ); 
     117 
     118                if( !p ) 
     119                        throw error( "invalid tag type" ); 
     120 
     121                return p->value(); 
     122        } 
     123 
     124private: 
     125        T val; 
    86126}; 
    87127 
  • branches/morph-targets/x42maya/Export-Anim.cpp

    r508 r554  
    2222 
    2323#include "common.h" 
     24 
     25namespace old 
     26{ 
    2427 
    2528void ExModelData::GetAnimData( MTime startTime, MTime endTime, MTime stepTime ) 
     
    109112        baseFrame = animIt.baseFrame(); 
    110113} 
     114 
     115}; 
  • branches/morph-targets/x42maya/Export-ConfigCmds.cpp

    r508 r554  
    2222 
    2323#include "common.h" 
     24 
     25namespace old 
     26{ 
    2427 
    2528/* static */ void* X42Config::Creator( void ) 
     
    15141517/* static */ ExModelData* X42Config::s_currModel; 
    15151518/* static */ MString X42Config::s_destFileName; 
     1519 
     1520}; 
  • branches/morph-targets/x42maya/Export-Gather.cpp

    r512 r554  
    2222 
    2323#include "common.h" 
     24 
     25namespace old 
     26{ 
    2427 
    2528/***** 
     
    11421145        tags.push_back( tag ); 
    11431146} 
     1147 
     1148}; 
  • branches/morph-targets/x42maya/Export.cpp

    r506 r554  
    2727*/ 
    2828 
     29namespace old 
     30{ 
     31 
    2932ExModelData::ExModelData( void ) 
    3033        : verbose( false ), scaleScale( 1.0F ), 
     
    292295        x42mod.write_data( ostm, model.persistFlags ); 
    293296} 
     297 
     298}; 
  • branches/morph-targets/x42maya/Export.h

    r506 r554  
    2323#ifndef INC_EXPORT_H 
    2424#define INC_EXPORT_H 
     25 
     26namespace old 
     27{ 
    2528 
    2629using namespace ::x42::make::old; 
     
    307310        MPxFileTranslator::FileAccessMode mode ); 
    308311 
     312}; 
     313 
    309314#endif 
  • branches/morph-targets/x42maya/X42FileTranslator.cpp

    r308 r554  
    2222 
    2323#include "common.h" 
     24 
     25namespace old 
     26{ 
    2427 
    2528MPxFileTranslator::MFileKind X42FileTranslator::identifyFile( const MFileObject &file, const char *buffer, short size ) const 
     
    8083        return new X42FileTranslator; 
    8184} 
     85 
     86}; 
  • branches/morph-targets/x42maya/X42FileTranslator.h

    r218 r554  
    2424#define INC_EXPORTX42_H 
    2525 
     26namespace old 
     27{ 
     28 
    2629class X42FileTranslator : public MPxFileTranslator 
    2730{ 
     
    4144}; 
    4245 
     46}; 
     47 
    4348#endif 
  • branches/morph-targets/x42maya/common.h

    r463 r554  
    147147#include "util.h" 
    148148 
     149#include "translator.h" 
     150 
    149151#include "X42FileTranslator.h" 
    150152#include "Export.h" 
  • branches/morph-targets/x42maya/entry.cpp

    r471 r554  
    4747        CHECK_ERR( err ); 
    4848 
    49         V( plugin.registerFileTranslator( X42_TRANSLATOR_NAME, "", X42FileTranslator::Creator ) ); 
    50         V( plugin.registerCommand( X42_EXPORT_CONFIG_CMD_NAME, X42Config::Creator, X42Config::SyntaxCreator ) ); 
     49        V( plugin.registerFileTranslator( X42_TRANSLATOR_NAME, "", ::old::X42FileTranslator::Creator ) ); 
     50        V( plugin.registerCommand( X42_EXPORT_CONFIG_CMD_NAME, ::old::X42Config::Creator, ::old::X42Config::SyntaxCreator ) ); 
    5151 
    5252        MGlobal::executeCommand( "source x42maya.mel" ); 
  • branches/morph-targets/x42maya/x42maya.vcproj

    r281 r554  
    660660                </Filter> 
    661661                <Filter 
    662                         Name="Export" 
     662                        Name="export" 
     663                        > 
     664                        <File 
     665                                RelativePath=".\translator.cpp" 
     666                                > 
     667                        </File> 
     668                        <File 
     669                                RelativePath=".\translator.h" 
     670                                > 
     671                        </File> 
     672                </Filter> 
     673                <Filter 
     674                        Name="old" 
    663675                        > 
    664676                        <File 
     
    680692                        <File 
    681693                                RelativePath=".\Export.h" 
     694                                > 
     695                        </File> 
     696                        <File 
     697                                RelativePath=".\X42FileTranslator.cpp" 
     698                                > 
     699                        </File> 
     700                        <File 
     701                                RelativePath=".\X42FileTranslator.h" 
    682702                                > 
    683703                        </File> 
     
    767787                        > 
    768788                </File> 
    769                 <File 
    770                         RelativePath=".\X42FileTranslator.cpp" 
    771                         > 
    772                 </File> 
    773                 <File 
    774                         RelativePath=".\X42FileTranslator.h" 
    775                         > 
    776                 </File> 
    777789        </Files> 
    778790        <Globals>