☭
Регистрация: 26.09.2006
Сообщений: 6,035
Написано 1,474 полезных сообщений (для 2,707 пользователей)
|
Re: Двойная анимация
Итак, дамы и господа, если вы хотите, затекстурить, установить альфу, режим блендинга, или еще что либо для анимированной модели, то делайте ето в рекурсии. Марк - жопа, и не написал необходимых функций, но мы то с вами, тоже не дураки, поетому можем написать сами.
вот всякие ф-ии для работы с анимированными объектами

Function AnimEntityTexture(aent,tex,frame=0,layer=0)
Local ent
EntityTexture aent,tex,frame,layer
For c=1 To CountChildren(aent)
ent=GetChild(aent,c)
If CountChildren(ent)>0
AnimEntityTexture(ent,tex,frame,layer)
Else
If EntityClass(ent)="Mesh" Then EntityTexture ent,tex,frame,layer
EndIf
Next
End Function
Function AnimEntityColor(aent,r,g,b)
Local ent
EntityColor aent,r,g,b
For c=1 To CountChildren(aent)
ent=GetChild(aent,c)
If CountChildren(ent)>0
AnimEntityColor(ent,r,g,b)
Else
If EntityClass(ent)="Mesh" Then EntityColor ent,r,g,b
EndIf
Next
End Function
Function AnimEntityAlpha(aent,a#)
Local ent
EntityAlpha aent,a
For c=1 To CountChildren(aent)
ent=GetChild(aent,c)
If CountChildren(ent)>0
AnimEntityAlpha(ent,a)
Else
If EntityClass(ent)="Mesh" Then EntityAlpha ent,a
EndIf
Next
End Function
Function AnimEntityFX(aent,fx)
Local ent
EntityFX aent,fx
For c=1 To CountChildren(aent)
ent=GetChild(aent,c)
If CountChildren(ent)>0
AnimEntityFX(ent,fx)
Else
If EntityClass(ent)="Mesh" Then EntityFX ent,blend
EndIf
Next
End Function
Function AnimEntityBlend(aent,blend)
Local ent
EntityBlend aent,blend
For c=1 To CountChildren(aent)
ent=GetChild(aent,c)
If CountChildren(ent)>0
AnimEntityBlend(ent,blend)
Else
If EntityClass(ent)="Mesh" Then EntityBlend ent,blend
EndIf
Next
End Function
Function AnimEntityPickMode(aent,mode)
EntityPickMode aent,mode,0
For i=1 To CountChildren(aent)
AnimEntityPickMode(GetChild(aent,i),mode)
Next
End Function
Function AnimEntityAnimate(aent,mode=1,speed#=1,sequence=0,transition#=0)
Local ent
Animate(aent,mode,speed#,sequence,transition#)
For c=1 To CountChildren(aent)
ent=GetChild(aent,c)
If CountChildren(ent)>0
AnimEntityAnimate(ent,mode,speed#,sequence,transition#)
Else
Animate(ent,mode,speed#,sequence,transition#)
EndIf
Next
End Function
|