maya2egg2008

Hello
can not export a model with jpeg or png texture

gdb maya2egg2008
GNU gdb (GDB) 7.1-ubuntu
Copyright © 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type “show copying”
and “show warranty” for details.
This GDB was configured as “i486-linux-gnu”.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/
Reading symbols from /usr/bin/maya2egg2008…(no debugging symbols found)…done.
(gdb) run textures_test.mb plane.egg
Starting program: /usr/bin/maya2egg2008 textures_test.mb plane.egg
[Thread debugging using libthread_db enabled]
process 3787 is executing new program: /usr/bin/maya2egg2008-wrapped
[Thread debugging using libthread_db enabled]

Initializing Maya.
[New Thread 0xb39c9b70 (LWP 3790)]
[New Thread 0xb2c69b70 (LWP 3791)]
[Thread 0xb2c69b70 (LWP 3791) exited]

Program received signal SIGSEGV, Segmentation fault.
0xb639fdba in PySys_GetObject (name=0x1c768ed “argv”) at Python/sysmodule.c:52
52 Python/sysmodule.c: No such file or directory.
in Python/sysmodule.c
(gdb) bt
#0 0xb639fdba in PySys_GetObject (name=0x1c768ed “argv”)
at Python/sysmodule.c:52
#1 0x01c6948d in ExecutionEnvironment::ns_get_environment_variable(std::string const&) const () from /usr/lib/panda3d/libp3dtool.so
#2 0x01c6a902 in ExecutionEnvironment::expand_string(std::string const&) ()
from /usr/lib/panda3d/libp3dtool.so
#3 0x01cb8ccd in ConfigVariableSearchPath::reload_search_path() ()
from /usr/lib/panda3d/libp3dtoolconfig.so
#4 0x08062e03 in MayaToEggConverter::apply_texture_filename(EggTexture&, MayaShaderColorDef const&) ()
#5 0x080678df in MayaToEggConverter::set_shader_modern(EggPrimitive&, MayaShader const&, bool) ()
#6 0x08069de4 in MayaToEggConverter::set_shader_attributes(EggPrimitive&, MayaShader const&, bool) ()
#7 0x0807092c in MayaToEggConverter::make_polyset(MayaNodeDesc*, MDagPath const&, MFnMesh const&, EggGroup*, MayaShader*) ()
#8 0x08076281 in MayaToEggConverter::process_model_node(MayaNodeDesc*) ()
#9 0x08076493 in MayaToEggConverter::convert_hierarchy(EggGroupNode*) ()

Does it help if you call this before trying maya2egg:

export MAIN_DIR=/usr/bin

Perhaps Panda’s Python is interfering with Maya’s Python? I’ve seen this happen before, and it’s a vexing problem. The only truly reliable way I’ve found to avoid it is to build a version of Panda without Python support, and use that version to generate maya2egg.

Are you running the pre-built version of Panda downloaded from this site, or did you build your own?

David

That’s what I was guessing. Since we call into Python for the MAIN_DIR check in ExecutionEnvironment, and it crashes on that PySys_GetObject call (that means it passed the Py_IsInitialized() call), that’s where it usually goes wrong first.

I notice that we don’t link pystub into the Maya converters on Linux, while we do that on Windows. Maybe that could be a problem?

I don’t think we ship the prebuilt Linux builds with Maya support.

Regardless, try the MAIN_DIR hack, that should disable that code in ExecutionEnvironment. Maybe that’ll fix it, but maybe it’ll crash somewhere else. We’ll see.

yes it is helped
thanks all

i build panda but i had some problems so i copied maya2egg
and install pre-built panda after i copy maya2egg back :slight_smile:

That might be why - in some cases it seems that maya2egg is happier if used with the same build it came from.