Sequence problem.

Alex Martelli aleaxit at yahoo.com
Thu Oct 19 12:28:22 EDT 2000


"joonas" <keisari_ at hotmail.com> wrote in message
news:39EEF9B3.6950CC30 at hotmail.com...
    [snip]
> 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."

If it's indeed 6.0, a floating-point number, then the error
is understandable -- it's a number, not a sequence.  You can
make it into a string in various ways, but in general you
will also need to ensure it's formatted correctly for your
purposes, e.g.:

change the second of the following lines to:
    rotation = '%3.1f' % object1.LocZ

> object1= Blender.Object.Get("locater")
> rotation = object1.LocZ
>
> a,c,b = rotation
> firstnumber = a
> secondnumber = b

Alex






More information about the Python-list mailing list