View Full Version : Help w/ Softening Normals Script

11 November 2005, 03:48 AM
looking for a way to toggle between 0 (hardened normals) and 180 (softened normals) of a selected object.
i only have a global proc to harden normals:

polySoftEdge -a 0 -ch 1;

i'm no good with queries and if statements.
any help will be greatly appreciated.
thank you.

11 November 2005, 04:41 AM
I thought this would have been easy, but I don't know how to check normal angle. You can't querry polySoftEdge.

11 November 2005, 05:31 AM
Try this. I still can't figure out how to querry normal hardness.

11 November 2005, 06:35 AM
thank you for the script.
it's not working on my character model.
it keeps telling me to only select one object when only one object is selected.
so to double check i go into the hypergragh and check to see if more than one object is selected; but there isn't one.
i even try seperating it and maya is telling me this :

// Error: polySurface57 has only one piece. Ignored. //

if i were to place a cube in the scene it works fine.
please help

11 November 2005, 04:56 PM
Try this version and tell me how it goes:

11 November 2005, 08:13 PM
This is intereseting. The polyInfo command when used to find the vertices connected to an edge returns the vertex numbers as well as "Hard" when the normals have an angle of 0, but nothing when soft.

polyInfo -ev yourObject.e[edge#]

Didn't see that in the documentation. Just popped up in another script.

11 November 2005, 10:24 PM
i'm unable to comprehend what you just said.

11 November 2005, 01:59 AM
That's ok, but did the new version of the script work?

11 November 2005, 02:03 AM
i'm not too sure what you mean by new script.
i only have the script yo uposted

11 November 2005, 02:41 AM
Post number 5 links to the new script!

11 November 2005, 03:48 AM
:bounce: :bounce: :thumbsup:
sorry i didnt see the other reply.
thanks a million!

11 November 2005, 03:51 AM
why not just make a shelf button or a sdk on the character set the slider to 0 for hard normals and 1 for soft normals. super easy and no scripting is involved. :)

11 November 2005, 03:53 AM
why not just make a shelf button or a sdk on the character set the slider to 0 for hard normals and 1 for soft normals. super easy and no scripting is involved. :)

because chicks dig teh scripting! :love:

11 November 2005, 04:24 AM
the script works and all but there's a slight problem.
if i were to toggle the normals; it's fine.
now if i were to delete history after toggling the normals i get this:

// Error: No object matches name: polySoftEdge2 //
then the script no longer works.

please help.

11 November 2005, 06:02 AM
I'm not suprised: I hadn't thought about history. I'll fix it tomorrow, because I gotta sleep now!

And thanks for testing!

11 November 2005, 01:21 AM
I attached a third version to this post. It should now work even if you delete history. Tell me how it goes. -shawn

11 November 2005, 08:22 PM
thank you sooooooooo much! :thumbsup:
it works!

11 November 2005, 10:17 PM
Awesome! I think I'll upload it to highend3d now. The only other similar script I could find there toggles the visibilty of the normals.

11 November 2005, 03:44 PM
i guess one tiny little itty bitty request on your script...
but is there a way to soften and harden "multiple" objects?

CGTalk Moderation
11 November 2005, 03:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.