Skip to content

Commit

Permalink
set instanceDescriptor path on generate
Browse files Browse the repository at this point in the history
fixing #90
  • Loading branch information
typemytype committed May 8, 2024
1 parent 5915118 commit 08885f0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions DesignspaceEditor2.roboFontExt/lib/designspaceEditor/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ class GenerateInstanceSheet:

def __init__(self, parentWindow, operator, instances):
self.operator = operator
# update the path attribute in all given instanceDescriptors
for item in instances:
instanceDescriptor = item["object"]
instanceDescriptor.path = os.path.abspath(os.path.join(os.path.dirname(self.operator.path), instanceDescriptor.filename))

self.instances = instances
self.w = vanilla.Sheet((350, 140), parentWindow=parentWindow)

Expand Down Expand Up @@ -1435,7 +1440,6 @@ def callback(result=True):
else:
callback()


@coalescingDecorator(delay=0.2)
def variableFontsEditorCallback(self, sender):
variableFonts = variableFontsParser.parseVariableFonts(sender.get(), self.operator.writerClass.variableFontDescriptorClass)
Expand Down Expand Up @@ -2000,13 +2004,11 @@ def designspaceEditorInstancesDidChange(self, notification):
else:
self.instances.list.set([self.wrapInstanceDescriptor(instanceDescriptor) for instanceDescriptor in self.operator.instances])



if __name__ == '__main__':
pathForBundle = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
designspaceBundle = ExtensionBundle(path=pathForBundle)

path = "/Users/frederik/Documents/dev/letterror/mutatorSans/MutatorSans.designspace"
# path = "/Users/frederik/Documents/fontsGit/RoboType/RF.designspace"
path = None
# path = None
DesignspaceEditorController(path)

0 comments on commit 08885f0

Please sign in to comment.