Copy link to clipboard
Copied
Is there a way to return mask data in a way that I may be able to export and parse it in nuke?
For instance,
app.project.activeItem.selectedLayers[0].Masks.property(1).property(1).valueAtTime(currentFrame/24,0)
Returns the mask path of the first mask of the first layer selected at the first frame assuming my comp is 24 fps. But when I alert() this, I am returned 'object Shape'. Now I'm not denying it is an object shape, but I was hoping to find data that I can at least try to work with. Any ideas?
Note: I'm fine with a solution that leaves the beziers baked. The masks are already baked in the first place for these purposes.
Say you do this:
var myMask = app.project.activeItem.selectedLayers[0].Masks.property(1).property(1) .valueAtTime(0,false);
myMask will be a shape object with 4 attributes:
myMask.vertices gives you an array of 2D points, in layer space, one for each vertex.
myMask,inTangents gives you an array of incoming tangent points, relative to each vertex.
myMask.outTangets gives you an array of outgoing tanget points, relative to each vertex.
myMask.closed is true if the shape is closed
Dan
Copy link to clipboard
Copied
Say you do this:
var myMask = app.project.activeItem.selectedLayers[0].Masks.property(1).property(1) .valueAtTime(0,false);
myMask will be a shape object with 4 attributes:
myMask.vertices gives you an array of 2D points, in layer space, one for each vertex.
myMask,inTangents gives you an array of incoming tangent points, relative to each vertex.
myMask.outTangets gives you an array of outgoing tanget points, relative to each vertex.
myMask.closed is true if the shape is closed
Dan
Copy link to clipboard
Copied
Great, thanks.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now