no message

This commit is contained in:
leyghisbb 2021-04-30 11:59:52 +02:00
parent b250166459
commit 8da67341bd
1 changed files with 974 additions and 985 deletions

View File

@ -38,17 +38,8 @@ def unittouu(string):
class OutputProBitmap(inkex.EffectExtension):
#def add_arguments(self, pars):
#pars.add_argument("--title")
#pars.add_argument("-n", "--noffset",type=float, default=0.0, help="normal offset")
#pars.add_argument("-t", "--toffset", type=float, default=0.0, help="tangential offset")
#pars.add_argument("-k", "--kind", default=True, help="choose between wave or snake effect")
#pars.add_argument("-c", "--copymode", default=True, help="repeat the path to fit deformer's length")
#pars.add_argument("-p", "--space", type=float, default=0.0)
#pars.add_argument("-v", "--vertical", type=inkex.Boolean, default=False, help="reference path is vertical")
#pars.add_argument("-d", "--duplicate", type=inkex.Boolean, default=False, help="duplicate pattern before deformation")
def effect(self):
try:
with open(os.path.join(os.path.abspath(inkex.utils.get_user_directory() + "/../"), "preferences.xml"), 'r') as f:
inkscape_config = f.read()
@ -61,9 +52,6 @@ class OutputProBitmap(inkex.EffectExtension):
list_of_dct_jpeg = {u'Integer':'int', u'Integer (fast)':'fast', u'Floating point':'float'}
list_of_area_to_export = [_(u"Page"), _(u"Drawing"), _(u"Object")]#, _(u"Área definida")]
#On Windows 7+ -> C:\Windows\System32\spool\drivers\color
#On Linux: /usr/share/color/icc/
if "nt" in os.name:
icc_dir = 'C:\\Windows\\System32\\spool\\drivers\\color'
else:
@ -76,7 +64,6 @@ class OutputProBitmap(inkex.EffectExtension):
rgb_profile = '"' + inkscape_config.split('id="displayprofile"')[1].split('uri="')[1].split('" />')[0] + '"'
#cmyk_profile = '"' + inkscape_config.split('id="softproof"')[1].split('uri="')[1].split('" />')[0] + '"'
list_of_selected_objects = []
for id, node in self.svg.selected.items():
list_of_selected_objects.append(node.get('id'))
@ -1029,9 +1016,11 @@ class OutputProBitmap(inkex.EffectExtension):
app = QtWidgets.QApplication(sys.argv)
app.main = mainWindow()
app.main.show()
dirpathTempFolder.cleanup() #close temp dir
sys.exit(app.exec_())
except Exception as e:
self.msg(e)
finally:
dirpathTempFolder.cleanup() #close temp dir
if __name__ == '__main__':
OutputProBitmap().run()