### Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

### Messages - ManDrake13

Pages: [1] 2
1
##### User modifications / Produce Rate settings.
« on: August 10, 2015, 03:03:58 am »
I've been debating the producerate setting for the campaigns and I was wondering what the general consensus was for it's value. So here are the relevant lines of code from the cp_produce.cpp.

Code: [Select]
` 34 /** @brief Default amount of workers, the produceTime for technologies is defined. */ 35 /** @note producetime for technology entries is the time for PRODUCE_WORKERS amount of workers. */ 36 static const int PRODUCE_WORKERS = 10;... 63         /* Calculate the time needed for production of the item for our amount of workers. */ 64         const float rate = PRODUCE_WORKERS / ccs.curCampaign->produceRate; 65         double const timeScaled = timeDefault * (MINUTES_PER_HOUR * rate) / std::max(1, maxWorkers);`
At first I was taken aback by the setting of 10 by default, well producerate is set to 1 by default, which makes the rate 10. But then I started putting pencil to paper on the math and my reaction was a bit unrealistic, but not terribly so. According the publicly available statistics the average American worker puts in 1600 hours are year and the average European worker put in 1400 hours a year. The goal is to have workers working 24 hours a day, 7 days a week logically no one human being can do that. Doing some rounding that comes out to about 8760 to do one constant man year of work. Dividing it up to get 24/7 coverage for American workers that would be 5.475 workers to do one man year of work, or 6.257 workers if they are European.  Which would mean their respective producerate would be 1.8265 and 1.5982 roughly. Personally when I worked as a contractor, I worked 1920 hours a year, which is 4.5625 workers to do a man year. But I'm zealot and I got paid overtime, so I don't think that's realistic. I mean I know it's not realistic to work every worker 24/7, but do we really need to give them 12 weeks vacation a year? Or 17 weeks of vacation like the Europeans? There is a super secret war against the Aliens going on, do we have to only keep them working 22 weeks a year? Given that it's the future and the averages have probably changed at least some what, because human life tends to get easier over time. Anyway, that was just my thinking on the subject, I was curious if anyone else had come up with different math on the topic.

2
##### Bugs in development version (2.6-dev) / Re: Did something change with the repository?
« on: July 23, 2015, 03:14:38 am »
Wow, 7 days and it's finally back up! now what was I working on again??

3
##### Bugs in development version (2.6-dev) / Did something change with the repository?
« on: July 17, 2015, 10:59:16 pm »
I've been busy with work for a couple days, and when I did a git pull when I got back, I get the following error now.

\$ git pull
fatal: unable to connect to git.code.sf.net:
git.code.sf.net[0: 216.34.181.155]: errno=Connection refused

Did the repository move or something?

4
##### Artwork / Re: Scaling Question.
« on: July 02, 2015, 03:26:38 pm »
No worries, it's just reinforcing my instinctive distrust of Blender. I've got tons of things I do without remembering the why I developed the procedure. It's the nature of people really. Like why I develop an entire infrastructure to manage my mods, I've been burned so many times by multiple version code management, that I'm paranoid about it.

So the final versions of shape and center for the minimedikit ends up being the following.

Code: [Select]
` shape "0 0 1 2" center "-1 -5 0"`
So center is x,y,? like you would expect. Not sure what the last number does, it appears to exaggerate the values of x and y. Shape appears to be ?,?,x,y, oh the first two appears to allow you to link multiple shapes together. So in reality it's x,y,x,y, and the first ones are to set the offsets from the previous shape if you have multiple rectangles to fit the image.

Once again, thank a lot for the help. The next challenge will be to alter a component of an existing image, but I need a break from Blender. I can only take so many hits to head in a given period of time.So I'll probably just play the game this holiday weekend, instead of trying to improve my mods.

