OLD TEXT 2 NEW TEXT

This is a project I started after meeting with multiple 

old Contact Sheets and templates that are still using Nuke's

first Text node that is often causing issues when shared.

So I decided to do something about it for a same reason that 

one IT friend said about why he worked over the weekend

to fix something no one sent ticket for:
"I just couldn't let them suffer..."

So what is the problem?

To answer this let's start at the beginning:

●  First, what's the visual difference between the old and the new Text nodes:

005_nodes.jpg

●  The nodes you are opening in Nuke are representing python Classes which you can check without coding if you select a single node and press `i`:

002_class.jpg

It will most likely say Class=Text2 in the second line. That serial number at the end means that there is an earlier version which actually called Text ( I'll call it "old Text" here ).

● When you install Nuke, the package contains 3 font sets that are stored in ..\plugins\fonts.
These are BitstreamCharter Courier Utopia. The folder also has a README.txt - first sentence goes like this:

 

" This set of fonts is distributed with NUKE in order to ensure that any NUKE script that restricts font usage to the fonts present in this directory will render identically on any platform. "

It means that the rest of the fonts you are using in the program are coming from your OS's font library.

When you make a new Text node however it will likely use Utopia as a standard. 
You can check the path of the font you are using by clicking on the little `i` next to the knob:

003_path.jpg

● In the new Text node you can select a font type and the font style from a dropdown menu which lists certain font types in your OS dependent font folder next to the installed ones. You can found details about it HERE.

In the old Text node however it was essentially a file knob like the one on your Read node ​except when you click on a little folder icon it opens the local font folder if you wanted to select a different one:

004_font.jpg

And we finally got to the PROBLEM part!

Just like a Read node that can't find the content the path is pointing at Errors

so does the old Text node! 
This happens when you open for example a template that was created on a different OS some time ago and I am sure you can imagine other scenarios too when this is a problem.

So must acknowledge that this problem luckily is not something we often have to deal with but as it is occurs sometimes we can be prepared.

So here are two functions I wrote that might can help with quickly solving a problem, especially if you have multiple old Read nodes in a script you'd like to update.

006_menu.jpg

( You can add this to your menu.py )

Old Text Node Finder

The clicked on the function selects the old Text nodes in the script and puts out a 

message that lists them and asks if you'd like to zoom on them. It also shows the name

of the Groups that contains old Text nodes.

007_finder3.jpg

Alternatively, it tells you if you don't have any old Text nodes.

007_finder4.jpg

Old Text 2 New Text

 

The selected old Text nodes get replaced with a new Text node keeping all the information

from the old one. Note: This function is not replacing old Text nodes in Groups/Gizmos as that might 

harm the functionality of the Group/Gizmo.

If you don't have a node selected a message pops up:

009_2new1.jpg

Hope you will find it useful!