Support for MAXScript in Pencil+ 3 has been improved.
Please consult 3ds Max's help documentation for details about using MAXScript.
Pencil+ 3 Line / Methods
setLineset
Sets the Line sets used by this Line.
Return value: None.
Parameter: Array (array of Line sets).
getLinesetNum
Returns the number of Line sets used by this Line.
Return value: Integer (number of Line sets).
Parameter: None.
getLineset
Returns a specific Line set used by this Line.
Return value: Line set object.
Parameter: Index of the Line set to retrieve (number of the Line set we want, starting from 0).
createLineset
Creates a new Line set object.
The new Line set object is not automatically used by this Line.
Add it to the array of Line sets and use the method setLineset to add it to the Line sets used by this Line.
Return value: A new Line set object.
Parameter: None.
solveDuplicatedMtlByNameNew!
Performs the same operation as the button [Update Materials].
Replaces materials in line sets that are not allocated to an object with materials that have the same names and exist in the scene.
Return value: Number of materials replaced.
Parameter: None.
removeUnusedMtl New!
Removes from the material list materials in line sets that are not allocated to an object.
Return value: Number of materials removed.
Parameter: None.
Pencil+ 3 Line set / Properties
objects
Array of the objects being used.
Starting with version 3.02, it became possible to change the number of elements in the Array.
mtls
Array of the materials being used.
Starting with version 3.02, it became possible to change the number of elements in the Array.
[Pencil+ 3 Line set / Access to the brush settings]
- brush
- brushOutline
- brushObject
- brushIntersection
- brushSmoothingGroup
- brushMaterialID
- brushNormalAngle
- brush_Hidden
- brushOutline_Hidden
- brushObject_Hidden
- brushIntersection_Hidden
- brushSmoothingGroup_Hidden
- brushMaterialID_Hidden
- brushNormalAngle_Hidden
Pencil+ 3 Material / Methods
setZone
Sets the Zones used by this Material.
Return value: None.
Parameter: Array (Array of Zones).
getZoneNum
Returns the number of Zones used by this Material.
Return value: Integer (number of Zones).
Parameter: None.
getZone
Returns a specific Zone used by this Material.
Return value: Zone object.
Parameter: Index of the Zone to retrieve (number of the Zone we want, starting from 0).
createZone
Creates a new Zone object.
The new Zone object is not automatically used by this Material.
Add it to the array of Zones and use the method setZone to add it to the Zones used by this Material.
Return value: A new Zone object.
Parameter: None.
Pencil+ 3 Material / Line Functions / Methods
setObjectsForVisibleLines
Sets the target objects for "Draw Hidden Lines of Targets as Visible Lines".
Return value: None.
Parameter: Array (Array of objects).
getObjectsNumForVisibleLines
Returns the number of target objects of "Draw Hidden Lines of Targets as Visible Lines".
Return value: Integer (number of objects).
Parameter: None.
getObjectForVisibleLines
Returns a specific target object of "Draw Hidden Lines of Targets as Visible Lines".
Return value: Object.
Parameter: Index of the object to retrieve (number of the object we want, starting from 0).
setMtlsForVisibleLines
Sets the target Materials for "Draw Hidden Lines of Targets as Visible Lines".
Return value: None.
Parameter: Array (Array of Materials).
getMtlsNumForVisibleLines
Returns the number of target Materials of "Draw Hidden Lines of Targets as Visible Lines".
Return value: Integer (number of Materials).
Parameter: None.
getMtlForVisibleLines
Returns a specific target Material of "Draw Hidden Lines of Targets as Visible Lines".
Return value: Material.
Parameter: Index of the Material to retrieve (number of the Material we want, starting from 0).
setObjectsForMaskHiddenLines
Sets the target objects for "Mask Hidden Lines of Targets".
Return value: None.
Parameter: Array (Array of objects).
getObjectsNumForMaskHiddenLines
Returns the number of target objects of "Mask Hidden Lines of Targets".
Return value: Integer (number of objects).
Parameter: None.
getObjectForMaskHiddenLines
Returns a specific target object of "Mask Hidden Lines of Targets".
Return value: Object.
Parameter: Index of the object to retrieve (number of the object we want, starting from 0).
setMtlsForMaskHiddenLines
Sets the target Materials for "Mask Hidden Lines of Targets".
Return value: None.
Parameter: Array (Array of Materials).
getMtlsNumForMaskHiddenLines
Returns the number of target Materials of "Mask Hidden Lines of Targets".
Return value: Integer (number of Materials).
Parameter: None.
getMtlForMaskHiddenLines
Returns a specific target Material of "Mask Hidden Lines of Targets".
Return value: Material.
Parameter: Index of the Material to retrieve (number of the Material we want, starting from 0).
Tips!
Sample scripts:
- Allocate Pencil+ 3 Materials containing a single zone to the scene objects.
pcl3mtl_0_en.ms - Return the Zones of the Pencil+ 3 Materials in the scene to their default values.
pcl3mtl_1_en.ms - Allocate a Pencil+ 3 Line to Effects and add a Line set.
pcl3line_en.ms - Copy the Pencil+ 3 Line Sets registered in the effects.
pcl3lineset_copy_en.ms - Add a Pencil+ 3 Material element to Render Elements.
pcl3mtl_elem_en.ms - Add a Pencil+ 3 Line element to Render Elements.
pcl3line_elem_en.ms