Post #4731: It appears that bpy.ops.view3d.interactive_add() has been modified to use mous
š Metadata
- Author: Pluglug
- Date: 2023-05-20 05:56:17
- Type:
answer - Quality Score: 8/10
- Reply to: post_04730
š·ļø Tags
macro hotkeys advanced unsolved
āļø Related PME Features
- Sticky Key Editor
- Macro Editor
- Hotkey Configuration
š¬ Content
It appears that bpy.ops.view3d.interactive_add() has been modified to use mouse position information obtained by the builtin.primitive_cube_add tool. Upon comparing the API Reference, some parameters have been added to bpy.ops.view3d.interactive_add() from version 3.0 onwards. These changes to the parameters were presumably made to provide users with further control over the placement and snapping of objects.
Iām not sure how the mouse position information is communicated to bpy.ops.view3d.interactive_add(), so I propose a method of temporarily switching tools. As an example, I provide the setup method for Sticky Key.
# On Press
value = C.workspace.tools.from_space_view3d_mode(C.mode).idname; bpy.ops.wm.tool_set_by_id(name='builtin.primitive_cube_add')
# On Release
set_tool = value; bpy.ops.wm.tool_set_by_id(name=set_tool)
If you are seeking the exact same user experience as before 2.9, it might be difficult to solve with PME alone. It may be necessary to create a new custom operator.
ā¤ļø 1 likes