Storeroom of scripts

Update from one of my other tasks:

I made another version of the script that uses the move tool to subtly move an object (an Ice Cream Truck) up and down, as if the engine is vibrating it. I had to very carefully cut and move the tires and make them a separate layer, but setting the move-increment to just a pixel after that really worked a treat.

This just goes into where the movetool-move-right action was:

        if (f % 2) == 0:
            Krita.instance().action('movetool-move-down').trigger()
        else:
            Krita.instance().action('movetool-move-up').trigger()

:slight_smile: Hello @89ZERO, and welcome to the forum!

I’m not sure as what we have to classify your topic, it somehow feels to be out of place here.
Should this be a question for support with your code, where you currently have some quirks you can’t resolve yourself? Or is it meant as a resource like a plugin, which belonged into the category Plugins in our forums Resources section? Or, lastly, does it fit into our Storeroom of scripts, which currently is where I tend to locate it.

Of course, my guesses and assumptions are based on poking around in the fog using a long rod, not knowing what your concern really is. May I ask you what your concern really is, and can you describe it in a way that someone who can not read minds can understand it?

Thank you.

Michelist

Ah- please pardon the odd placement of my topic,

I’m new, as you can see, to this site.

I’d also looked through the dropdown menus on the drafting page to see if anything would fit better, but I must’ve missed the options you’ve mentioned.

If you’d like me to re-post in the scripting section, I’m happy to do so.

As for my goal, I’ll explain it in a different way"

I’m animating a kids’ ebook for an internship.
I was asked to make simple animations for each spread, which are a few to several seconds long.

When interviewing for the position, I was given the impression that it was a partly IT-based internship, but thankfully, through Krita, I’m already familiar with the animation process.

Part of my goals in this project is to make scripts, to later be used in a plugin, to automate simpler animations.
The script in the main post does 4 main tasks in a loop:

  1. It sets the current frame based on an int value (f, for frames).
  2. It uses the move tool (which must be selected as well as configured through its Tool Options) to move the current layer right (which can be substituted for the other cardinal directions).
  3. It creates a duplicate frame in the next frame from the current frame.
  4. It increments the int value up by 1 to advance to the next frame at the start of the next loop.

The questions near the bottom of the post regard my next steps of being able to make a similar script, but for rotation rather than translation, and for being able to access and configure the tool options using scripting, and later through a dialogue in the final plugin.

My hope is that, compared to posts I’ve read asking similar questions, the means to do these things are less difficult to access.

Once again, I’m happy to move my post if you’d prefer.

Thank you.

1 Like

It’s all good, everyone has to start somewhere. One minor issue is that users often seem to think we can read their minds or see what they are seeing on their monitor, so we have to ask questions to clarify things.


Okay, now I can work with this description. Then, you don’t need to open a new topic, we’ll just ask our helpful administration team to add your topic to the Storeroom of scripts. You can also post further additions there.
When the time comes, you can post your plugin in our plugin section.

@Sooz, @tiar, @raghukamath, would you be so kind to append this topic to our storeroom of scripts? This way, users in need may find code snippets that are useful for them and their projects.

Michelist

Edit/Removal: Didn’t notice that the editor added an existing selection as quote to the posting → deleted.

2 Likes