mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
New Egg API
This commit is contained in:
parent
35455f504b
commit
dd730b98ca
@ -643,7 +643,6 @@ bool MaxEggExpOptions::DoExport(IObjParam *ip, bool autoOverwrite, bool saveLog)
|
|||||||
char *apcParameters[64];
|
char *apcParameters[64];
|
||||||
char pszSF[10], pszEF[10];
|
char pszSF[10], pszEF[10];
|
||||||
char acOutputFilename[MAX_PATH];
|
char acOutputFilename[MAX_PATH];
|
||||||
char curFilename[MAX_PATH];
|
|
||||||
int iParameterCount=0;
|
int iParameterCount=0;
|
||||||
|
|
||||||
//Initialize our global error logger
|
//Initialize our global error logger
|
||||||
|
@ -338,7 +338,7 @@ void Logger::WriteToPipe( char *textToPipe )
|
|||||||
case PIPE_TO_FILE:
|
case PIPE_TO_FILE:
|
||||||
if ( myFileOutputLog.is_open() )
|
if ( myFileOutputLog.is_open() )
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < myHierarchyLevel; ++i )
|
for (unsigned int i = 0; i < myHierarchyLevel; ++i )
|
||||||
myFileOutputLog << " ";
|
myFileOutputLog << " ";
|
||||||
myFileOutputLog << textToPipe << endl;
|
myFileOutputLog << textToPipe << endl;
|
||||||
myFileOutputLog.flush();
|
myFileOutputLog.flush();
|
||||||
|
@ -413,7 +413,7 @@ convert_char_chan(double start_frame, double end_frame, double frame_inc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
EggXfmSAnim *anim = _tree.get_egg_anim(node_desc);
|
EggXfmSAnim *anim = _tree.get_egg_anim(node_desc);
|
||||||
if (!anim->add_data(tgroup->get_transform())) {
|
if (!anim->add_data(tgroup->get_transform3d())) {
|
||||||
// *** log an error
|
// *** log an error
|
||||||
}
|
}
|
||||||
delete tgroup;
|
delete tgroup;
|
||||||
@ -781,7 +781,7 @@ get_transform(INode *max_node, EggGroup *egg_group) {
|
|||||||
// node's parent
|
// node's parent
|
||||||
m4d = m4d * egg_group->get_node_frame_inv();
|
m4d = m4d * egg_group->get_node_frame_inv();
|
||||||
if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) {
|
if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) {
|
||||||
egg_group->add_matrix(m4d);
|
egg_group->add_matrix4(m4d);
|
||||||
Logger::Log( MNEG_GEOMETRY_GENERATION, Logger::SAT_DEBUG_SPAM_LEVEL,
|
Logger::Log( MNEG_GEOMETRY_GENERATION, Logger::SAT_DEBUG_SPAM_LEVEL,
|
||||||
"Non-identity matrix applied to node!" );
|
"Non-identity matrix applied to node!" );
|
||||||
} else {
|
} else {
|
||||||
@ -877,7 +877,7 @@ get_joint_transform(INode *max_node, EggGroup *egg_group) {
|
|||||||
// node's parent
|
// node's parent
|
||||||
m4d = m4d * egg_group->get_node_frame_inv();
|
m4d = m4d * egg_group->get_node_frame_inv();
|
||||||
if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) {
|
if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) {
|
||||||
egg_group->add_matrix(m4d);
|
egg_group->add_matrix4(m4d);
|
||||||
Logger::Log( MNEG_GEOMETRY_GENERATION, Logger::SAT_DEBUG_SPAM_LEVEL,
|
Logger::Log( MNEG_GEOMETRY_GENERATION, Logger::SAT_DEBUG_SPAM_LEVEL,
|
||||||
"Non-identity matrix applied to node!" );
|
"Non-identity matrix applied to node!" );
|
||||||
} else {
|
} else {
|
||||||
@ -953,7 +953,7 @@ if (parent_node) {
|
|||||||
m4d = m4d * pi_m4d;
|
m4d = m4d * pi_m4d;
|
||||||
}
|
}
|
||||||
if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) {
|
if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) {
|
||||||
egg_group->add_matrix(m4d);
|
egg_group->add_matrix4(m4d);
|
||||||
Logger::Log( MNEG_GEOMETRY_GENERATION, Logger::SAT_DEBUG_SPAM_LEVEL,
|
Logger::Log( MNEG_GEOMETRY_GENERATION, Logger::SAT_DEBUG_SPAM_LEVEL,
|
||||||
"Non-identity matrix applied to node!" );
|
"Non-identity matrix applied to node!" );
|
||||||
} else {
|
} else {
|
||||||
|
@ -172,7 +172,7 @@ MaxEggJoint *MaxEggLoader::MakeJoint(EggGroup *joint, EggGroup *context)
|
|||||||
{
|
{
|
||||||
MaxEggJoint *parent = FindJoint(context);
|
MaxEggJoint *parent = FindJoint(context);
|
||||||
MaxEggJoint *result = new MaxEggJoint;
|
MaxEggJoint *result = new MaxEggJoint;
|
||||||
LMatrix4d t = joint->get_transform();
|
LMatrix4d t = joint->get_transform3d();
|
||||||
if (parent) {
|
if (parent) {
|
||||||
result->_trans = t * parent->_trans;
|
result->_trans = t * parent->_trans;
|
||||||
} else {
|
} else {
|
||||||
@ -575,7 +575,7 @@ void MaxEggLoader::TraverseEggNode(EggNode *node, EggGroup *context)
|
|||||||
EggTexture *tex = poly->get_texture(0);
|
EggTexture *tex = poly->get_texture(0);
|
||||||
texid = GetTex(tex->get_fullpath().to_os_specific())->_id;
|
texid = GetTex(tex->get_fullpath().to_os_specific())->_id;
|
||||||
if (tex->has_transform())
|
if (tex->has_transform())
|
||||||
uvtrans = tex->get_transform();
|
uvtrans = tex->get_transform2d();
|
||||||
} else {
|
} else {
|
||||||
texid = GetTex("")->_id;
|
texid = GetTex("")->_id;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user