Post #228: ![](https://blenderartists.org/user_avatar/blenderartists.org/draguu/48/15444_2.

📋 Metadata

  • Author: roaoao
  • Date: 2016-07-27 03:18:51
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_00227

🏷️ Tags

macro hotkeys intermediate solved

  • Macro Editor
  • Python Scripting
  • Command Execution

💬 Content

draguu:

execute_script(“/media/weybec02/E/scripts/bone/leftarm.py”), bpy.ops.poselib.browse_interactive()

this script was working well in earlier version , it was selecting all bones and directly giving browse pose lib command , but now it does not gives poselib command in the end it only runs the script

Some interactive commands must be executed in ‘INVOKE_DEFAULT ’ mode.
In earlier versions the addon used that mode by default for all commands in your code.
In the current version ‘INVOKE_DEFAULT ’ mode is used only when you have one command in the code.

In your case you have 2 functions (execute_script and browse_interactive). So you have to specify that mode manually:

execute_script("/media/weybec02/E/scripts/bone/leftarm.py"); bpy.ops.poselib.browse_interactive('INVOKE_DEFAULT', True)

🔗 View on Blender Artists