mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
Fix compile errors in unicode conversion in max exporter
This commit is contained in:
parent
ea82d9d664
commit
34b8e0844e
@ -291,7 +291,7 @@ void MaxEggJoint::CreateMaxBone(void)
|
||||
_node->SetRenderable(FALSE);
|
||||
|
||||
#ifdef _UNICODE
|
||||
TCHAR *wname [1024];
|
||||
TCHAR wname[1024];
|
||||
wname[1023] = 0;
|
||||
mbstowcs(wname, _egg_joint->get_name().c_str(), 1023);
|
||||
_node->SetName(wname);
|
||||
@ -468,7 +468,14 @@ MaxEggMesh *MaxEggLoader::GetMesh(EggVertexPool *pool)
|
||||
result->_tvert_count = 0;
|
||||
result->_cvert_count = 0;
|
||||
result->_face_count = 0;
|
||||
result->_node->SetName(TSTR(name.c_str()));
|
||||
#ifdef _UNICODE
|
||||
TCHAR wname[1024];
|
||||
wname[1023] = 0;
|
||||
mbstowcs(wname, name.c_str(), 1023);
|
||||
result->_node->SetName(wname);
|
||||
#else
|
||||
result->_node->SetName((char*) name.c_str());
|
||||
#endif
|
||||
_mesh_tab[pool] = result;
|
||||
}
|
||||
return result;
|
||||
|
@ -589,7 +589,14 @@ make_nurbs_curve(INode *max_node, NURBSCVCurve *curve,
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef _UNICODE
|
||||
char mbname[1024];
|
||||
mbname[1023] = 0;
|
||||
wcstombs(mbname, max_node->GetName(), 1023);
|
||||
string name(mbname);
|
||||
#else
|
||||
string name = max_node->GetName();
|
||||
#endif
|
||||
|
||||
string vpool_name = name + ".cvs";
|
||||
EggVertexPool *vpool = new EggVertexPool(vpool_name);
|
||||
@ -652,7 +659,15 @@ make_polyset(INode *max_node, Mesh *mesh,
|
||||
// all the vertices up front, we'll start with an empty vpool, and
|
||||
// add vertices to it on the fly.
|
||||
|
||||
#ifdef _UNICODE
|
||||
char mbname[1024];
|
||||
mbname[1023] = 0;
|
||||
wcstombs(mbname, max_node->GetName(), 1023);
|
||||
string node_name(mbname);
|
||||
#else
|
||||
string node_name = max_node->GetName();
|
||||
#endif
|
||||
|
||||
string vpool_name = node_name + ".verts";
|
||||
EggVertexPool *vpool = new EggVertexPool(vpool_name);
|
||||
egg_group->add_child(vpool);
|
||||
|
Loading…
x
Reference in New Issue
Block a user