Results 1 to 10 of 46

Thread: Questions About Scripting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2010
    Location
    Nevada
    Posts
    139

    Questions About Scripting

    I am really excited about the scripting possibilities on 3.5! I color a webcomic and there are certain setup tasks that must be performed each time. Now there is a way to reduce that drudgery...

    I do have some questions about scripting which I hope the ArtRage gurus can answer. If anyone else does too, please feel free to add to this thread!

    My first question (more of a comment, really) is that, on my PC, the Scripts folder did not default to the User Content folder! It was instead placed inside of My Documents: ArtRage Paintings. I like things to be consistent, so I manually moved the Script folder to User Content. However, "Tools: User Content: Open Scripts Folder... " still looks in the ArtRage Paintings folder.
    Cat Boxes, a web comic

  2. #2
    Join Date
    Feb 2010
    Location
    Nevada
    Posts
    139
    Is there a way to run a script and have it act upon a currently active painting rather than a blank canvas or the painting that was saved with the script?
    Cat Boxes, a web comic

  3. #3
    Join Date
    Oct 2007
    Location
    NC, USA
    Posts
    2,872
    Quote Originally Posted by terrygillooly View Post
    Is there a way to run a script and have it act upon a currently active painting rather than a blank canvas or the painting that was saved with the script?
    I'm not sure about the folder question in your first post, but for your question on having the Playback work over an existing image, there might be a way. Actually, two ways. The first thing that comes to mind, is editing the script file (through a text editor) to include the other drawing somehow. I haven't had enough time to really get into the code yet, though, so I haven't tested that. The other method, which I have just tested, is probably something that's not supposed to be working this way, so I'm not sure if they'll leave this in there, or not, upon updating the program.

    Here's what you need to do:
    1 - Set the Pencil to 1% pressure, and single click your mouse on a blank layer (Note: This will likely have you scratching your head, but bear with me...).

    2 - Copy the layer you made the mark on (Ctrl + C).

    3 - Begin Recording (File > Record Script).

    4 - Paste what you copied (Ctrl + V).
    This is done to get the program to record the process of the pasting. This will be essential for getting your playback to work over a different image during playback.
    5 - Do whatever it was you wanted to do for the rest of the image.
    Okay, so here's how this will work... After following the steps above, you'll be left with a script that wants to paste something. Because you only recorded the pasting process, and skipped the copy step, the program is going to use whatever is currently copied to the clipboard of the computer. This means if you (or a person playing the script back) goes online, right clicks an image, and selects "copy image" from the menu, that's the image ArtRage is going to paste onto a new layer when the script is played back.
    Nothing is easy to the unwilling.

  4. #4
    Join Date
    Jun 2011
    Location
    Hamburg Germany
    Posts
    472
    I'm really glad to see more people interested in this new feature with much potential. I think it has at least the same potential as stencils which are pretty obvious part of AR. Stencils are even its distinguishing mark, I'd say.

    Scripting feature is very new one and this implies some shortcomings at it's current state. What we need, is a bit more options for the script recorder. Option to crate scripts independent of current recorder context is quite essential IMO. We need some more options to eliminate or at least to minimize manual editing of script files. We need also some sort of script reference, just to understand the script file.

    I hope this feature will meet some more attention in further development and let it be an another property, which makes AR so unique.

  5. #5
    Join Date
    Mar 2006
    Location
    Ambient Design
    Posts
    3,866
    I'm soon going to post a few 'utility' type scripts for use.
    One does an automatic drop-shadow, another does a bevel, another does a 'cutout' effect, another draws a grid overlay.

    In a text editor you can edit the script. It's a unicode UTF16 text file.
    After all the header pre-amble - after "// Script data follows:" - add this line:
    int nLayer = CurrentLayerIndex()

    Then find any command that acts on a specific layer index, and replace the layer index with nLayer:


    Wait: 0.000s EvType: Command CommandID: CID_DuplicateSpecificLayer ParamType: uint32 Value: { nLayer }
    Wait: 0.000s EvType: Command CommandID: CID_SelectSpecificLayer ParamType: uint32 Value: { nLayer }
    Wait: 0.000s EvType: Command CommandID: LayerAdjustment ID: 0x000000000 Idx: nLayer Contrast: 0 Brightness: -1 Saturation: 0 Hue Shift: 0 Flatten: YES Colourize: NO
    Wait: 0.000s EvType: Command CommandID: LayerAdjustment ID: 0x000000002 Idx: nLayer Blur Radius: 4
    Wait: 0.000s EvType: Command CommandID: CID_SetSpecificLayerOpacity ParamType: LayerProp Value: { nLayer, 0.5 }
    Wait: 0.000s EvType: Command CommandID: LayerXForm Idx: nLayer Scale: (1, 1) Rot: -0 Off: (4, 4) MirH: NO MirV: NO Ras: NO
    Wait: 0.000s EvType: Command CommandID: CID_MergeSpecificLayerDown ParamType: uint32 Value: { (nLayer + 1) }
    AndyRage's mantra for graphics engine code:
    "Sure - how hard can it be?"

  6. #6
    Join Date
    Mar 2006
    Location
    Ambient Design
    Posts
    3,866
    I've got a couple more urgent things to complete this week, then I'm going to take a short break, and then I'm going to make some useful posts about things you can do with scripting.
    My brain is a bit fried at the moment.
    AndyRage's mantra for graphics engine code:
    "Sure - how hard can it be?"

  7. #7
    Join Date
    Jul 2011
    Location
    Berkeley, CA
    Posts
    8

    hack script to make it play over exising art

    Quote Originally Posted by terrygillooly View Post
    Is there a way to run a script and have it act upon a currently active painting rather than a blank canvas or the painting that was saved with the script?
    I found that if I open an existing/recorded script and change the "Script Feature Flags:" value in the Header to:

    Code:
        Script Feature Flags: 0x00000FFFF
    , then it works on whatever is already open. Very cool.

    -crg

    [update: oh, I see I missed the existing solution to this. Sorry. Now let's see if I can find my feature request before I post another unnecessary question ....]

    [update 2: And thanks to Terry in the following post for pointing out that this (
    "0x00000FFFF")solution allows for the introductory box to show, whereas the other solution does not]
    Last edited by crgreen; 09-06-2011 at 06:33 PM.

  8. #8
    Join Date
    Feb 2010
    Location
    Nevada
    Posts
    139
    crg, that is an awesome discovery, because it will show the Introductory box, unlike the other method.
    Cat Boxes, a web comic

Posting Permissions

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