TypeError: 'NoneType' object is unscriptable

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

TypeError: 'NoneType' object is unscriptable

Postby ardent red » Fri Jun 27, 2008 12:57 am

I get the error in the topic title (TypeError: 'NoneType' object is unscriptable) every time I export, and I've had no luck in trying to fix it. I know it has something to do with materials, as the previous line in the console said 'baseVertedIdx = len(materialGroups[mface.mat]["vertices"])'. I've tried exporting several times, and the error pops up on one of three objects everytime. Each have the same material applied- well, they do now. Other times when the error popped up, it thought the material was assigned, but it wasn't. I assigned the materal, and the problem stopped for that object. However, the error now comes on one object of the same group which has the material applied.

If it's important, a material called 'mface.mat' doesn't exist in the age.
ardent red
ardent red
 
Posts: 150
Joined: Fri Apr 18, 2008 3:41 pm
Location: The big little New Zealand

Re: TypeError: 'NoneType' object is unscriptable

Postby Lontahv » Fri Jun 27, 2008 1:32 am

What version of the plugin are you using?

~Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: TypeError: 'NoneType' object is unscriptable

Postby D'Lanor » Fri Jun 27, 2008 2:57 am

Did you UV map the objects?
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: TypeError: 'NoneType' object is unscriptable

Postby ardent red » Fri Jun 27, 2008 3:31 am

I'm using plugin verson 1.4.0 release, and all three objects are UV-mapped.
ardent red
 
Posts: 150
Joined: Fri Apr 18, 2008 3:41 pm
Location: The big little New Zealand

Re: TypeError: 'NoneType' object is unscriptable

Postby Grogyan » Fri Jun 27, 2008 5:22 am

Yes but is all the faces attached to that material?

ie find the "Link and Materials" tab under Editing F9
click deselect and then select, are all faces part of the material (mat 1 of 1)?


You'll also need to make sure the image is loaded through the "Texture Buttons" F6
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: TypeError: 'NoneType' object is unscriptable

Postby ardent red » Fri Jun 27, 2008 4:02 pm

I joined the three objects together so that it would be easier to fix (two less materials to alter), but the # mat # thing says 3 mat 2 rather than 1 mat 1. Is this a problem? Pressing the select button selects every face on the object, so that's not the reason for the error.

The .blend file for the age can be found here, if you'd like to take a look at it. The object causing all the problems is called 'Tusks', and is the one that looks like... three tusks.
ardent red
 
Posts: 150
Joined: Fri Apr 18, 2008 3:41 pm
Location: The big little New Zealand

Re: TypeError: 'NoneType' object is unscriptable

Postby Lontahv » Fri Jun 27, 2008 5:07 pm

The problem is that you have 2 vertex-material groups that are linked to non-existent materials. Try deleting all of the materials in the mesh buttons (f9)... the things on the far left. Then start fresh with the materials for your tusks (don't delete anything that say anything about "texture").

Also... I couldn't help but notice the very-vertiness of your age. :shock:
But I won't critique it. ;)

~Lontahv
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: TypeError: 'NoneType' object is unscriptable

Postby ardent red » Fri Jun 27, 2008 9:51 pm

Woo, no more errors! Thanks Lontahv, I'll try to be more organised with materials in the future- though I wish the system for deleting materials would get a bit easier.

Also... I couldn't help but notice the very-vertiness of your age. :shock:

tell me about it! The age lags a bit at the best of times, but when I upgraded to the new plugin, and wasn't aware of the default shadow rendering, I almost died from shock! But never fear- I've begun to purge my age of unnecessary vertices. Did you notice that the platforms were made from about a hundred or so cubes joined together? (I did that because when I was designing the support, I only did a little section and duplicated it- I never realized how bad my situation would become) Well, I've deleted all of those platform 'modules', and remade the platorms from indvidual stretched cubes, so each one only has 6 vertices instead of 600. Is there anything which I can do to get rid of vertices automatically, though, because the vertex-heavy tusks wouldn't be terribly fun to edit manually?
ardent red
 
Posts: 150
Joined: Fri Apr 18, 2008 3:41 pm
Location: The big little New Zealand

Re: TypeError: 'NoneType' object is unscriptable

Postby Grogyan » Fri Jun 27, 2008 10:41 pm

2 things can help, but you need to be in edit mode with the object selected

Remove doubles
or
apply a decimate modifier
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am


Return to Building

Who is online

Users browsing this forum: No registered users and 10 guests