UGX-Mods

Call of Duty 5: World at War => Applications & Tools => Custom Maps, Mods & Tools => 3rd-Party Applications & Tools => Topic started by: DeletedUser on August 14, 2016, 10:20:38 pm

Title: CoD Maya Tools 2.0 for Maya 2012+
Post by: DeletedUser on August 14, 2016, 10:20:38 pm
(https://cdn.discordapp.com/attachments/157701157978898436/214504642661318666/CoD_Tools.png)
by Ray1235 and Scobalula
Originally by Aidan
Now with new features!
Logo by HitmanVere

What new stuff can it do?

Installation
1) Download the script and copy it to <User>\Documents\maya\<version>\scripts (in my case it's C:\Users\Maciej\Documents\maya\2012-x64\scripts)
2) In the same folder, create usersetup.mel (if you don't already have one). Add this code to the end of the file:
Code Snippet
Plaintext
python("import CoDMayaTools");
3) Restart Maya
4) First time configuration will occur, choose your root folder, confirm that you will be/won't be using Export2Bin and you're good to go! :)

github.com
Download the latest version (https://github.com/Ray1235/CoDMayaTools/archive/development.zip) (might not work correctly)
Fork it on GitHub (https://github.com/Ray1235/CoDMayaTools)

Wait, but how do I...
...get the notetracks from tanims/M16 rig/Wraith exports?
It's really simple! All you have to do is open the Export XAnim window and press Grab Notes!
(http://image.prntscr.com/image/1d87e29ae98443f19cf4e99c41df75c5.png)
...generate camera anims?
First, select tag_camera and then mark it as camera
(http://image.prntscr.com/image/3e01b16c4937472f8d333cd96962f585.png)
Then, select tag_weapon (or tag_weapon_right, or whatever you want to use) and mark it as weapon
(http://image.prntscr.com/image/8ca2ac7b17d24a37b92d45ba9112f736.png)
And now you can press "Generate camera animation"!
(http://image.prntscr.com/image/8972dbf6973346e89adf73c4894ccc08.png)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: KhelMho on August 14, 2016, 10:56:36 pm
Nice! New updates  :rainbow:
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: JBird632 on August 14, 2016, 11:28:46 pm
Thanks Ray, this will come in handy :D
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on August 15, 2016, 08:09:40 am
I cant seem to find the export as xmodel_bin. Where is this setting? I have the path set to export2bin, just cant seem to find a way to actually export as bin

If it's enabled it will export to xmodel_export and then execute export2bin, essentially enable it, do Export xModel, Export Selected, once it's done exporting (goes too 100%) it should run it.

Also Ray I think you forgot to include my notetrack thing. \__ :alone: __/ I added it, link should have updated version with notetrack stuff.

For "ignore Useless joints" this is for BO1 and lower, so those doing BO3 can possibly leave this off when porting, to give people an idea of what is considered a Useless:

Code Snippet
Plaintext
IsUneededNote = ( # If you find a Note that is not needed in WaW and you want to remove it from further anims add it here:
NoteTrack == "reload_large"
     or NoteTrack == "reload_small"
     or NoteTrack == "reload_medium"
             or NoteTrack == "clip_out"
     or NoteTrack == "clip_in"
     or NoteTrack == "rechamber_release"
             or NoteTrack == "rechamber_pull_back"
             or NoteTrack == "end" # This will cause an error in converter, but might be needed for BO3, appears to be on ALL anims.
        )

Any issues with notetrack stuff please let me know! :)

Spoiler: click to open...
For those in tools who are porting from DLC, etc. and don't want to constantly untick that button to ignore certain notes go to line 1612 and change it to:

Code Snippet
Plaintext
IgnoreUslessNotes = cmds.checkBox("Scoba_IgnoreUslessNotes", label="Ignore Useless Notes like reload_large, etc.", annotation="Check this if you want to ignre notes like reload_large, etc.", value=False)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Harry Bo21 on August 15, 2016, 08:42:58 am
Only "end" gives an error btw?

I've always added the other notes, even tho they are totally redundant granted
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on August 15, 2016, 08:49:59 am
Only "end" gives an error btw?

I've always added the other notes, even tho they are totally redundant granted

I know, the others aren't need so I gave the user the option to ignore them.

Also the updated WraithNote should be added soon to Wraith, it uses a new system of getting notes.

http://prntscr.com/c5vvk6 (http://prntscr.com/c5vvk6)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Harry Bo21 on August 15, 2016, 09:06:17 am
Awesome man
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: DeletedUser on August 15, 2016, 06:16:32 pm
Uploaded a hotfix
Fixes:
 - No longer asks for root directory everytime when opening a save file dialog
 - [RCAT] Frame numbers are converted to int to avoid errors

Double Post Merge: August 15, 2016, 11:06:12 pm
Another hotfix:
Tool no longer asks for a root directory when importing models
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on August 16, 2016, 08:05:47 am
I've added an experimental feature to Dev. build (well, it worked on PPSh so not really "experimental") that allows you to export the animation reversed. Let us know how it goes.

Good for doing sprint_ins, then reversing to make a sprint_out, same with putaway etc. and was very easy to add.

Code Snippet
Plaintext
		if cmds.checkBox("CoDMAYA_ReverseAnim", query=True, value=True):
cmds.currentTime(((frameEnd+1)-i)*multiplier) # Frame End defined by user (frameEnd) - what our current frame should be (i).
else:
cmds.currentTime(i*multiplier)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on August 17, 2016, 03:58:59 pm
Automatic GDT anyone?

(http://image.prntscr.com/image/9ab0eb171a0b4f2497ea9154abd3fce8.jpeg)

:)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Tim Smith on August 17, 2016, 05:22:18 pm
Yes please :rainbow:.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on August 17, 2016, 05:31:24 pm
Yes please :rainbow:.

Should be updated to dev build soon, seems to be working fine:

(http://image.prntscr.com/image/5c52affff6884410bc13bbd9cd5a5373.jpeg)

Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Tim Smith on August 17, 2016, 05:36:54 pm
Lovely, any idea i could export it and add it to my own gdt ? Not having to make one ?
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on August 17, 2016, 06:10:59 pm
Lovely, any idea i could export it and add it to my own gdt ? Not having to make one ?

Maybe.

(http://image.prntscr.com/image/7ac9295ba63542128948da0708e1e2d4.jpeg)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: michaeladean on August 17, 2016, 09:09:28 pm
idk how ya'll get the plugin to show up in maya 2012 but i did exactly what you said and it doesn't work... HELP
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: KhelMho on August 18, 2016, 12:01:36 am
What is the "Quality (0-10)"  ???
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: trains4days on August 27, 2016, 05:13:12 am
I followed these instructions exactly and nothing shows up in Maya. I am using Maya 2014, and I had to create usersetup.mel so nothing was in it and I copied   python("import CoDMayaTools");  into the file and then saved it and opened Maya, I dont get an error, there just isnt the CodMayaTools tab on the top. Ive been trying this for a few hours and nothing seems to work. Any help is great thanks.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on August 27, 2016, 08:48:00 am
I followed these instructions exactly and nothing shows up in Maya. I am using Maya 2014, and I had to create usersetup.mel so nothing was in it and I copied   python("import CoDMayaTools");  into the file and then saved it and opened Maya, I dont get an error, there just isnt the CodMayaTools tab on the top. Ive been trying this for a few hours and nothing seems to work. Any help is great thanks.

Show screenshot of Script Editor.

(http://image.prntscr.com/image/7a1d67d76f8640c0b5d67fa27c88b7a8.jpeg)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: DeletedUser on September 18, 2016, 07:04:01 pm
Uploaded a hotfix. Export2Bin is now 100% confirmed working.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: zeroy on September 18, 2016, 07:29:29 pm
Great stuff, thanks guys!
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Linoxet on September 21, 2016, 11:33:45 pm
If I try to export a xmodel from CoD5 maya gives me this error:

Code Snippet
Plaintext
# Error: TypeError: cannot concatenate 'str' and 'tuple' objects # 

I did not try exporting from CoD4 because I dont have the game.
I tried using the "old" CoD Maya Tools, but it does not work anymore on my pc.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on October 02, 2016, 03:14:12 pm
Updated: Fixed error that would cause all options below Export2bin to disappear and stop other buttons working, it was due to it trying to open a Registry Key that didn't exist. Let me know if it works, it worked on my end. :)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: ItsJiinzo on October 07, 2016, 03:46:37 pm
it doesnt work me i got this error
i tried with v1 or v2 same error please help me ray

https://gyazo.com/f388a4478abc4ec97b57a4b4cd67b713
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Delta on October 22, 2016, 10:43:20 am
Uploaded a hotfix. Export2Bin is now 100% confirmed working.

100% NOT working.

I tried it yesterday and the export2bin doesn't create the correct file (content).
I used Maya 2016.

The normal export worked fine, but I had to run it (after 1 hour of raging) manually through export2bin (that tool is also questionable...)

Could this please be reviewed, because I got clearly fooled by the developer saying it works 100%.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: DeletedUser on October 22, 2016, 11:02:41 am
100% NOT working.

I tried it yesterday and the export2bin doesn't create the correct file (content).
I used Maya 2016.

The normal export worked fine, but I had to run it (after 1 hour of raging) manually through export2bin (that tool is also questionable...)

Could this please be reviewed, because I got clearly fooled by the developer saying it works 100%.
Sorry for misleading, I forgot to edit my post after I've noticed that it doesn't work at all, god dammit. I thought that the tool would accept the full path as argument, but it doesn't.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Delta on October 23, 2016, 06:56:51 pm
Sorry for misleading, I forgot to edit my post after I've noticed that it doesn't work at all, god dammit. I thought that the tool would accept the full path as argument, but it doesn't.

yeah the tool is "weird" I quickly had to convert one so I just moved it into the main dir.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Riskeh on October 26, 2016, 10:45:47 pm
Whenever I try to export a model i'm getting the same error, I tried with Maya Tools 1.0 and 2.0, Maya 2015 / 2016.
Am I doing something wrong ?

(http://image.noelshack.com/fichiers/2016/43/1477521697-816-27-10-2016-at-00-41-15.jpg)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Riskeh on October 29, 2016, 02:05:25 pm
Whenever I try to export a model i'm getting the same error, I tried with Maya Tools 1.0 and 2.0, Maya 2015 / 2016.
Am I doing something wrong ?

(http://image.noelshack.com/fichiers/2016/43/1477521697-816-27-10-2016-at-00-41-15.jpg)

I've found the solution, my username contains a unicode character so I just had to do an other account.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on November 07, 2016, 02:33:48 pm
Updated: Export2bin should now hopefully be working, I tested it with an xmodel and an xanim and it worked fine in both cases. Make sure to download latest and replace the .py file and delete the PYC file. :)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on November 08, 2016, 11:27:50 pm
Quote from: Riskeh link= date=1477749925
I've found the solution, my username contains a unicode character so I just had to do an other account.
Alright, I think I fixed this, I pushed another small update, if you're not running into this issue you don't need to download it.
It will now instead "ignore" these so if your directory for // Source: is c:\éat_me\spookie.mb it will be c:\at_me\spookie.mb when writting the xmodel_export/xanim_export.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: theripppa on November 10, 2016, 01:49:12 am
I cant get this to work with Maya 2016..am i doing something wrong?
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on November 10, 2016, 08:37:44 am
I cant get this to work with Maya 2016..am i doing something wrong?

You probably are, I have it working on 2012 and 2016, what exactly isn't working? Script Editor should provide some info.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: theripppa on November 12, 2016, 01:46:35 am
I got it Mapper..apparently i must have been tired, had files in wrong folder :o
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: FinalKill9175 on December 21, 2016, 06:25:17 pm
When I try to export an anim, I get this error. I am using Maya 2016 on windows 7 64 bit.
Code Snippet
Plaintext
An unhandled error occurred during export:

Traceback (most recent call last):
  File "C:/Users/ARlO-DESKTOP/Documents/maya/2016/scripts\CoDMayaTools.py", line 2031, in GeneralWindow_ExportSelected
    exec("response = %s(\"%s\")" % (OBJECT_NAMES[windowID][4], filePath))
  File "<string>", line 1, in <module>
  File "C:/Users/ARlO-DESKTOP/Documents/maya/2016/scripts\CoDMayaTools.py", line 1325, in ExportXAnim
    RunExport2Bin(filePath)
  File "C:/Users/ARlO-DESKTOP/Documents/maya/2016/scripts\CoDMayaTools.py", line 2293, in RunExport2Bin
    subprocess.call(p.replace("/","\\") + " \"" + file.replace("/","\\") + "\"")# , "\"" + file.replace("/","\\") + "\""])
  File "C:\Program Files\Autodesk\Maya2016\bin\python27.zip\subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Program Files\Autodesk\Maya2016\bin\python27.zip\subprocess.py", line 709, in __init__
    errread, errwrite)
  File "C:\Program Files\Autodesk\Maya2016\bin\python27.zip\subprocess.py", line 957, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

I think it may have to do with the python installation inside of maya. But idk.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: HyperFirez on January 05, 2017, 03:02:04 am
I get this error when trying to click on anything in the tool: "# Error: NameError: name 'CoDMayaTools' is not defined"

EDIT: Huh, that is odd... I restarted Maya for the second time and it works now.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: DeletedUser on January 05, 2017, 06:17:11 am
I get this error when trying to click on anything in the tool: "# Error: NameError: name 'CoDMayaTools' is not defined"

EDIT: Huh, that is odd... I restarted Maya for the second time and it works now.
I was about to suggest you to check the filename as it has to be the same.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: HyperFirez on January 05, 2017, 01:35:01 pm
I was about to suggest you to check the filename as it has to be the same.
Yeah, it is the same.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: ARX-4 on January 12, 2017, 04:04:39 pm
it just add a new object "call of duty tools" on the maya top list but not work

i have install my country's version of maya 2012(zh-CN) and follow your words but it doesnt work
when i click the "call of duty"menu list it said "error:NameError:name 'codmaya tools' is not defined"
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on May 12, 2017, 09:51:54 pm
A new update has been released to this which includes some fixes and new features:
 
*Moved all settings to a sub menu and make them check boxes, before it required a refresh of the menu which crashed 2017 on occasions. (which seems to happen on any script I've tried that deletes and recreates UI)
*Optimized the ReadNotes functions with a list and loop so they are now easier to read and modify., instead of a mess of if and elifs.
+Add a Button to grab frames from scene so you no longer need to manually enter start and end frame.
 
Of course any issues do let Ray or I know.
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on May 18, 2017, 08:36:36 am
A test version has been released that some might wanna give a go, after Porter showed me PyCod for AutoGDT I decided to give a go at implementing it into CoDMayaTools.
 
Essentially this ads direct *_BIN support from the tool, no Export2Bin.exe junk. To use this update download the latest from pycod branch here:
 
https://github.com/Ray1235/CoDMayaTools/tree/pycod_implementation
 
And simply put the CoDMayaTools.py and pycod folder into your scripts folder. I have done several test with different models including weighted, multiple materials, over 65k, etc. and all seem to work. Of course none of that would be possible without work of those on PyCod (which of course make sure to checkout the dev. version of Blender-CoD which has support for _BINS also).
 
https://github.com/SE2Dev/PyCoD
 
Please note this is a TEST version, and while tests worked, both PyCoD and this implementation are not finished, so it's not unlikely you might run into issues, please do report any you find.
(https://my.mixtape.moe/jeaole.png)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Scobalula on June 24, 2017, 08:19:22 am
Hey would you look at that cosmetic bones. ¯\_(ツ)_/¯


(https://my.mixtape.moe/uktgin.png)

go here


https://github.com/Ray1235/CoDMayaTools
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Tim Smith on October 21, 2017, 09:51:26 am
Good work guys!
Spoiler: click to open...
i know they're outdated, but please bring back the tanims notetracks support. It was working before. Thou you really don't have to. but if you have an update you wanna push, would be lovely to do that again. :)
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: Vikmor on January 09, 2018, 02:22:28 pm
This Tool can export COD4 character Xmodels properly? (for SP)
I have a broken rig at every model i export, even if its original without any changes.

Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: jiggy22 on January 25, 2018, 10:56:42 pm
When installing, I get this error:

# Error: file: C:/Users/XXX/Documents/maya/2014-x64/scripts/usersetup.mel line 1: ImportError: file C:/Users/XXX/Documents/maya/2014-x64/scripts\CoDMayaTools.py line 56: No module named pycod.xmodel #

Any fix?
Title: Re: CoD Maya Tools 2.0 for Maya 2012+
Post by: K-Nuto on November 20, 2020, 07:38:14 pm
Hi. I know this topic has been inactive for months, but I'm new here and I don't know how to create a new one.
My problem is that, after succesfully installing the CODMayaTools, I get an error when trying to export models that I previously loaded from other programs. In my case, a created a plain 3D square  on autocad and then opened it on Maya 2019. When I click "export selected", I receive the following error:

"An unhandled error occurred during export:

Traceback (most recent call last):
  File "C Users/Admin/Documents/maya/2019/scripts\CoDMayaTools.py", line 2855, in GeneralWindow_ExportSelected
    exec("response = %s(\"%s\")" % (OBJECT_NAMES[windowID][4], filePath))
  File "<string>", line 1, in <module>
  File "C Users/Admin/Documents/maya/2019/scripts\CoDMayaTools.py", line 1239, in ExportXModel
    ExportMeshData(joints

  File "C Users/Admin/Documents/maya/2019/scripts\CoDMayaTools.py", line 1371, in ExportMeshData
    cmds.progressBar(OBJECT_NAMES['progress']
RuntimeError: Maximum value must be greater than minimum value."[/list]


Please, I've tried to figure out the solution but I've run out of any ideas


NOTE: seems to work fine when models are created on maya itself, but I can't seem to get it working with (even totally simple) imported models, i.e. a simple 3D sphere