https://bugs.kde.org/show_bug.cgi?id=419281

--- Comment #10 from wolthera <griffinval...@gmail.com> ---
BTW, that last comment was for the first script, the second script indeed needs
a 'waitForDone':
--------------------------------------------

# Import Krita
from krita import *

# Krita Instance Objects
ki = Krita.instance()
ad = ki.activeDocument()
an = ad.activeNode()
root = ad.rootNode()
# Read document size
width = ad.width() / 2
height = ad.height()

# Force the Mirror Axis to Center
ki.action('mirrorX-moveToCenter').trigger()

# Is there a Selection from the User?
sel = ad.selection()
# Selection Sensitive
if sel == None:  # Create a Selection
    # Place Selection
    ss = Selection()
    ss.select(0.0, 0.0, width, height, 255)
    ad.setSelection(ss)

    # Copy Selection
    ki.action('copy_selection_to_new_layer').trigger()
    ad.waitForDone()

    # Deselect
    ki.action('deselect').trigger()

    # Point of Error that needs to be Broken to Work

    # Since there is a Selection from the user do Mirror Flip like this instead
    Krita.instance().action('mirrorNodeX').trigger()

    # Mirror_2 with the layer below
    Krita.instance().action('merge_layer').trigger()

print("Copy Paste Done")

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to