Blender api problem?

Well here we go, I have a cube and I want to add a property to it but I want the property to be a list [].

Here’s where I am,

import bpy
cube = bpy.data.meshes[‘Cube’]
cube[‘Heat’] = []
cube[‘Heat’].to_list() //this makes it show up in the Datablocks under {Meshes.Cube.Heat}

how do I turn Heat into a list();

like
Meshes.Cube.Verticies

Well I think i figured it out, here what I did

cube = bpy.data.meshes[‘Cube’]
cube[‘Heat’] = [1,1,1,1,1,1,1,1]
cube[‘Heat’].to_list()

by adding my data as a full list it worked
there is no .append() so your list must be complete when assigned.

Any suggestions would be helpful?

It seems that I can create a new property at the ob.data level but I cannot go any lower i.e.
this is ok!

ob = bpy.data.meshes[‘Cube’]
ob[‘temp’] = [{‘temp’: 0.0}, [2,4,5]]
ob[‘temp’][0][‘name’] = ‘Title’

but I would like to add data lower at the vertices level

ob = bpy.data.meshes[‘Cube’].vertices
for v in ob:
v[‘temp’] = 0.0

>>> ob = bpy.data.meshes[‘Cube’].vertices
>>> for v in ob:
… v[‘heat’] = 0.0

Traceback (most recent call last):
File “<blender_console>”, line 2, in <module>
TypeError: bpy_struct[key]= val: id properties not supported for this type

so it seems that if I want to have a value related to each vertice I must create a property list i.e.

ob = bpy.data.meshes[‘Cube’]

heat = []

for v in ob.vertices:
heat.append({‘temp’: 0.0})

ob[‘Heat’] = heat

for n in ob[‘Heat’]:
n[‘name’] = ‘Temperature’

this is what I get

of course you can do it this way to but it is auto name a sequence:

ob = bpy.data.meshes[‘Cube’]

temp = []
for v in ob.vertices:
temp.append(0.0) /float
ob[‘Heat’] = temp

I get this picturehttp://imageshack.us/photo/my-images/841/newheat.png/