State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:157847|
Problem summary
Adding HTML tags to a node's label knob causes alignment and resizing issues.
When HTML is added, all text ( Including the node name ) are left justified.
Additionally, the node will not resize correctly.
Customer reported version
nuke.11.1v3
Customer reported platform
centos6
Steps to reproduce
1) Open Nuke, copy/paste the following into the Node Graph:
set cut_paste_input [stack 0]version 11.2 v3push $cut_paste_inputGrade { name Grade1 label "<div style=\"color: red\"><b>RED TEXT VIA HTML CODING</b></div>\n<div style=\"text-align: center\">Center aligning text \\n through CSS addition</div>" selected true xpos 278 ypos 69}
Result: The labels will not be aligned to the center by default, the node itself will not resize.
Workaround
StickyNote Replacement
Instead of putting HTML within the node, add a StickyNote node and add your HTML specific notes:
AutoLabel Center
Within your menu.py file, you could setup a startup script to autolabel all nodes with a Center alignment:
This will increase the size of all nodes, so generally it is not recommended as already built scripts will look different to new scripts.
Additionally, this will still receive the resizing issues within the node.
Here is an example with some HTML scripting added:
Add the following snippet to your menu.py to be executed on launch:
def force_centre(): old = autolabel() wrapper_start = '<div style="text-align: center;">' wrapper_end = '</div>' full_label = "{}{}{}".format(wrapper_start, old, wrapper_end) return full_labelnuke.addAutolabel(force_centre)
Reproduced by support
This bug has been reproduced in:
Nuke11.2v4 - Windows 7 - Mac10.13 - CentOS6.9
Nuke11.2v1 - Windows 7
Nuke11.1v4 - Windows 7
Nuke11.1v1 - Windows 7
Nuke11.0v4 - Windows 7
Nuke11.0v1 - Windows 7
Nuke10.5v7 - Windows 7 - Mac10.13 - CentOS6.9
Nuke10.5v1 - Windows 7
Nuke10.0v6 - Windows 7
Nuke10.0v1 - Windows 7
Nuke9.0v9 - Windows 7
Nuke9.0v1 - Windows 7
Nuke8.0v7 - Windows 7
Nuke7.0v10 - Windows 7 - Mac10.13 - CentOS6.9
Earliest version tested
- This issue appears to be in all versions of the product
Expected behaviour
HTML formatting within a node, should resize the node correctly and keep it's centered alignment unless modified by user.
Actual behaviour
Adding HTML to a node causes a left alignment, and the node to resize incorrectly
We're sorry to hear that
Please tell us why