NiVE愛用者スレ8【NicoVisualEffects】 at STREAMING
[2ch|▼Menu]
114:名無しさん@お腹いっぱい。
10/04/22 01:12:42 X4otMl4k0
>>110
うp主さんじゃないけど、とりあえず適当に書いてみたサンプルコード。ちと長いので2レスで。

//エフェクトのエクスプレッションに記述して下さい。

// 試しに自エフェクトのプロパティをモニタしてみる。
// Monitorに追加されたプロパティは、左側の「表示」の「プロパティ」の所で見れるようになる。
PropertyBase[] props = property.GetProperties(thisItem);
foreach(PropertyBase prop in props){
Monitor.Add(prop);
}

// IExpressionItemのParentItemは
//  ・エフェクトの場合→所属するレイヤー
//  ・レイヤーの場合→所属するコンポジション
// になるらしい。試しに所属レイヤーのプロパティをモニタしてみる。
IExpressionItem thisLayer = thisItem.ParentItem;
PropertyBase[] layerProps = property.GetProperties(thisLayer);
foreach(PropertyBase layerProp in layerProps){
Monitor.Add(layerProp);
}

// 5秒かけて所属レイヤーの不透明度を100→0に変化させてみる。timeは時間を表しており、単位は秒。
NumberProperty toumei = (NumberProperty)property.GetProperty(thisLayer,"不透明度");
toumei.DoubleValue = 100-time*20;


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4889日前に更新/193 KB
担当:undef