Post #1312: Hi,

📋 Metadata

  • Author: MickHanks
  • Date: 2018-04-05 08:58:52
  • Type: showcase
  • Quality Score: 7/10

🏷️ Tags

macro hotkeys advanced

  • Macro Editor
  • Python Scripting
  • Modal Editor

💬 Content

Hi,

Again, I’m sure there’s a better way of doing this. Just made an external script to JumpScreen that centers the work in the screen. This is great for the node editor.

////////////////
import bpy

a = C.area; x = a.x + (a.width >> 1); y = a.y + a.height; C.window.cursor_warp(x, y); bpy.ops.pme.timeout(delay=0.0001, cmd=“bpy.ops.screen.area_move(x=%d, y=%d, delta=300)” % (x, y))
bpy.ops.node.view_all()
////////////////

I just don’t understand how to do this internal in PME. but will keep learning.


🔗 View on Blender Artists