Thanks , script did run now
but now showing this
Make sure the argument is of the correct type.
You are new to this whole programming thing, aren’t you? Because all the errors so far are pretty self explanatory and sometimes even tell the solution.
Not new but my frist long project with multiple file handling and all. That’s why it sucks.
You should check out the node.save() function in Krita’s API.
Here’s an example of how you might write it in gesture_2_grid.py
#def run_g2g(self):
# -------------------------
# SAVE IMAGE FROM KRITA
# -------------------------
exportParameters = InfoObject()
exportParameters.setProperty("alpha", True)
exportParameters.setProperty("compression", 0) # 0-9
# #exportParameters.setProperty("forceSRGB", True)
exportParameters.setProperty("indexed", False)
# #exportParameters.setProperty("interlaced",True)
# #exportParameters.setProperty("saveSRGBProfile",True)
# #exportParameters.setProperty("transparencyFillcolor",[255,255,255])
rect = QRect(0, 0, doc.width(), doc.height())
node.save(input_img, 1.0, 1.0, exportParameters, rect) ### fixed
Mind if I copy it and paste directly
Are you concerned about copyright issues? This code is a very common format used in InfoObject(). You can safely replace the following section of your code with mine.
# -------------------------
# SAVE IMAGE FROM KRITA
# -------------------------
node.save(input_img, 0, 0, doc.width(), doc.height())
Hello everyone, I was AFK for a while to make this plugin now even after doing a lot of changing. You can see in the GitHub file below. till still showing this
even after cmd has shown this
Kindly help me, please. ![]()
![]()
![]()
GitHub link : GitHub - P00A/Krita-plugin-Gesture_2_Grid: Convert hand-drawn lines into perspective grids · GitHub
Since the setup.bat file in your script didn’t work properly, I can’t answer your question about setting up the environment.
Out of curiosity, I set up the OpenCV module myself and tried running your script.
I wasn’t able to get your script to work. Which library does the addShape() function in gesture_2_grid.py belong to?
Man can you help me rectify setup.bat .
btw addShape() function bleongs Krita’s Python API, specifically the vector layer class
There is no addShape() function in the Krita API.
I’m guessing you might be confused by an AI hallucination.
Even before turning it into a plugin, I don’t think your script will work properly…