- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello !
I'm a newbie in scripting 😄
For displaying the normal i'm using this :
// Normal type
polyOptions -displayNormal true -global;
polyOptions -f; // on facets
// normal size
polyOptions -sn 0.3;
// Increase normal size
// polyOptions -r -sn 1.5;
and to switch off this :
polyOptions -displayNormal false -global;
-------------------------------------------------------------------------
---------------------------------------------------------------------------
It's doing the job 😄
But when i try to regroup it in a simple script to use with a hotkey for example
global proc togglenormal()
{
int $tmp[] = polyOptions -displayNormal -global;
if ($tmp[0]) polyOptions {polyOptions -displayNormal false -global;}
else {// Normal type
polyOptions -displayNormal true -global;
polyOptions -f; // on facets
// normal size
polyOptions -sn 0.3;}
}
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
I'm having this :
// Error: int $tmp[] = polyOptions -displayNormal -global; //
// Error: Line 3.30: Invalid use of Maya object "polyOptions". //
// Error: int $tmp[] = polyOptions -displayNormal -global; //
// Error: Line 3.45: Invalid use of Maya object "displayNormal". //
// Error: if ($tmp[0]) polyOptions {polyOptions -displayNormal false -global;} //
// Error: Line 5.43: Invalid use of Maya object "polyOptions". //
// Error: if ($tmp[0]) polyOptions {polyOptions -displayNormal false -global;} //
// Error: Line 5.62: Invalid use of Maya object "displayNormal". //
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
It's certainly nothing but it's my first "script"
Thanks
Solved! Go to Solution.