5
##### Artwork / Re: Scaling Question.
« on: July 01, 2015, 02:25:21 pm »
I can complete understand the concern. I have 20+ mods for the game, so I had to start separating them to allow for easier debugging. So I work on them in the standalone directory and then do a build mod, which creates a proper mod directory for game usage. You are correct that the standalone directory would never work for the game.

Code: [Select]
`ubuntu@Ubuntu13:~/ufoai\$ git pullremote: Counting objects: 29, done.remote: Compressing objects: 100% (24/24), done.remote: Total 24 (delta 16), reused 0 (delta 0)Unpacking objects: 100% (24/24), done.From git://git.code.sf.net/p/ufoai/code   7aa7b56..72898b1  master     -> origin/masterUpdating 7aa7b56..72898b1Fast-forward src/tools/blender/io_mesh_md2.py | 103 +++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------- 1 file changed, 47 insertions(+), 56 deletions(-)`
So I saw you pushed a new fix overnight, so I reran my tests and got the same result. Which made no sense to me. A single line of code change should change something even if it's absolutely minor. So I became suspicious that something wasn't actually being changed. And there is only one thing in the process that isn't us, and it's Blender. So even though I was reloading the new copy of io_mesh_md2.py every time, it appears that blender wasn't actually changing it. So I went back end and deleted the script completely from Blender. Then reloaded it from scratch.

Code: [Select]
`ubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64\$ ./blenderconnect failed: No such file or directoryRead new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blendfound bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/pythonreloading addon: io_mesh_md2 1435751192.8296928 1435752005.9417028 /home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.pyModules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' ()trying to save userpref at /home/ubuntu/.config/blender/2.73/config/userpref.blend okaddon_utils.disable: io_mesh_md2 not loaded.Modules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' (io_mesh_md2)trying to save userpref at /home/ubuntu/.config/blender/2.73/config/userpref.blend okSaved session recovery to '/tmp/quit.blend'Blender quitubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64\$ ./blenderconnect failed: No such file or directoryRead new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blendfound bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/pythonreloading addon: io_mesh_md2 1435752038.5777032 1435752180.137705 /home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.pyModules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' ()reloading addon: io_mesh_md2 1435752180.137705 1435752209.1097054 /home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.pyModules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' ()trying to save userpref at /home/ubuntu/.config/blender/2.73/config/userpref.blend okBlender quitubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64\$ ./blenderconnect failed: No such file or directoryRead new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blendfound bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/pythonReading: /home/ubuntu/ufoai/mods/techmods_26/standalone/minimedikit/models/minimedikit.md2....DoneCreating mesh.....DoneModel importedminimedikit:  ('104 vertices', '158 faces')Export progress: 100% - Model exported.Saved session recovery to '/tmp/quit.blend'Blender quit`
Sure enough after that draconian measure what came out the other end worked properly with your new code.

Now that it works, the next question comes along, but you'll need to see the mod to actually understand what I'm talking about. I think the scaling option is throwing things off on the mod, because it's confusing the placement routine for orientation, it's like it's having trouble treating it like a 1x2 object now. The logical center of the object seems to be off. It puts it in the wrong orientation compare to objects of similar type.

Quote
For everyone else, this is a 2.6 only mod, built off of bleeding edge code and should not be considered stable or usable for any reason. The mod should be considered completely broke if found at some future date when 2.6 is released to the public, because the code changes could completely destroy the mod. DO NOT USE UNDER ANY CONDITIONS! Here there be dragons, run away.

6
##### Artwork / Re: Scaling Question.
« on: July 01, 2015, 02:15:40 am »
Right. I was over thinking it. Sorry about that. So I ignored the warning. I did a clean start over again to my base value. Imported, scaled, and exported the md2 file. Confirmed that it had default values correctly.

Code: [Select]
`ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models\$ ~/ufoai/src/tools/md2.pl skinedit ../../../../../base/models/weapons/medikit/medikit.md2 minimedikit.md2 .minimedikitIN = "../../../../../base/models/weapons/medikit/medikit.md2"OUT= "minimedikit.md2"TEX= ".minimedikit"MD2 file found.1 Skin(s) foundSkin 0 old: ".medikit"Skin 0 new: ".minimedikit"Writing model to minimedikit.md2ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models\$ lltotal 28drwxrwxr-x 2 ubuntu ubuntu  4096 Jun 29 08:53 ./drwxrwxr-x 4 ubuntu ubuntu  4096 Jun 30 15:16 ../-rw-rw-r-- 1 ubuntu ubuntu 15501 Jun 29 09:28 minimedikit.jpg-rw-rw-r-- 1 ubuntu ubuntu  2864 Jun 30 20:03 minimedikit.md2ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models\$ ~/ufoai/src/tools/md2.pl info minimedikit.md2MD2 file found.NumFrames: 1 (max is 512)NumSkins: 1 (max is 32)NumXYZ: 104 (max is 2048)NumST: 95NumTris: 158 (max is 4096)NumGLcmds: 0SkinWidth: 256SkinHeight: 256`
Then I rebuilt my mod and started it up and got the following error.

Code: [Select]
`executing keys.cfgexecuting autoexec.cfg"version" is "UFO: Alien Invasion 2.6-dev AMD64 Jun 28 2015 Linux DEBUG"R_LoadActorSkinsFromModel: Skin models/soldiers/ugv_ares/ares_w_default not found, defaulting to: models/soldiers/ugv_ares/ares_wNo skin for #0 of 'weapons/minimedikit/minimedikit'80 static models loadedCL_LanguageInit: language settings are stored in configuration: en...using language: en_ZW.utf8SDL_ttf version 2.0.11 - we need at least 2.0.7...registering 14 fonts`
In the game, now instead of being blue it's red, this looks like what happened when I tried to use the real image name when I did my skin edit, it would show up properly in Blender, but gave me a red outline in the game. That was when I figured out that it needed .<jpgname> for it to actually show up and it couldn't have the file extension on it. I want this to be a typo, but I can't see it if it is.

7
##### Artwork / Re: Scaling Question.
« on: July 01, 2015, 01:13:09 am »
No luck. I did a git pull

Code: [Select]
`ubuntu@Ubuntu13:~/ufoai\$ git pullremote: Counting objects: 40, done.remote: Compressing objects: 100% (31/31), done.remote: Total 31 (delta 22), reused 0 (delta 0)Unpacking objects: 100% (31/31), done.From git://git.code.sf.net/p/ufoai/code   707f219..7aa7b56  master     -> origin/masterUpdating 707f219..7aa7b56Fast-forward src/client/cgame/campaign/cp_missions.cpp |  2 +- src/tools/blender/io_mesh_md2.py          | 26 +++++++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-)`
and installed the script again.

Code: [Select]
`ubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64\$ ./blenderconnect failed: No such file or directoryRead new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blendfound bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/pythonreloading addon: io_mesh_md2 1435408318.457492 1435691440.972961 /home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.pyModules Installed from '/home/ubuntu/ufoai/src/tools/blender/io_mesh_md2.py' into '/home/ubuntu/.config/blender/2.73/scripts/addons' ()trying to save userpref at /home/ubuntu/.config/blender/2.73/config/userpref.blend okReading: /home/ubuntu/ufoai/mods/techmods_26/standalone/minimedikit/models/minimedikit.md2....DoneCustomData_copy_data_layer: warning null data for CDMTFace type ((nil) --> 0x7f38d6806008), skippingCreating mesh.....DoneAnimating - progress: 100%.Model importedSaved session recovery to '/tmp/quit.blend'Blender quit`
Same warning.

8
##### Artwork / Re: Scaling Question.
« on: June 30, 2015, 03:21:02 pm »
That was my first thought too, but there is nothing in the log about a texture failure for the minimedikit. I attached the game log, that I ran with the minimedikit enabled as the only mod using +set developer 1 to turn on the additional debugging information. I see the Actor skin warnings, but those have been hanging around for a while now on 2.6, they haven't seemed to cause any adverse affects to playing the game.

