問: | Querying a material type, i.e Composite, Standard, Blend etc 如何辨別材質的種類 |
答: | for m in scenematerials where classof m == compositeMaterial do --your code here... |
2005.03.23 |
問: | how to set a Keyframe via MAXScript as I'd like to animate lights multiplier property 如何用maxscripts來設定光物件的keyframe |
答: | the easiest way is to tell MAXScript that you want to animate values, and it will create keyframes for you. For example, $Omni01.multiplier = 2.0 will set (without animating) the multiplier of a light called Omni01 to 2. To set a keyframe on the CURRENT frame, you would say with animate on $Omni01.multiplier = 2.0 This does NOT press the AutoKey button in the UI, but tells MAXScript to do the equivalent of enabling the AutoKey button internally. Any changes to values you do in the context of with animate on ( ) will be keyframed. If you want to specify your times, you can do this using the at time context. theLight = $Omni01 with animate on ( at time 10 theLight.multiplier = 2 at time 25 theLight.multiplier = 10 at time 100 theLight.multiplier = 1 ) this will set keyframes on frames 10, 25 and 100. If there was no keyframe on frame 0, it will be created, too. |
2005.03.24 |
持續更新…
沒有留言:
張貼留言