sureskumar / sketch-isometric

Generate Isometric and 3D Rotation views from Artboards and Rectangles in Sketch app.
1.64k stars 64 forks source link

not working on sketch 50 #25

Closed bukinoshita closed 6 years ago

bukinoshita commented 6 years ago

I'm using sketch version 50, would like to know if it works on v50. I try to generate the isometric but nothing happens.

frankieGP commented 6 years ago

2nd that. Same issue.

dH3s1 commented 6 years ago

Yes this definitely isn't generating anything in sketch v50. Hopefully this can be resolved soon. Thanks.

sureskumar commented 6 years ago

I will look into this today or tomorrow. Sorry for the delay guys!

sureskumar commented 6 years ago

@gokul0 Looks like this part of the code is not working in Sketch v50.

var path = NSBezierPath.bezierPath(); path.moveToPoint(NSMakePoint(x1, y1)); path.lineToPoint(NSMakePoint(x4, y4)); path.closePath(); var shape = MSShapeGroup.shapeWithBezierPath(path); var border = shape.style().addStylePartOfType(0);

If you have time, can you please look into this? Cheers!

gokulanv commented 6 years ago

Ok sures, I ll look into it this week.

sureskumar commented 6 years ago

@gokul0 The error I am getting is -[NSBezierPath transformedPathUsingAffineTransform:]: unrecognized selector sent to instance 0x600000321a40

Any clue how to fix this?

gokulanv commented 6 years ago

From what I just saw, I think it pops up because we call a method that does not exist on the object. Will have to look into it. We may need to check if

bezierPath()

Function exists on the object in the first place

sureskumar commented 6 years ago

Thanks Gokul. The bug is now fixed in the latest version. Sorry for the inconvenience guys!

gokulanv commented 6 years ago

@sureskumar What was the issue?

sureskumar commented 6 years ago

Replacing this var shape = MSShapeGroup.shapeWithBezierPath(path); with this

var newBezier = MSPath.pathWithBezierPath(path);
var shape = MSShapeGroup.shapeWithBezierPath(newBezier);

solved it :)

gokulanv commented 6 years ago

I saw that in the commit. But why did we have to make this change? The old method invocation of

bezierPath ()

on the

NSBezierPath

object was removed or deprecated?

sureskumar commented 6 years ago

To be honest, I dont understand code in that level of depth :) I saw another plugin working in sketch 50 using this and I tried it :)

gokulanv commented 6 years ago

No probs, why is this now reopened?

bukinoshita commented 6 years ago

tried latest version and it's working, I'm going to close this. Thanks

leonardofed commented 6 years ago

Can't make this work with Sketch 49. Any updates?