Cutter
	    	 | 
	
| 
			 
			A .rman script does not create the interface in Maya. That task is accomplished by a
			Mel script that uses two Pixar Mel procedures,  Naming Conventions
			Cutter's authoring environment uses the following scripting and naming conventions. 
			It is assumed a custom UI should be implemented by a .rman script and (at least) two Mel scripts. 
			For example, the interface shown in figure 1 uses the following scripts.
			
			  | 
	
			
			Example - An Interface for a Procedural Primitive
			This section provides a step-by-step example of creating a ".rman" 
			script and its associated Mel scripts from scratch. The work flow consists of three
			steps. runProgramUI(); At render time the sphere does not appear in the image, instead, it is replaced by a cluster of points as shown in figure 4. 
			 
			 The reader should review the tutorial, RfM: Customizing before continuing.  | 
	
| 
			 
			  | 
		
    Declare param {string rp_python_path} {
        label "Helper App Path"
        description "The path to the procedural helper app."
        subtype file
        range {*.py}
        }
		 | 
	
| 
			 
			Change the name of the param to   | 
	
	
			
			Adding a Int SliderUse the popup menu to insert an "int" (slider) param block - figure 7. Then edit the code as shown below.  | 
	
| 
			 
			  | 
		
    Declare param {int rp_points_num} {
        label "Number of Particles"
        subtype slider
        range {1 10000 10}
        description "The number of particles to generate."
        }
		 | 
	
	
			
			Adding a Float SliderUse the popup menu to insert a "float" (slider) param block - figure 8. Then edit the code as shown below.  | 
	
| 
			 
			  | 
		
    Declare param {float rp_points_width} {
        label "Particle Size"
        subtype slider
        range {0.001 1}
        description "The diameter of the particles."
        }
		 | 
	
| 
			 The .rman script should now look like this, # runProgram.rman file
rman "-version 1" {
Declare param {string rp_python_path} {
    label "Helper App Path"
    description "The path to the procedural helper app."
    subtype file
    range {*.py}
    }
  
Declare param {int rp_points_num} {
    label "Number of Particles"
    subtype slider
    range {1 10000 10}
    description "The number of particles to generate."
    }
  
Declare param {float rp_points_width} {
    label "Particle Size"
    subtype slider
    range {0.001 1}
    description "The diameter of the particles."
    }
}
			Although the coding of the .rman script has not been completed it can be pre-visualized in a browser. Previewing the UITo preview the interface defined by the ".rman" script use the keyboard shortcut alt + e, control + e or Apple + e. A representation of the user interface defined by the .rman script will open in a browser - figure 9. 
			 Two more float slider widgets must be added to the .rman script. When complete the script should like this.  | 
	
			
			Step 2.1 - Creating the UI Mel scriptRight mouse click anywhere in the .rman document and from the popup menu select "UI PreShape script" - figure 10. 
			 
			The Mel script generated by Cutter should be saved as 
			runProgramUI.mel in the users
			RfM_mel directory. Refer to the tutorial 
			"RfM: Customizing" for information about this
			directory.
			  | 
	
			
			Step 2.2 - Creating the RI Mel script
			Use the  
			 The Mel script generated by Cutter should be saved as runProgramRI.mel in the users RfM_mel directory.  | 
	
			
			Step 3 - Editing the Mel scriptsThe runProgramRI.mel script will require editing. The finished script is shown here.  | 
	
			
	    	Using the ScriptsThe finished scripts (runProgram.zip) should be saved in the following locations.     maya/
        |_ scripts/gen_points.py
        |
        |_projects/
                  |_ RfM_mel/
                            |_ runProgram.rman
                            |_ runProgramUI.mel
                            |_ runProgramRI.mel
			
			To add the interface to the shape node of surface follow these two steps.
			  | 
	
© 2002- Malcolm Kesson. All rights reserved.