I can't get Sketch import to work in Framer Studio. I get this error: Error: Error: Utils.domLoadDataSync: no data was loaded (url not found?). Latest Sketch 3 beta. Any ideas?
can you paste a screenshot of your code?
Actually I haven't coded yet. But after opening a new project and trying to import a Sketch file I get this code and nothing got imported. It happens with several Sketch files test. I have layer groups. Same test with PSD worked perfectly. # This imports all the layers for "test" into testLayerstestLayers = Framer.Importer.load "imported/test"
# So to hide the layer for a group named "Main Screen" you can do:# testLayers["Main Screen"].visible = false
I still can't import Sketch files with Generator, now I have to convert my Sketch design to PSD in order to prototype, very cumbersome. I can position by hand, but that would defeat the purpose. Tried Framer Studio and Generator. Can anyone test this Sketch 3 file with Generator to see if importing works? http://cl.ly/3i242G451I1b
Benny Chew Remove the slices and it works.
I was just able to import it using both Studio and Generator after deleting the slices.
Thanks for the suggestion. Unfortunately after deleting slices and importing it didn't work. Same error. Also tried creating an artboard around it. Weird... (Sketch beta 3.0.4 7976)
I downloaded your file, opened it with Sketch Beta, removed the slices and used Generator without error.
I think the problem is my Sketch installation. Will need to wait for a new version. This is the error I get: Error: ReferenceError: Can't find variable: sketch
YES! Finally it works. I deleted old beta, reinstalled Sketch and reinstalled latest beta. Importing works with Generator, but not with Studio. I'm happy! :)
Importing now also works in Studio in my case. I encountered the problem. The variable name was causing the problem. sketch-framer-testLayers = Framer.Importer.load "imported/sketch-framer-test" So I removed sketch-framer- and it worked! But using Studio it was not perfect, the images have weird files names: 36F7ED19-1C9B-407B-A4ED-8A7DE2267900.png
They're meant to have those names. You don't refer to the PNGs directly, so it doesn't matter what they're named. You reference the layers with Framer by the names you used in Sketch.