[Bf-python] update list
Yuniel Castro González
ycastrog at estudiantes.uci.cu
Wed May 18 05:12:52 CEST 2011
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
More information about the Bf-python
mailing list