Updated MayaPandaUI Interface - Egg & Bam Exporter for Maya

I finally got it working! Hooray! It doesn’t work with Maya 2017 yet sadly. But i hope it will in the future.

I went ahead and added the camera collision types to the egg object array for people who are using Toontown Online egg object types. I don’t know how to add more buttons to the window so not all of them show up.

If you want to use these extra types just replace the latest (As of posting this) MayaPandaUI file with this one i have attached.

I also posted the types below for Toontown Online.


Custom ObjectTypes for Toontown.

“barrier” means a vertical wall, with bitmask 0x01

“floor” means a horizontal floor, with bitmask 0x02

“camera-collide” means things that the camera should avoid, with bitmask 0x04

egg-object-type-barrier collide-mask { 0x01 } { Polyset descend }
egg-object-type-trigger collide-mask { 0x01 } { Polyset descend intangible }
egg-object-type-sphere collide-mask { 0x01 } { Sphere descend }
egg-object-type-trigger-sphere collide-mask { 0x01 } { Sphere descend intangible }
egg-object-type-floor collide-mask { 0x02 } { Polyset descend level }
egg-object-type-camera-collide collide-mask { 0x04 } { Polyset descend }
egg-object-type-camera-collide-sphere collide-mask { 0x04 } { Sphere descend }
egg-object-type-camera-barrier collide-mask { 0x05 } { Polyset descend }
egg-object-type-camera-barrier-sphere collide-mask { 0x05 } { Sphere descend }

#Extra Types

Define a “shadow” object type, so we can render all shadows in their

own bin and have them not fight with each other (or with other

transparent geometry).

egg-object-type-shadow bin { shadow } alpha { blend-no-occlude }

#Define a “ground” object type so we can render the ground in the correct draw order and bin.
egg-object-type-ground bin { ground } draw-order { 0 }
Confauto.zip (2.3 KB)
MayaPandaUI.zip (29.8 KB)

So what was the issue with it not wanting to load on your PC and how were you able to finally get it to run?

As for adding buttons to the GUI window, all one has to do is add the types to the global array and reload the script. This will reinitialize and populate the array, therefore have the new additions show up as their own button.
Also, it’s much better to just use a custom config file, instead of modifying the ones that ship with Panda, (especially the Configauto file, as it even states in that file at the top that it is not recommended to edit it and to use the Config for edits instead). For the simple reason that if one upgrades their panda and it is the same major version, the configs will probably be overwritten, losing all the edited entries. Though if a custom config is added to the directory in addition to the default two, it will be retained if there is an upgrade. Just follow the naming directives for how the configs are loaded, (alphabetical/numerical), meaning lower alpha, lower numerical are loaded first. The last loaded takes precedence over first loaded. I personally don’t include and panda config files, for a few reasons. Not everyone may run the same settings. This is primarily just a GUI for Maya, and I wanted it to run, without errors, out of the box.

I actually don’t know exactly besides the fact some files got duplicated into Maya’a main dir and my userSetup.mel for some reason disappeared. So i had to re-do some stuff.

As for the config part i’ll work on a better alternative later on. If you want you can add a custom like object type option where it add’s what the object type does instead of the object type parameter itself. I don’t know the mel language well enough to do it myself so it’s like you know.

I think I understand what you tried to explain, in practice however, this cannot work. Simply for the fact that when the attribute is added to a node, the attribute and the Panda3D configuration file must match up. Meaning, for example, if in the prc configuration files, an egg-object-type is listed as “egg-object-type-barrier”, then the attribute assigned to the node [needs] to be “barrier”. This function is built into the ‘maya2egg[version].exe’ converter. It is however in the realm of possibilities to add annotation to a GUI control that produces a ‘pop-up’ text when the mouse is hovered above the control. This is a feature I use with dedication in my private personal editor and for static controls in this tool as well. The drawback in this instance though, is that it is used primarily just for controls of that type; for non-changing, hard-coded controls and not for those that have the ability to be modified with additions/subtractions where the controls are created/modified on-the-fly. Since this tool is nothing more than a front-end to Panda3d and to Maya, and it isn’t designed to be a teaching tool, it should be without stating, that a user should actually read the Panda3D manual, relevant text help files in the source and related command help text, to get a full understanding of how specific items function.

