0

actualy I know how to insert the keyframe to custom properties; that was solved in previous post

with the same idea I want to insert the keyframe to object.data.layers

I can access and modify the data layers values:

context = bpy.context 
obj= context.active_object
obj.data.layers[0]

I test some ideas in order to insert the keyframe with any result:

obj.data.keyframe_insert(data_path = 'layers[\"1"\]')
obj.data.keyframe_insert(data_path = layers[str(1)]))
obj.data.keyframe_insert(data_path = '"layers[1]"')
obj.data.keyframe_insert(data_path = 'layers[1]')
obj.data.keyframe_insert(data_path = layers[1])

at this point I think in the wrong place

some ideas please

****************************** update 1*********** I have this layers as buttons in a addon UI enter image description here

enter image description here

after insert enter image description here

yhoyo
  • 2,285
  • 13
  • 32

0 Answers0