{"id":17817,"date":"2016-01-06T22:00:00","date_gmt":"2016-01-06T13:00:00","guid":{"rendered":"https:\/\/cg-method.com\/after-effects\/?p=17817"},"modified":"2026-01-12T17:59:44","modified_gmt":"2026-01-12T08:59:44","slug":"after-effects-comp-size-shape-script","status":"publish","type":"post","link":"https:\/\/cg-method.com\/after-effects\/after-effects-comp-size-shape-script\/","title":{"rendered":"After Effects\u2502\u30b3\u30f3\u30dd\u30b5\u30a4\u30ba\u306e\u30b7\u30a7\u30a4\u30d7\u3092\u4f5c\u6210\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"\n<p>\u5e73\u9762\u306e\u4ee3\u308f\u308a\u306b\u30b7\u30a7\u30a4\u30d7\u3092\u4f7f\u3044\u305f\u3044<\/p>\n\n\n\n<p>\u300c\u5e73\u9762\u300d\u30d5\u30a9\u30eb\u30c0\u306b\u30cc\u30eb\u3068\u304b\u8abf\u6574\u30ec\u30a4\u30e4\u30fc\u3068\u304b\u5e73\u9762\u3068\u304b\u3001\u3084\u305f\u3089\u305f\u304f\u3055\u3093\u3042\u308b\u306e\u304c\u5acc\u3044\u306a\u306e\u3067\u3001\u3067\u304d\u308b\u3060\u3051\u30b7\u30a7\u30a4\u30d7\u3067\u4ee3\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30f3\u30dd\u30b5\u30a4\u30ba\u306e\u30b7\u30a7\u30a4\u30d7\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5<\/h2>\n\n\n\n<p>\u9577\u65b9\u5f62\u30c4\u30fc\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea\u30c3\u30af\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30f3\u30dd\u30b5\u30a4\u30ba\u306e\u30b7\u30a7\u30a4\u30d7\u3092\u4f5c\u6210\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8<\/h2>\n\n\n\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u5316\u3057\u307e\u3057\u305f\u3002\u30e9\u30d9\u30eb\u30ab\u30e9\u30fc\u3092\u30b0\u30ec\u30fc + \u8abf\u6574\u30ec\u30a4\u30e4\u30fc + \u5857\u308a\u3092\u9ed2\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>\/*########################################################################################################################\n#   \u30b3\u30f3\u30dd\u30b5\u30a4\u30ba\u306e\u30b7\u30a7\u30a4\u30d7\u3092\u4f5c\u6210\n#   @author suimin \n########################################################################################################################*\/\napp.beginUndoGroup(&quot;\u30b3\u30f3\u30dd\u30b5\u30a4\u30ba\u306e\u30b7\u30a7\u30a4\u30d7\u3092\u4f5c\u6210&quot;);\nvar activeComp = app.project.activeItem;\nif (activeComp == null) {\n    alert(&quot;\u30b3\u30f3\u30dd\u30b8\u30b7\u30e7\u30f3\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002&quot;)\n}\nelse {\n    var comp = app.project.activeItem;\n    var customShape = comp.layers.addShape();\n    customShape.name = &quot;Custom Shape&quot;\n    customShape.label = 0  \/\/\u30e9\u30d9\u30eb\u3092\u30b0\u30ec\u30fc\u306b\n    customShape.adjustmentLayer = true\n    customShape.property(&quot;position&quot;).expression = &quot;x=thisComp.width;\\ry=thisComp.height;\\r[x\/2,y\/2]&quot;\n    var shapeProperty = customShape.property(&quot;ADBE Root Vectors Group&quot;);\n    var customShapePath = shapeProperty.addProperty(&quot;ADBE Vector Shape - Rect&quot;)\n    customShapePath(2).expression = &quot;x=thisComp.width;\\ry=thisComp.height;\\r[x,y]&quot;\n    var fill = shapeProperty.addProperty(&quot;ADBE Vector Graphic - Fill&quot;)\n    fill.property(&quot;ADBE Vector Fill Color&quot;).setValue([0, 0, 0, 0]); \/\/\u5857\u308a\u3092\u9ed2\u306b\n}\napp.endUndoGroup();<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5e73\u9762\u306e\u4ee3\u308f\u308a\u306b\u30b7\u30a7\u30a4\u30d7\u3092\u4f7f\u3044\u305f\u3044 \u300c\u5e73\u9762\u300d\u30d5\u30a9\u30eb\u30c0\u306b\u30cc\u30eb\u3068\u304b\u8abf\u6574\u30ec\u30a4\u30e4\u30fc\u3068\u304b\u5e73\u9762\u3068\u304b\u3001\u3084\u305f\u3089\u305f\u304f\u3055\u3093\u3042\u308b\u306e\u304c\u5acc\u3044\u306a\u306e\u3067\u3001\u3067\u304d\u308b\u3060\u3051\u30b7\u30a7\u30a4\u30d7\u3067\u4ee3\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u30b3\u30f3\u30dd\u30b5\u30a4\u30ba\u306e\u30b7\u30a7\u30a4\u30d7\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5 \u9577\u65b9\u5f62\u30c4\u30fc\u30eb\u3092\u30c0\u30d6\u30eb\u30af\u30ea [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17895,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[28],"tags":[],"class_list":["post-17817","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-expression-script"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/posts\/17817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/comments?post=17817"}],"version-history":[{"count":2,"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/posts\/17817\/revisions"}],"predecessor-version":[{"id":17896,"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/posts\/17817\/revisions\/17896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/media\/17895"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/media?parent=17817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/categories?post=17817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/after-effects\/wp-json\/wp\/v2\/tags?post=17817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}