Q100333: How to change the display name of a TeleParameter to show that it's receiving its value from another parameter

Follow

SUMMARY

This article explains how to change the display name of a TeleParameter, as well as the name that it is referred to internally in Katana (for example for scripting access).

For a more detailed explanation of the TeleParameter parameter type and instructions for how to create them, please see this article: Q100292: How to create TeleParameters in Katana

 

MORE INFORMATION

A TeleParameter takes on the appearance of the parameter it is referencing, including its label:

mceclip0.png

The names of user parameters can usually be changed by clicking on the wrench icon directly above the parameter label and selecting ‘Rename Parameter…’.

This is also possible for TeleParameters - however, this does not affect the name that is shown in the UI.

mceclip3.png

This is because the parameter is still referenced by the name of the parameter it is linked to:

fovParam = NodegraphAPI.GetNode('CameraCreate').getParameter('fov')

 

However, the user parameter still exists with a unique name on its own node. That name doesn't appear in the UI, but it can be used to access the parameter via Python like:

teleParam = NodegraphAPI.GetNode('CameraCreate').getParameter('user.CameraFov')

 

NOTE: The value of the user parameter is a string expression pointing to the parameter that is referenced, in this example ‘CameraCreate.fov’.

 

The label of the user parameter can be changed in the UI by clicking on the wrench icon directly above the parameter label and selecting ‘Widget Options…’.

mceclip5.png

Alternatively, it can be set using the NodegraphAPI:

teleParam = NodegraphAPI.GetNode('CameraCreate').getParameter('user.CameraFov')
teleParam.setHintString(repr({'widget': 'teleparam', 'label': 'CameraFovTele'}))

 

 

    We're sorry to hear that

    Please tell us why