Simple Fake 3D Text

What type of scripts do you need?

Moderator: byronnash

Post Reply
acobjoe
Posts: 1
Joined: July 15th, 2011, 4:31 pm

I'm trying to put my first script together to help be a little more efficient at work. Brian Charles over at Creative Cow has helped me start out with putting this script together, but I don't know scripting at all. I've only been able to modify an existing script to get as far as I have.

What I have so far is a script that will duplicate a selected 3D text layer a specified number of times, create a null with a slider control, and add an expression to each text layer linking the z-axis anchor point to the null's slider control. This allows me to control the look of an extrusion with the slider, and to add more density, all I have to do is duplicate any of the text layers as many more times as needed and they are automatically offset evenly. It's very helpful already. However, it has some issues. I've attached the script to this post.

First and foremost, if I want to run the script on more than one text layer, it creates a null with the same name. That messes with the expression and all of the text layers I've created with the script follow the null that was created last. This prevents me from being able to have animated extrusion or different values of extrusion per 3D text. So my first question is...

1. How do I get the script to generate a unique name for the null every time I run the script?

The next issue I've been trying to figure out is how to parent all of the duplicate text layers to the original? Actually, the way the script works now, the first duplicate layer doesn't have the expression applied, and leaves the anchor point set to 0. So that layer would probably be my first choice of which layer to parent the duplicates (and in that case, the original) to, but either would work equally. So for the sake of consistency...

2. How do I parent all of the duplicate layers to the original?

And finally, I've noticed that if I set any parameters for the text's orientation, after running the script, they are all reset back to 0.

3. Can the script leave all pre-set attributes alone?

Thanks in advance for reading this. I don't know the first thing about writing my own script, this is just something I've taken on for myself and my co-workers as it would automate this tedious task each of us have to do on a daily basis.
Attachments
anchorPoint_offset.jsx.zip
(1.4 KiB) Downloaded 755 times
Post Reply