No, I didn't unwrap or anything. This was created with literally the three steps I list, import uncheck Import Animation like you said, I did the n thing that Noordung mention to bring up the scaling menu faster, I put in the .5 for Y in the scaling section, and then literally just exported. The check box was already unchecked in that case. Here is the command console results that came out of Blender when I did this.

Code: [Select]
`ubuntu@Ubuntu13:~/blender-2.73a-linux-glibc211-x86_64\$ ./blenderconnect failed: No such file or directoryRead new prefs: /home/ubuntu/.config/blender/2.73/config/userpref.blendfound bundled python: /home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/pythonReading: /home/ubuntu/ufoai/mods/techmods_26/standalone/minimedikit/models/minimedikit.md2....DoneCustomData_copy_data_layer: warning null data for CDMTFace type ((nil) --> 0x7f1ffd00e008), skippingCreating mesh.....DoneModel importedminimedikit:  ('104 vertices', '158 faces')Export progress: 100% - Model exported.Saved session recovery to '/tmp/quit.blend'Blender quit`
I didn't notice the warning message there before, because it exported successfully. Maybe that's the problem, because that's in the importer execution like you suspected.

9
##### Artwork / Re: Scaling Question.
« on: June 29, 2015, 03:43:31 pm »
Thanks DarkRain! That got me past that export problem. It exported just fine this time. When I tried to load it in the game, I got the following error.

Code: [Select]
`"version" is "UFO: Alien Invasion 2.6-dev AMD64 Jun 28 2015 Linux DEBUG"********************ERROR: model models/weapons/minimedikit/minimedikit.md2 has invalid skin dimensions '0 x 0'********************failed to upload file '/home/ubuntu/.ufoai/2.6-dev/techmods_26_public/ufoconsole.log': Failed to open/read local data from file/applicationfailed to upload file '/home/ubuntu/.ufoai/2.6-dev/techmods_26_public/ufoconsole.log': Failed to open/read local data from file/application`
I just did the most basic steps, imported model with no Import Animation. Changed the scale for Y axis to be .5, and exported the model.

So I did an info on the md2 file to see what I could see.

Code: [Select]
`ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models\$ ~/ufoai/src/tools/md2.pl info minimedikit.md2MD2 file found.NumFrames: 1 (max is 512)NumSkins: 1 (max is 32)NumXYZ: 104 (max is 2048)NumST: 95NumTris: 158 (max is 4096)NumGLcmds: 0SkinWidth: 0SkinHeight: 0ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models\$ ~/ufoai/src/tools/md2.pl info ../../../../../base/models/weapons/medikit/medikit.md2MD2 file found.NumFrames: 1 (max is 512)NumSkins: 1 (max is 32)NumXYZ: 104 (max is 2048)NumST: 148NumTris: 158 (max is 4096)NumGLcmds: 0SkinWidth: 256SkinHeight: 256`
And sure enough Skin width and height were set to zeros. I remembered from when I was reverse engineering the md2.pl script seeing something about skin sizes.

Code: [Select]
`ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models\$ ~/ufoai/src/tools/md2.pl skinsize minimedikit.md2IN=OUT= "minimedikit.md2"MD2 file found.Changing skin sizes ...Current size: 0w x 0hEnter new width in pixel (0):128Enter new height in pixel (0):256Writing model to minimedikit.md2ubuntu@Ubuntu13:~/ufoai/mods/techmods_26/standalone/minimedikit/models\$ ~/ufoai/src/tools/md2.pl info minimedikit.md2MD2 file found.NumFrames: 1 (max is 512)NumSkins: 1 (max is 32)NumXYZ: 104 (max is 2048)NumST: 95NumTris: 158 (max is 4096)NumGLcmds: 0SkinWidth: 128SkinHeight: 256`
So I reloaded the game and this time, it came up a blue wireframe in the menus and Ufopedia, but as soon as I tried to load it on a character it would disappear. I remembered your comment about not scaling the texture, so I went back again and redid the same steps above but this time, I set the skinsize to be 256x256 instead, but it yielded the same results even with an unmodified copy of the medikit image. A blue wireframe image instead, which is exactly the size I imagined in the beginning, so I think it's just the skin wrapping part that I'm doing wrong.

