Edit curve control

6 votes
Version: 
0.02a
Author Name: 
Vojtech Cada

Edit curve controls in bigger, resizable window:

Curve edit

Additional Info: 

Installation:
If you just want to use it on maps:
Drag&drop the editMapCurve.mcr file in the viewport, open Customize UI dialog and find "Edit Map Curve" item in the "Shortcuts" category. Put it in a quadmenu, menu, toolbar or assign keyboard shortcut to it to use it.
If you want to install just the function to use in a customized tool:
Copy the .ms file inside the stdscripts folder (evaluate once if this is your first time using it), that way it will be available for scripts in the script folder and macroscripts. FileIn approach is another alternative. To try it out, run in once. After that, you can call the editCurve function, passing the curve you want to edit.

Usage: The script exposes an editCurve function. Pass the curve you want to edit as an argument. For example, if you want to edit the mono output curve of a map currently selected in compact material editor (provided that it's enabled), you'd use

 editCurve (mEdit.getCurMtl()).Output.Mono_Color_Map.Curve_1

Attached is also an example editOutputMonoCurve.mcr macro that opens the dialog for active output curve in Slate or classic material editor and shows how to target a specific curve directly. If you want to use it, run the .mcr file once via Scripting -> Run Script or by drag&dropping it to the viewport. It creates an item in the Shortcuts category under Customize UI, which you can then add to a quadmenu or assign a shortcut to it.

You might want to disable and re-enable the color map or switch to a different material/panel and back to force update. The material preview should be updated automatically but not the curve displayed in the UI.

AttachmentSize
curveEdit.ms1.43 KB
editMapCurve.mcr2.91 KB
editOutputMonoCurve.mcr741 bytes

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Swordslayer's picture

Output is an example macro...

For other curve controls, you can make your own or ask someone with basic scripting knowledge to do that for you. It should work with any curve you pass to it, the Output curve is an example on how to do it. For falloff, you'd edit the example to use MixCurve.Curve_1 instead of Output.Mono_Color_Map.Curve_1, and edit the safeguards accordingly (see attachement).

For RGB Color map, you either edit the whole thing to show and replace more curves at once, or pass one of the three curves only and edit one at a time.

AttachmentSize
editFalloffCurve.mcr 604 bytes
bronius's picture

Doesn't work with Falloff map

With Falloff map always get "A map that supports output has to be active in the material editor" message. And what about RGB color map mode? Works only in Mono mode?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.