:evilgrin:
Hi there!!!
I have this simple problem. I have 3 sphere and I want to create and animate. I have problems to do that.
import bpy
vertici = [(0,0,0),(0,1,0),(1,1,1)]
for i in range(0,len(vertici)):
bpy.ops.mesh.primitive_uv_sphere_add(segments=32,size=0.3,location=(vertici[i]))
bpy.ops.object.shade_smooth()
movimenti = [(0,0,2),(0,1,3),(1,1,2)]
for i in movimenti:
#orig_frame =bpy.context.scene.frame_current
for ob in bpy.data.objects:
portos = ob.name
bpy.ops.object.select_name(name = "portos")
bpy.context.scene.frame_set(+10)
bpy.context.active_object.location = i
bpy.ops.anim.keyframe_insert(type='Location', confirm_success=True)
#error Traceback (most recent call last):
File "/Text", line 24, in <module>
AttributeError: 'NoneType' object has no attribute 'location'
I want to move my object to keyframe 10 and move the position of the object and insert a keyframe.
Thanks in advance for any help