'col_r' referenced before assignment

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!

'col_r' referenced before assignment

Postby Whilyam » Sun Mar 09, 2008 7:54 pm

I'm working with vertex painting and I get this error:

Code: Select all
UnboundLocalError: local variable 'col_r' referenced before assignment


What did I do wrong? :P
User avatar
Whilyam
 
Posts: 1023
Joined: Sat Sep 29, 2007 5:55 pm

Re: 'col_r' referenced before assignment

Postby Grogyan » Sun Mar 09, 2008 8:10 pm

Check to see if you have a material attached to that texture layer
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: 'col_r' referenced before assignment

Postby Whilyam » Sun Mar 09, 2008 8:20 pm

Texture layer?

I have a material on all the objects.
User avatar
Whilyam
 
Posts: 1023
Joined: Sat Sep 29, 2007 5:55 pm

Re: 'col_r' referenced before assignment

Postby Grogyan » Sun Mar 09, 2008 9:08 pm

Texture layers also need a material set to them I believe

Also I tend to make sure that I have all the textures loaded in the texture panel, so if I have 3 layers I have 3 texture files
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: 'col_r' referenced before assignment

Postby Robert The Rebuilder » Mon Mar 10, 2008 8:42 am

Whilyam: andylegate had the same error. Take a look at this thread.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: 'col_r' referenced before assignment

Postby Whilyam » Mon Mar 10, 2008 12:49 pm

So far it seems fixed. Thanks!
User avatar
Whilyam
 
Posts: 1023
Joined: Sat Sep 29, 2007 5:55 pm

Re: 'col_r' referenced before assignment

Postby Whilyam » Mon Mar 10, 2008 12:54 pm

*spins around* New problem! :P

Code: Select all
[Visual Object Cube]
 [LogicHelper]
   No actions in list
None
   Exporting modifiers
   No modifiers
None
 [Draw Interface Cube]
  [Material Material]
   [Layer Material-Tex]
    -> Using default first UV map
Traceback (most recent call last):
  File "<string>", line 176, in open_file
  File "<string>", line 88, in export_age
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alcresmanag
er.py", line 585, in export_all
    plDrawInterface.Export(self,obj,scnobj,name,SceneNodeRef,isdynamic)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_DrawCla
sses.py", line 1549, in _Export
    drawi.data.export_obj(obj,SceneNodeRef,isdynamic)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_DrawCla
sses.py", line 1762, in export_obj
    pmat.data.export_mat(mat,obj)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_MatClas
ses.py", line 521, in export_mat
    self.FromBlenderMat(mat,obj)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_MatClas
ses.py", line 417, in FromBlenderMat
    layer.data.FromBlenderMTex(mtex,obj,mat)
  File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\alc_MatClas
ses.py", line 1030, in FromBlenderMTex
    if mface.uv and mface.mode & Blender.Mesh.FaceModes["TWOSIDE"]:
ValueError: face has no texture values
User avatar
Whilyam
 
Posts: 1023
Joined: Sat Sep 29, 2007 5:55 pm

Re: 'col_r' referenced before assignment

Postby Robert The Rebuilder » Mon Mar 10, 2008 1:07 pm

Looks like you have an object where some faces are textured, but not all. So, select your Cube object, switch to "UV Face Select" mode, and hunt down the face that isn't assigned to the cube's texture.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: 'col_r' referenced before assignment

Postby Whilyam » Mon Mar 10, 2008 2:05 pm

Looks fixed. Thanks again.
User avatar
Whilyam
 
Posts: 1023
Joined: Sat Sep 29, 2007 5:55 pm

Re: 'col_r' referenced before assignment

Postby Whilyam » Tue Mar 11, 2008 8:06 pm

Really minor issue now. I have a transparent texture I'm using for clouds and, where the texture is black, it's alpha-ed correctly, but any part that isn't, instead of blending completely, bleeds through the fog color on top of whatever's in front of it. Any idea how to fix this?

Thanks,
Whilyam
User avatar
Whilyam
 
Posts: 1023
Joined: Sat Sep 29, 2007 5:55 pm

Next

Return to Building

Who is online

Users browsing this forum: No registered users and 3 guests