Using ActionScript to specify settings in the Hue/Saturation Effect

Hi there,
I have been trying to write a little action script that sets up a bunch of defaults in the Hue Saturation plug-in but can only get so far.
The syntax either falls over or I am missing something here because the same code will work when in After Affects but if I try to run a script from the script UI directory. I get a "property undefined" returned. Uusally you just call the property by name and all is well. In this particularl case though. The only way to access say the "Red channel Saturation" is to have the plug-in in the Red channel pop-up. Ok so it works but not when running an external script.
The following does work from within AE but not from the UI scripts directory via the Window menu.
currProj = app.project(index).layer(index):
currEffect = currProj.Effects.addProperty("Hue/Saturation");
currEffectProp = currProj.effect("Hue/Saturation");
currEffectProp.masterSaturation.setValue(20);//this call works
currEffectProp.channelControl.setValue(2);//this call works changing the plug-in pane to the Red Channel
currEffectProp.redSaturation.setValue(-5); //this returns: "TypeError: undefined is not an object" – yet when run within AE as an expression it works fine???
Any help would be great – thank you

"Max thank you for solving this for me."
I still don't know what went wrong in your original code, so it's not really "solved" I guess!
Anyway, about layer("ADBE Effect Parade") it's the same thing as layer.Effects or layer("Effects") but I'm never sure of what will work in a non-english version of AE.
That's why I'm adding the Hue/Saturation effect using "ADBE HUE SATURATION" instead of "Hue/Saturation"
So a useful thing to do is to create a script in the base "Script" folder, and write something like:
var comp = app.panel.activeItem;
if (     comp
     && comp instanceof CompItem
     && comp.selectedLayers.length
     && comp.selectedLayers[0].selectedProperties.length)
     var prop = comp.selectedLayers[0].selectedProperties[0];
     var str = "";
     while (prop)
          str += prop.matchName + " (" + prop.numProperties + "): " + prop.name;
          prop = prop.parentProperty;
     alert(str);
Again, typing in the browser, check the code first ;-)
Something like that will give you:
- the matchName of the property selected (which can be anything: effect, shape, mask ... or any property of these)
- the number of sub-properties of the current poperty (so for the Hue/Saturation effect, that will give you the number of controls of the plugin UI, although there may be some hidden ones too)
- the name of the property
... for the selected property and its parents, up to the layer it belongs to.
I find that quite handy when you want to know the matchname of an effect for example.

