# Macro Color Picker And Groups

**URL:** https://forum.highend3d.com/t/macro-color-picker-and-groups/9291
**Category:** Compositing
**Tags:** shake
**Created:** [May 14, 2008, 7:38pm UTC](https://forum.highend3d.com/t/macro-color-picker-and-groups/9291 "2008-05-14T19:38:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 14, 2008, 7:38pm UTC](https://forum.highend3d.com/t/macro-color-picker-and-groups/9291/1 "2008-05-14T19:38:53Z")

</div>

Hello All,  
This is my first post!! yay!  
I'm quit new to macro creating, and am not so good with scripting.   
I've created this color correcting macro... Here's an example of the UI:

nuiDefSlider("OldFilmCC.CC\_Add\_red",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_Add\_green",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_Add\_blue",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_rGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_gGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_bGamma",0,4,0);

the problem is that I can't groups without deleting the values.  
Also, i want to add a color picker (to the CC\_Add function). I've tried using the example in the manual, but it doesn't work.  
Can any one please enlighten me to what am i doing wrong?

Thanks a bunch  
Yoav

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 14, 2008, 8:45pm UTC](https://forum.highend3d.com/t/macro-color-picker-and-groups/9291/2 "2008-05-14T20:45:52Z")

</div>

unless you're quite good with programming, i would advise you to use the GUI to create your first macros. it's fairly straightforward and well documented.  
++ chris

---

<div class="post-metadata">

### Author: ![aaron-marine](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/a/ecd19e/32.png) [@aaron-marine](https://forum.highend3d.com/u/aaron-marine)
#### Post date: [May 18, 2008, 4:26am UTC](https://forum.highend3d.com/t/macro-color-picker-and-groups/9291/3 "2008-05-18T04:26:54Z")

</div>

im not quite sure what you are trying to do. from what i understand you are trying to replace the sliders you have on the add function with a color picker? if that is the case then there are some attributes you have to modify.

can you reply with the content inside your .h and UI.h so i can see how you built it so far? if i can see that then i can most likely tell you how to complete the process. i do color pickers on my macros and it is really easy.

---

<div class="post-metadata">

### Author: ![user\_deleted](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted](https://forum.highend3d.com/u/user_deleted)
#### Post date: [May 20, 2008, 12:41pm UTC](https://forum.highend3d.com/t/macro-color-picker-and-groups/9291/4 "2008-05-20T12:41:20Z")

</div>

Hey, Thanks for the reply and forgive the lateness of mine. That's exactly what i'm trying to make.. a color picker insted of sliders. Here#s the content of the .h file (some of it):  
image OldFilmCC(  
image In=0,  
float CC\_Add\_red=0.03,  
float CC\_Add\_green=0.03,  
float CC\_Add\_blue=0.03,  
float CC\_rGamma=1,  
float CC\_gGamma=1,  
float CC\_bGamma=1,  
float CC\_Mult\_red=1,  
float CC\_Mult\_green=0.845501,  
float CC\_Mult\_blue=0.490098,  
float Vignette\_Fade=0.621,  
float Highlight\_BlurX=0,  
float Highlight\_BlurY=50,

and here's the .ui:

nuiPushMenu("Tools");  
 nuiPushToolBox("User");  
 nuiToolBoxItem("@OldFilmCC",OldFilmCC());  
 nuiPopToolBox();  
nuiPopMenu();

nuiDefSlider("OldFilmCC.CC\_Add\_red",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_Add\_green",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_Add\_blue",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_rGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_gGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_bGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_Mult\_red",0,3,0);  
nuiDefSlider("OldFilmCC.CC\_Mult\_green",0,3,0);  
nuiDefSlider("OldFilmCC.CC\_Mult\_blue",0,3,0);  
nuiDefSlider("OldFilmCC.Vignette\_Fade",0,1,0);  
nuiDefSlider("OldFilmCC.Highlight\_BlurX",0,200,0.1);  
nuiDefSlider("OldFilmCC.Highlight\_BlurY",0,200,0.1);

if you take the first node, for instance. it is a simple add node. but in the macro, i only see it as sliders. I want a picker ![]()  
thanks again

---

<div class="post-metadata">

### Author: ![aaron-marine](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/a/ecd19e/32.png) [@aaron-marine](https://forum.highend3d.com/u/aaron-marine)
#### Post date: [May 21, 2008, 11:27pm UTC](https://forum.highend3d.com/t/macro-color-picker-and-groups/9291/5 "2008-05-21T23:27:46Z")

</div>

k i spent a few minutes to check out what you have so far. it seems you were pretty close. all you had to do different was change some code in the UI file, specifically the "nuiDefSlider" controls. I spent a little time typing you some color picker controls so all you have to do with these is go in to your UI.h file and replace these:

nuiDefSlider("OldFilmCC.CC\_Add\_red",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_Add\_green",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_Add\_blue",-1,1,0);  
nuiDefSlider("OldFilmCC.CC\_rGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_gGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_bGamma",0,4,0);  
nuiDefSlider("OldFilmCC.CC\_Mult\_red",0,3,0);  
nuiDefSlider("OldFilmCC.CC\_Mult\_green",0,3,0);  
nuiDefSlider("OldFilmCC.CC\_Mult\_blue",0,3,0);

...with these:

nuiPushControlGroup("OldFilmCC.addColor");  
 nuiGroupControl("OldFilmCC.CC\_Add\_red");  
 nuiGroupControl("OldFilmCC.CC\_Add\_green");  
 nuiGroupControl("OldFilmCC.CC\_Add\_blue");  
nuiPopControlGroup();  
nuiPushControlWidget("OldFilmCC.addColor",   
 nuiConnectColorTriplet(kRGBToggle,kCurrentColor,1)  
);

nuiPushControlGroup("OldFilmCC.gammaRGB");  
 nuiGroupControl("OldFilmCC.CC\_rGamma");  
 nuiGroupControl("OldFilmCC.CC\_gGamma");  
 nuiGroupControl("OldFilmCC.CC\_bGamma");  
nuiPopControlGroup();  
nuiPushControlWidget("OldFilmCC.gammaRGB",   
 nuiConnectColorTriplet(kRGBToggle,kCurrentColor,1)  
);

nuiPushControlGroup("OldFilmCC.multRGB");  
 nuiGroupControl("OldFilmCC.CC\_Mult\_red");  
 nuiGroupControl("OldFilmCC.CC\_Mult\_green");  
 nuiGroupControl("OldFilmCC.CC\_Mult\_blue");  
nuiPopControlGroup();  
nuiPushControlWidget("OldFilmCC.multRGB",   
 nuiConnectColorTriplet(kRGBToggle,kCurrentColor,1)  
);

I hope this works out for you. I know the controls work for me. just make sure before you do this you save an original copy of the UI.h file somewhere else as backup.
