We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to write same function for "deleteAndFillSelection" -- can anybody help me ?
def content_aware_fill(ps, doc, left, top, right, bottom, hull_points): # Deselect any current selections doc.selection.deselect()
# Define the selection area if hull_points is not None: doc.selection.select(hull_points) else: left, top, right, bottom = int(left), int(top), int(right), int(bottom) selection_points = ((left, top), (right, top), (right, bottom), (left, bottom)) doc.selection.select(selection_points) # Perform Content-Aware Fill desc12 = ps.ActionDescriptor() # Fill method using content-aware idFl = ps.app.charIDToTypeID("Fl ") idUsng = ps.app.charIDToTypeID("Usng") idFlCn = ps.app.charIDToTypeID("FlCn") idcontentAware = ps.app.stringIDToTypeID("contentAware") desc12.putEnumerated(idUsng, idFlCn, idcontentAware) # Set opacity to 100% idOpct = ps.app.charIDToTypeID("Opct") idPrc = ps.app.charIDToTypeID("#Prc") desc12.putUnitDouble(idOpct, idPrc, 100.0) # Set blending mode to Normal idMd = ps.app.charIDToTypeID("Md ") idBlnM = ps.app.charIDToTypeID("BlnM") idNrml = ps.app.charIDToTypeID("Nrml") desc12.putEnumerated(idMd, idBlnM, idNrml) # Execute the action ps.app.executeAction(idFl, desc12, ps.DialogModes.DisplayNoDialogs) # Deselect after filling doc.selection.deselect()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to write same function for "deleteAndFillSelection" -- can anybody help me ?
def content_aware_fill(ps, doc, left, top, right, bottom, hull_points):
# Deselect any current selections
doc.selection.deselect()
The text was updated successfully, but these errors were encountered: