Pass a Float into panelBreakup

You can change the function to accept a float parameter and pass it to the -delta setting. In the panelBreakup function header, add the following:

global proc panelBreakup (float $myDelta) {

Maya Python Opengl Float
Figure 20.67 Results of panelBreakup script.

In the script body, add:

nurbsToPoly -name polyPanel -polygonType 1 -delta $myDelta panel;

Save the script, and re-source it. If the script is in one of the Maya environment script path directories, you can simply type and execute it in the Script Editor as follows:

source panelBreakup;

Load the scene ex8start again, and type panelBreakup 0.1;

You will get an error if you do not give the function a float number after typing panelBreakup.

  • Error: panelBreakup; //
  • Error: Wrong number of arguments on call to panelBreakup. //
0 0

Post a comment

  • Receive news updates via email from this site