This is probably the most basic script ever posted here, but yesterday I started trying to learn EEL to work on a few scripts after I couldn't find this one here. I use them along with the mousewheel actions to create a custom action to manipulate the pan properties with a modifier + the mousewheel. Thanks to all of you guys who post your scripts here, I am pretty much learning by breaking down your scripts.
Anyway, here they are, in case they help anyone else. And if I managed to do something stupid in such a simple script, please let me know =]
Increase Take Pan property
Code:
item = GetSelectedMediaItem(0,0);
take = GetActiveTake(item);
pan = GetMediaItemTakeInfo_Value(take, "D_PAN");
pan <= 0.95 ?
(
pan = pan + 0.05;
);
pan >= 0.95 ?
(
pan = 1;
);
SetMediaItemTakeInfo_Value(take,"D_PAN",pan);
Decrease Take Pan property
Code:
item = GetSelectedMediaItem(0,0);
take = GetActiveTake(item);
pan = GetMediaItemTakeInfo_Value(take, "D_PAN");
pan >= -0.95 ?
(
pan = pan - 0.05;
);
pan <= -0.95 ?
(
pan = -1;
);
SetMediaItemTakeInfo_Value(take,"D_PAN",pan);