Development > Artwork

Basic Question

<< < (2/2)

ManDrake13:
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$
--- End quote ---

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.

Noordung:
Im using windows so not sure how it is in linux.
also looks like its blender/2.74/python/lib
also you have to go file user preferences and enable script.

not really remember where to add scripts since im only using 2 or 3 of them, but im 90% its blender/2.74/python/lib

ManDrake13:
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:
  '/home/ubuntu/blender-2.74-linux-glibc211-x86_64/2.74/scripts/addons/io_mesh_md2.py'
  '/home/ubuntu/.config/blender/2.74/scripts/addons/io_mesh_md2.py'
multiple addons with the same name:
  '/home/ubuntu/blender-2.74-linux-glibc211-x86_64/2.74/scripts/addons/io_scene_tag.py'
  '/home/ubuntu/.config/blender/2.74/scripts/addons/io_scene_tag.py'

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.

DarkRain:
I'll stress this again you don't need to bother with Blender unless you really want to change the *shape* of the object...

That said, yes the md2 is still pointing to the old red skin, you can either open the md2 with an hex editor and change it to point to the new skin (skins are stored as plain text usually near the beginning of the file) or use the ufomodel tool provided with the game to edit skin names, with it you can even add more skins to the file — you can specify which skin to use in the ufo scripts (Yes, importing and re-exporting it in Blender will also allow you to edit skins, but that's overkill IMHO)

(Also sorry should have mentioned you need to edit the skins before for some reason I just assumed you'd edit the file 'in place')

ManDrake13:
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.

What I attempted to do was this.

~/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.

Navigation

[0] Message Index

[*] Previous page

Go to full version