build on gcc 4.0

This commit is contained in:
David Rose 2005-05-17 23:43:12 +00:00
parent c2a9e4df84
commit 63a62a804a
3 changed files with 11 additions and 8 deletions

View File

@ -352,7 +352,7 @@ read_surface_color(MayaShader *shader, MObject color, bool trans) {
maya_cat.debug() << pl.name() << " first:connectedTo: " << pla_name << endl; maya_cat.debug() << pl.name() << " first:connectedTo: " << pla_name << endl;
read_surface_color(shader, pla[j].node()); read_surface_color(shader, pla[j].node());
_texture_name.assign(pla[j].name().asChar()); _texture_name.assign(pla[j].name().asChar());
int loc = _texture_name.find('.',0); size_t loc = _texture_name.find('.',0);
if (loc != string::npos) { if (loc != string::npos) {
_texture_name.resize(loc); _texture_name.resize(loc);
} }

View File

@ -1649,7 +1649,7 @@ make_polyset(MayaNodeDesc *node_desc, const MDagPath &dag_path,
} }
} }
pvector<string> uvset_names; vector_string uvset_names;
MStringArray maya_uvset_names; MStringArray maya_uvset_names;
status = mesh.getUVSetNames(maya_uvset_names); status = mesh.getUVSetNames(maya_uvset_names);
if (!status) { if (!status) {
@ -2241,7 +2241,7 @@ get_vertex_weights(const MDagPath &dag_path, const MFnNurbsSurface &surface,
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void MayaToEggConverter:: void MayaToEggConverter::
set_shader_attributes(EggPrimitive &primitive, const MayaShader &shader, set_shader_attributes(EggPrimitive &primitive, const MayaShader &shader,
const MItMeshPolygon *pi, const pvector<string> uvset_names) { const MItMeshPolygon *pi, const vector_string &uvset_names) {
//mayaegg_cat.spam() << " set_shader_attributes : begin\n"; //mayaegg_cat.spam() << " set_shader_attributes : begin\n";
@ -2257,11 +2257,12 @@ set_shader_attributes(EggPrimitive &primitive, const MayaShader &shader,
string uvset_name = color_def->_texture_name; string uvset_name = color_def->_texture_name;
// look for this name in maya's uvset_names // look for this name in maya's uvset_names
if (uvset_names.size()){ if (uvset_names.size()){
if (uvset_name.length()) if (uvset_name.length()) {
uvset_name.resize(uvset_name.length()-1); uvset_name.resize(uvset_name.length() - 1);
}
mayaegg_cat.spam() << "looking for uvset_name: " << uvset_name << " "; mayaegg_cat.spam() << "looking for uvset_name: " << uvset_name << " ";
for (size_t uvi=0; uvi<uvset_names.size(); ++uvi){ for (size_t uvi = 0; uvi < uvset_names.size(); ++uvi){
if (uvset_names[uvi].find(uvset_name) != -1) { if (uvset_names[uvi].find(uvset_name) != string::npos) {
uvset_name = uvset_names[uvi]; uvset_name = uvset_names[uvi];
mayaegg_cat.spam() << "found maya uvset_name: " << uvset_name << endl; mayaegg_cat.spam() << "found maya uvset_name: " << uvset_name << endl;
} }

View File

@ -30,6 +30,7 @@
#include "coordinateSystem.h" #include "coordinateSystem.h"
#include "globPattern.h" #include "globPattern.h"
#include "pvector.h" #include "pvector.h"
#include "vector_string.h"
#include "pre_maya_include.h" #include "pre_maya_include.h"
#include <maya/MDagPath.h> #include <maya/MDagPath.h>
@ -137,7 +138,8 @@ private:
// void set_shader_attributes(EggPrimitive &primitive, // void set_shader_attributes(EggPrimitive &primitive,
// const MayaShader &shader); // const MayaShader &shader);
void set_shader_attributes(EggPrimitive &primitive, const MayaShader &shader, void set_shader_attributes(EggPrimitive &primitive, const MayaShader &shader,
const MItMeshPolygon *pi=NULL, const pvector<string> uvset_names=NULL); const MItMeshPolygon *pi = NULL,
const vector_string &uvset_names = vector_string());
void apply_texture_properties(EggTexture &tex, void apply_texture_properties(EggTexture &tex,
const MayaShaderColorDef &color_def); const MayaShaderColorDef &color_def);
bool compare_texture_properties(EggTexture &tex, bool compare_texture_properties(EggTexture &tex,