Не подтверждена Коммит f2f358bc создал по автору Dealga McArdle's avatar Dealga McArdle Зафиксировано автором GitHub
Просмотр файлов

test (#4108)

владелец 74a48086
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import bgl import bgl
import blf import blf
import bpy import bpy
from mathutils import Vector
import gpu import gpu
from gpu_extras.batch import batch_for_shader from gpu_extras.batch import batch_for_shader
...@@ -96,6 +97,11 @@ def draw_node_time_infos(*data): ...@@ -96,6 +97,11 @@ def draw_node_time_infos(*data):
x, y = get_xy_for_bgl_drawing(node) x, y = get_xy_for_bgl_drawing(node)
x, y = int(x), int(y) x, y = int(x), int(y)
if node.hide and isinstance(node.dimensions, Vector):
# just in case we are still overriding node.dimensions anywhere.
# this is not exact, but it's better than the alternative
y += (node.dimensions[1] / 2) - 10
show_str = string_from_duration(node_data['duration']) show_str = string_from_duration(node_data['duration'])
draw_text(font_id, (x, y), show_str, (r, g, b)) draw_text(font_id, (x, y), show_str, (r, g, b))
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать