From def10fa4cda773972b84e5d13f406814bfe29f7d Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Sat, 13 Feb 2016 17:20:56 +0100 Subject: [PATCH] Button to select groups from a selected layer #14 --- Dugr.jsx | 120 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 85 insertions(+), 35 deletions(-) diff --git a/Dugr.jsx b/Dugr.jsx index 348e88e..68ebdf0 100644 --- a/Dugr.jsx +++ b/Dugr.jsx @@ -116,10 +116,12 @@ along with Dugr. If not, see . scriptMng.files["/exit_o.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x16\x00\x00\x00\x16\b\x03\x00\x00\x00\u00F3j\u009C\t\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03viTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 \u00BB\x10\u00A7H\x00\x00\x00\x06PLTE\u00FF\u0086\u0086\u00FF\u00FF\u00FF\u00B7\u0089\u0098\u00C4\x00\x00\x00\x02tRNS\u00FF\x00\u00E5\u00B70J\x00\x00\x00CIDATx\u00DA\u009C\u0091\u00C9\x11\x000\b\x02\u00D7\u00FE\u009B\u00CE7\u009A\u008D9\u00FC\u00C1\u008C\u0080H\u00E8\u00F0L\u00B3\u00A1X\u00F6\u00A9R\u0089\u00A0x\u00D1\u00C2j\u00C2,\u008A\u00E5\u0086\u00B8\u00A7]\u00C4-\u00FB\u00BC\x19\u00FB\u00F1^\x15\u00C7\u00AE\u00FF\u009E6\x04\x18\x00\u00C0\u00BD\x01\u00C5\u00B9\u009Cp\u0087\x00\x00\x00\x00IEND\u00AEB`\u0082"; scriptMng.files["/frameBlending.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\b\x06\x00\x00\x00\x1F\u00F3\u00FFa\x00\x00\x00\tpHYs\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\u009A\u009C\x18\x00\x009\u00C2iTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00\n\n \n \n xmp.did:7610C58C566611E583F7E1E52CC47E97\n xmp.iid:19c9bb0b-abe9-a449-913a-da71421075bf\n \n adobe:docid:photoshop:acc9d240-5665-11e5-b12d-e0622a3347a3\n adobe:docid:photoshop:acc9d240-5665-11e5-b12d-e0622a3347a3\n \n xmp.did:7610C58C566611E583F7E1E52CC47E97\n \n \n \n saved\n xmp.iid:19c9bb0b-abe9-a449-913a-da71421075bf\n 2015-09-08T22:39:04+02:00\n Adobe Photoshop CC 2015 (Windows)\n /\n \n \n \n Adobe Photoshop CC 2015 (Windows)\n 2015-09-08T22:16:17+02:00\n 2015-09-08T22:39:04+02:00\n 2015-09-08T22:39:04+02:00\n image/png\n 3\n 1\n 720000/10000\n 720000/10000\n 2\n 65535\n 16\n 16\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\u0082\u00AC\u00D0\u00CC\x00\x00\x00 cHRM\x00\x00z%\x00\x00\u0080\u0083\x00\x00\u00F9\u00FF\x00\x00\u0080\u00E9\x00\x00u0\x00\x00\u00EA`\x00\x00:\u0098\x00\x00\x17o\u0092_\u00C5F\x00\x00\x018IDATx\u00DA\u00C4\u0093\u00B1j\u0083P\x14\u0086\u00FF\u0094\x0E}\u0085:\u0086N\u00A1\x19|\x00g\x1F\u00C0\u00C1A\u009C\f\u00CE\x1D\u00C4\u00A5[\u00E9R\x112D$H\x02\x01\u00A7PB]\u00F2\x06}\u0084\u0092\u00A9\u00B3\u00A8\u008F\u0090{\u00CEM\u00974xcJ\x02\x19z\u00E0,\u00F7\u00E7\u00FF9\u00E7;\u00DC\u00DEn\u00B7\u00C35u\u0083+\u00EB\u00F6\u00F8A\u00D3\u00B4\u0087K\u008CeY~\u009F\fX\u00AF\u00D7\x1F\x00\x1E\u00CF\u00F8\u00BF\x00\f\u0095\u0080~\u00BF\x7F/\u0084\u00B8+\u008A\u0082-\u00CB\u00C2j\u00B5B\x1C\u00C7\u008A+\b\x02\u00EC5\u00EE\u00AC\x10\u0086\u00E1SUU!\x11a\u00B9\\\u0082\u0088 \u0084P\x02Z\u009A\u00E8@\u0094Rr\u0092$`f\u00D8\u00B6\rf\x06\x11)\u00DD\u00D2\x0E\x13\u00F4~\u00CF8\u0099L^\u00EB\u00BA~6M\u00F3\x12\u0086\u009F\u0086a\x18\u009D\t\u00A6\u00D3)\u0088\b\u00AE\u00EB\u0082\u0088\u0090\u00A6\u00A9\u00D2-m\u00DBa\u00C0\u00CC\u00DB\u00D1h\x04)%\u00E6\u00F39\u00A4\u0094\x1D\x06-\u008DO1\u0090\u00B3\u00D9\f\u00CC\f\u00CF\u00F3\u00FEd\u00B0\u00D7d\u0087A\x14Ea\u00D34o\u008E\u00E3\u009C\u00BB?\x00@\u00D7\u00F5\u00E1\u00F1\n\u00BCX,\u00C0\u00CC\u00D8l6\u008Ak0\x18 \u00CFs\u00B8\u00AE\u00FB2\x1E\u008F\u00DF\u00DB\u00DAa\u0082,\u00CB\u00E2K\u00F0\u00FB\u00BE\x1F\u009C\f\u00F8\u00B7\u00DF\u00F83\x00\u00BA\u00D2\u00DB{\u00ADw\x00\u00F1\x00\x00\x00\x00IEND\u00AEB`\u0082"; scriptMng.files["/frameBlending_o.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\b\x06\x00\x00\x00\x1F\u00F3\u00FFa\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03niTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 uP\u00F3\u0080\x00\x00\x00\x7FIDATx\u00DAb\u00FC\u00FF\u00FF?\x03%\u0080\u0089\u0081B\u00C0\x02g\u00B9\u00BA\u00C2X*D\u00E9\u00DC\u00BD\u00FB\x0E\u00AA\x01\b\u00B0\x1E\u0088u\bh\u00BF\x02\u00C4\u00BA\u00E8\x06H\x021\x07\x10\u00FF%\u00C2\u00FE\u00BF\u00D8\u00C2\u00A0\x00\u0088\u00EF\x01\u00B1>\x11\x06\u00FC\u00C6f\u00C0_\x12\u00C2\x0E\u00AB\x0B\u00FE\u0091`\x00\u00C5.\u00F8\u0085\u00CD\u0080_\u00F4\u00F4\u00C2?\u00CC\u0084D\u009C\x17\u00AE@iir\rh\x02\u00E2\u00D5\u00D8\u00932$!\u00F5\x120\u00C0\x1C\u00DD\x00\u00C6\x01\u00CF\u008D\x00\x01\x06\x00t2\x1F\x0F\u00DA\u00FA\u00CD\u0094\x00\x00\x00\x00IEND\u00AEB`\u0082"; + scriptMng.files["/get.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x16\x00\x00\x00\x16\b\x06\x00\x00\x00\u00C4\u00B4l;\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03viTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 \x10\u0099\u00A5;\x00\x00\x00\u00E3IDATx\u00DAb\u00FC\u00FF\u00FF?\x03-\x00\x0B\u00B9\x1A\x0Bw2 \u00BB\u0088\u00B1\u00DF\x1DU\u009E\u0089\x02C\x19\u0091\u00F0\x7F\u00A0\x18\u00E5\x06\x13\x15\x14\u00E86a\x01\u00BF\u0081\u00F8=\x10\u008B\u0082\u00D4\x03\u00BD\u00FC\x17\u00EAJ\x06\u0090\u00F7\u0091\\Or\x18\u0083\u00D4\u0088\x11\b\x12\f\u00C0DF\u00F8b\x05\u00E8\u0091\u0087\u00EE\u00E2: \u00FE\u008EE_)\x1A\u009F\x13\u0088\u009B\u0080\u00861\u00C2,\x03\u00B9\x1E\u00C6\u00C7f0\u00C8\x07\u00DDhb]X\u00C4\x1A\b\x05\x05\u00C8`G \u00FE\x03\u00E5\u00CB\x01\u00B1-\x16u\u00B6P\u00B5\u00FB\u00D1\u00C4\x19\u00F1E\fH\u00F20\u0094\u00EF\u008C\u00C4F\x06 1'R\u00E2\u0082f\u00E9x\u00E8\x19Ll!t\x15\u0088\u00B9\u0081\u00F8+\u0094\x0F\u00CA\u0085\u00A1\u0094\x1A\f\u008ByP\u00E4\u00EDCJn\r\u0083&(\u00B2q\u00A8U\x03bMr\r\u00C6\u00E7=\u00E4\u00A0 \u00DA`sj\x07\x05#\u00AD\u00EA<\u009AE\x1E@\u0080\x01\x00&\u00AB1\u00B2\u00D3\x16\u00CDz\x00\x00\x00\x00IEND\u00AEB`\u0082"; + scriptMng.files["/get_o.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x16\x00\x00\x00\x16\b\x06\x00\x00\x00\u00C4\u00B4l;\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03viTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 \u0091\x05}e\x00\x00\x00\u00E3IDATx\u00DAb\u00FC\u00FF\u00FF?\x03-\x00\x0B\u00D9:\u00DB\u00DB\u0091]\u00C4\u00C8PY\u0089\"\u00CDD\u0081\u00A1\u008CH\u00F8?P\u008C\n\x06\x13\x15\x14h6a\x01\u00BF\u0081\u00F8=\x10\u008B\u0082\u00D5WV\u00FE\u0085\u00BA\u0092\x01\u00EC}\u0084\u00EBI\x0Ec\u0090\x1A1\x02A\u0082\x01\u0098\u00C8\b_\u00EC\u00E2h\u0091\u0087\u00EE\u00E2: \u00FE\u008EE[)\x1A\u009F\x13\u0088\u009B\u0080\u00861\u00C2-\x03\u00B9\x1E\u00C6\u00C7b0\u00C8\x07\u00DDhb]X\u00C4\x1A\b\x05\x05\u00C8`G \u00FE\x03\u00E5\u00CB\x01\u00B1-\x16u\u00B6P\u00B5\u00FB\u00D1\u00C4\x19\u00F1E\fH\u00F20\u0094\u00EF\u008C\u00C4F\x06 1'R\u00A2\u0082f\u00E9x\u00E8\x19Ll!t\x15\u0088\u00B9\u0081\u00F8+\u0094\x0F\u00CA\u0085\u00A1\u0094\x1A\f\u008ByP\u00E4\u00EDCJn\r\u0083&(\u00B2q\u00A8U\x03bMr\r\u00C6\u00E7=\u00E4\u00A0 \u00DA`sj\x07\x05#\u00AD\u00EA<\u009AE\x1E@\u0080\x01\x00vJ1B\x1B\x0E\u00D1f\x00\x00\x00\x00IEND\u00AEB`\u0082"; scriptMng.files["/guide.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\b\x06\x00\x00\x00\x1F\u00F3\u00FFa\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03niTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 \x10b\"f\x00\x00\x00LIDATx\u00DAb\u00FC\u00FF\u00FF?\x03%\u0080\u0089\u0081B@\x1B\x03\u00A6L\u0099\u00F2\u009F\x181\u00AA\u00B8\u0080\x119\x10q\u00D9\u0082\x0Errr\x18\u00E1\x1C\u0090\x01\u00E8x\u00F2\u00E4\u00C9\u00FF\u0089\x11\x03\u00E1A\x1A\x0B\u00C3 \x10\u00D5\u00D4\u00D4\u0088\x12\u00C3\u00F0\u00C2\u00D0\u008C\x05\u0080\x00\x03\x009\u00E8x\u00F3D\b\u0082\u00DE\x00\x00\x00\x00IEND\u00AEB`\u0082"; scriptMng.files["/guide_o.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\b\x06\x00\x00\x00\x1F\u00F3\u00FFa\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03niTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 .)+E\x00\x00\x00CIDATx\u00DAb\u00FC\u00FF\u00FF?\x03%\u0080\u0089\u0081B@\u00B1\x01,( \u0085\u00AC]!\x00\x00\x00\x0FPLTE\u00FE\u00FE\u00FF\u00FD\u00FE\u00FF\u00F9\u00FC\u00FFp\u00B8\u00FF\u00FF\u00FF\u00FF`\u0096t\u00E9\x00\x00\x00\x05tRNS\u00FF\u00FF\u00FF\u00FF\x00\u00FB\u00B6\x0ES\x00\x00\x00CIDATx\u00DAb`\u00C1\n\x18\u00A8&\u00CC\u008C\x02\x10\u00C2H\u00EA\u00B0\x0B3\u00B3\u00A0\b#L ^\u0098\t\u00AB0\x0B#6a \x0F\u008B0\x0BVa\x16\x18\u008B\u00B0KP<\u0084\b\x13\x16\u00EC\u00C2X\u0083\u008AF\u00B1\x03\x10`\x00\x05\u00E2\x07\x1B\x0B\x0B\b\u008F\x00\x00\x00\x00IEND\u00AEB`\u0082"; - scriptMng.files["/invert_o.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x16\x00\x00\x00\x16\b\x03\x00\x00\x00\u00F3j\u009C\t\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03viTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 c\x1FCz\x00\x00\x00\fPLTE\u00FF\u00FE\u00FE\u00FF\u00FA\u00FA\u00FF\u0086\u0086\u00FF\u00FF\u00FF#\u00C4\u00F6\u00E6\x00\x00\x00\x04tRNS\u00FF\u00FF\u00FF\x00@*\u00A9\u00F4\x00\x00\x00CIDATx\u00DAb`\u00C6\n\x18\u00A8&\u00CC\u0084\x02\x10\u00C2H\u00EA\u00B0\x0B31\u00A3\b#L ^\u0098\x11\u00AB03\x036af\u00AC\u00C2\u00CCX\u0085\u0099a,\u00C2.A\u00F1\x10\"L\u0098\u00B1\x0Bc\r*\x1A\u00C5\x0E@\u0080\x01\x00)7\x059\u00C2\x10\x15\u00F4\x00\x00\x00\x00IEND\u00AEB`\u0082"; + scriptMng.files["/invert.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x16\x00\x00\x00\x16\b\x06\x00\x00\x00\u00C4\u00B4l;\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03viTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 \u00BArS_\x00\x00\x00vIDATx\u00DAb\u00FC\u00FF\u00FF?\x03-\x00\x13\x03\u008D\u00C0\u00D03\u0098\x05]\u00A0p'\x03Y\u0081\u00DE\u00EF\u00CE\u00C0\u0088\u00D7`(`$\u00C1\u00CC\u00FF\u00B4\b\u008A\u00FF\u00B8\x1C\u00C1B\u008Ek\u00D0\u00BD\x0F\f\u00BEA\u009E*\u00D0#\u008AZ\x063\u00D2\u00C2\u00C5\u008C\u00B4\b\nF\u008A2\b.C\u0081\u00E1\u00CA@\x0B\u0083\u00FFcKR\u00E4\x1A\u00FC\u009FT\u00EF\x13c0Q\u0086\u00E2\u00F3\x05\x0B\u00B9\u00B9\u008E`\u00A4\u008C\u00D6 47\x18 \u00C0\x00#h\x168 J6\x1A\u00FA\x00\x00\x00pIDATx\u00DA\u00EC\u0095\u00C1\x0E\u0080 \fC\u00A9\u00D9O\u00EF\x0B\u00F6\u00D9\u00E5\u00E0M\x04a\u00DAD\x13{\u00E4\u00F0\u00D2v[\x00\u00C9\u00A2\u00D0VD\u00FA\x1E\u00D8\u009A\u0097\u0088\\\u00E9\u00EE\x18\u0083wa\x01IE\x15\u00EC\u0099\u00B0\u008C\u009B&~\u00C4\u00DB\u00B7\u00E20\u00A8\u00A7\u00C0P8\u0086\u00A2\n\u00DC;\u0090\x1E\u00D4\u00BD(\u00C0<[\u00A9,\u0098\u00AB\u00F1g\u00C0s\u00D0A\nK_\u00DD\u00D5P\u00FE\x1FD\x0E\u00AE\x02\f\x00d\u00E8\x168G\u00F4\u00C0\u009D\x00\x00\x00\x00IEND\u00AEB`\u0082"; scriptMng.files["/isolate.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x14\x00\x00\x00\x14\b\x06\x00\x00\x00\u008D\u0089\x1D\r\x00\x00\x00\x04gAMA\x00\x00\u00B1\u008F\x0B\u00FCa\x05\x00\x00\x00 cHRM\x00\x00z&\x00\x00\u0080\u0084\x00\x00\u00FA\x00\x00\x00\u0080\u00E8\x00\x00u0\x00\x00\u00EA`\x00\x00:\u0098\x00\x00\x17p\u009C\u00BAQ<\x00\x00\x00\x06bKGD\x00\x00\x00\x00\x00\x00\u00F9C\u00BB\x7F\x00\x00\x00\tpHYs\x00\x00.#\x00\x00.#\x01x\u00A5?v\x00\x00\x00WIDAT8\u00CBc(\u00D8\u00F1\u00FF?\x03\u0095\x00\u00DC,j\x18\u008Aa\x06%\u0086\u00E2\u00D4K\u008E\u00A1\u00D4\f2\u00AC\u0080\u0091\x12['x02\x12\u00A3\u008E(\x03q\u00A9a\u00A2\u00B6\u0097G\r\x1C\t\x06\u00B2\u00E0\x10\u00FFO\u00F3,E\x16 \u00D5Ux\u00D5\u0093\u00EBE\u00AC\u00FA(\r/\x14\u00FD\u00D4\n|\u00989\x00\u00A7n@\u00E5\u00941V\u00B6\x00\x00\x00\x00IEND\u00AEB`\u0082"; scriptMng.files["/isolate_o.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x16\x00\x00\x00\x16\b\x03\x00\x00\x00\u00F3j\u009C\t\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\u00C9e<\x00\x00\x03viTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00 ?\x01\u00E1L\x00\x00\x00\x06PLTE\u00FF\u0086\u0086\u00FF\u00FF\u00FF\u00B7\u0089\u0098\u00C4\x00\x00\x00\x02tRNS\u00FF\x00\u00E5\u00B70J\x00\x00\x00CIDATx\u00DA\u00D4\u00D1a\n\x00 \b\u0083\u00D1\u00CF\u00FB_\u00BA0\bs\u00F3\x00\u00CD\x7F\u008F\b\u009C\u0084\r{<\u00A2\u009A\u0086\u00E8!\u00BA\u00BA\u009F\x0Bs\u00F3r\x7F\u00F6\x0B\u00FBu\u00EC\u00F2H\x1BZ,\u00A5r\u00ED\u009B\x18\u00AEc\u00B2\x04\x18\x00\u00AC\u00F5\x01\u00B1\u00C93\u008A\u0085\x00\x00\x00\x00IEND\u00AEB`\u0082"; scriptMng.files["/locked.png"] = "\u0089PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\b\x06\x00\x00\x00\x1F\u00F3\u00FFa\x00\x00\x00\tpHYs\x00\x00\x0B\x13\x00\x00\x0B\x13\x01\x00\u009A\u009C\x18\x00\x009\u00C2iTXtXML:com.adobe.xmp\x00\x00\x00\x00\x00\n\n \n \n xmp.did:F2839DFF566511E582A483D83E8DDDDD\n xmp.iid:ee38b5ee-6b49-a54a-847d-73cb84dd7045\n \n adobe:docid:photoshop:acc9d240-5665-11e5-b12d-e0622a3347a3\n adobe:docid:photoshop:acc9d240-5665-11e5-b12d-e0622a3347a3\n \n xmp.did:F2839DFF566511E582A483D83E8DDDDD\n \n \n \n saved\n xmp.iid:ee38b5ee-6b49-a54a-847d-73cb84dd7045\n 2015-09-08T22:38:57+02:00\n Adobe Photoshop CC 2015 (Windows)\n /\n \n \n \n Adobe Photoshop CC 2015 (Windows)\n 2015-09-08T22:12:36+02:00\n 2015-09-08T22:38:57+02:00\n 2015-09-08T22:38:57+02:00\n image/png\n 3\n 1\n 720000/10000\n 720000/10000\n 2\n 65535\n 16\n 16\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nY\u008B\u00C8\x13\x00\x00\x00 cHRM\x00\x00z%\x00\x00\u0080\u0083\x00\x00\u00F9\u00FF\x00\x00\u0080\u00E9\x00\x00u0\x00\x00\u00EA`\x00\x00:\u0098\x00\x00\x17o\u0092_\u00C5F\x00\x00\x01. return true; } + function findGroups(layrs) + { + var layers = []; + if (layrs instanceof LayerCollection) + { + for (var i = 1;i<=layrs.length;i++) + { + layers.push(layrs[i]); + } + } + else layers = layrs; + + var groupsFound = []; + var re = /\|[^\|\n\r]+\| /g; + for (var i=0;i. var comp = app.project.activeItem; if (!(comp instanceof CompItem)) { - alert("No active composition."); + //alert("No active composition."); return; } @@ -613,7 +656,7 @@ along with Dugr. If not, see . var comp = app.project.activeItem; if (!(comp instanceof CompItem)) { - alert("No active composition."); + //alert("No active composition."); return; } @@ -673,7 +716,7 @@ along with Dugr. If not, see . var comp = app.project.activeItem; if (!(comp instanceof CompItem)) { - alert("No active composition."); + //alert("No active composition."); return; } @@ -738,7 +781,7 @@ along with Dugr. If not, see . var comp = app.project.activeItem; if (!(comp instanceof CompItem)) { - alert("No active composition."); + //alert("No active composition."); return; } @@ -870,36 +913,12 @@ along with Dugr. If not, see . if (!(comp instanceof CompItem)) return; //regexp to find groups - var re = /\|[^\|\n\r]+\| /g; - var groupsFound = []; - for (var i=1;i<=comp.numLayers;i++) - { - var layer = comp.layer(i); - var groups = layer.comment.match(re); - if (!groups) continue; - - for (var j=0;j. app.endUndoGroup(); } + function getFromLayerButtonClicked() + { + var comp = app.project.activeItem; + if (!(comp instanceof CompItem)) + { + alert("Please select the layer(s) from which you want to get existing groups"); + return; + } + + + var groupsFound = findGroups(comp.selectedLayers); + + //unselect previsously selected groups + groupsList.selection = null; + //select groups + for (var i = 0;i. dynamicPanel.hide(); customPanel.show(); settingsPanel.hide(); - refresh(); + refresh(true); } function settingsButtonClicked() @@ -1815,7 +1862,10 @@ along with Dugr. If not, see . addLayerButton.size = [22,22]; var removeLayerButton = addImageButton(bottomButtons2,'',imgFolder + 'remove.png',"Remove selected layers from selected groups",imgFolder + 'remove_o.png'); removeLayerButton.onClick = removeLayersFromGroups; - removeLayerButton.size = [22,22]; + removeLayerButton.size = [22,22]; + var getFromLayerButton = addImageButton(bottomButtons2,'',imgFolder + 'get.png',"Get groups from selected layers",imgFolder + 'get_o.png'); + getFromLayerButton.size = [22,22]; + getFromLayerButton.onClick = getFromLayerButtonClicked; var nameEdit = customPanel.add('edittext',undefined,"New group..."); nameEdit.alignment = ['fill','bottom'];