Skip to content

Commit 1ddb896

Browse files
committed
Feat: Add src
1 parent 93a7126 commit 1ddb896

23 files changed

+1824
-0
lines changed

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
* text=auto
2+
3+
*.obj text eol=crlf linguist-language=Lua working-tree-encoding=cp932
4+
*.anm text eol=crlf linguist-language=Lua working-tree-encoding=cp932
5+
*.scn text eol=crlf linguist-language=Lua working-tree-encoding=cp932
6+
*.cam text eol=crlf linguist-language=Lua working-tree-encoding=cp932
7+
*.tra text eol=crlf linguist-language=Lua working-tree-encoding=cp932
8+
9+
*.obj2 text eol=crlf linguist-language=Lua working-tree-encoding=utf-8
10+
*.anm2 text eol=crlf linguist-language=Lua working-tree-encoding=utf-8
11+
*.scn2 text eol=crlf linguist-language=Lua working-tree-encoding=utf-8
12+
*.cam2 text eol=crlf linguist-language=Lua working-tree-encoding=utf-8
13+
*.tra2 text eol=crlf linguist-language=Lua working-tree-encoding=utf-8
14+
15+
*.jpg binary
16+
*.png binary
17+
*.gif binary

.github/workflows/releaser.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: releaser
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Setup MSVC (x64)
20+
uses: ilammy/msvc-dev-cmd@v1
21+
with:
22+
arch: x64
23+
24+
- name: Build
25+
run: |
26+
cd ${{ github.workspace }}
27+
cmake -S dll_src -B dll_src/build -DCMAKE_GENERATOR_PLATFORM=x64
28+
cmake --build dll_src/build --config Release
29+
30+
- name: Upload artifact
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: publish
34+
path: ${{ github.workspace }}/dll_src/build/Release/*.dll
35+
36+
releaser:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0
48+
submodules: "recursive"
49+
50+
- name: Download artifact
51+
uses: actions/download-artifact@v4
52+
with:
53+
name: publish
54+
path: ${{ github.workspace }}/build/publish
55+
56+
- name: Extract script name
57+
run: |
58+
REPO_BASE=$(basename "${{ github.repository }}")
59+
MIDDLE_PART=$(echo "$REPO_BASE" | sed 's/AviUtl2_\(.*\)_Script/\1/')
60+
echo "SCRIPT_NAME=$MIDDLE_PART" >> $GITHUB_ENV
61+
62+
- name: Setup python
63+
uses: actions/setup-python@v5
64+
with:
65+
python-version: '3.11'
66+
67+
- name: Build script
68+
run: |
69+
python tools/build.py --tag ${{ github.ref_name }}
70+
71+
- name: Create release
72+
uses: softprops/action-gh-release@v2
73+
with:
74+
name: ${{ env.SCRIPT_NAME }}_${{ github.ref_name }}
75+
files: 'build/*.zip'
76+
body_path: build/release_note.txt

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/__pycache__/
2+
**/build/
3+
.vscode/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "tools/lib"]
2+
path = tools/lib
3+
url = https://github.com/korarei/AviUtl2_ScriptBuilder.git

