...記得自己公司曾經做一個戰爭場麵的動畫,用了CAT,十分迅速.這個插件的確強大.好與壞不去評價,反正隻要解決問題就好.
...不說CAT,說下MAX本質的東西.
移除邊,和點
最終成形
材質我隻是隨便放個顏色區分而已
[page]
增加個"多邊形選擇"修改器
再來個"子級變換"
打開"中心"然後縮放,
可以看到黑色區域可變化大小
至於為什麼這樣,看看<MAX參考>就可以
不好意思
是-----
是---
再增加個"屬性保持"修改器
[page]
編寫腳本----
解釋一下
看劃部分-------
再修改腳本,然後運行
在屬性保持修改器下出現===
[page]
結束
通過這簡單的例子隻是說明下自定義屬性的靈活性.作為自定義腳本的基礎.
涉及的腳本參考(大家有空就翻譯下,我隻是匆匆的翻譯了一下):
Attribute Definitions
Attributes can be added to an object via an "attribute definition". This is a syntactic construct in MAXScript that is similar to a scripted plug-in definition, but rather than adding a new plug-in class, a definition is built that can be used to add custom attributes and rollup UI to any number of objects at any time, through a special new function.
屬性能通過一個"attribute definition"增加到對象。這是一個在MAXScript中依照造句法的結構,類似一個定義的腳本插件。但勝於增加一個類插件。建立一個定義能在任何時間增加自定義屬性和UI展卷用於任何數目的對象。
NOTES:
The auto-UI connection between the parameters and rollout items via the ui and keyword is the same as the support in Scripted Plug-ins. You can treat attribute scripting as basically identical to scripting plug-ins, in terms of parameter, rollout setup and handler programming.
auto-UI在參數和首次展示項目之間連接通過ui和關鍵詞和在Scripted Plug-ins支持一樣。你能對待腳本像主要插件腳本同樣在參數項目,首次展示設置和管理者編寫程序方麵。
Since 3ds max 5.1, scripted custom attributes can be applied to any MAXWrapper object - base objects, modifiers, materials, nodes, controllers, rootnodes, render effects, etc. The only place the UI for custom attributes is currently supported is the Material Editor and the Command Panel, so you will only be able to see any rollouts associated with the custom attribues on base objects, modifiers, and materials.
以前3ds max 5.1,腳本自定義屬性能指定給任何MAXWrapper對象—基本對象,修改器,材質,節點,控製器,根節點,渲染效果 等等。唯一放置自定義屬性UI當前支持是材質編輯和命令麵板,你將僅僅在基礎對象,修改者,和材料上能夠看見任何與自定義屬性有關的首次展示。
custAttributes.add <object_or_collection> <attributes_definition>[#unique] [BaseObject:<bool>]
Adds a set of attributes to an object or a collection. You can only add one custom attribute set of a particular attributes definition to an object, but you can have as many different attribute sets from different definitions as needed.
把一屬性裝置添加到一個對象或者一個控製器。 你能僅僅添加把定義的特殊屬性的自定義屬性裝置放置到一個對象,但是你能同有從不同的定義有很多不同的屬性裝置以至你需要。
EXAMPLE:
custAttributes.add $weapon01 weaponData
Opening $weapon01 in the Modify panel will now display the "Weapon Parameters" rollout and allow them to be edited as can normal object parameters. You can use attribute definitions to add their defined sets of attributes to any object at any time. Any appropriate type of parameter can be animated, also, exactly as with scripted plug-ins.
The custAttributes.add() function can be applied to an object collection to add sets of attributes to a group of objects in one go.
在修改麵板中打開$weapon01現在將顯示“weaponData”展示欄並且允許他們作為能正常的對象參數被編輯。 你能使用屬性定義來在任何時間添加他們把屬性的定義裝置到任何對象。 任何適當的類型的參數也能動畫,同樣作為腳本正確地插入。
custAttributes.add ( )功能能被運用於對象控製器來以便添加把屬性裝置為一群對象的一個中去。
custAttributes.add $weapon* weaponData
Adds a separate set of these custom attributes to all objects whose names begin "weapon" in the scene.
添加它們自定義屬性一個單獨裝置到當所有對象在場景中的名字都是"weapon"時
attributes "Game Data"
redefine:def
(
parameters ...
rollout ...
)
This expects an existing attributes definition as the value given in the redefine: parameter and will update it to the definition that follows, and update any custom attributes made from that particular definition value. In the example, this would update $box01 and $box02.
這是盼望現有的屬性定義同樣地值從重定義中獲得:參數和將更新它到下列的定義,和更新任何的定製屬性由特殊的定義值製成,在例子裏,將會更新$box01 和 $box02。
Alternatively, you can use the custAttributes.redefine method:
做為選擇,你能使用custAttributes.redefine方式:
custAttributes.redefine <def> <definition_string>