Skip to content

Position is broken on Retina display or when node is in a frame. #1

Description

@videopilot

Tested on Mac, Blender 4.5.4 and 5.1 RC. Seems the positions needs to be multiplied by bpy.context.preferences.system.ui_scale

Image

Also, if the image texture node is in a frame, the dimensions label is not positioned.

This fixes both here at line 165-ish:

    abs_x, abs_y = node.location.x, node.location.y
    parent = node.parent
    ui_scale =  bpy.context.preferences.system.ui_scale

    while parent:
        abs_x += parent.location.x
        abs_y += parent.location.y
        parent = parent.parent
    vx = (abs_x + offset_x) * ui_scale
    vy = (abs_y + offset_y) * ui_scale
    rx, ry = view2d.view_to_region(vx, vy, clip=False)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions