Post #4079: The custom tab is like using console inside blender, the command tab is a ‘wrapp
📋 Metadata
- Author: Motiomancer
- Date: 2021-09-20 12:49:25
- Type:
answer - Quality Score: 7/10
- Reply to: post_04073
🏷️ Tags
v1-18-7 macro scripting intermediate solved
⚙️ Related PME Features
- Macro Editor
- Custom Tab
- Command Tab
- Python Scripting
- External Script Option
💬 Content
The custom tab is like using console inside blender, the command tab is a ‘wrapper’ so we are able to easily put operators inside buttons.
You would have to compress those 4 lines into one, or use the external script option:
Pie Menu Editor 1.18.7 Released Scripts and Themes
One line if-else statement should look like this: [execution] if [condition] [else] [execution 2] if statement: [execution] if [condition] [else] None if bpy.context.object.mode == “EDIT”: saved_location = bpy.context.scene.cursor.location.copy() bpy.ops.view3d.snap_cursor_to_selected() bpy.ops.object.mode_set(mode=“OBJECT”) bpy.ops.object.origin_set(type=‘ORIGIN_CURSOR’) bpy.context.scene.cursor.location = saved_location bpy.ops.object.m…

❤️ 2 likes