{"id":870,"date":"2013-08-21T12:45:17","date_gmt":"2013-08-21T05:45:17","guid":{"rendered":"http:\/\/blog.bebensiganteng.com\/?p=870"},"modified":"2016-05-18T09:26:38","modified_gmt":"2016-05-18T09:26:38","slug":"photoshop-script","status":"publish","type":"post","link":"https:\/\/rahmat-hidayat.com\/?p=870","title":{"rendered":"Photoshop Script"},"content":{"rendered":"<p>Just a bit of intermezzo, I&#8217;ve built a photoshop script that&#8217;ll detect the position of an object and store it in JSON.<\/p>\n<h5>How to do it<\/h5>\n<p><em>1. First, arrange your objects like so;<\/em><\/p>\n<p><a href=\"http:\/\/imgur.com\/AEke0Bo\"><img decoding=\"async\" src=\"http:\/\/i.imgur.com\/AEke0Bo.png\" title=\"Hosted by imgur.com\" \/><\/a><\/p>\n<p>Notice the naming convention. <\/p>\n<p>The object you want to retrieve its position from, is nested inside a folder which has its name appended with &#8220;@&#8221;, this concept was taken from <a href=\"http:\/\/www.cutandslice.me\/\" title=\"http:\/\/www.cutandslice.me\/\">cutandslice<\/a>.<\/p>\n<p><em>2. Run the script.<\/em><br \/>\n<script src=\"https:\/\/gist.github.com\/bebensiganteng\/6182956.js\"><\/script><\/p>\n<p>and it&#8217;ll churn a JSON like below;<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n{\r\n\t&quot;stage&quot;: {\r\n\t\t&quot;item1&quot;: {\r\n\t\t\t&quot;x&quot;: 277,\r\n\t\t\t&quot;y&quot;: 618,\r\n\t\t\t&quot;width&quot;: 287,\r\n\t\t\t&quot;height&quot;: 646\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<p>So if your job involves endless toiling with Photoshop, then script automation will extremely optimize your flow work and you can use the ubiquitous Javascript! I swear you can&#8217;t do any coding without bumping with Javascript now a days. <\/p>\n<p>Smart example is of course <a href=\"http:\/\/www.cutandslice.me\/\" title=\"http:\/\/www.cutandslice.me\/\">cutandslice<\/a>, it has become an inseparable tools for me.<\/p>\n<p>If you&#8217;d like to make it your own, start from <a href=\"http:\/\/creativedroplets.com\/\" title=\"http:\/\/creativedroplets.com\/\">Michael Chaize&#8217;s <\/a>tutorial below;<\/p>\n<p><iframe loading=\"lazy\" width=\"425\" height=\"239\" src=\"\/\/www.youtube.com\/embed\/ajYxgkAoLBU\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<h5>Tested on<\/h5>\n<p>&#8211; Adobe Photoshop CS6<br \/>\n&#8211; Mac OSX 10.8.4<\/p>\n<h5>Resource<\/h5>\n<p>&#8211; <a href=\"https:\/\/gist.github.com\/bebensiganteng\/6182956\" title=\"https:\/\/gist.github.com\/bebensiganteng\/6182956\">Source file<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just a bit of intermezzo, I&#8217;ve built a photoshop script that&#8217;ll detect the position of an object and store it in JSON. How to do it 1. First, arrange your objects like so; Notice the naming convention. The object you want to retrieve its position from, is nested inside a folder which has its name [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[23,36,48],"tags":[113,131],"_links":{"self":[{"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=\/wp\/v2\/posts\/870"}],"collection":[{"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=870"}],"version-history":[{"count":4,"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=\/wp\/v2\/posts\/870\/revisions"}],"predecessor-version":[{"id":1742,"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=\/wp\/v2\/posts\/870\/revisions\/1742"}],"wp:attachment":[{"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=870"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=870"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rahmat-hidayat.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=870"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}