Results 1 to 6 of 6

Thread: Layers Properties and Methods

  1. #1
    Join Date
    Nov 2009
    Gallery
    View images
    Posts
    28

    Layers Properties and Methods

    It would be really helpful to be able to create new layers, set blend mode, etc via script as well as assign script to a hot-key. I've created a complete workflow environment in Photoshop with a custom palette, scripts, and actions which greatly minimizes all the pointing, clicking, pull-down menus, etc. and allows me to spend more time 'painting'. Not sure if you view this as a goal for ArtRage.

    Thanks for considering this.

  2. #2
    Join Date
    Jan 2011
    Gallery
    View images
    Posts
    720
    I was actually just thinking this exact thing the other day when Someonesane suggested making an empty template Layer at the bottom of the painting each time you start, and then duplicating the layer and moving it each time you wanted a new one with those settings. It's a reasonable work around, but I was actually thinking-- can't this be done with a script? I also would like to do similar things-- set layer texture, blending mode, etc.-- and just bind it to a keystroke.

    I've never done a script before, but it seemed like just the thing to do these things in sequence very easily. Can you set scripts to a hotkey? And can a script do this sort of stuff?

  3. #3
    Join Date
    Oct 2007
    Location
    NC, USA
    Gallery
    View images
    Posts
    2,872
    A script could do it, but you'd still need to go up to file, select "play script", and then select the script. So it probably wouldn't be worth it, at this point. Unless it was a really complex set of events...
    Nothing is easy to the unwilling.

  4. #4
    Join Date
    Jan 2011
    Gallery
    View images
    Posts
    720
    Hmmmm... so just to double check-- you can make a script for this, but you can't link a script to a key, right?

    For those who are savvy with AutoHotkey though, you should be able to make a button that would load the script. You could load up AHK, have a button available for it onscreen, and all you'd need to do is tap it.

    I'm working an AHK setup for Artrage right now with someone else, built to be used on tablet pc's, or for those who don't use a keyboard. I might be able to add a feature like this to the setup. I'm planning on sharing it, perhaps some time in April. But if you're more savvy than I am with AHK, you could whip this one up on your own.

  5. #5
    Join Date
    Oct 2007
    Location
    NC, USA
    Gallery
    View images
    Posts
    2,872
    Quote Originally Posted by Steve B View Post
    Hmmmm... so just to double check-- you can make a script for this, but you can't link a script to a key, right?

    Well it depends on exactly what it is you're looking to do, but pretty much everything you can do with the tools, and features, can be recorded into a script. I'm not sure about saving, or exporting, but things like layer creation, duplication, blend modes, and all of that, should work. I don't know whether it would work with the AutoHotkey thing you mentioned. I've never used it.

    But here's an example of a script (see below) that will add a new layer, change it to the Multiply Blend mode, and name it Multiply, plus whatever the current layer count is. So if you have 8 layers, in total, then play the script, it'll add the new layer, make it use the Multiply Blend, and name it Multiply9. There's probably a way to get them to use a certain type of canvas, as well, but it's late and I have work in the morning, so I'll leave that part to you.

    Here's the script (When you play it, it'll ask if you'd like to save your work. This is a safeguard by AR, which I'm not sure can be avoided. You can either choose to save, or click "no". Either way, the script will run afterwards).

    Code:
    //===========================================================================
    //===========================================================================
    //                            ArtRage Script File.
    //===========================================================================
    //===========================================================================
    
    
    //===========================================================================
    // Version Block - Script version and ArtRage version:
    //===========================================================================
    
    <Version>
        ArtRage Version: ArtRage 3 Studio Pro
        ArtRage Build: 3.5.4
        Professional Edition: Yes
        Script Version: 1
    </Version>
    
    
    //===========================================================================
    // Header block - Info about the painting/person who generated this script:
    //===========================================================================
    
    <Header>
        // === Project data
        Painting Name: "Untitled"
        Painting Width: 1600
        Painting Height: 870
        Painting DPI: 72
        Mask Edge Map Width: 1600
        Mask Edge Map Height: 870
        // === Author data
        Author Name: "Gaeton Laprade (Someonesane)"
        Script Name: "Add Multiply layer"
        Comment: ""
        Script Type: ""
        //Script Feature Flags: 0x000000015
    </Header>
    
    
    //===========================================================================
    // ArtRage project features. Sets the startup state of the script:
    //===========================================================================
    
    <StartupFeatures>
    </StartupFeatures>
    
    
    //===========================================================================
    // Script data follows:
    //===========================================================================
    
    <Events>
    Wait: 0.000s    EvType: Command    CommandID: Add New Layer
    int nLayer = CurrentLayerIndex();
    int nLayerCount = LayerCount();
    string lName = "Multiply"+nLayerCount;
    Wait: 0.000s    EvType: Command    CommandID: LayerName    Idx: nLayer    Name: lName
    Wait: 0.000s    EvType: Command    CommandID: CID_SetSpecificLayerBlend    ParamType: LayerTwoOp    Value: { nLayer, 3000000176 }
    Nothing is easy to the unwilling.

  6. #6
    Join Date
    Nov 2009
    Gallery
    View images
    Posts
    28
    Very interesting! I didn't see the Layers API in the documentation but now I see by recording the script you can extract all the API info. Thanks for that. Also, thanks to Steve B for the reference to AutoHotKey...that looks like a cool tool.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •