インストールに成功したIllustrator用ハイブリッドzxpのmxiファイル。
ディレクトリ構造はこんなだ。comboMoverUI.zxpはHTMLエクステンション部分単体で作成したzxp。
- comboMover
- comboMoverUI.mxi
- comboMoverUI.zxp
- mac
- comboMover.aip
- win64
- comboMover.aip
| ;; bezier_study | |
| ;; To Edit the Shape: | |
| ;; Click each "segment" at the end | |
| ;; of this code and drag the point. | |
| (defn adjust_dir [p p1 p2] | |
| (let [angle (vec2/angle (vec2/- p1 p)) | |
| len (vec2/dist p1 p2)] | |
| (vec2/+ p1 (vec2/dir angle len)))) |
| // refer to "JavaScript Tools Guide" for more information about File object. | |
| // https://www.adobe.com/content/dam/acom/en/devnet/scripting/estk/javascript_tools_guide.pdf | |
| function loadFile(){ | |
| var data; | |
| try{ | |
| var f = File.openDialog("select input file"); | |
| if(f == null) return; | |
| if(!f.open("r")){ |
| import bpy | |
| import math | |
| # カーブ生成 + 渦巻き (blender 2.82a) | |
| # (渦巻きは曲線上の点をプロットしたもので、NURBSのポイントとして適切かは考慮していません。) | |
| def createPolyline(coords, obj_name, closed=False): | |
| # ref: https://blender.stackexchange.com/questions/120074/how-to-make-a-curve-path-from-scratch-given-a-list-of-x-y-z-points | |
| cv = bpy.data.curves.new('cv', 'CURVE') | |
| cv.dimensions = '3D' |
| import bpy | |
| import mathutils | |
| import numpy as np | |
| import math | |
| NUM_POINTS = 300 # 点の数 | |
| MAX_ITERATION = 100 # 最適化試行回数上限 | |
| MAX_ERROR_SQUARED = 1e-4 # 前回の最適化との最大誤差(の2乗) | |
| RADIUS = 5 # 半径 |
| import bpy | |
| from mathutils import Vector, Matrix | |
| import math | |
| class MyScene: | |
| _freq = 3 | |
| _cube_count = 20 | |
| _scale = 0.1 | |
| _radius = 2 | |
| _rotation_x = math.radians(4) |
インストールに成功したIllustrator用ハイブリッドzxpのmxiファイル。
ディレクトリ構造はこんなだ。comboMoverUI.zxpはHTMLエクステンション部分単体で作成したzxp。
| // @peprintenpa さんに教えていただいた、SDKの機能を使う方法。 | |
| // ref: https://twitter.com/peprintenpa/status/1217626021630857216 | |
| AIErr MyTool::ToolMouseDown( AIToolMessage* message ) | |
| { | |
| if(message->event->modifiers & aiEventModifiers_shiftKey){ | |
| sAIUser->MessageAlert(ai::UnicodeString("shift is down")); | |
| } | |
| // ... | |
| } |
| #target illustrator | |
| // 選択オブジェクトを位置によってソートし、 | |
| // ソート順に連番の名前をつける。 | |
| // ソート方法は sortByPosition を参照 | |
| function main(){ | |
| var sels = app.activeDocument.selection; | |
| if(sels){ |
| #!/usr/bin/env python | |
| # coding:utf-8 | |
| from __future__ import print_function | |
| import sys | |
| import os | |
| import traceback | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| from time import sleep, strftime |