Blender Mathutils Error?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
hello
Posts: 0
Joined: Thu Jul 08, 2004 6:27 pm

Blender Mathutils Error?

Post by hello »

I'm not sure if this is stupidity on my part or what, but if I have in a line of code(for example):

if Rand(0,1) == 1:

it seems to work, but if I change that to (for example):

if Rand(0,1) < 1:

I get

TypeError: expected optional float & float

If someone could explain why this is happening-- if I am doing something wrong, or if there is workaround-- that would be great.

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

I cannot reproduce this.

hello
Posts: 0
Joined: Thu Jul 08, 2004 6:27 pm

Post by hello »

Thanks for your time, although now I feel like I kinda wasted it... sorry
Yeah, forget about this post... I got kinda frustrated because I wasn't able to fix this stupid problem. Apparently, removing a line that had something like: face.mat = material the problem went away. I'm not sure, does a face require uv coordinates to allow it to get a material assigned? I'm thinking that could be the problem, but not sure. I don't need to bother with materials anyway, I discovered vert.sel!

Post Reply