Hi,
I'm very stumped and I assume that there isn't a fix for this so I'm looking for some kind of work around. It seems as if the Scene maybe loaded after the python script is autorun both by the command line " -P main.py" and also having register script checked. Certain script commands run fine. Eg:
bpy.ops.sequencer.delete()
bpy.ops.sequencer.sound_strip_add(filepath="C:\\par5.wav")
bpy.context.scene.frame_end = soundl
But selecting Modes or area types throw an error. Eg:
bpy.context.area.type = "SEQUENCE_EDITOR"
bpy.ops.object.mode_set(mode='POSE')
bpy.ops.pose.select_all(action='DESELECT')
Note: The script works fine if I click Run Script within Blender.
The purpose of this project is to automate random movements for the rig in a large video sequence. Blinks, hand gestures, etc.
Any help would be greatly appreciated. Thank you!
bpy.context.area.type = "SEQUENCE_EDITOR" give
AttributeError: 'NoneType' object has no attribute 'type'