< Previous | Contents | Next >

Fuse Plugin Guide


About Fuse Plugins ����������������������������������������� 7

Installation ��������������������������������������������������������������� 7

Resolve������������������������������������������������������������������������ 7

Fusion �������������������������������������������������������������������������� 8


Overview Guide ������������������������������������������������ 8 About the Lua Language ����������������������������������� 8 Types of Fuse Plugins ������������������������������������������ 9

Image Basics������������������������������������������������������������ 9

Images ������������������������������������������������������������������������ 9

Color��������������������������������������������������������������������������� 10

Channels������������������������������������������������������������������� 10 Canvas Color ����������������������������������������������������������� 10 Image Domain ������������������������������������������������������� 11 Metadata������������������������������������������������������������������ 11

Fuse Plugin Programing����������������������������������� 11 Editing and Loading��������������������������������������������� 11 Setting Code Dev Editor������������������������������������� 11 Naming Conventions������������������������������������������� 12

Variables������������������������������������������������������������������� 12 Console - Print and Debug �������������������������������� 13 Other Programing Notes����������������������������������� 13

Example 1 – Overview of a Fuse ������������������� 13 FuRegisterClass Function���������������������������������� 14 UI Controls - Create Function ������������������������� 14 Process Event Function �������������������������������������� 15

Example 2 – UI Controls ����������������������������������� 17 Sliders������������������������������������������������������������������������ 17 Buttons, Check Boxes and Lists ��������������������� 18 On Screen ���������������������������������������������������������������� 19

Color Controls ������������������������������������������������������� 20 Gradient Color ������������������������������������������������������� 21 Organize, Tabs, Nests ���������������������������������������� 22 Image Inputs ��������������������������������������������������������� 23 Notify Change ������������������������������������������������������� 23

image

Example 3 – Internal Image

Processing Functions ��������������������������������������� 24 Color Matrix ����������������������������������������������������������� 24 Color Functions ���������������������������������������������������� 25 Color Space ������������������������������������������������������������ 25 Clear and Fill Image �������������������������������������������� 25 Channel Operations��������������������������������������������� 26

Channel Booleans������������������������������������������������� 26

Transform ���������������������������������������������������������������� 26

Crop��������������������������������������������������������������������������� 27

Resize������������������������������������������������������������������������ 27

Merge ����������������������������������������������������������������������� 27 OMerge OXMerge ����������������������������������������������� 28 Blur Glow����������������������������������������������������������������� 28

Example 4 – Multi Pixel Processing������������ 29 Creating Pixel Functions ����������������������������������� 29 Process��������������������������������������������������������������������� 30

Example 5 – Shapes, Lines, Text ������������������� 31 Example 6 – Text and Strings ������������������������ 33 UI Create ����������������������������������������������������������������� 33 Process��������������������������������������������������������������������� 34 Function Creation - Text Rendering ������������� 35

Example 7 – Sampling ������������������������������������� 37 Process Scatter ����������������������������������������������������� 37 Process Sample ���������������������������������������������������� 38