10
##### Artwork / Re: Scaling Question.
« on: June 28, 2015, 02:39:51 pm »
Wow, that was a very long and very nasty rabbit hole that led me to a dead-end. So I read over the documentation on models again, and I need to understand what exactly is happening. I saw a reference that some things get lost in translation. Is that what is happening to me? So I import the object in, but this unwrapping thing isn't embedded in the object. Instead the system has some other set of instructions it's using that maps it to the correct spots. Since it doesn't have the wrapping map any more, Blender guesses and it's guesses appear to always be wrong is YouTube is to be believed. So the reality is that there is no such thing as a working prototype to start from, because the game files are already in a non-Blender friendly format. My dreams of just changing the proportions and feeding it a smaller image and altering the mapping were always impossible?

11
##### Artwork / Scaling Question.
« on: June 27, 2015, 04:45:30 pm »
OK, I'm taking another stab graphics after the previous success changing the color of something. So one of my mods is a Mini-Medikit. So my goal was straight forward enough, I'm not brave enough to try to build a completely new model, so I decided to steal the existing one and tweak it. I figured out from searching that what I call proportions is called scaling by artistic people. It appears the challenge with this is just learning an entire new language of terms. So my goal is to make 1x2 mini-medikit for my mod to use. So I did the standard thing made a model directory and copied in the original medikit to work with.

So I copied over the JPG file and renamed it to be minimedikit.jpg and I copied over the md2 file with provided perl script for doing such things. I remembered from my previous experience that I needed to give the JPG part the required naming convention rather than  what the actual JPG name.

Code: [Select]
`\$ ~/ufoai/src/tools/md2.pl skinedit ../../../../../base/models/weapons/medikit/medikit.md2 minimedikit.md2 .minimedikitIN = "../../../../../base/models/weapons/medikit/medikit.md2"OUT= "minimedikit.md2"TEX= ".minimedikit"MD2 file found.1 Skin(s) foundSkin 0 old: ".medikit"Skin 0 new: ".minimedikit"Writing model to minimedikit.md2`
So then I edited the JPG in GIMP. Once I realized the terminology problem it was fairly straight forward. Image->Scale Image, click the chain looking thingy to making it accept a different proportion, cut the image from 256 to 128 for the X axis, then export as a JPG. And you are done. Figuring all that out took an hour, but it's simple once you get the terminology problems worked out.

Then I went back to the beast Blender. I imported in the minimedikit.md2 file that I'd created with the Quake II Python script for md2. Loaded up fine and I could see the medikit model floating in space on the screen. It took me a bit, but I finally accidentally selected the image by clicking on the upside down triangle under the image name. That brought me up in image edit mode, which I'd been trying to find. And on the left hand side lots of new buttons came up,one of them said Scaling, which I recognized and clicked. Took a while after that to make my mouse movements to stop doing scaling automatically, which was completely annoying. I finally figured out I could click the scaling button twice and it would give me numbers I could type in to control scaling. Then I figured out X axis was what I would call the Z axis, and Y axis was what I would call the X axis, and Z axis was what I would call the Y axis. So once I figured out Blender world out of rotation with my world, I was able to edit the correct proportion. So I set the Y axis to be .5 instead of 1. The imagine on the screen looked correct, I was happy, so I decided I needed to get it saved and tested.

And that's where my dream of a simple process went completely off the rails. When I tried to export it with Quake II MD2 exporter I got the following error. It appears what I've tried to do violates some fundamental principal of what we expect to happen.

