PDA

View Full Version : Free Script : Auto (Unique) Surface Rename



Matt
07-27-2004, 08:15 AM
Hi all

I've been working on a script that uniquely renames selected polygon's surface name.

Finally managed to make the renaming part to work intellgently: if you have 30 polys selected the suffix will be 01, 02, 03 etc. if you had 1000 polys selected the suffix will be 0001, 0002, 0003 etc.

Helps keep them in order in the surface editor.

I'm sure there are scripts out there already that do something similar (and probably better) but I like to practise my LScript every now and again!

Anyway; here it is, hope someone finds it useful!

Cheers
Matt

P.S. Code is fully commented to help others, I know it helps me!

Matt
07-27-2004, 08:16 AM
. . . and the ZIP file (can only attach one item at a time!)

Hervé
07-27-2004, 08:22 AM
hey thanks a lot Matt... dunno if it exists or not, but That will come in handy, sure enough !

@+;)

Karmacop
07-27-2004, 08:33 AM
Matt, if you have 1000 wont they be 0001, 0002, 0003 etc? :confused:

Matt
07-27-2004, 08:38 AM
Hehe! I noticed that myself after I posted it, have changed it!!!

Rest assured it does it correctly in the script!!! :)

Panikos
07-27-2004, 08:54 AM
Hey Matt

Thanks very much for developing this script. Its very useful.

Can you place it on the web, and let www.flay.com to place it as news ?

I am doing it always with pleasure to submit news to flay, many users use such tools very often, and they are unaware of an automated solution.

Merci again :cool:

Matt
07-27-2004, 09:58 AM
Thanks Panikos - it is done! :)

Exper
07-27-2004, 10:24 AM
Thanks for sharing! :cool:

Karmacop
07-27-2004, 11:10 AM
It's good the lscript works properly ;)

If you need somewhere to host the file I can put it on my site.

thekho
07-27-2004, 12:00 PM
Thanks for sharing, matt! :)

riki
07-27-2004, 07:54 PM
sweet thanks matt, this could be a huge time saver.

Is it possible to add an option to keep the current surface attributes?

Matt
07-28-2004, 01:24 AM
I was thinking about adding an option to create random diffuse / specularity etc. etc. so _if_ you can access all the surface parameters you could make a copy before (a big job though) - I'll look into it!

omeone
07-28-2004, 01:58 AM
This is sweet Matt, a few times I needed something like this...

and the commenting in the LScript is a loverly bonus

Exper
07-28-2004, 02:00 AM
Yep... well done Matt! :cool:

trick
07-28-2004, 04:31 AM
Great Script !!!

Maybe you could change it so it (optionally) assigns an equally named texture (which is loaded in the image editor) with a selectable UV-map (that was preassigned with quad-mapping for example) in the color channel. then you could easily randomly map 100's of windows in your building :)

Cobalt
07-28-2004, 05:37 AM
Can anyone give an example of how this would be useful? In my ignorance, I am not seeing the bigger picture here.

omeone
07-28-2004, 05:42 AM
Yeah, Im always using sequentially numbered ortho-photography tiles, where each poly name is sequential numbered (same as the images)

I tend to name the poly surface the same as the image to keep things easy to follow, sometimes UV maps are added with the same name too.

(wow: that has to be most mind-numbing post Ive ever written :))

3DBob
07-28-2004, 06:11 AM
Nice one matt - I'm definitely up for something that creates random luminosity / colour / spec / between two user selectable values - that would really be useful.

Also the UV map thing would make it super fast to map a load of windows - maybe making a number of UV maps as required - say 10, then 10 window shots could be mapped across a mass of windows - with the above variability in surface attributes you would have a pretty cool building v.quickly.

3DBob

Lightwolf
07-28-2004, 08:08 AM
Originally posted by 3DBob
Nice one matt - I'm definitely up for something that creates random luminosity / colour / spec / between two user selectable values - that would really be useful.

Well, I was thinking in that direction the other day as well. As shader that duplicates SE's functionality (i.e. textures and envelopes for all settings), and uses those as the other value to interpolate to, randomly, either on a poly by poly, or a object by object basis.

Would be very handy, and should be possible :)

Cheers,
Mike

Matt
07-29-2004, 02:11 AM
Thanks for the comments! Guess I need to brush up on my Lscript even further to accomodate all the features!!!

Mike - you can guess where my first port of call will be when I get stuck! Yep, you guessed it!!! :)

tcoursey
02-08-2006, 01:22 PM
Nice Script Matt. I don't do much LScript yet, but am trying to get into it. Have you seen or could your script be modified to allow basically a Find and Replace kind of renaming.

Meaning if you have a bunch of surfaces in an object named "Room1_Surface2" could you have the script replace all the Room1 text with Room2 etc.?

Thanks for any thoughts. Nice script.

xchrisx
02-11-2006, 04:51 PM
this is great. thanks so much for sharing. :thumbsup:

Matt
07-04-2010, 01:22 AM
Nice one matt - I'm definitely up for something that creates random luminosity / colour / spec / between two user selectable values - that would really be useful.

Finally got around to doing this feature request! (Only 6 years late! Gulp!)

Available on my website (last in the list):

http://www.pixsim.co.uk/lightwave_lscripts.html

archijam
07-04-2010, 02:38 AM
Awesome matt!

Now just update the grammar ;)

zapper1998
07-04-2010, 03:12 AM
cool

tk

Matt
07-04-2010, 09:47 AM
Awesome matt!

Now just update the grammar ;)

I just noticed this myself, fixed! :D

nickdigital
07-04-2010, 10:30 AM
Awesome script. I can definitely make use of this.

Thanks for your generosity. :thumbsup:

-EsHrA-
07-04-2010, 12:50 PM
cheers matt!

mlon