On other notes, I have been in the process of another round of updates to this tool for some time now. It’s been a month or more since I worked on it. If I recall correctly, I was modifying the code to allow for multiple file conversions at once instead of the current method of one at a time. I do not yet have any specified release date on when i will be done as it really depends on my free time. One thing I never implemented that I keep wanting to code in, is a process to notify users when an update is released. This is honestly something that I should have coded into it when I first started working on this. This would have saved the users of this tool, which literally are 100’s to date, from having to periodically come back here to check. (Not that visiting this forum is a bad thing since there is indeed a LOT of useful information on here). The update checking will more than likely be nothing more than a user clicking a menu option or button to check for updates, though I [may] look at a method that runs at launch time as well. If an update has been released, they can then be directed to this page to download it. I might someday actually get to the point of diving back into the code and completing the addition of other commands into this tool, such as egg-optchar and egg-palettize, to which I started like a year ago in the hopes of creating a type of ‘all-in-one’ front-end. Though I stopped coding those to work on other things instead, so it’s anyone’s guess when/if they will be completed, lol, as they are not a priority for me at this time.

Another aspect, is that I would love to actually get this into the Panda3D installation distributions, as this tool is designed to benefit anyone creating models for the panda3d environment and not being specific to any one game.

Sometime in the near future I may be able to verify this runs on Maya 2017. (I had installed it a month or two back, though with the performance modifications Autodesk made to it, it was a super resource hog on my GPU; and was, for the most part, not run-able, so I uninstalled it) Though honestly, unless Autodesk made any really significant programming changes, I’m 99% certain that it will run on 2017. One would just need to install what is required to build Panda3D themselves to compile the needed MLL plugins.

You sadly did not understand what i meant. I meant instead of placing the ObjectType tag down you’d place down stuff like ’ { Polyset descend }’ and ‘ collide-mask { 0x00000004 }’.

I’m also going to have to read eveything you put there. [So much]

That won’t work for the reason I describe. The entry in the prc, and subsequently the assigned node tag need to match. So unless a user added entries into their prc(s) which were, in your example and since spaces are not allowed, would have to be similar to the following:
“egg-object-type-<Collide-{-Polyset-descend-} { Polyset descend }”.
You can see from this also, that in my tool, instead of adding “ { Polyset descend }” to the array, it’d be required to be entered as “<Collide-{-Polyset-descend-}”. Quite an unneeded headache not to mention that the name on the button is reflected from the array entries.

Is the maya convertor that limited to the point you can’t assign ‘ { Polyset descend }’ as a tag/extra attribute? You said it needs ‘-’ but you still don’t understand what i meant. I mean putting ‘ { Polyset descend }’ raw into the resulting converted egg. Can that NOT be done? If not that’s pretty sad for limiting.

I understand exactly what you meant and wanted to do. It’s not limited and in fact functions as designed. I feel you just do not understand how they function and what their purpose is. Perhaps in a similar manner to the collision system in general? I recall on reddit you holding to it that there was a ‘bug’ with collisions, when in fact, as I told you there on reddit, there is not. I gathered instead, that you simply just didn’t understand how the Panda3d collision system worked/s. Specifically in that case, what bitmasks, [into] collisions and [from] collisions actually are and how they all work together. From previous posts on here, it does appear though that you were lucky enough to have had someone give you the entries, with included bitmasks, that panda will embed into the bam files when compiled. Though these are not required to make the collisions system work as it should. They can be either embedded into a compiled bam file or by writing specific python code to add the bitmasks at model load time; or by a few other methods. The purpose of the tags are that they are ‘shortcuts’ for a modeler so that they can use a small, simple one or two word [tag] in the modeling program, to which the more lengthy code is then described in the Panda prc files.

You honestly seem to be missing the sole purpose and function of tags. As I mentioned, they are ‘shortcuts’ for modelers. That’s all, nothing more. So in the modeling program, the modeler adds, say “barrier”. When the maya2egg/egg2bam, or any panda command line program really, programs are run, Panda loads/reads the configuration files. If tags are found, it matches up the tag object names it comes across, to the line entry in a prc file. So to further this explanation and try to make it as simple as possible for you to understand, when panda comes across the tag of ‘barrier’, it searches the prc’s for a tag entry of ‘egg-object-type-barrier’. When it finds the last one in the prc files it reads, it then converts the tag name to the actual data entry that the tag references. It’s been this way, from what I can tell, since the inception of the Panda3D engine. I can only recommend that you take the time to read on the topics for a better, more rounded understanding of their function and use. Entering in the actual data to embed, from my understanding, is not only not possible(though I’ve honestly never bothered to find out if it can be for the obvious reasons mentioned), it defeats the purpose of using tags in the first place; and instead would require the user to remember long, complex lines of code to enter in for every tag the user wanted to use(since tags can, and used to be, manually added to a node for users [not] using a gui similar to mine). Though this in no way limits it’s function as you insinuated. I mean, it’s really not that difficult to add a complex entry into a prc file, is it? For once the entry is in the configuration file(s), the shortened tag name can be used by different modeling programs without needing to remember a long line of code.

Let me straighten some things out. Yes i will admit i don’t know EVERYTHING about Panda3D and who does besides rdb and them? I did soon figure out that collision ‘bug’ was not a bug as you stated but a bitmask issue. And the only reason i ever suggested adding in these complex lines of code is for custom object type like options for people so they can make their own without having to go in and edit the main code and .prc files and shit. Not all modelers are programmers so that would be a handy feature for them. Second off i’m mainly a programmer not a modeler so me not knowing everything is excepted. HECK not even Swag Foreman knew the issue was the Bitmasks till i figured it out from rdb. Also those bitmasks? I FOUND them. They weren’t HANDED to me in any way. I hope this clears some things up.

All of that aside, I understand what you’re wanting to do. But answer me this. Once one determines they need a specific string of code for any type they wish to define, by doing research on it, or other entry to include into an egg file, bam file or through python code, isn’t it just easier to enter that long string, one time, in a prc, where it will now be available to every panda command for other uses; versus a one time use in say an exported egg file?

It honestly isn’t that difficult of a process to add an entry into a prc file and the MEL script. The whole process consists of the following 3 steps to create a new object-type and requires absolutely no programming skills at all:

  1. Figure out the data string for what one is wanting to achieve. (This has to be done either route.)
  2. Add the 'egg-object-type-[name] [data string, [data string], …]" line entry in a prc.
  3. Add the [name] to the global array in my mel script.

That’s it. After those 3, very simple, steps are done, adding the tag to nodes is now available through the GUI. Adding the raw data is something I’ve never attempted, nor ever seen any advantage in doing so, as the current Panda method functions great as it is. Using tags also has the advantages that the defined egg-object-types in the configuration file(s) will also available to every other panda command a user may utilize without further needing to figure out just how to incorporate the data string into the process trying to be accomplished. This can be important. By using just a tag name, instead of the data string, also allows for the same tag name to be used across multiple panda versions where the data string may need to be varied do to version conflicts. Since my tool allows for the use of multiple panda versions, it’s able to also take advantage of this. In instances where a user manually adds tags to nodes, it requires them to only need to remember a simple word or two, instead of a long string of data. Decreasing the chances of mistakes.

In closing, while it [may] be possible to actually add the data string directly to a node, as I stated, I’ve never needed to, wanted to, nor honestly even know if it it would actually export into the egg data. “Not all modelers are programmers” is exactly [why] tags are used instead of requiring the modelers to remember lengthy strings of code. In all honesty, since I fail to see any advantage to adding tags this route, if it’s even possible, it is not something I’m going to spend any of my free time trying to figure out or incorporate into my tool. It just makes no sense to me to do so.

How can you import egg animations with this? it doesn’t seem to work for me.

Thank you for all the wonderful updates, this tool has truly made my experience 100 times better. :smiley:

:smiley: You’re very welcome! And, thank you for the support!

So maya 2016 was not working so i had to upgrade to maya 2017. Since i had to delete my plugins, i had to redownload the egg and bam exporter for maya. It was going fine until i got to the step where u have to get the plugins from the panda3d folder. i only have mayaeggimport2016 not mayaeggimport2017. I even downloaded the latest dev build but still cant find it. Can someone send me a download link for the files or just help me if im doing something wrong because this is kinda stressing me out.

According to a post by rdb, 2017 was added at the dev1099. So, any dev build after that should contain the 2017 plugins from my understanding.
[url]maya2egg for Maya 2017?]

hi, i am having trouble with this.
My panda GUI seems to be missing the export button

Any help would be much appreciated.

Honestly not sure why that would have happened to just you. (as I’ve not heard this from anyone else that is.)
Looking at your screenshot though, I definitely wonder if you’ve edited the original script pertaining to the GUI creation section. And I wonder this, given that not only are, eh, two, sections missing on the right-bottom side but even for the ones showing up, it ‘appears’ that their heights are off a little. Which would give cause as to why some of the frames are partially overlapping checkboxes and text in frames above those.
Regardless of my observations, which Maya version are you using, and is the script you are using, downloaded from here and still in its original form?

I use maya 2012 for this. And i have not edited any scripts.And yes it is the same scripts i downloaded from here

Ah. That may, in fact, be the issue then. A number of the older commands of say 2012 version of Maya, have been removed, (deprecated), from the newer versions. It’s highly probable, given the situation and evidence, that at least one of the GUI window commands was one of them. I also know for a fact that at least one, maybe more, of the actual functions of the script, if I remember correctly, had been deprecated from version 2012 in version 2016 and overall, the script won’t fully run on 2012 anyhow; even without the GUI issues demonstrated. Since I updated a number of the script aspects, I was more worried about the script running on the newer versions personally. Currently, this script should run properly with the following versions, 2015, 2016, 2017. I have not been able to test it out on 2018 as of yet as I have not been able to compile the plugins for that version to date. Since I no longer run 2012 and haven’t for a number of years, it’s impossible for me personally attempt to recode it to run properly on the older versions.

ah Thanks… will have to get the 2015 onwards one