Script and burn tool

Hello all !!
How can the burn tool parameter : range, exposure, size, be place in a script ?? 
Thanks.
Janou.

range
    Values: 'burnInS' | 'burnInM' | 'burnInH'
    Get by script: True
    Set by script: False
exposure (or 'opacity' in this burn tool)
    Values: 1% - 100%
    Get by script: True
    Set by script: False
size
    Values: 1% - 1000%
    Get by script: True
    Set by script: True
Also all this ones can be get and set by script:
Diameter [1-500], Hardness%, Angle [-180/180], Roundness%, Spacing [0-1000], Flipy Boolean, Flipx Boolean
The problem is exposure
My suggestion would be to do this workarround:
For each tool, create a group of presets like this:
'burnInS010', 'burnInS020', 'burnInS030', 'burnInS040', 'burnInS050', 'burnInS060', 'burnInS070', 'burnInS080', 'burnInS090','burnInS100'
where 'burnInS010' means Burn Shadows opacity 10%, etc (you could have more accuracy with more opacity values, of course)
Then do the same for the other Ranges using
'burnInM010', 'burnInM020',...
'burnInH010', 'burnInH020',...
'dodgeS010', 'dodgeS020',...
'dodgeM010', 'dodgeM020',...
'dodgeH010', 'dodgeH020',...
Then by script you could pre-select the preset you want and put the other preferences by code.
After you have ALL the presets created you can use this code:
// Select BurnTool with all parameters
// collected from several sources and compiled
// If the preset doesn't exist, it gives a warning, telling how to create a new specific preset so the error doesn't comes again
app.currentTool = "burnInTool";
var Range = 'S';  // 'S' shadows | 'M' midtones | 'H' highlights
var Exposure = 30;  // 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
selectPresetBurnDodge(Range, Exposure);
setBrushFeatures_Burn(150, 80,undefined,undefined,undefined,undefined,undefined);
///////////////////////////////////////// Use Range and Exposure to choose the right Preset
function selectPresetBurnDodge(range, exposure) {
    exposure = (exposure < 100) ? '0'+exposure.toString() : 100;
    var presetName = app.currentTool.replace(/Tool/,'') + range + exposure;
    var Presets = getPresetList();
    var thisPresetExists = false;
    for(var v in Presets){
        if (String(Presets[v]) == presetName) {
            thisPresetExists = true;
            break;
    if (thisPresetExists) {
        if (app.currentTool == "burnInTool" || app.currentTool == "dodgeTool") {
            var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putName( stringIDToTypeID( "toolPreset" ), presetName );
            desc.putReference( charIDToTypeID( "null" ), ref );
            executeAction( charIDToTypeID( "slct" ), desc, DialogModes.ALL );
    } else {
        alert("This Preset name '"+presetName+"' doesn't exist.\n\nCreate new " + app.currentTool + " preset.\nName:\t"+presetName+"\nRange:\t" + range+ "\nExposure:\t" + Number(exposure));
///////////////////////////////////////// Set Brush
// Diameter [1-500], Hardness%, Angle [-180/180], Roundness%, Spacing [0-1000], Flipy Boolean, Flipx Boolean
function setBrushFeatures_Burn (Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx) {
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var appDesc = executeActionGet(ref);
    var toolDesc = appDesc.getObjectValue(stringIDToTypeID('currentToolOptions'));
    var brushDesc = toolDesc.getObjectValue(stringIDToTypeID('brush'));
    if (Diameter == undefined) Diameter = brushDesc.getDouble(stringIDToTypeID('diameter'));
    if (Hardness == undefined) Hardness = brushDesc.getDouble(stringIDToTypeID('hardness'));
    if (Angle == undefined ) Angle = brushDesc.getDouble(stringIDToTypeID('angle'));
    if (Roundness  == undefined) Roundness = brushDesc.getDouble(stringIDToTypeID('roundness'));
    if (Spacing == undefined) Spacing = brushDesc.getDouble(stringIDToTypeID('spacing'));
    if (Flipy == undefined) Flipy = brushDesc.getBoolean(stringIDToTypeID('flipY'));
    if (Flipx == undefined) Flipx = brushDesc.getBoolean(stringIDToTypeID('flipX'));
    var desc = new ActionDescriptor();
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID( "Brsh" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
    desc.putReference( charIDToTypeID( "null" ), ref );
    var desc1 = new ActionDescriptor();
    desc1.putDouble(stringIDToTypeID('diameter'), Diameter);
    desc1.putDouble(stringIDToTypeID('hardness'), Hardness);
    desc1.putDouble(stringIDToTypeID('angle'), Angle);
    desc1.putDouble(stringIDToTypeID('roundness'), Roundness);
    desc1.putDouble(stringIDToTypeID('spacing'), Spacing);
    desc1.putBoolean(stringIDToTypeID('flipY'), Flipy);
    desc1.putBoolean(stringIDToTypeID('flipX'), Flipx);
    desc.putObject( stringIDToTypeID('to'), charIDToTypeID( "Brsh" ), desc1 );
    executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
// get all Presets
function getPresetList(){
    var ref = new ActionReference();
    ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
    var appDesc = executeActionGet(ref);
    var List = appDesc.getList(stringIDToTypeID('presetManager'));
    var presetNames=[];
    var list = List.getObjectValue(7).getList(charIDToTypeID('Nm  '));
    for (var i = 0; i < list.count; i++) {
        var str = list.getString(i);
        presetNames.push(str);
    presetNames=ReturnUniqueSortedList(presetNames);
    return presetNames;
function ReturnUniqueSortedList(ArrayName) {
    var unduped = new Object;
    for (var i = 0; i < ArrayName.length; i++) {
    unduped[ArrayName[i]] = ArrayName[i];
    var uniques = new Array;
    for (var k in unduped) {
        uniques.push(unduped[k]);
    return uniques.sort();

Similar Messages

  • Dodge and Burn Tool basicly stopped working.

    For some reason the Dodge and Burn Tool in Lightrooom 5.4 basicly stopped working. It will only make a slight adjustment no matter how much I change the exposure value. Does anyone know what could be causing this?

    Do you have the flow and/or density of the Adjustment Brush set to a very low level?

  • Dodging and burning tool freeze up on CC 2104

    I have recently subscribed to CC Photoshop 2104 and when using the burn tool the programme just hangs, or takes a very long time to complete the action. i have to close down lose my work and re-open. Dont know how to fix it, help?

    I recognize that you want to use the Dodge and Burn tools for local tone adjustment, but it would be to your advantage to use another approach for dodge and burn. Consider this:
    Dodge and burn, techniques that provide subtle local adjustments in the tone values of an image, are familiar to anyone who has worked in a film & paper darkroom. Photoshop’s similarly named tools have one notable shortcoming; each dodge or burn dab is incorporated into the image. This makes it impractical or impossible to undo one or more of the changes minutes later, when other dabs have been added elsewhere in the image. Instead, you must then pile correction on correction rather than modifying the original image values. It is an inefficient and often destructive procedure.
    There is a better way – one that puts the dodge and burn adjustments on a separate layer where they may be seen at any time and each adjusted or even eliminated, returning the area to its original value – all without corrupting the original image. This is how to do it:
    1. Load a file to be retouched and add a blank layer by clicking on the Create a New Layer symbol at the bottom of the Layers panel to the left of the Trash. The blank layer is Layer 1.
    2. Choose Edit > Fill and from the double-arrow options of the Use field, choose 50% gray. Then click OK. The image area will become gray overall.
    3. Change the Blending mode in the Layers panel from Normal to Overlay. The Background image will return although you will be working on Layer 1.
    4. Do not use the Dodge and Burn tools. Choose the Brush tool and adjust its size by tapping either of the square brackets to the right of the P key on the keyboard. To adjust the Brush hardness – a soft edge is best for this -- hold down the Shift key as you continually strike the left the square bracket. Set the Opacity of the Brush in the Options bar at about 10%.
    5. Painting in white will Dodge (lighten) the area, Black will Burn (darken) the area. Strike the D key to place Black as the Foreground color and White as the Background color. To transpose them stroke the X key. Dab or stroke with the Black to slowly add density. To lighten an area, dab or stroke with White. Although the image will reflect the changes, they are being recorded on Layer1 and may be viewed by turning off the eye in the Background layer. Best of all: to undo any tone adjustment and return the area to its original value, simply return that area to 50% by cloning from an adjacent unretouched area in Layer 1.

  • Dodge and Burn tools in v9

    I just moved up from Elements v4 to Elements v9.  Where are the dodge and burn tools?  Then again, maybe they don't want guys over 70 to be using such things.  < Smile >

    Hi terry
    Right click on that blue thing!

  • Dodge and burn tools in elements 12?

    I just downloaded Elements 12. Why does it look so different? Are there fewer tools than previous versions? I don't see dodge and burn tools anywhere. Please help if you can!

    I don't see dodge and burn tools anywhere.
    http://forums.adobe.com/message/5755706

  • Dodge  and burn tool

    Well I have used the tool a couple of times and I just opened my aperture, and its suddenly gone...any reason why? Thats kind of weird

    Never heard that one before. The dodge and burn plugin is actually part of the package in the applications folder so it's kind of hard to nuke it w/o blowing away aperture itself.
    Hmmm, that is weird. I'll take a poke around and see if I can break it on purpose and get back.
    RB

  • Burn and Dodge tools not working on b/w sketch scan

    Hi, I may have somehow eliminated information in an image of a black and white sketch which prevents the dodge and burn tools from working...is there a common mistake which prevents these tools from working as they normally should on a black and white image with multiple shades? (The sketch is not pure black and pure white but has multiple gray shades...it "looks" like an image on which these tools should work.)
    When adjusting Levels for the image all of its "information" seems to be clustered around the "0" point on the far left of the Levels adjustment slider, if that helps in understanding this problem....
    Did I mistakenly somewhere along the line destroy information in this image necessary for these tools to work?
    Thanks in advance

    > it would be nice if dodge and burn worked on partially transparent images. This is impossible?
    It is working properly. With a partially transparent layered image, only **some** of the visible tone is coming from the image layer. The rest is coming from whatever is showing on the layer underneath. Burn and dodge will only affect the layer you're working on. As I said, I could get get B&D to affect it a little ... and that's is exactly what it should do in this case. Because the pixels are partially transparent, B&D is only going to **partially** affect the visible tone. It's altering the pixels on the image layer, just not very much because there aren't very many pixels available.
    Peel off white does an incredible job. However, I would use it only once. The fact that the sketch becomes a bit transparent tells you it's removing image information.

  • Burn Tool:  Protect Tones checkbox has no effect

    Deleting this question.  I was trying to darken an area of highlights that had too little color to protect, which is why the burned area was appearing grey.

    >CS4 added "Protect Tones" to the Dodge and Burn tools with very little explanation about what it does, yet the default setting is Protect Tones on.
    My Link was in answer to your question in that it tells you what "Protect Tones" DOES.
    If you wish to turn it off, that is up to you but there is no Preference available to do that as far as I know be probably because the Photoshop engineers felt that using "Protect Tones" would benefit the User.

  • Dodge and Burn Stopped Working

    My dodge and burn tools have stopped working. If some one could help me find out why this might be? My photoshop (CS6) is new and was only installed yesterday. I edited some photos yesterday and the dodge and burn was working but now it is not.

    make sure you have a layer highlighted in the layers pallet that can be dodged/burned (they may not work on some type of layers, modes)
    or try reset the tool:

  • CS5 dodge and burn overkill

    I don't know if anyone else has this problem but, since upgrading from CS4 to CS5 I've noticed a big difference in the dodge and burn tools.  In CS4 I'd always set them at 10% so that I'd get subtle changes - gradually building up to how I wanted the changes to look.  Now, even setting as low as 5% the changes are drastic, especially the dodge tool.  Yes, I have Protect Tones selected.
    Any ideas?

    Control-Alt-Shift after launch seems to have fixed it for me too.
    Deleting the file "Adobe Photoshop X64 CS5 Prefs.psp" on it's own didn't.
    1% still seems a bit darker than I remember, but since you guys haven't made any changes, it must be my imagination  ;-)

  • Using Dodge and Burn Plug-in

    I took a photo that I like of a sunset with trees in the foreground. I've been able to crop the worst of the powerlines out but I still have two remnant lines in the body of the photo.
    I have tried to figure out the workflow on the dodge and burn tool to accomplish getting rid of these powerlines with no success. I have searched this forum and the manual for instructions for using this tool.
    Does anyone have a workflow that would get rid of these powerlines? I do not have Photoshop nor do I intend to buy it.

    Hi there,
    If all you're wanting to do is remove powerlines, I'd suggest using the Spot and Patch tool instead of dodge and burn. This should clone out your powerlines and replace them with sky for a more natural effect.
    I've not used it much, so you'll need to experiment a little with the settings, or look up tutorials or other forum threads here if you get stuck.
    Andrew

  • Aperture 3 keeps crashing on me, consistently. More frequently after using Burn tool or skin smoothing - and even more often when I feather. What can I do? I already upgraded my RAM. I'm at a loss!

    Aperture 3 keeps crashing on me, consistently. More frequently after using Burn tool or skin smoothing - and even more often when I feather. What can I do? I already upgraded my RAM. I'm at a loss!

    4) When my computer crashes, once it starts again, it says "repairing" ... but I am not familiar with reparing permissions -- can you explain how I might do that?
    If you are running OS X Lion, then you can restart your computer and then press and hold the 'Option' key immediately after you hear the start up 'gong' (usually heard when grey screen shows as it restarts).
    You should see at least two Disks to choose from. Choose 'Recovery Disk' and wait for it to load, then choose 'Disk Utility' option in the Utilities dialog.
    Once Disk Utility loads, do the following:
    1 - In the left hand pane, choose your system partition (usually called either 'Macintosh HD' or 'Macintosh SSD'). Note - don't choose the actual hard drive listed above the partition when using Disk Utility in OS X Lion as this doesn't offer options for repairing due to it including the Recovery Disk you have loaded in memory.
    2 - Click the 'First Aid' tab
    3 - Click the 'Repair Disk Permissions' button in lower portion of main pane and allow to complete. Ideally, you will get a final message in main pane saying Disk Permissions are repaired.
    4 - At lower right of same pane, click the 'Repair Disk' button and allow to complete. Ideally, you will get a final message indicating that Disk Repair is completed and all appears to be good.
    5 - Quit Disk Utility > Close Utilities dialog window > Click 'Restart' button (confirm as needed).
    You should boot straight into the system partition when complete.
    Note - any red text in the main pane text while running the repairs will be issues and you will need to follow the advice given or post back.
    If you are running Snow Leopard; then (as David mentions) boot from your first OS X reinstall disc and run the Disk Utility the same way; except you select the actual hard drive listed at top of left pane (not the partition below it). This is because Snow Leopard does not use a 'Recovery Disk' partition and repairs can be run on the HD or SSD itself.
    Hope that helps.

  • Photoshop CS6 crashes when using burn tool, crop tool, and dodge tool?

    Just recently upgraded from Photoshop CS5.5 64bit to Photoshop CS6 64 bit. Crashes when using burn tool, crop tool, or dodge tool? Thanks for your help!

    Turn off OpenGL in the prefs and update your graphics driver before re-enabling it.
    Mylenium

  • Looking for the burn and smudge tools in photoshop 8.0

    Hi,  I have been using Photoshop 4.0 and loved it.  Got a new computer and had to change to Photoshop 8.0.  I can't seem to find the burn or smudge tools I used in the 4.0 photoshop.  Is any one familiar with this problem?

    Assuming you mean Photoshop Elements 8.0, then they are located under the Sponge and Blur tools, respectively.
    Burn Tool:
    Smudge Tool:

  • HOWTO and script: create and burn an UDF image with 4+GB files

    Most people think, creating UDF images with files bigger than 4GB or even 1GB is impossible, however it's not true! You just need udftools. Also you need to load loop and udf modules. There's a good howto by grigio, I also created an (admitably pretty poor) script to do it automatically, since grigio's howto doesn't include real dvd sizes:
    UDFPATH=$HOME
    echo -e "By default the udf image will be placed into your home directory. \n Do you want to enter an alternative one? (Enter y or n)"
    read yesorno
    if [ $yesorno == y ]; then
    echo "Please enter the directory you want to use: "
    read UDFPATH
    if [ -d $UDFPATH ]; then
    echo "Using $UDFPATH"
    else
    echo "Creating $UDFPATH" && mkdir -v $UDFPATH
    fi
    fi
    if [ $yesorno == n ]; then
    echo "Using default directory"
    fi
    if [ $yesorno != y -a $yesorno != n ]; then
    echo "Incorrect entry, aborting..." && exit 0
    fi
    if [ -e $UDFPATH/udf.iso ]; then
    mv $UDFPATH/udf.iso $UDFPATH/udf.iso.bak-`date +%y.%m.%d-%H.%M` && echo "udf.iso already exists! Backing up..."
    fi
    echo -e "Please enter your type of disk: dvd5p, dvd5m, dvd9p or dvd9m:\n(5/9 stand for normal/double layer disk and p/m for +/-)"
    read type
    if [ $type == dvd5p ]; then
    echo "Creating a 4,7 GB DVD+R image..."
    dd if=/dev/zero of=$UDFPATH/udf.iso bs=1024 count=4590208
    fi
    if [ $type == dvd5m ]; then
    echo "Creating a 4,7 GB DVD-R image..."
    dd if=/dev/zero of=$UDFPATH/udf.iso bs=1024 count=4596992
    fi
    if [ $type == dvd9p ]; then
    echo "Creating a 8,5 GB DVD+R image..."
    dd if=/dev/zero of=$UDFPATH/udf.iso bs=1024 count=8347648
    fi
    if [ $type == dvd9m ]; then
    echo "Creating a 8,5 GB DVD-R image..."
    dd if=/dev/zero of=$UDFPATH/udf.iso bs=1024 count=8343424
    fi
    if [ $type != dvd5p -a $type != dvd5m -a $type != dvd9p -a $type != dvd9m -a $type != cheat ]; then
    echo "Wrong type entered, aborting..." && exit 0
    fi
    mkudffs $UDFPATH/udf.iso
    echo -e "UDF image created in $UDFPATH/udf.iso. Want to mount it right now? (Make sure udf and loop modules are loaded)"
    read yesorno
    if [ $yesorno == y ]; then
    echo "Please enter the directory you want to use for mounting: "
    read MOUNTPATH
    if [ $UDFPATH = $MOUNTPATH ]; then
    echo "You can't mount the image to the directory it exists in!" && exit 0
    echo -e " Mount it yourself with 'sudo mount -o loop,user,uid=`id -u` -t udf $UDFPATH/udf.iso targetdir\'"
    echo " Afterwards copy your files, unmount the image and burn the dvd."
    echo -e " For burning you may just use 'cdrecord -eject -dao -dev=/dev/sr0 $UDFPATH/udf.iso'\n (the path to your DVD burner may vary!)"
    fi
    if [ -d $MOUNTPATH ]; then
    echo "Using $MOUNTPATH"
    USERID=`id -u`
    sudo mount -o loop,user,uid=$USERID -t udf $UDFPATH/udf.iso $MOUNTPATH
    echo "Copy your files, umount the image and burn the dvd."
    echo -e "For burning you may just use 'cdrecord -eject -dao -dev=/dev/sr0 $UDFPATH/udf.iso'\n(the path to your DVD burner may also vary)";
    else
    echo "Creating $MOUNTPATH..." && mkdir -v $MOUNTPATH
    USERID=`id -u`
    sudo mount -o loop,user,uid=$USERID -t udf $UDFPATH/udf.iso $MOUNTPATH
    echo "Copy your files, umount the image and burn the dvd."
    echo -e "For burning you may just use 'cdrecord -eject -dao -dev=/dev/sr0 $UDFPATH/udf.iso'\n(the path to your DVD burner may also vary)";
    fi
    fi
    if [ $yesorno == n ]; then
    echo -e "All right, then mount it yourself with 'sudo mount -o loop,user,uid=`id -u` -t udf $UDFPATH/udf.iso targetdir'\nAfterwards copy your files, unmount the image and burn the dvd."
    echo -e "For burning you may just use 'cdrecord -eject -dao -dev=/dev/sr0 $UDFPATH/udf.iso'\n(the path to your DVD burner may also vary)"
    fi
    if [ $yesorno != y -a $yesorno != n ]; then
    echo "Incorrect entry, aborting..."
    echo -e " Mount it yourself with 'sudo mount -o loop,user,uid=`id -u` -t udf $UDFPATH/udf.iso targetdir\'"
    echo " Afterwards copy your files, unmount the image and burn the dvd."
    echo -e " For burning you may just use 'cdrecord -eject -dao -dev=/dev/sr0 $UDFPATH/udf.iso'\n (the path to your DVD burner may vary!)"
    exit 0
    fi
    EDIT: Some major mistakes solved.
    Last edited by ku (2009-04-23 19:02:41)

    See the second article for how to look through a list of files in a folder.
    http://stackoverflow.com/questions/7854727/loop-over-video-files-in-folder-to-ge t-video-length

Maybe you are looking for

  • Windows 7, no option to install the 32 bit only????

    Im running a windows 7 (64 bit) but would like to install photoshop cs5 as a 32bit variant, which the installer is not letting me. any workarounds or patches? please I need urgent help,

  • Denim update

    My Lumia 625 shows denim update I want to ask what is the size of denim update Now I'm using Lumia cyan

  • I forgot my passcode on my iPhone4s what do i do?

    i forgot my passcode on my iphone4s what do i do now?

  • Kernel Panic analysis please?

    I get these several times a week, and I can't figure out what's triggering it.  The last time it happened, I had just fullscreened a video in quicktime 7 and it was playing for a few seconds, then panic.  I have Mavericks 10.9.3, MacBookPro8,3, 16GB

  • Potential leak & value stored to .. never read - messages

    hi! I am using the static analyzer to test my code. There are some messages I dont understand. The file is uploaded here (http://www.learnclip.com/iPhoneDev/leak1.png) but I will also post the code below. There are three "lacks" in my code; 1. "The v