mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
Fixing filenames
This commit is contained in:
parent
f4acfc72c4
commit
08f2be33ce
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//Includes & Defines
|
//Includes & Defines
|
||||||
#include "MaxEgg.h"
|
#include "maxEgg.h"
|
||||||
//Types and structures from windows system-level calls
|
//Types and structures from windows system-level calls
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
@ -18,13 +18,13 @@
|
|||||||
#include "pandatoolbase.h"
|
#include "pandatoolbase.h"
|
||||||
|
|
||||||
//Includes & Definitions
|
//Includes & Definitions
|
||||||
#include "MaxToEgg.h"
|
#include "maxToEgg.h"
|
||||||
#include "MaxEggExpOptions.h"
|
#include "maxEggExpOptions.h"
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
|
|
||||||
/* Error-Reporting Includes
|
/* Error-Reporting Includes
|
||||||
*/
|
*/
|
||||||
#include "Logger.h"
|
#include "maxLogger.h"
|
||||||
#define ME Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM6
|
#define ME Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM6
|
||||||
#define MaxEggPlugin_CLASS_ID Class_ID(0x7ac0d6b7, 0x55731ef6)
|
#define MaxEggPlugin_CLASS_ID Class_ID(0x7ac0d6b7, 0x55731ef6)
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource.h"
|
#include "maxResource.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
MaxEgg.cpp
|
maxEggExpOptions.cxx
|
||||||
Created by Phillip Saltzman, 2/15/05
|
Created by Phillip Saltzman, 2/15/05
|
||||||
Carnegie Mellon University, Entetainment Technology Center
|
Carnegie Mellon University, Entetainment Technology Center
|
||||||
|
|
||||||
@ -7,7 +7,7 @@
|
|||||||
what to export from 3D Studio max
|
what to export from 3D Studio max
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "MaxEggExpOptions.h"
|
#include "maxEggExpOptions.h"
|
||||||
|
|
||||||
//Disable the forcing int to true or false performance warning
|
//Disable the forcing int to true or false performance warning
|
||||||
#pragma warning(disable: 4800)
|
#pragma warning(disable: 4800)
|
||||||
@ -765,4 +765,4 @@ bool MaxEggExpOptions::DoExport(IObjParam *ip, bool autoOverwrite, bool saveLog)
|
|||||||
delete Logger::globalLoggingInstance;
|
delete Logger::globalLoggingInstance;
|
||||||
|
|
||||||
return successful;
|
return successful;
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
MaxEggExpOptions.h
|
maxEggExpOptions.h
|
||||||
Created by Phillip Saltzman, 2/15/05
|
Created by Phillip Saltzman, 2/15/05
|
||||||
Carnegie Mellon University, Entetainment Technology Center
|
Carnegie Mellon University, Entetainment Technology Center
|
||||||
|
|
||||||
@ -7,8 +7,8 @@
|
|||||||
export options, and then execute the export
|
export options, and then execute the export
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MaxEggExpOptions__H
|
#ifndef __maxEggExpOptions__H
|
||||||
#define __MaxEggExpOptions__H
|
#define __maxEggExpOptions__H
|
||||||
|
|
||||||
#pragma conform(forScope, off)
|
#pragma conform(forScope, off)
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
|
|
||||||
/* Error-Reporting Includes */
|
/* Error-Reporting Includes */
|
||||||
#include "Logger.h"
|
#include "maxLogger.h"
|
||||||
#define ME Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM6
|
#define ME Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM6
|
||||||
#define MNEG Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM2
|
#define MNEG Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM2
|
||||||
#define MNEG_GEOMETRY_GENERATION Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM3
|
#define MNEG_GEOMETRY_GENERATION Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM3
|
@ -1,4 +1,4 @@
|
|||||||
#include "Logger.h"
|
#include "maxLogger.h"
|
||||||
|
|
||||||
/* Globals & Static Members
|
/* Globals & Static Members
|
||||||
*/
|
*/
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef __Kens_Logger__H
|
#ifndef __maxLogger__H
|
||||||
#define __Kens_Logger__H
|
#define __maxLogger__H
|
||||||
|
|
||||||
/* Standard C++ Includes for file and stream output
|
/* Standard C++ Includes for file and stream output
|
||||||
*/
|
*/
|
||||||
@ -118,4 +118,4 @@ private:
|
|||||||
/* Externed Globals
|
/* Externed Globals
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -18,7 +18,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "maxNodeDesc.h"
|
#include "maxNodeDesc.h"
|
||||||
#include "Logger.h"
|
#include "maxLogger.h"
|
||||||
#define MTEC Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM4
|
#define MTEC Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM4
|
||||||
|
|
||||||
TypeHandle MaxNodeDesc::_type_handle;
|
TypeHandle MaxNodeDesc::_type_handle;
|
||||||
|
@ -32,12 +32,12 @@
|
|||||||
//Disable the "Too many actual parameters in istdplug.h" warning in Max5
|
//Disable the "Too many actual parameters in istdplug.h" warning in Max5
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4002)
|
#pragma warning(disable: 4002)
|
||||||
#include "pre_max_include.h"
|
#include "max_pre_include.h"
|
||||||
#endif
|
#endif
|
||||||
#include <Max.h>
|
#include <Max.h>
|
||||||
#include "bipexp.h"
|
#include "bipexp.h"
|
||||||
#ifdef MAX5
|
#ifdef MAX5
|
||||||
#include "post_max_include.h"
|
#include "max_post_include.h"
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
//Disable the "Too many actual parameters in istdplug.h" warning in Max5
|
//Disable the "Too many actual parameters in istdplug.h" warning in Max5
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4002)
|
#pragma warning(disable: 4002)
|
||||||
#include "pre_max_include.h"
|
#include "max_pre_include.h"
|
||||||
#endif
|
#endif
|
||||||
#include "Max.h"
|
#include "Max.h"
|
||||||
#ifdef MAX5
|
#ifdef MAX5
|
||||||
#include "post_max_include.h"
|
#include "max_post_include.h"
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
#include "maxToEggConverter.h"
|
#include "maxToEggConverter.h"
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
MaxToEgg.cpp
|
maxToEgg.cxx
|
||||||
Created by Ken Strickland 02/24/03
|
Created by Ken Strickland 02/24/03
|
||||||
Modified and maintained by Corey Revilla, (05/22/03)-(Present)
|
Modified and maintained by Corey Revilla, (05/22/03)-(Present)
|
||||||
Carnegie Mellon University, Entetainment Technology Center
|
Carnegie Mellon University, Entetainment Technology Center
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//Our headers, which in turn includes some Max headers.
|
//Our headers, which in turn includes some Max headers.
|
||||||
#include "MaxToEgg.h"
|
#include "maxToEgg.h"
|
||||||
|
|
||||||
//Member Function Definitions
|
//Member Function Definitions
|
||||||
/* ~MaxToEgg() - Uninteresting destructor.
|
/* ~MaxToEgg() - Uninteresting destructor.
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
MaxToEgg.h
|
maxToEgg.h
|
||||||
Created by Ken Strickland, 02/24/03
|
Created by Ken Strickland, 02/24/03
|
||||||
Modified + Maintained by Corey Revilla, (05/22/03-Present)
|
Modified + Maintained by Corey Revilla, (05/22/03-Present)
|
||||||
CMU's Entertainment Technology Center
|
CMU's Entertainment Technology Center
|
||||||
@ -12,18 +12,18 @@
|
|||||||
class, MaxEggPlugin. This class, in turn, is a wrapper about the
|
class, MaxEggPlugin. This class, in turn, is a wrapper about the
|
||||||
MaxToEggConverter class, which actually twiddles the bits, as they say.
|
MaxToEggConverter class, which actually twiddles the bits, as they say.
|
||||||
*/
|
*/
|
||||||
#ifndef __MaxToEgg__H
|
#ifndef __maxToEgg__H
|
||||||
#define __MaxToEgg__H
|
#define __maxToEgg__H
|
||||||
|
|
||||||
#pragma conform(forScope, off)
|
#pragma conform(forScope, off)
|
||||||
|
|
||||||
#include "pandatoolbase.h"
|
#include "pandatoolbase.h"
|
||||||
|
|
||||||
#include "MaxToEggConverter.h"
|
#include "maxToEggConverter.h"
|
||||||
|
|
||||||
/* Error-Reporting Includes
|
/* Error-Reporting Includes
|
||||||
*/
|
*/
|
||||||
#include "Logger.h"
|
#include "maxLogger.h"
|
||||||
#define MTE Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM5
|
#define MTE Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM5
|
||||||
|
|
||||||
/**
|
/**
|
203
pandatool/src/maxegg/maxToEggConverter.h
Executable file
203
pandatool/src/maxegg/maxToEggConverter.h
Executable file
@ -0,0 +1,203 @@
|
|||||||
|
// Filename: maxToEggConverter.h
|
||||||
|
// Created by Corey Revilla and Ken Strickland (6/22/03)
|
||||||
|
// from mayaToEggConverter.cxx created by drose (10Nov99)
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// PANDA 3D SOFTWARE
|
||||||
|
// Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved
|
||||||
|
//
|
||||||
|
// All use of this software is subject to the terms of the Panda 3d
|
||||||
|
// Software license. You should have received a copy of this license
|
||||||
|
// along with this source code; you will also find a current copy of
|
||||||
|
// the license at http://www.panda3d.org/license.txt .
|
||||||
|
//
|
||||||
|
// To contact the maintainers of this program write to
|
||||||
|
// panda3d@yahoogroups.com .
|
||||||
|
//
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef __maxToEggConverter__H
|
||||||
|
#define __maxToEggConverter__H
|
||||||
|
|
||||||
|
#pragma conform(forScope, off)
|
||||||
|
|
||||||
|
#include "pandatoolbase.h"
|
||||||
|
|
||||||
|
/* 3ds Max Includes, with bonus(!) memory protection
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef MAX5
|
||||||
|
//Disable the "Too many actual parameters in istdplug.h" warning in Max5
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4002)
|
||||||
|
#include "max_pre_include.h"
|
||||||
|
#endif
|
||||||
|
#include "Max.h"
|
||||||
|
#include "iparamb2.h"
|
||||||
|
#include "iparamm2.h"
|
||||||
|
#include "istdplug.h"
|
||||||
|
#include "iskin.h"
|
||||||
|
#include "maxResource.h"
|
||||||
|
#include "stdmat.h"
|
||||||
|
#include "phyexp.h"
|
||||||
|
#include "surf_api.h"
|
||||||
|
#ifdef MAX5
|
||||||
|
#include "max_post_include.h"
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Panda Includes
|
||||||
|
*/
|
||||||
|
#include "eggCoordinateSystem.h"
|
||||||
|
#include "eggGroup.h"
|
||||||
|
#include "eggPolygon.h"
|
||||||
|
#include "eggTextureCollection.h"
|
||||||
|
#include "eggTexture.h"
|
||||||
|
#include "eggVertex.h"
|
||||||
|
#include "eggVertexPool.h"
|
||||||
|
#include "eggNurbsCurve.h"
|
||||||
|
#include "pandatoolbase.h"
|
||||||
|
#include "somethingToEgg.h"
|
||||||
|
#include "somethingToEggConverter.h"
|
||||||
|
#include "eggXfmSAnim.h"
|
||||||
|
|
||||||
|
/* Local Includes
|
||||||
|
*/
|
||||||
|
#include "maxNodeTree.h"
|
||||||
|
|
||||||
|
/* Error-Reporting Includes
|
||||||
|
*/
|
||||||
|
#include "maxLogger.h"
|
||||||
|
#define MTEC Logger::ST_MAP_ME_TO_APP_SPECIFIC_SYSTEM4
|
||||||
|
|
||||||
|
/* Helpful Defintions and Casts
|
||||||
|
*/
|
||||||
|
#define null 0
|
||||||
|
#define PHYSIQUE_CLASSID Class_ID(PHYSIQUE_CLASS_ID_A, PHYSIQUE_CLASS_ID_B)
|
||||||
|
|
||||||
|
/* External Helper Functions for UI
|
||||||
|
*/
|
||||||
|
// *** Figure out why this is causing link errors
|
||||||
|
//DWORD WINAPI ProgressBarFunction(LPVOID arg);
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Class : MaxToEggConverter
|
||||||
|
// Description : This class supervises the construction of an EggData
|
||||||
|
// structure from a Max model
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
class MaxToEggConverter : public SomethingToEggConverter {
|
||||||
|
public:
|
||||||
|
MaxToEggConverter(const string &program_name = "");
|
||||||
|
MaxToEggConverter(const MaxToEggConverter ©);
|
||||||
|
virtual ~MaxToEggConverter();
|
||||||
|
|
||||||
|
virtual SomethingToEggConverter *make_copy();
|
||||||
|
|
||||||
|
virtual string get_name() const;
|
||||||
|
virtual string get_extension() const;
|
||||||
|
|
||||||
|
virtual bool convert_file(const Filename &filename);
|
||||||
|
bool convert_max(bool from_selection);
|
||||||
|
|
||||||
|
//Sets the interface to 3dsMax.
|
||||||
|
void setMaxInterface(Interface *pInterface);
|
||||||
|
|
||||||
|
void set_selection_list(ULONG *list, int len) {
|
||||||
|
_selection_list = list; _selection_len = len; }
|
||||||
|
void set_double_sided(bool flag) {double_sided = flag;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
double _current_frame;
|
||||||
|
ULONG *_selection_list; int _selection_len;
|
||||||
|
|
||||||
|
bool convert_flip(double start_frame, double end_frame,
|
||||||
|
double frame_inc, double output_frame_rate);
|
||||||
|
|
||||||
|
bool convert_char_model();
|
||||||
|
bool convert_char_chan(double start_frame, double end_frame,
|
||||||
|
double frame_inc, double output_frame_rate);
|
||||||
|
bool convert_hierarchy(EggGroupNode *egg_root);
|
||||||
|
bool process_model_node(MaxNodeDesc *node_desc);
|
||||||
|
|
||||||
|
void get_transform(INode *max_node, EggGroup *egg_group);
|
||||||
|
LMatrix4d get_object_transform(INode *max_node);
|
||||||
|
void get_joint_transform(INode *max_node, EggGroup *egg_group);
|
||||||
|
void get_joint_transform(INode *max_node, INode *parent_node,
|
||||||
|
EggGroup *egg_group);
|
||||||
|
|
||||||
|
// *** Leaving out these functions til there use/support in Max is determined
|
||||||
|
/*
|
||||||
|
void make_nurbs_surface(const MDagPath &dag_path,
|
||||||
|
MFnNurbsSurface &surface,
|
||||||
|
EggGroup *group);
|
||||||
|
EggNurbsCurve *make_trim_curve(const MFnNurbsCurve &curve,
|
||||||
|
const string &nurbs_name,
|
||||||
|
EggGroupNode *egg_group,
|
||||||
|
int trim_curve_index);
|
||||||
|
*/
|
||||||
|
bool make_nurbs_curve(NURBSCVCurve *curve, const string &name,
|
||||||
|
TimeValue time, EggGroup *egg_group);
|
||||||
|
void make_polyset(INode *max_node,
|
||||||
|
Mesh *mesh,
|
||||||
|
EggGroup *egg_group,
|
||||||
|
Shader *default_shader = NULL);
|
||||||
|
/*
|
||||||
|
void make_locator(const MDagPath &dag_path, const MFnDagNode &dag_node,
|
||||||
|
EggGroup *egg_group);
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Gets the vertex normal for a given face and vertex. Go figure.
|
||||||
|
Point3 get_max_vertex_normal(Mesh *mesh, int faceNo, int vertNo);
|
||||||
|
|
||||||
|
void get_vertex_weights(INode *max_node, EggVertexPool *vpool);
|
||||||
|
/*
|
||||||
|
void set_shader_attributes(EggPrimitive &primitive,
|
||||||
|
const MayaShader &shader);
|
||||||
|
*/
|
||||||
|
void set_material_attributes(EggPrimitive &primitive, INode *max_node);
|
||||||
|
|
||||||
|
void set_material_attributes(EggPrimitive &primitive, Mtl *maxMaterial, Face *face);
|
||||||
|
|
||||||
|
void apply_texture_properties(EggTexture &tex,
|
||||||
|
StdMat *maxMaterial);
|
||||||
|
/*
|
||||||
|
bool compare_texture_properties(EggTexture &tex,
|
||||||
|
const MayaShaderColorDef &color_def);
|
||||||
|
*/
|
||||||
|
|
||||||
|
bool reparent_decals(EggGroupNode *egg_parent);
|
||||||
|
|
||||||
|
string _program_name;
|
||||||
|
bool _from_selection;
|
||||||
|
|
||||||
|
MaxNodeTree _tree;
|
||||||
|
|
||||||
|
int _cur_tref;
|
||||||
|
bool double_sided;
|
||||||
|
|
||||||
|
public:
|
||||||
|
//MayaShaders _shaders;
|
||||||
|
EggTextureCollection _textures;
|
||||||
|
Interface *maxInterface;
|
||||||
|
|
||||||
|
bool _polygon_output;
|
||||||
|
double _polygon_tolerance;
|
||||||
|
|
||||||
|
enum TransformType {
|
||||||
|
TT_invalid,
|
||||||
|
TT_all,
|
||||||
|
TT_model,
|
||||||
|
TT_dcs,
|
||||||
|
TT_none,
|
||||||
|
};
|
||||||
|
TransformType _transform_type;
|
||||||
|
|
||||||
|
static TransformType string_transform_type(const string &arg);
|
||||||
|
|
||||||
|
Modifier* FindSkinModifier (INode* node, const Class_ID &type);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -1,8 +1,8 @@
|
|||||||
#include "DllEntry.cpp"
|
#include "maxDllEntry.cxx"
|
||||||
#include "Logger.cpp"
|
#include "maxLogger.cxx"
|
||||||
#include "MaxEgg.cpp"
|
#include "maxEgg.cxx"
|
||||||
#include "MaxEggExpOptions.cpp"
|
#include "maxEggExpOptions.cxx"
|
||||||
#include "maxNodeDesc.cxx"
|
#include "maxNodeDesc.cxx"
|
||||||
#include "MaxNodeTree.cxx"
|
#include "maxNodeTree.cxx"
|
||||||
#include "MaxToEgg.cpp"
|
#include "maxToEgg.cxx"
|
||||||
#include "MaxToEggConverter.cxx"
|
#include "maxToEggConverter.cxx"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user