Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stethoscope offset scale fix #4836

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nodes/text/stethoscope_v28.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,15 @@ def process(self):
# display the __repr__ version of the incoming data
processed_data = data

ui_scale = bpy.context.preferences.system.ui_scale

draw_data = {
'tree_name': self.id_data.name[:],
'node_name': self.name[:],
'content': processed_data,
'location': get_xy_for_bgl_drawing,
'color': self.text_color[:],
'scale' : float(scale),
'scale' : float(scale*ui_scale),
'mode': self.selected_mode[:],
'font_id': int(self.font_id)
}
Expand Down
3 changes: 2 additions & 1 deletion utils/sv_nodeview_draw_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def get_xy_for_bgl_drawing(node):
# adjust proposed text location in case node is framed.
# take into consideration the hidden state
_x, _y = node.absolute_location
_x, _y = (_x + node.width + 20), _y
ui_scale = bpy.context.preferences.system.ui_scale
_x, _y = (_x + node.width)*ui_scale + 20, _y*ui_scale

# this alters location based on DPI/Scale settings.
return _x * node.location_theta, _y * node.location_theta
Expand Down