Sequence problem.

joonas keisari_ at hotmail.com
Thu Oct 19 09:40:03 EDT 2000


I have a problem. 

I have made a script, that uses number-strings to make number-objects
show differrent numbers.

Part of the working script is shown below. 

################ 
import Blender 

numero = "32" 
a,b = numero 
firstnumber = a 
secondnumber = b 

object2= Blender.Object.Get(firstnumber) 
object2.LocY = 0 

object3= Blender.Object.Get(secondnumber + ".001") 
object3.LocY = 0 
################ 


But when i want to use Blender.Object.Get() to open two objects thats
names are the first and
third number of object1´s location string (LocZ is 6.0). 
I get error: "TypeError: unpack non-sequence." 

Script that gives the error is shown below. 

#################
import Blender 

object1= Blender.Object.Get("locater") 
rotation = object1.LocZ 

a,c,b = rotation 
firstnumber = a 
secondnumber = b 

object2= Blender.Object.Get(firstnumber) 
object2.LocY = 0 

object3= Blender.Object.Get(secondnumber + ".001") 
object3.LocY = 0 
##################

Btw the program i use is a free modelling, videoediting,
3Dgamemaking and animating software called Blender
http://www.blender.nl/ that uses Python.
Joonas.



More information about the Python-list mailing list