Code: [Select]
`Creating mesh.....DoneAnimating - progress: 100%.Model importedError: Modifier cannot be applied to a mesh with shape keysTraceback (most recent call last):  File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 859, in triangulateMesh    bpy.ops.object.modifier_apply(modifier=modifier.name)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy/ops.py", line 189, in __call__    ret = op_call(self.idname_py(), None, kw)RuntimeError: Error: Modifier cannot be applied to a mesh with shape keysDuring handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 984, in __init__    self.info = ObjectInfo(self.object)  File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 934, in __init__    mesh = Util.triangulateMesh(object)  File "/home/ubuntu/.config/blender/2.73/scripts/addons/io_mesh_md2.py", line 865, in triangulateMesh    bpy.ops.mesh.quads_convert_to_tris(use_beauty=False)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy/ops.py", line 189, in __call__    ret = op_call(self.idname_py(), None, kw)TypeError: Converting py args to operator properties: : keyword "use_beauty" unrecognizedlocation: <unknown location>:-1location: <unknown location>:-1Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'Traceback (most recent call last):  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 662, in draw_ls    func(self, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 42, in draw    VIEW3D_MT_editor_menus.draw_collapsible(context, layout)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/modules/bpy_types.py", line 771, in draw_collapsible    cls.draw_menus(layout, context)  File "/home/ubuntu/blender-2.73a-linux-glibc211-x86_64/2.73/scripts/startup/bl_ui/space_view3d.py", line 159, in draw_menus    layout.menu("VIEW3D_MT_edit_%s" % edit_object.type.lower())AttributeError: 'ID' object has no attribute 'type'`
So I'm back for some help, either for what I should have done, or what step I've missed that will resolve my issue.

12
##### Artwork / Re: Basic Question
« on: June 10, 2015, 10:38:41 pm »
Well getting Blender allowed me to compare the two objects directly allowed me to see what my actual problem was. Turns out it was in the step that I used with make the md2 file that caused the issue.

~/ufoai/src/tools/md2.pl skinedit ../../../../../base/models/weapons/shotgun2/shotgun_clip.md2 shotgun_clip_yellow.md2 shotgun_clip_yellow.jpg

What I noticed when I was suspicious of the output, once I could see it in Blender, I went back to the messages that md2.pl script put out.

IN = "../../../../../base/models/weapons/shotgun2/shotgun_clip.md2"
OUT= "shotgun_clip_yellow.md2"
TEX= "shotgun_clip_yellow.jpg"
MD2 file found.
1 Skin(s) found
Skin 0 old: ".shotgun_clip"
Skin 0 new: "shotgun_clip_yellow.jpg"
Writing model to shotgun_clip_yellow.md2

So I noticed the old skin name was completely different different than what I thought it should be. Based on that, I went back and redid it to look like this:

~/ufoai/src/tools/md2.pl skinedit ../../../../../base/models/weapons/shotgun2/shotgun_clip.md2 shotgun_clip_yellow.md2 .shotgun_clip_yellow

And suddenly it all started working properly. I ran all these in the models directory of my mod builder system, so for normal people it will be one level higher in the directory structure. I was just designing a way to keep my mods separate from one another so I could add and remove them easily.

Thanks for all the help Noordung and DarkRain. Now I have the ability to add models to my mods working properly. But the whole double script thing in Blender 2.74 is a bit annoying. We should probably have someone that knows what their doing look at that and see if it's just me or if we need to document that so no one else gets hung up on it.

13
##### Artwork / Re: Basic Question
« on: June 10, 2015, 06:09:56 pm »
OK, I think there is a problem with Blender 2.74, I finally figured out how to get to console window and I see this error.

found bundled python: /home/ubuntu/blender-2.74-linux-glibc211-x86_64/2.74/python
multiple addons with the same name:
multiple addons with the same name:

So it looks like 2.74 is copying the add-on into two places and that's why it's not working.

