PDA

View Full Version : is this possible with lscript



toasterhombre
06-27-2004, 11:49 AM
I might need a custom lscript written. If the following is possible with lscript or anyone here can tackle it as a plug in, let me know, and we can talk about compensation etc.

Basically what I want is:

After a user types text and creates a text based object in modeler, I'd like a script to cut each layer and paste them in separate layers.

If possible, I'd like to be able to have each objects pivot point be in the center of the individual object and not at 0,0,0. I am not sure if it is possible to do that with lscript inside of modeler etc.

I'd also be interested in having a plug in that makes text creation even easier. There used to be a text plug in in LW years ago that would handle beveling and surfacing etc.

If anyone is interested in giving any of the above a try, email me at [email protected]

wiffzack
06-28-2004, 02:28 AM
Yes, why not? You could select the first poly from the text layer - > sel connected -> cut -> freeLayer -> paste -> compute pivot -> ... And the same for all characters.

toasterhombre
06-28-2004, 05:37 AM
I can't do that ;-) Writing scripts is not one of my less than many talents ;-)

I am assuming it would be necessary to manually select polygons each of the letters? I guess that would work, but was hoping for more "automatic".

I even went sio far as to skim through some of the lscript docs etc.

If you know anybody that may want to make a few bucks doing some lscripts let me know!

wiffzack
06-28-2004, 09:20 AM
Well dude, you have luck i ve written it today

please tell me if modeler freezes

toasterhombre
06-28-2004, 09:47 AM
I don't freeze in modeler but get a "script requires 2.6 version of this plugin" message.

Is this script doing the selections automatically or I'd have to select each letter?

Dude, if this works, we will be willing to buy the script from you.

Lynx3d
06-28-2004, 12:32 PM
LScript 2.6 comes with LW 7.5 and later i think...
Is there anything in the script that is not available in LScript since ages?
Maybe try removing (or comment out) the line

@version 2.6

wiffzack
06-28-2004, 12:56 PM
Yes, i think the value property of the controls is since 2.6

change the line

piv = c3.value;

to

piv = c3.getValue();

But i dont really know about versioning, i always use the latest.

wiffzack
06-28-2004, 01:03 PM
@toasterdude: Put the money back in your pocket. This is just quick and dirty (havent tested large objects) and maybe not stable too. Oh and thanks for the idea :)

You dont need to select anything - Just a layer with the words

Wich LW version do you have?

toasterhombre
06-28-2004, 01:35 PM
LW 7.5c What versions do you think it will work with?

toasterhombre
06-28-2004, 01:44 PM
Oops. . .I modified that line as per your post but still get the same error? Hmmm. . . . .

wiffzack
06-29-2004, 12:32 AM
Isn't 2.6 since 7.5c? I developed on [8] but i have 7.5 installed.

Did you remove the line

@version 2.6

?

But i will check it with good ol 7

wiffzack
06-29-2004, 01:12 AM
Hmm, i was wrong. There is no getValue method... It works in 7.0 as it is.

Download it again and just clear the '@version 2.6' line. Or change to 2.2. Like Lynx3d said before.

I hope thats it.

toasterhombre
06-29-2004, 06:19 AM
Thanks guys! Getting very close! Are you sure none of you script writers want to make a few bucks? I got the script to work, except for a few minor issues, plus I might need a few more similarly simple scripts. Since I would be including these in a product for Video Editors, I'd be more than willing to pay for some custom scripts.

The above script works except:

Checking the pivot point box did not adjust the pivot of each layer to the objects center, but rather stayed at the origin.

Splitting the layers worked fine except the last letter of the word remains in layer 1, rather than the first letter of the word being in layer 1. I could really use the layers to be in the same order as the letters of the word.

Also one minor problem that I don't think could be solved "automatically". Any letter "i" winds up in 2 layers for obvious reasons.

That might actually be cool in some cases. In other cases we can teach the user how to cut and paste the dot into the same layer as the "i".

However if we do that, we might need another script to shift all the layers down, leaving no empty layers between letters. I am assuming that would be fairly straight forward.

I have downloaded a script for adjusting the pivot points but that must be run on each layer separately.

I was also winding up with "stray" points which could be a result of beveling the text. These stray points wind up also having a layer.

So as you see a "down and dirty" little script can get more complicated.
If anyone here, either wants to make a few bucks doing some custom scripts or knows someone that does. . . . .let us know.

My partner lives pretty close to Bob Hood, but we haven't seen Bob in years! I am sure he'd know someone!

wiffzack
06-29-2004, 06:51 AM
What? The pivot is not centered? This works fine in LW8. I will check it in 7 later.

Ah the problem with the i. :o I dont saw that but its not only for letters. I think it would be better to enter the text in the plugin but thats a lot of work with fonts etc.

Well i have no problem with the first letter in the last layer. Changing this could be possible but theres a lot of work to do and it doesn't matter in layout, right?

I dont want to write this as a wellthought plugin cause its too much work and bugfixing, my english is very bad and the ls docs arent what i need. And i am in austria - so thats problematic too.

But i am shure you get it ;)

toasterhombre
06-29-2004, 07:14 AM
Well, thanks for all your help. I will find someone that wants to write some scripts I am sure! For me the letters need to be in order as I will be using follower etc. We know quite a few LW guys that do lscript so we will keep looking for a "programmer".

Once again thanks very much for all of your help!!!!!!

wiffzack
06-29-2004, 09:07 AM
The centering of pivot works everywhere. I guess its your fault with the modify i told you. Did you download it again?

I have some workarounds for you:

I think the last letter is no problem, its always only the last letter.

With the letters that arent connectet you could create 2point polys with individual surface to connect the letter and cut them in one go after the plugin has finished?

A .p would be better for you cause lscript tends to get slow if you want it all