Change Line Segment Colour

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Change Line Segment Colour

Post by videodv »

Here is a simple script that you can use to change a line or line segment to a different colour this idea came from a recent tread I was looking at (cant remember where now!)

Here is the script
https://dl.dropboxusercontent.com/u/662 ... _colour.7z



Please keep in mind this is a first test but seems to be ok


Regards
Chris.
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Re: Change Line Segment Colour

Post by videodv »

I forgot to point out on the video if you need straight ends then untick "Round Caps" in the Advanced section in the styles palette.

Regards
Chris.
User avatar
Víctor Paredes
Site Admin
Posts: 5815
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Re: Change Line Segment Colour

Post by Víctor Paredes »

Nice script. I'm sure it will be useful in the future for fast segment painting.
Thanks.
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Re: Change Line Segment Colour

Post by videodv »

Your welcome

Regards
Chris.
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Re: Change Line Segment Colour

Post by videodv »

Hi

Just a quick test pic to show some of the things this script will do that might not be obvious nothing fancy but could be of use at some point.

Image

Regards
Chris
amanandink
Posts: 259
Joined: Wed Feb 13, 2008 10:28 pm
Location: Kilkenny, Ireland
Contact:

Re: Change Line Segment Colour

Post by amanandink »

Hey Chris

the script looks great, the only thing I noticed that might be an issue is on light colours, there is a pixel of black, its like the underneath colour shining through. you can see it on the yellow and green line

Jeremy
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Re: Change Line Segment Colour

Post by videodv »

amanandink wrote:Hey Chris

the script looks great, the only thing I noticed that might be an issue is on light colours, there is a pixel of black, its like the underneath colour shining through. you can see it on the yellow and green line

Jeremy
Yep thats because the underlining line colour is black i'm sure the reason for the black pixel showing is because this was a quick and simple test and I changed the line size after creating the original line.

The second from the left is also coloured yellow but I changed the opacity to 50% to show the line colour underneath (black in this case)

Regards
Chris.
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Re: Change Line Segment Colour

Post by videodv »

A final quick test pic.

Image

Regards
Chris.
videodv
Posts: 69
Joined: Tue Feb 08, 2011 10:17 am

Re: Change Line Segment Colour

Post by videodv »

Hi All

If you get an error for line 100 please change line 98 from this ptID = mesh:Point(segID+j) to this ptID = mesh:Point(segID)

Sorry about this.

Regards
Chris.
Post Reply