Hi Dave,
I agree that the end result of running the effect is a bitmap, but 3D Stroke is parametrically controlled, so I’m looking for a way to change the parameters to give me the same image at a higher res.
I pushed on with my original thinking and I think I’ve got it cracked…
Should anyone need to do this or something similar then the code below should do it (WARNING – SCRAPPY CODE WITH NO ERROR CHECKING! – SAVE YOUR PROJECT FIRST!). Just run this from the ExtendScript Toolkit.
scaleFactor = 5; // this is what we're going to scale the comp by
targetLayer = "stroke 2" //put the name of the layer containing 3D Stroke
app.beginUndoGroup("rescale 3D Stroke comp");
c = app.project.activeItem;
originalEffect = c.layer(targetLayer).effect("3D Stroke");
bend = originalEffect("Bend").value;
pos = originalEffect("XY Position").value;
d = c.duplicate();
d.name = c.name + "(x"+scaleFactor+")"
d.width = d.width*scaleFactor;
d.height = d.height*scaleFactor;
l = d.layer(targetLayer);
var strokeEffect = l.effect("3D Stroke");
strokeEffect("Bend").setValue(bend*scaleFactor);
strokeEffect("XY Position").setValue(pos/scaleFactor);
d.activeCamera.zoom.setValue(d.activeCamera.zoom.value*scaleFactor);
tempLayer = d.layers.addSolid([0,0,0],"scriptSolid", d.width, d.height, 1.0);
l.replaceSource(tempLayer.source,false);
tempLayer.remove()
l.anchorPoint.setValue([0.0,0.0]);
l.position.setValue([0,0]);
myShape = l.mask(1).maskShape.value;
var verts = [];
for(e in myShape.vertices) {
var oldPoint = myShape.vertices[e];
var newPoint = [(oldPoint[0]-(d.width/2))/scaleFactor +(d.width/2),(oldPoint[1]-(d.height/2))/scaleFactor + (d.height/2)];
verts.push(newPoint);
}
myShape.vertices = verts;
l.mask(1).maskPath.setValue(myShape);
app.endUndoGroup();