2 mazzza
Вот что мне ответили
davestewart
Joined: 10 Mar 2005
Posts: 44
Location: London, UK
I started thinking about it,so thought I'd do the leg work... just for fun....
Code:
function reverseMask (obj,maskIndex){
// check
if(obj==undefined){
alert('Object undefined');return
}
if(maskIndex>obj.Masks.numProperties){
alert('Incorrect mask index specified');return
}
// existing mask
var curMask= obj.Masks.property(maskIndex).property("ADBE Mask Shape")
var verts= curMask.value.vertices
var inTans= curMask.value.inTangents
var outTans= curMask.value.outTangents
// collect the values
var tempVerts=[]
var tempInTans=[]
var tempOutTans=[]
for(var i=curMask.value.vertices.length-1;i>=0;i--){
tempVerts.push(verts
)
tempOutTans.push(inTans)
tempInTans.push(outTans)
}
// build the shape
var tempMask=new Shape()
tempMask.vertices = tempVerts
tempMask.inTangents = tempInTans
tempMask.outTangents = tempOutTans
tempMask.closed=curMask.value.closed
// assign mask
curMask.setValue(tempMask)
}
reverseMask(app.project.activeItem.layers[1],1)
It seems to reverse the mask just fine, although Vegas doesn't seem to respect this? Maybe your morphing thing will.
Let me know...
Cheers,
Dave
тестовый скрипт на первый слой с первой маской, это легко устранимо переделкой скрипта
я тестировал на эффекте Strok работает, только меняет Начальную точку маски, устраняется при помощи Set First Vertex
mazzza,будет время проверь на своем морфинге. Тогда добьем скрипт до совершенства! У меня написана часть скрипта обрабатывающие все выделенные маски, ядро надо доработать.
ЗЫ
Ночь не прошла бесследно
2 Не-Не
похоже проблема всетаки решаема!