Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.96 KB

README.md

File metadata and controls

40 lines (26 loc) · 1.96 KB

Gradient-Styler v1.0 For Katana

This Tool create gradient colors for nodes in The Foundry Katana

UI

Developed in Python for Katana, specifically designed to style and customize nodes in the Node Graph by applying color gradients.

Features

  • Custom Color Selection: allows you to choose two colors to generate a gradient that will be applied to the selected nodes.

  • Automatic Position Detection: Detects the position of the nodes on the Y axis of the Node Graph to calculate the gradient accurately.

Special Scenarios:

  • If only one node is selected, the first color chosen is applied.
  • If no nodes are selected, it displays a message indicating that at least one node is needed to apply the gradient.

How to install

  1. Copy the Python script and the gradientStyler.png file.
  2. Navigate to your Katana configuration folder. On Windows, the default location is: C:\Users.katana\Shelves\Python
  3. After Paste you will find the tool in the shelftool

shelf

  1. You will need to modify the code on line 53 by pasting the full path to the gradientStyler.png image. The path will vary depending on your computer.

code

How it works

The gradient at intermediate nodes is applied by interpolating the color values between the initial color and the final color using a mathematical formula based on the proportion of each node within the sequence.

The basic formula for calculating a color value in the gradient is:

formula

Ci = Node color at position i

Cstart = Initial color of the first node

Cend = Final color of the last node

i = Current node position (starting from 0)

n = Total number of nodes in the sequence