On 2.73, I figured out that when said enable the script, you were really saying:

File -> User Preferences -> Add-ons -> Install from File for each of the two python scripts.

Once I realized it was hosed in 2.74 and switch and did the same thing in 2.73, it all started to work. Now I've got my image, but I think the default box is around it. Which I think I can get rid of. Let me experiment for a few minutes with it. I think I'm getting close.

14
##### Artwork / Re: Basic Question
« on: June 10, 2015, 03:46:59 pm »
Well remember, I'm a programmer, so I'm extremely literal about things, especially when I'm walking into something I don't understand. So you should probably assume that you are talking to a 3 year old when trying to describe this stuff.

So I downloaded the latest Blender version 2.74 for Linux. I did a simple copy operation like you said to copy all the python scripts into the python directory for Blender.

Quote
ubuntu@ubuntu2:~/blender-2.74-linux-glibc211-x86_64/2.74/python\$ cp ~/ufoai/src/tools/blender/
export_marker_list.py  io_mesh_md2.py         io_scene_tag.py
ubuntu@ubuntu2:~/blender-2.74-linux-glibc211-x86_64/2.74/python\$ cp ~/ufoai/src/tools/blender/* .
ubuntu@ubuntu2:~/blender-2.74-linux-glibc211-x86_64/2.74/python\$ ll
total 68
drwxr-xr-x 3 ubuntu ubuntu  4096 Jun 10 09:20 ./
drwxr-xr-x 5 ubuntu ubuntu  4096 Mar 31 10:54 ../
-rwxrwxr-x 1 ubuntu ubuntu  3322 Jun 10 09:20 export_marker_list.py*
-rwxrwxr-x 1 ubuntu ubuntu 36319 Jun 10 09:20 io_mesh_md2.py*
-rwxrwxr-x 1 ubuntu ubuntu 13035 Jun 10 09:20 io_scene_tag.py*
drwxr-xr-x 3 ubuntu ubuntu  4096 Mar 31 10:54 lib/
ubuntu@ubuntu2:~/blender-2.74-linux-glibc211-x86_64/2.74/python\$

But no new options appeared import/export menu. I noticed you were using 2.73a, so I downloaded it instead and did the same copy operation with the same results, no new options appeared in the import or export value. Now I see there is a scripts directory at the same level as python and I see there are a lot of python scripts at two levels down in the python directory. But I suspect that I'm missing something obvious here.

15
##### Artwork / Re: Basic Question
« on: June 10, 2015, 02:52:16 pm »
Thanks for the info. It took a a couple of hours, but I finally managed to get what I wanted to happen to happen with GIMP. So I cloned the existing magazine and switched the color of the shell on top. Turns out the term export was an important key word cause you can't save it in jpg format, except with an export in GIMP. Updated my weapons_human.ufo file to point to it. And everything is coming out red like before. So I suspect that this where the discussion on the md2 files comes in. You mentioned an import/export script for those. Originally I assumed it was GIMP, but I couldn't find an md2 option in GIMP. When I searched, I found mention of the md2.pl script, but it's not clear to me what I should do with this.

ubuntu@ubuntu2:~/ufoai/base/models/weapons/shotgun2\$ ~/ufoai/src/tools/md2.pl info shotgun_clip_yellow.md2
MD2 file found.
NumFrames: 1 (max is 512)
NumSkins: 1 (max is 32)
NumXYZ: 50 (max is 2048)
NumST: 95
NumTris: 92 (max is 4096)
NumGLcmds: 0
SkinWidth: 256
SkinHeight: 256

So what is my next step? I'm presuming because I copied the red md2 file, that it's pointed to the red md2 image still. I'm also not sure where the external shell that I see in the image inside the game. But I see the same thing on the medikit as well, the big needle image isn't in the jpg, so it must be built with some other information somehow. So I suspect the md2 files do all sorts of special stuff.

So is there a recommended tool for digging into md2 for Linux?

Pages: [1] 2