README.md

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# ObjectMotionBlur_LK
2+
3+
![GitHub License](https://img.shields.io/github/license/korarei/AviUtl2_ObjectMotionBlur_LK_Script)
4+
![GitHub Last commit](https://img.shields.io/github/last-commit/korarei/AviUtl2_ObjectMotionBlur_LK_Script)
5+
![GitHub Downloads](https://img.shields.io/github/downloads/korarei/AviUtl2_ObjectMotionBlur_LK_Script/total)
6+
![GitHub Release](https://img.shields.io/github/v/release/korarei/AviUtl2_ObjectMotionBlur_LK_Script)
7+
8+
オブジェクトにモーションブラーをかけるスクリプト.
9+
10+
[ダウンロードはこちらから](https://github.com/korarei/AviUtl2_ObjectMotionBlur_LK_Script/releases)
11+
12+
## 動作確認
13+
14+
- [AviUtl ExEdit2 beta11a](https://spring-fragrance.mints.ne.jp/aviutl/)
15+
16+
## 導入・削除・更新
17+
18+
初期配置場所は`ぼかし`である.
19+
20+
`オブジェクト追加メニューの設定`から`ラベル`を変更することで任意の場所へ移動可能.
21+
22+
### 導入
23+
24+
1. 同梱の`*.anm2``*.dll``%ProgramData%`内の`aviutl2\\Script`フォルダまたはその子フォルダ (英語) に入れる.
25+
26+
`beta4`以降では`aviutl2.exe`と同じ階層内の`data\\Script`フォルダ内でも可.
27+
28+
### 削除
29+
30+
1. 導入したものを削除する.
31+
32+
### 更新
33+
34+
1. 導入したものを上書きする.
35+
36+
## `ObjectMotionBlur@MotionBlur_K`との相違点
37+
38+
このスクリプトは[ObjectMotionBlur@MotionBlur_K](https://github.com/korarei/AviUtl_MotionBlur_K_Script)の劣化移植版である.いくつかの機能が削除,制限,追加されている.
39+
40+
### 削除項目
41+
42+
計算が複雑になる上にそこまで正確でない項目を削除した.
43+
44+
- Shutter Angle (`[360.0, 720]`): 非現実的な数値を認めない.
45+
46+
- Shutter Phase: `-shutter_angle`で固定.
47+
48+
### 制限項目
49+
50+
`beta11a`で提供されているライブラリのみを使用したため制限された.
51+
52+
- Object ID (オブジェクト固有な値)
53+
54+
- Center
55+
56+
### 追加項目
57+
58+
新たに追加した機能.
59+
60+
- Extrapolation (旧`Calc -1F & -2F`): かつては2次補間だけだったが1次補間できるようにした.
61+
62+
- Mix (旧`Mix Original Image`): アルファ値にした.
63+
64+
- 中心座標の移動に対してブラーをかけるようにした.
65+
66+
基本的な使い方は同じだが,これらの機能差に注意してほしい.
67+
68+
## 使い方
69+
70+
オブジェクトのX,Y,拡大率,Z軸回転,中心X,中心Yのトラックバーによる移動に関して線形的モーションブラーをかける.ただしbeta11a現在,中心座標を入手する方法がないので,中心X,中心Yはスクリプト内トラックバーにて再度設定する必要がある.
71+
72+
また,Geometryのうち,ox,oy,zoom,rz,cx,cyに関してはデータを保持することにより,計算で扱うことが可能である. (基本効果系エフェクトやDelayMove,全自動リリックモーションなど)
73+
74+
- Shutter Angle
75+
76+
ブラー幅 (360度で1フレーム移動量と等しい).
77+
78+
初期値は`180.0`で一般的な値を採用している.
79+
80+
- Sample Limit
81+
82+
描画精度.このスクリプトは移動量に応じた可変サンプル数を採用している.ここでは,そのサンプル数の上限値を設定する.PCの重さに関わるため適切に設定してほしい.
83+
84+
必要サンプル数はダイアログ内の`Print Information`を有効にするとコンソールで確認できる.
85+
86+
最小必要サンプル数は`2`
87+
88+
初期値は`256`とやや小さい値にしている.
89+
90+
- Preview Limit
91+
92+
プレビュー時の描画制度.`0`以外の値にすることで,編集時に描画制度を下げて軽量にすることができる.出力時は`Sample Limit`の値になる.
93+
94+
初期値は`0`でこの機能を無効にしている.
95+
96+
- Extrapolation
97+
98+
0フレームより前を仮想的に計算する.計算方法として以下の3つある.
99+
100+
- None (計算しない)
101+
102+
- Linear (1次補間)
103+
104+
- Quadratic (2次補間)
105+
106+
初期値は`Quadratic`
107+
108+
- Resize
109+
110+
サイズを変更.`ON`でブラーが見切れないようにする.
111+
112+
初期値は`ON`
113+
114+
- Geo Cache
115+
116+
スクリプトによる座標変化を計算に入れるかどうかを指定する.保存方法は以下の3つ.
117+
118+
- None (保存しない)
119+
120+
- Full (全フレーム保存する)
121+
122+
- Minimal (必要最低限だけ保存する)
123+
124+
初期値は`None`
125+
126+
- Cache Control
127+
128+
ジオメトリデータの扱いを指定する.コントロール方法は以下の4つ.
129+
130+
- Off (特に何も行わない)
131+
132+
- Auto (オブジェクトの最終フレームに現在オブジェクトのデータのみ削除する)
133+
134+
- All (次スクリプトが読み込まれた時,すべて削除する)
135+
136+
- Current (次スクリプトが読み込まれた時,現在オブジェクトのデータのみ削除する)
137+
138+
初期値は`Off`
139+
140+
- Object ID
141+
142+
オブジェクト固有の値を入力する.この数字ごとにジオメトリデータを保存する.
143+
144+
初期値は`0`
145+
146+
- Mix
147+
148+
元画像を元の位置に描画する.(アルファブレンド)
149+
150+
かての標準モーションブラーエフェクトの`残像`のようなもの.
151+
152+
初期値は`0.0`
153+
154+
- Print Information
155+
156+
コンソールに情報を表示する.
157+
158+
表示される情報は以下のとおり
159+
160+
- Object ID (所謂`Object Index`.GeometryはObject IDごとに保存される.)
161+
162+
- Index (所謂`obj.index`.個別オブジェクトのインデックス.)
163+
164+
- Required Samples (必要なサンプル数.これを目安に`Sample Limit`を設定してほしい.)
165+
166+
初期値は`OFF`
167+
168+
- Center
169+
170+
中心X,中心Yの値と同じ値を入力する.
171+
172+
- PI
173+
174+
パラメータインジェクション.
175+
176+
```lua
177+
{
178+
shutter_angle = 180.0,
179+
render_sample_limit = 256,
180+
preview_sample_limit = 0,
181+
extrapolation = 2,
182+
resize = true, -- booleanも可
183+
geo_cache = 0,
184+
geo_ctrl = 0,
185+
object_id = 0,
186+
mix = 0.0,
187+
print_info = false, -- booleanも可
188+
cx = 0.0,
189+
cy = 0.0
190+
}
191+
```
192+
193+
`{}`は既に挿入済みであるため,PI項目では中身のみ記載する.
194+
195+
## ビルド方法
196+
197+
`.github\\workflows`内の`releaser.yml`に記載.
198+
199+
## License
200+
LICENSEファイルに記載.
201+
202+
## Change Log
203+
- **v0.1.0**
204+
- Release

dll_src/.clang-format

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BasedOnStyle: Google
2+
3+
4+
IndentWidth: 4
5+
TabWidth: 4
6+
UseTab: Never
7+
ContinuationIndentWidth: 8
8+
ConstructorInitializerIndentWidth: 4
9+
AccessModifierOffset: -4
10+
PointerAlignment: Right
11+
DerivePointerAlignment: false
12+
SpaceBeforeParens: ControlStatements
13+
SpacesInParentheses: false
14+
15+
ColumnLimit: 120
16+
BreakBeforeBinaryOperators: NonAssignment
17+
AlignOperands: AlignAfterOperator
18+
BreakConstructorInitializers: AfterColon
19+
BreakInheritanceList: AfterColon
20+
AlwaysBreakTemplateDeclarations: Yes
21+
22+
BreakBeforeBraces: Attach
23+
AlwaysBreakAfterReturnType: TopLevel
24+
AlignAfterOpenBracket: Align
25+
AllowShortIfStatementsOnASingleLine: Never
26+
AllowShortEnumsOnASingleLine: false
27+
ReflowComments: true
28+
IncludeBlocks: Preserve
29+
EmptyLineBeforeAccessModifier: LogicalBlock

0 commit comments

Comments
 (0)