[Bf-python] update list

jmsoler at free.fr jmsoler at free.fr
Wed May 18 09:08:15 CEST 2011


The problem is perhaps linked to the name used by the objects.
Try to add this at the firt line :

# -*- coding: latin-1 -*-

It works for me when i read french texts in old blender's files.

Regards, jms



Selon Yuniel Castro González <ycastrog at estudiantes.uci.cu>:

> Hello to all.
> I am programming a script, at one point I need to update a list that contains
> a group of objects, that is, I run:
>
> def find(list, element):          //// find object in list return True, else
> return False
>     bool = True
>     for i in list:
>         if i.name == element.name:
>             bool = False
>     return bool
>
>
> def update_list():        //// if element of list_of_objects isn't in temp,
> delete this element
>     bpy.context.scene.update()
>     temp = bpy.context.scene.objects
>
>     for i in list_of_objects:
>         a = find(temp, i)
>         if a:
>             list_of_objects.remove(i)
>
> in short, I want to leave my only objects that are still on the scene, but
> but I get this error:
>
> UnicodeDecodeError: 'utf8' codec can't decode byte 0xc3 i position 0: invalid
> continuation byte
>
> what happens???
>
> Thanks in advance.
>
> --
>
>
>
>
>
>
>
>
> Yuniel
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>





More information about the Bf-python mailing list