zMayaTools download github

zStringFormatter
Module: zStringFormatter

Introduction

zStringFormatter allows using Python string formatting to generate a string attribute.

Use cases

Usage

Create a zStringFormatter node.

In the attribute editor, add entries to the inputIntEntries, inputFloatEntries or inputStringEntries arrays, and set a name to use in the format string. Set a value or connect it to a source attribute.

Set the format string. Each input value's name will be available for substitution. For example, if an inputIntEntries exists with a name of "frame", the value can be substituted with the format string "%(name)i".

See String Formatting Operations in the Python documentation for full details about string formatting. Some examples:

%(name)i an integer 1
%(name)03i an integer padded to 3 digits 001
%(name)f a float 1.5
%(name)s a string hello

Attributes