Creating a custom macro, couple Q's


#1

hey guys, i gotta couple simple Q’s about creating my own macro. im stuck on 2 simple parts.

  1. Id like to have a simple ON/OFF function for a monochrome setting, going from 0-1 doesnt work, the image just turns black to green (i set it for green)

  2. id like the Maxiumum size for Image_2 to be the size of Image_1

and my brain cant seem to figure out the whole using a variable from one node to another. I did it in the tutorial but i cant seem to grasp it right

and the On/Off hting, i was HOPING there was an ignore fucntion in macro maker (which im using) that i could enable/disable, but its not there.

Thanks in advance guys.


#2

HEY MAD§
not tested but here is what i’d try :
1.
// in your .h file :
int ON=0;
// in your ui.h file :
nuxDefToggle(“ON”);

int maxSize = max( img2.width, img2.height );
Resize1 = Resize(img1, maxSize , maxSize , “default”, 0);

AND
nodeName.parameterName

cheers


#3

hmm…yea ive done some C++

the maxsize, i get it now. THANKS, just Image.variable (im using macro maker ATM)

And the nuxDefToggle, where did you find that? im looking at the shake tutorial…duh i gotta checkout the documentation…

thanks janimatic


#4

do like everyone did :
have a look in your shake install folder , check the nreal.h and nrui.h … and of course other macros from highend !

best


#5

yup thats exactly what im doing now

nuiPushMenu("Visibility ",0);

could be what im looking for…its been awhile since C++, but this cant hurt to learn.


#6

i don’t know about last version’s doc, but in 2.5 doc there was a “customisation” section very complete about ui stuff…
Also Shake’s ui scripts have not much to do with c++… (even though funcion bodies syntax is in C and you can even use the standard C library if add appropriate headers)


#7

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.