Similar Messages

  • The hue/saturation adjustment in my photoshop CS3 no longer works. how can I fix?

    the hue/saturation adjustment in my photoshopCS3 no longer works. How can I fix?

    Are your images RGB/8?
    Is "Preview" checkmarked in the HSB dialog?
    If so, then hold down the Alt key and when the Cancel button changes to Reset, click on it to clear it and set it to defaults.

  • Where is the Hue, Saturation, Lightness effect that has colorize option in CS3 Premiere?

    Hi,
    Please could you say where is the Hue, Saturation, Lightness effect that has colorize option in CS3 Premiere? I look under Color Correction in Effects and there is a "Color Balance (HLS)" but there is no colorize option. Thanks for your help.

    Sometimes you ned to apply more than one effect.
    Look at Fast Color Corrector.

  • Colorize button in the Hue/Saturation window

    When dragging the Hue slider, it seems to change the color of a selected area on screen without the Colorize checkbox selected. However, checking it seems to make a bigger difference. What is the checkbox (colorize) doing  to the hue/saturation tool when it is selected?
    Thanks.

    In HSB and LHC Hue is represented by angles.
    Or check out this:
    http://en.wikipedia.org/wiki/Color_circle
    http://en.wikipedia.org/wiki/HSV_color_space
    Just look at the two rainbow-colored rectangles at the bottom of the Hue/Saturation Panel and observe how they are affected by moving the Hue-slider.

  • How to use color picker or RGB values in the hue-saturation colorize adjustment

    I have a monochromatic adornment that I want to match to the color of a logo.  I am attempting to use the colorize option of a hue saturation adjustment layer to match color.  But I cannot quite get the colors to match.  I know the RGB values of the color, but how do these translate into the Hue/Sat/Lightness numbers of the adjustment dialog?  I tried using the correlating H/S/B values fro9m the color picker but that did not work.
    Any suggestions?

    Thanks Zeno.  Creating a layer with the color and using the blend mode worked fine.  But as I stated in the original post, using the H/S/B (there is no HSL) values from the color picker does not work when you place them into the H/S/L values in the hue-adjustment layer with (or without) the colorize box checked.  But your first suggestion worked like a charm.  Thank you.

  • How can you match an existing color when you are using the Hue/Saturation adjustment layer?

    Hi, I have a student who wants to match the color of a new layer to the exact color of an existing layer. He is using an adjustment layer to "eyeball" the color match, but is there a way to ensure that the match is perfect?

    Depends, John.
    If you're able to create a reasonable selection via Color Range, feathered masking, etc, then by matching one specific color, you'll also be correcting for that entire range of hue. It might have been needed anyway...or you use a color filter to correct the whole image, if it's needed.
    As we all know, each image presents its own specific challenges and solutions.

  • Hue/Saturation

    Hi,
    another Problem: I need to add the "Hue/Saturation" Effect. In my german Version it is "Farbton/Sättigung".
    Both Names do not work. I also tried some Variations like "Farbton/Saettigung" or "Hue_Sat" an so on, but nothing works.
    How can I get the correct Name of this Effect? I also loaded the Hue_Sat.AEX in a Text Editor, but there it names it self only "Hue_Sat".

    As Dan said, it's best to stick to using matchNames for properties and effects as these will work in all languages of AE. I recommend getting Jeff's Gimme Prop Path script which lets you find the matchNames and property paths for any selected property:
    http://www.redefinery.com/ae/view.php?item=rd_GimmePropPath
    In general Jeff's scripts are really useful as reference for learning how to write scripts.

  • Should a Layer Mask appear simultaneously with the creation of a Hue/Saturation mask?

    Using PC+CS4.  When creating a hue/saturation mask, why doesn't a Layer Mask appear simultaneously, as it does on training instruction when instructing with CS4 on mac? I've looked through Prefs and panel options without success.  Anyone got any ideas?

    CS4 Adobe added the Adjustment Panel and in the Adjustment Panel Adobe included two new bad options that can change Photoshop Default behavior.  One of the bad option Changes Photoshop so no automatic layer mask are added to adjustment layers.  The other bad option will add adjustment clipped by default.   These option are bad for Photoshop does not always operate the way they are set and changing Photoshop default behavior brakes some thing developed for Photoshop..   These settings are not preferences and are not settable in actions and scripts and plug-ins.  If a user set these from there default setting some actions and script will fail to operate correctly.  Photoshop is not only not backwards compatible with older versions of Photoshop it not compatible with current Photoshop.  These two menu items should simply be removed.

  • Adding to the selection of a current hue/saturation adjustment layer?

    I made a selection on a car, used a Hue/Saturation adjustment layer to change that selected color, though I went and used the Magic Wand to add more to my selection and that new part of the selection is not affected by the previous Hue/Saturation adjustment layer. How is this done? Do I have to make a new Hue/Saturation adjustment layer for the added selection Using Cs5.
    Thanks.

    There's selection of the color range the Hue/Saturation layer will work on.  That's controlled by the little sliders that appear when you choose, for example, "Reds".  You can do things like widen or narrow the range of colors included, as well as widen or narrow the ramps defining how much that colors near the edges of the ranges will be affected.
    There's also the possibility that you defined a layer mask when making the Hue/Saturation layer, which will define which pixels in the image will be affected.  If so, you need to click on the layer mask in the Layers panel and paint on it (white to choose which parts the Hue/Saturation layer will work on, black to choose which parts not to work on).  You can, of course, paint grayscale on the layer mask to have certain pixels partially affected.
    Hope this helps.
    -Noel

  • Altering Hue/Saturation using scripting

    Hi,
    I can't work out how to change the hue/saturation/brigtness in photoshop using scripting (currently using applescript) - the 'adjust' command doesn't seem to work.
    As I'm using multi-coloured images I don't want to simply fill them with a colour.
    Any hints or tips really appreciated!
    Thanks

    I'm not quite sure how to execute the javascript function from applescript?
    and make it operate on the current layer of current document...
    I've tried this in applescript:
        tell application "Adobe Photoshop CS4"
            set myDoc to current document
            set myLayer to current layer in myDoc
            do javascript (file "/ Users / emmashipley / huesatlight.jsx") ¬
                with arguments {10, 10, 10}
        end tell
    and am getting this error message:
    Applescript error:
    Adobe Photoshop CS4 got an error: General Photoshop error occurred. This functionality may not be available in this version of Photoshop.
    - <no additional information available>
    The javascript file huesatlight.jsx is saved in the path referred to so not sure why this isn't working?
    Thanks for the help!

  • Why do shadows appear before the letters when using the write-on effect

    I am using the write-on effect.  I am casting shadows on a wall but the shadows of the letters are appearing whole prior to the letters being written.  How can I get the shadows to appear in sync?

    I apologize for not supplying enough information.  I am using AE CS6 and I am using 3D layers with lights. I have also used a single layer for each letter in the message that is slowly appearing.  The lights are creating the shadows but are rendering the shadow before the effect write-on, as the shadow letter appears first.  Then the letter is drawn second.  I thought it must be something in the render order, but I couldn't figure out how to make it happen correctly.
    After I posted my question, I found an Adobe video tutorial on render-order.  Although the video didn't address my problem, it did remind me that an effect that I could use - drop shadows.  I inserted the drop shadow effect above the write-on effect on each letter and the world is good.  The shadow appears at the same time as the letter.  And with a whole lot less effort.
    I appreciate you taking the time to think about the problem.  If there is a simple solution I would still be interested in knowing what it might be.
    Steve

  • In Photoshop CC (2014), Hue/Saturation adjustment layer properties disappear

    I am running Photoshop CC (2014) under Windows 7 Professional.  The program is up to date.
    Today, while editing an 8-bit image, I added a Hue/Saturation adjustment layer.  Then, in the properties panel for this layer, with the on-image adjustment tool selected, I clicked a color in the image to get a range of colors whose saturation I wanted to adjust.  Next, using the saturation slider in the properties panel, I increased the saturation of this range of colors. Finally, I closed the properties panel by clicking on the double arrow in the upper right corner.
    Later, I wanted to modify this adjustment layer.  I double-clicked on the layer thumbnail to reopen the properties panel, and found that, although the previous increase in saturation was still operating, the saturation slider was back at its default position, and the range of colors that I had previously established was gone.  Thus, I could not make further adjustments to this range of colors.
    I then did some further experimentation:  I deleted the first Hue/Saturation adjustment layer, and created a new Hue/Saturation adjustment layer. I then again established a range of colors as above, again increased the saturation of these colors, and then again closed the properties panel by clicking on the double arrow in the upper right corner.  This time, however, when I wanted to try to modify this adjustment layer, instead of double-clicking on the layer thumbnail to reopen the properties panel, I right-clicked on the layer and then clicked on "Edit adjustment..."  This opened the properties panel, which, this time, correctly showed my original adjustments -- the saturation slider showed the positive adjustment that I had previously made, and the range of colors established earlier was still shown. But then, on a hunch, I added a Curves adjustment layer above the Hue/Saturation adjustment layer.  Now, when I again opened the properties panel of the Hue/Saturation adjustment layer (by right-clicking on the layer and then clicking on "Edit adjustment..."), my previous settings were gone -- the saturation slider was at its default position and the range of colors was gone!  (But the increase in saturation was still operating.)
    Thus, it appears that there is a bug in the functioning of the properties panel of the Hue/Saturation layer: In short, once you have added a further adjustment layer, you can't then go back and make changes to the properties of the Hue/Saturation layer.  I would be interested to hear if others have noticed this.  Also, is Adobe planning to address this?

    OK, I am not entirely sure I have understood your post completely, but when you edit a colour range with a Hue/Sat layer, and click off and back on again, it will default to showing the RGB values, which you may not have made any adjustment to.  If you pick the previous colour from the image, or a similar colour, it _will_ show you the adjustments.  So long as your picked colour is contained within the range of the previous adjustment.
    Ypu could also use the RGB drop down (actually they call it Master nowadays), and chose the colour that is closest to your previously picked colour.  I expect you are away that you can edit the colour range being operated on by dragging the four sliders on the two colour bars at the bottom of the Properties panel.
    Does that make sense, or am I going in the wrong direction?

  • Image Adjustments Hue-Saturation / Ctrl U crashes CS4

    I have been running CS4 for about five months. There have been problems - speed, stability - but here is a new one. Out of the blue, selecting the Hue-Saturation panel eithe rthrough the menu or by keystroke brings up the eyedropper - functioning - but essentially crashes Photoshop. It goes on running - you get 'blind' menues - but it is impossible to switch the eydropper off and you consequently have to close CS4 from Windows. I have rebooted, it still happens. I am oath to reinstall until I know if there is afix for this.

    I hate to keep repeating the same mantra, but have you tried resetting your preferences as described in the FAQ.
    http://forums.adobe.com/thread/375776?tstart=0
    You either have to physically delete (or rename) the preference files or, if using the Alt, Ctrl, and Shift method, be sure that you get a confirmation dialog.
    This resets all settings in Photoshop to factory defaults.
    (A complete uninstall/re-install will not affect the preferences and a corrupt file there may be causing the problem.)

  • My hue/saturation filter quits working in Photoshop CS3

    I keep having this issue where my hue/saturation filter just quits working.  I use that filter religiously so it has to be fixed each time it occurs.  I've only had the Adobe CS3 for 3 months and I've had to resolve this 3 times now.  Each time this has happend I've had to uninstall the entire CS3 design package and do a complete reinstall which takes almost 4 hours because my download uses the Adobe server.  My product download was purchased online so I do not have a disk but rather files that I downloaded from Adobe with product serial numbers.
    I've used Adobe for years, as far back as Adobe 5, and never had such a problem!  I've checked in my preferences and have ample RAM available for the settings.  I use Dell inspirion and have 2 GB of RAM total on my system.
    Can someone please advise why this would keep happening.
    Thank you very much.

    Resetting your preferences is much faster than uninstalling/reinstalling, so if you haven't tried it, that would be what to do next, although it would be nice to figure out what the issue is.
    To reset your preferences hold the Ctrl-Alt-Shift keys down (windows) or Ctrl-Option-Shift keys down (mac) as you start up Photoshop.  You should get a message confirming whether you want to delete the preferences file.  If resetting preferences fixes things, then you should try to remember what you've been doing, just prior to having the problem.
    Once Hue/Sat sliders seem to be disabled, are they still way for all images that you open (a JPG for example), or are they just messed up for one image, but you need to work on that image so you have to fix things before doing anything else?  Hue/Sat is not a valid operation for certain modes, like Grayscale, although the menu item is disabled in this case.
    From: smk2008design
    Sent: Saturday, April 11, 2009 4:40 PM
    To: Steve Sprengel
    Subject: Re: My hue/saturation filter quits working in Photoshop CS3
    The hue/saturation filter window does open and it is not grayed out.  However, it does not allow me to do any thing to it.  I try to slide the saturation to the left or right and it does not move.  The same goes for the "Lightness" and "Hue".  I don't understand why it will work for a month or so and then just quit.  I end up rebooting my system to try and resolve but unfortunately once this occurs it seems to be stuck no matter what I do, that is until I unstall the entire program and reinstall...
    So if I need to change something in my preferences, what do you suggest that would be?  I appreciate your help, thank you.

  • Adjustments/hue/saturation

    Using Mac Snow Leopard--when I click hue/saturation I don't get a dialog box, only the eye dropper appears, then I have to CMD/return to get out. Other Adjustments work fine. This is a new development, it worked fine recently.

    No, it's not a bug.  It's user error.
    At one time you either had a secondary monitor attached which is now disconnected or you had a larger display screen resolution (more pixels wide by more pixels high) which you have since changed.  In either case the modal dialog box is now off screen.  You have no chance of finding it without first trashing your preferences.
    To re-create the preferences files for Photoshop, start the application while holding down Command+Option+Shift (Mac OS). Then, click Yes to the message, "Delete the Adobe Photoshop Settings file?"
    Wo Tai Lao Le
    我太老了

