paint soften edges

paint soften edges

HeavyMetalFox
Advocate Advocate
2,167 Views
8 Replies
Message 1 of 9

paint soften edges

HeavyMetalFox
Advocate
Advocate

Hello,
Is there a way to paint edges so they are hard or soft instead of having to select each edge and apply soften or harden
I remember there is a marking menu for this, am I right?

0 Likes
Accepted solutions (1)
2,168 Views
8 Replies
Replies (8)
Message 2 of 9

artfully3d
Advocate
Advocate

Hi!

 

If you Shift+RightClick on your edge, there will be a marking menu for Soften/Hard edges

artfully3d_0-1678039009933.png

 

0 Likes
Message 3 of 9

HeavyMetalFox
Advocate
Advocate

Yes, I know this tool, but its not a "paint" tool?

0 Likes
Message 4 of 9

brentmc
Autodesk
Autodesk

You can use the Paint Selection Tool to select the edges and then run soften edges on the selection.


screenshot_000166.png

Brent McPherson
Principle Software Developer
0 Likes
Message 5 of 9

HeavyMetalFox
Advocate
Advocate

Isn't there a way to paint to "soften edge" action?

0 Likes
Message 6 of 9

brentmc
Autodesk
Autodesk
Accepted solution

Hi,

 

The brushes in Maya can be scripted so it is possible to make a custom soften (or harden) edges brush.

Here is a script that will do the job and I just copied the shaderPaintTool.mel example in the installed Maya scripts and adapted it to soften edges.

 

Save this to a file called edgeSoftenPaintTool.mel in your script path. (or paste everything except the first line into the script editor and run it)

 

Note: The magic sauce is the -bsc/-beforeStrokeCmd and -asc/-afterStrokeCmd flags where you can define commands that get run before and after every brush stroke.

 

 

 

global proc edgeSoftenPaintTool()
{
	global string $gEdgeSoftenPaintTool;

	if ($gEdgeSoftenPaintTool == "") {
		$gEdgeSoftenPaintTool = `eval "artSelectCtx -i1 \"artSelect.png\" -ads false edgeSoftenPaintContext"`;
	}

    string	$cmd;
	$cmd  = "ArtPaintSelectTool; artSelectCtx -e";
	$cmd += " -bsc \"setComponentPickMask Edge true;\"";
	$cmd += " -asc \"polySoftEdge -a 180 -ch 1;";
	$cmd += "select -clear;\" ";
	$cmd +=	$gEdgeSoftenPaintTool;
	eval $cmd;
	setToolTo $gEdgeSoftenPaintTool;
}

 

 

 

 

Brent McPherson
Principle Software Developer
0 Likes
Message 7 of 9

HeavyMetalFox
Advocate
Advocate

Thanks alot man, works like a charm 🙂
When I paint it on edges, it  highlights them before applying the soften which is a bit distracting and not very smooth (even id "reselecting highlights" is turned off in thea2.jpg select menu)
Is there a way to paint directly without highlights things? 

Message 8 of 9

brentmc
Autodesk
Autodesk

No, it is not possible to avoid selecting the edges while painting because the script uses the paint select tool and it softens the edges after each stroke. (and clears the selection)

Brent McPherson
Principle Software Developer
Message 9 of 9

HeavyMetalFox
Advocate
Advocate

ok thanks alot.

0 Likes