Sketch 插件-复制画板

复制画板3.8之前

// MSCanvasActions
var action = doc.actionsController().actionWithName("MSCanvasActions");
// 默认复制artboards中最后一个画板
action.duplicate(nil);
artboards = page.artboards();
复制前,page里的Artboard数组
"<MSArtboardGroup: 0x7fc4a0f51660> 6 (40479CFB-8A05-4C93-9704-384F0345D865)",
"<MSArtboardGroup: 0x7fc4a0f51780> 6+ (F383BFC0-06BA-43F9-9858-2B16ACC4290B)"
复制后,

当选中"6"画板,复制,"6 copy"画板的在artboards数组中紧紧随"6"后:
"<MSArtboardGroup: 0x7fc4a0f51660> 6 (40479CFB-8A05-4C93-9704-384F0345D865)",
"<MSArtboardGroup: 0x7fc4a5a017d0> 6 copy (F2BB6C08-12FE-4C10-8F67-1A3E540B69C1)",
"<MSArtboardGroup: 0x7fc4a0f51780> 6+ (F383BFC0-06BA-43F9-9858-2B16ACC4290B)"

3.8.3之后

复制画板

doc = context.document;
log("controller :" + doc.actionsController);
var actionController = doc.actionsController();
log("actions :" + actionController.allActions());
action = actionController.actionWithID("MSCanvasActions");
action.duplicate(nil);

可以关注一下下面这些acrion, 支持很多功能。日后开发文档也可能会完善:
log("actions :" + actionController.allActions());

16/6/5 下午9:34:02.469 Scale (Sketch Plugin)[32254]: actions :(
    "<MSInsertSliceAction: 0x7f94a700fab0>",
    "<MSTogglePixelGridAction: 0x7f94a70174b0>",
    "<MSAddFillAction: 0x7f94a7018700>",
    "<MSAlignLayersCenterAction: 0x7f94a70085b0>",
    "<MSZoomAction: 0x7f94a7003790>",
    "<MSExportAction: 0x7f94a7017790>",
    "<MSConvertToOutlinesAction: 0x7f94a70160a0>",
    "<MSAlignCenterAction: 0x7f94a7010430>",
    "<MSReplaceImageAction: 0x7f94a7014830>",
    "<MSTriangleShapeAction: 0x7f94a700ffb0>",
    "<MSRotateAction: 0x7f94a7015df0>",
    "<MSLockLayerAction: 0x7f94a7017d40>",
    "<MSFlipHorizontalAction: 0x7f94a70116c0>",
    "<MSInsertImageAction: 0x7f94a700f790>",
    "<MSHideLayerAction: 0x7f94a7017a60>",
    "<MSAddShadowAction: 0x7f94a7009cd0>",
    "<MSBackToInstanceAction: 0x7f94a701e7b0>",
    "<MSUnderlineAction: 0x7f94a700fae0>",
    "<MSInsertLineAction: 0x7f94a700ee60>",
    "<MSAlignLeftAction: 0x7f94a7005870>",
    "<MSSelectAllArtboardsAction: 0x7f94a701ed70>",
    "<MSShowFillOptionsAction: 0x7f94a7015440>",
    "<MSTogglePixelLinesAction: 0x7f94a701f8f0>",
    "<MSToggleLayerHighlightAction: 0x7f94a701feb0>",
    "<MSMoveToFrontAction: 0x7f94a7013f60>",
    "<MSHideAllGridsAndLayoutsAction: 0x7f94a70138c0>",
    "<MSImageOriginalSizeAction: 0x7f94a7007e30>",
    "<MSAddInnerShadowAction: 0x7f94a70190f0>",
    "<MSCloudAction: 0x7f94a701d8f0>",
    "<MSStarShapeAction: 0x7f94a7011970>",
    "<MSPencilAction: 0x7f94a700f180>",
    "<MSIgnoreClippingMaskAction: 0x7f94a7006c40>",
    "<MSInsertTextLayerAction: 0x7f94a700f430>",
    "<MSAlignLayersMiddleAction: 0x7f94a7008a70>",
    "<MSAddBorderAction: 0x7f94a70099c0>",
    "<MSCreateSymbolAction: 0x7f94a7018b00>",
    "<MSClippingMaskAction: 0x7f94a7012180>",
    "<MSToggleGridAction: 0x7f94a7016ef0>",
    "<MSViewMenuAction: 0x7f94a7016930>",
    "<MSBooleanMenuAction: 0x7f94a7010030>",
    "<MSDifferenceAction: 0x7f94a70135a0>",
    "<MSReduceImageSizeAction: 0x7f94a70079c0>",
    "<MSBaseAlignLayersAction: 0x7f94a70081d0>",
    "<MSResizeArtboardToFitAction: 0x7f94a701e2b0>",
    "<MSSpiralShapeAction: 0x7f94a7013940>",
    "<MSToggleBorderAction: 0x7f94a7011250>",
    "<MSToggleArtboardShadowAction: 0x7f94a701f330>",
    "<MSUnionAction: 0x7f94a7012d10>",
    "<MSRoundedRectangleShapeAction: 0x7f94a7010c70>",
    "<MSOvalShapeAction: 0x7f94a700f960>",
    "<MSCanvasActions: 0x7f94a391c760>",
    "<MSNineSliceAction: 0x7f94a70150a0>",
    "<MSToggleFillAction: 0x7f94a7013010>",
    "<MSPolygonShapeAction: 0x7f94a7011690>",
    "<MSSmartRotateAction: 0x7f94a7015860>",
    "<MSEditAction: 0x7f94a7015b40>",
    "<MSTransformAction: 0x7f94a7014dc0>",
    "<MSInsertArrowAction: 0x7f94a7010400>",
    "<MSToggleAlignmentGuidesAction: 0x7f94a701f610>",
    "<MSToggleRulersAction: 0x7f94a7016c10>",
    "<MSRevealInLayerListAction: 0x7f94a70092a0>",
    "<MSMakeUppercaseAction: 0x7f94a70054f0>",
    "<MSInsertMenuAction: 0x7f94a700ec00>",
    "<MSAlignJustifiedAction: 0x7f94a7010ca0>",
    "<MSShowBorderOptionsAction: 0x7f94a701d070>",
    "<MSToggleLayoutAction: 0x7f94a70171d0>",
    "<MSToggleSelectionAction: 0x7f94a701fbd0>",
    "<MSAddExportFormatAction: 0x7f94a701f050>",
    "<MSScaleAction: 0x7f94a7016380>",
    "<MSMoveForwardAction: 0x7f94a7011220>",
    "<MSShapeAction: 0x7f94a70106e0>",
    "<MSAlignLayersLeftAction: 0x7f94a7015b70>",
    "<MSRemoveUnusedStylesAction: 0x7f94a701d350>",
    "<MSSubtractAction: 0x7f94a7012fe0>",
    "<MSJoinAction: 0x7f94a7007670>",
    "<MSInsertArtboardAction: 0x7f94a700fd90>",
    "<MSToolsMenuAction: 0x7f94a7014ae0>",
    "<MSFlattenAction: 0x7f94a70128d0>",
    "<MSAlignLayersBottomAction: 0x7f94a7016f20>",
    "<MSIntersectAction: 0x7f94a70132c0>",
    "<MSPrintAction: 0x7f94a3916c20>",
    "<MSBaseStyleAction: 0x7f94a7009640>",
    "<MSInsertVectorAction: 0x7f94a700eea0>",
    "<MSCollapseAllGroupsAction: 0x7f94a70177c0>",
    "<MSCreateSharedStyleAction: 0x7f94a7018de0>",
    "<MSMakeGridAction: 0x7f94a7005040>",
    "<MSDistributeVerticallyAction: 0x7f94a7014800>",
    "<MSTextOnPathAction: 0x7f94a7007000>",
    "<MSTogglePresentationModeAction: 0x7f94a7013880>",
    "<MSFlattenSelectionAction: 0x7f94a70183f0>",
    "<MSInsertSymbolAction: 0x7f94a7011c50>",
    "<MSAlignLayersTopAction: 0x7f94a7008930>",
    "<MSUngroupAction: 0x7f94a70125f0>",
    "<MSAlignLayersRightAction: 0x7f94a70163b0>",
    "<MSInsertSharedTextAction: 0x7f94a7012150>",
    "<MSRectangleShapeAction: 0x7f94a7010990>",
    "<MSClosePathAction: 0x7f94a7012900>",
    "<MSDetachSybolInstancesAction: 0x7f94a701ea90>",
    "<MSSyncSharedStyleAction: 0x7f94a70190c0>",
    "<MSMakeLowercaseAction: 0x7f94a700f1b0>",
    "<MSRoundToPixelAction: 0x7f94a70186d0>",
    "<MSAutoExpandGroupsAction: 0x7f94a7008ec0>",
    "<MSMoveBackwardAction: 0x7f94a70112d0>",
    "<MSSaveAsTemplateAction: 0x7f94a70060c0>",
    "<MSMirrorAction: 0x7f94a701d630>",
    "<MSResetSharedStyleAction: 0x7f94a70193a0>",
    "<MSMaskWithShapeAction: 0x7f94a7016650>",
    "<MSResetBooleanAction: 0x7f94a7015380>",
    "<MSClippingMaskModeAction: 0x7f94a70068f0>",
    "<MSGroupAction: 0x7f94a7012320>",
    "<MSFlipVerticalAction: 0x7f94a7006510>",
    "<MSScissorsAction: 0x7f94a7012a10>",
    "<MSAlignRightAction: 0x7f94a7005d00>",
    "<MSMoveToBackAction: 0x7f94a7014240>",
    "<MSDistributeHorizontallyAction: 0x7f94a7014520>",
    "<MSSplitAction: 0x7f94a70077d0>"
)

Sketch 3.8.3最新的头文件

