ArtRage 5 Product PageArtRage Lite Product PageArtRage for iOS Product PageArtRage for Android Product PageArtRage  Android Oil Painter Free Product PageArtRage  Free Demos Page

Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Selection to Stencil

  1. #1
    Join Date
    May 2006
    Location
    UK
    Posts
    186

    Selection to Stencil

    This script creates a stencil from a selection. Only painted areas are included.

    1) Select area
    2) Run script


    Questions for Ambient:
    1) Since some scripts are useful as macros, will we be able to bind them to keyboard shortcuts?
    2) Is there a command to fill a selection with the forground colour?






    Code:
    //===========================================================================
    //===========================================================================
    //                            ArtRage Script File.
    //===========================================================================
    //===========================================================================
    
    
    //===========================================================================
    // Version Block - Script version and ArtRage version:
    //===========================================================================
    
    <Version>
        ArtRage Version: ArtRage 3 Studio Pro
        ArtRage Build: 3.5.0
        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: 860
        Painting DPI: 72
        //Mask Edge Map Width: 1600
        //Mask Edge Map Height: 860
        // === Author data
        Author Name: "Charlie"
        Script Name: "Selection to Stencil"
        Comment: "Convert selection to stencil"
        Script Type: ""
        Script Feature Flags: 0
    </Header>
    
    
    //===========================================================================
    // ArtRage project features. Sets the startup state of the script:
    //===========================================================================
    
    
    //===========================================================================
    // Script data follows:
    //===========================================================================
    
    
    
    <Events>
    Wait: 0.000s    EvType: Command    CommandID: Copy
    Wait: 0.000s    EvType: Command    CommandID: Paste
    int nLayer = CurrentLayerIndex()
    Wait: 0.000s    EvType: Command    CommandID: CID_SelectSpecificLayer    ParamType: uint32    Value: { nLayer }
    Wait: 0.000s    EvType: Command    CommandID: CID_CreateStencilFromSpecificLayer    ParamType: uint32    Value: { nLayer }
    Wait: 0.000s    EvType: Command    CommandID: CID_DeleteSpecificLayer    ParamType: uint32    Value: { nLayer }
    Wait: 0.000s    EvType: Command    CommandID: Deselect All
    Attached Files Attached Files
    Last edited by Charlie; 07-27-2011 at 12:53 PM. Reason: Attached script
    Charlie

    ArtRage for Art | EnergyXT2 for Music | Blender for 3D

  2. #2
    Join Date
    Jun 2011
    Location
    Hamburg Germany
    Posts
    472
    Hm, your script didn't produce any stencil for me, but rather a nice error message instead

    edited: OK, forgot to save as UTF 16. Now works as intended
    Last edited by Strandy; 07-23-2011 at 04:08 AM.

  3. #3
    Join Date
    Aug 2007
    Location
    Germany
    Posts
    1,070
    very useful! thanks a lot!

  4. #4
    Join Date
    May 2006
    Location
    UK
    Posts
    186
    Attached script to first post
    Charlie

    ArtRage for Art | EnergyXT2 for Music | Blender for 3D

  5. #5
    Join Date
    May 2009
    Location
    3438 ft above sea level
    Posts
    2,951
    Hiya Charlie,
    any chance of a script version that converts the opposite way from stencil to selection in the future ?
    "I paint because I love to cut mats" (Arthur Alexander)

  6. #6
    Join Date
    May 2006
    Location
    UK
    Posts
    186
    I'll have a go at Stencil to Selection but it makes you realise that there is a lot of overlap between stencils, selections and masks.

    I'd like to be able to lock a stencil position and change it's transparency for example.
    Charlie

    ArtRage for Art | EnergyXT2 for Music | Blender for 3D

  7. #7
    Join Date
    May 2009
    Location
    3438 ft above sea level
    Posts
    2,951
    Thanks Charlie I really appreciate your efforts

    Quote Originally Posted by Charlie View Post
    I'd like to be able to lock a stencil position and change it's transparency for example.
    Hear hear... +1 internets for you for that suggestion
    Hate having to keep moving a stencil out of the way then using undo to put it back to check my progress on work while using them... opacity control would help that immensely. If the scripting language had enough flexibility to allow you to do that, you would bestowed with the title 'Supreme ARScript Master of the Universe' from me immediately

    I find the marching ants on selections to be annoying at best... in photoshop you can just use Ctrl-H to hide the active selection I don't know if that can be done in artrage.

    You're completely right about selections, stencils and masks all being similar.. same mask... different appearance.
    "I paint because I love to cut mats" (Arthur Alexander)

  8. #8
    Join Date
    Oct 2007
    Location
    NC, USA
    Posts
    2,874
    Yeah, I'd love to see an opacity change option for the stencils, and a way to hide the selection lines, as well. I've posted both suggestions before, around the forums here at some point in time (I think I even posted a suggestion image on how the stencil dial could work, someplace). Here's hoping we'll see them included in the future
    Nothing is easy to the unwilling.

  9. #9
    Join Date
    Feb 2010
    Location
    Nevada
    Posts
    139
    Quote Originally Posted by Juz View Post
    Hate having to keep moving a stencil out of the way then using undo to put it back to check my progress on work while using them... opacity control would help that immensely. ....

    I find the marching ants on selections to be annoying at best... in photoshop you can just use Ctrl-H to hide the active selection I don't know if that can be done in artrage.
    I don't usually work with the stencil window open so to "hide" the stencil I right-click to move the canvas (just a small amount). This makes the stencil disappear for as long as I hold the click.

    It also hides the 'marching ants.'

    Of course, you can't do anything while right-clicking, but at least it gives you a clear view of your canvas.


    Quote Originally Posted by Juz View Post
    You're completely right about selections, stencils and masks all being similar.. same mask... different appearance.
    And also transparency locking!
    Cat Boxes, a web comic

  10. #10
    Join Date
    Sep 2010
    Location
    Alabama
    Posts
    1,942
    I could not get the script to work for me...
    Try to see as many angles of vision as possible...no single one of us has a "handle" on the whole picture.

Posting Permissions

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