@sebby_man (sebby_man) posted a new topic, subject "How to unlink datablock in Action Editor". It read:

   Using a python script in blender, is it possible to unlink the current datablock in the Action Editor. Basically I want to press the X next to the name of the action. As far as I can tell, there is no python command attached to that button.

Then @batFINGER (batFINGER) said

    Hi sabby
    
    the action in the action editor is the one attached to the context object.
    [code] 
        import bpy
        
        context = bpy.context
        object = context.object
        
        #should put checks in to see if you have object animation_data etc
        
        action = object.animation_data.action  # this is the action that is shown in action editor.
        
        # the action can be unlinked using.
        
        object.animation_data.action = None
        
        
        
    [/code]

Then @sebby_man (sebby_man) said

    Thanks, it worked!


{'source': 'discourse', 'url': 'https://blenderartists.org/t/how-to-unlink-datablock-in-action-editor/562727', 'title': 'How to unlink datablock in Action Editor', 'views': 1380, 'has_accepted_answer': False, 'word_count': 110, 'like_count': 0, 'reply_count': 1, 'participant_count': 2, 'posts': 3, 'tags': '', 'author': '@sebby_man (sebby_man)', 'participants': '@sebby_man (sebby_man), @batFINGER (batFINGER)', 'image_url': [None], 'created_at': '2013-01-17T18:41:46.000Z', 'last_posted_at': '2013-01-18T11:16:06.000Z'}