Maybe you are looking for

  • Swapping out iBook G4 video card?

    Is it possible to swap out the video card in my 1.33GHz iBook G4 14.1"? If so, what sort of video card do I need? Thanks in advance!

  • MSI Eclipse Plus Motherboard Featuring NF200 Chip is it worth the it????

    Well MSI have launched there i7 with NF200 support according to some uk sites and the price is like ouch ouch and ouch again £350ish. Also it seems from some reports on the NF200 it slower that the X58 without the chip so is it really worth the money

  • How can i get slices info with PS API support?

    Hi. have tried listener. but there is no info about slices. in "SDK\samplecode\common\sources\PropertyUtils.cpp" found OSErr PIGetSlices(Handle & slices); but there is no information WHAT is that Handle?! Please, give some information about it

  • Using Other Languages and fonts in Photoshop and Illustrator

    I would like to be able to type in romanian as well as english, and do not know how to type using special characters in photoshop and illustrator. 1)How would I go about doing this? 2) How do I upload new fonts to these programs? Would very much appr

  • Syncing iPod Video with Firewire

    I was wondering why we're unable to sync our music onto our iPod video's via Firewire? I recently needed to erase my iPod and reinstall my library. I had over 9400+ songs, which took over 24 hours to sync. Why can't music be added via Firewire? Thank