自己写的一个插件:https://github.com/sueLan/ArtMold

时间: 2024-10-30 18:54:59

Sketch 插件-复制画板的相关文章

Sketch 插件介绍:Style Inventory(样式清单)

译者最近在做一个比较大的设计项目,才开始系统接触设计规范相关的内容,根据项目也需要生成一套样式清单供其他设计同事和研发团队使用.看到这款 Sketch 插件后发现有几个功能比较实用,比如能够一键汇总.导出所有项目/画板中所用到的颜色.字体样式信息.因此简单翻译了一下本插件开源地址的 Readme,希望有需要的朋友可以参考,原文地址如下:getflourish/Sketch-Style-Inventory · GitHub 注:原文页中有 gif 动图,因为专栏不支持动图显示,所以只截取了一帧,如

让你设计效率疾速提升的免费SKETCH插件

  尽管Bohemian Coding团队一直在尽力更新提高Sketch的易用性,完善功能和特性,但依然无法满足设计师和开发者的全部需求和愿望.好在开发者社区並沒有坐以待毙,而是积极地开始为Sketch开发各种各样地插件. 有些开发者打算用自己开发的插件替代系统预制的组件,旨在让GUI.图标和原型地设计拥有更大地定制空间,还有一些开发者则选择试图开发出提高工作效率,完善工作流程地组件,解决各种尚未完善地问题.如果你打算借助Sketch从零开始设计一个项目,那么下面介绍地许多插件和工具应该能给你极

25款轻巧实用的SKETCH插件大合集

  Sketch绝对是除了PS和AI之外在Mac 平台上最热门的设计工具,它更新迅速,功能完备,并且非常契合目前对于UI设计的需求,最重要的是,Sketch 小巧灵便不臃肿,还具有相当强大的可拓展性. Sketch 的优秀之处就是从它的可拓展性上延展开的,围绕着它的不仅有大量的设计师,还有一个活跃的开发者社群,许多优秀的免费插件都由此诞生.这些来自开发者社群的优秀插件从各个不同的角度完善.强化了Sketch的功能,让设计项目可以更加快速高效的完成.当然,在下载这些免费插件之前,请先装上Sketc

关于jquery.zclip.js 插件 复制剪切板的应用

问题描述 关于jquery.zclip.js 插件 复制剪切板的应用 3C 我在网上下了一个jquery.zclip.js包 放在我的项目中 在绑定zclip 按钮直接就死掉了 点击无效 解决方案 jquery导入没有,swf路径是否配置正确jquery.zclip.js API

chrome-jquery插件复制剪切板无效

问题描述 jquery插件复制剪切板无效 想实现单击复制链接操作,用了jquery,zclip插件,但是在网上看到 的例子也有不好用,想问一下是浏览器没有安装插件还是安全设置 等问题,或者有什么具体的解决方案么

带你了解超好用的SKETCH插件

  通过上两节的文章,大家可能已经对sketch这款软件的基本操作有了一个大概的了解.但很多朋友可能会有疑惑,"好像sketch的功能也没有那么强大啊?""也就是个普通的矢量绘图软件吧?" 恩,你错了,因为你忽略掉了一件东西-插件. 插件是让sketch保持强大的独门绝技,很多软件看起来不支持的功能,通过插件都可以实现,大大提高工作效率. 下面,静电来介绍下sketch常用的,受大家欢迎的插件. 一.安装插件的方法 sketch有两种插件安装的方法,一种是传统的安装

Sketch插件-Symbol符号的处理

Sketch3.7之前 符号是 Sketch 3 里一个重要的新功能,有些设计师又叫它模版,它功能确实像模版,你只要设计一组元素,并设置为 symbol,就能方便地在多个页面和画板中重复运用该组内容.你在某个画板中改变symbol某个元素的,其他各画板.页面的同组对应元素都会跟着改变. 符号其实就是一种特殊的组,在图层列表中也是以组的形式出现,但是不同于普通的组的蓝色图标,符号会有一个紫色的文件夹图标. Paste_Image.png 如何判断对象是否被设置了符号属性 在MSLayerGroup

jquery使用jquery.zclip插件复制对象的实例教程_jquery

复制代码 代码如下: <script type="text/javascript" src="js/jquery.js"></script><script type="text/javascript" src="js/jquery.zclip.min.js"></script> 复制代码 代码如下: $(function(){    $('#copy_input').zclip(

一份超详细的SKETCH GIT插件使用指南

  设计师的版本控制:Sketch的 Git 插件使用案例 温馨提示: 本次案例的项目已经公开啦,http://cloud.yuanchenhao.com:30000/stevenyuan/sketch Git . Git ,各位可以前往我的自建 Gitlab查看每一步的对比,不过服务器建在我香港学校的寝室里,访问速度可能较为一般,还请海涵.如果有想要实践的有问题可以加我微信804933158一起探讨~感谢! 最近自己一直在进行UI设计的学习,主要使用的软件是Sketch,很多时候在参考前辈们的