PolyToolsPolyDraw : GlobalUtilityPlugin

 

   

Graphite Modeling Tools - Quick Navigation

This GlobalUtilityPlugin introduced in 3ds Max 2011 exposes an interface providing access to the Graphite PolyDraw tools.

The functionality was first implemented in 3ds Max 2010 using different functions that were not officially supported as MAXScript tools. This interface consolidates all relevant properties and methods in one place and let MAXScript users apply them in their own tools.

Topic Navigation:  

Properties

Drag

StepBuild

Extend

Optimize

Shapes

Splines

Surface

Topology

Strips

Branch

EndTool

SwiftLoop

PaintConnect

   

Constructor:

Class instances not creatable by MAXScript 

PolyToolsPolyDraw interfaces:

Interface: PolyToolsPolyDraw 

Properties:

PolyToolsPolyDraw.offset: float : Read|Write 

Get/set the Offset value defining the distance from the Grid/Surface to draw at.

   

PolyToolsPolyDraw.MinDistance: float : Read|Write 

Get/set the Minimum Distance value defining the size of the smallest polygon generated during drawing.

   

PolyToolsPolyDraw.DistanceType: integer : Read|Write 

Get/set the Distance type.

Possible values are:

0 - in Pixels

1 - in Units

   

PolyToolsPolyDraw.BranchTaper: float : Read|Write 

Get/set the Branch Taper value which defines the amount of tapering applied to branches while being drawn.

Negative values shrink the branches, positive values make them thicker, and a value of 0.0 causes no tapering.

   

PolyToolsPolyDraw.TopoAutoWeld: bool : Read|Write 

When set to true, geometry generated after using the Topology tool will be welded to the original geometry.

   

PolyToolsPolyDraw.SurfaceDoQuads: bool : Read|Write 

When set to true, painting a surface after calling the .Surface() method will produce mainly quads.

Methods:

PolyDraw Methods

<bool>PolyToolsPolyDraw.Drag () 

Activates the Drag tool which lets you move around elements on the surface or on the grid.

The functionality of the Drag tool depending on the keys pressed is as follows:

Keys Pressed

Function

No Keys Pressed

Click and drag to movevertices.

Shift

Click and drag to move edges.

Ctrl

Click and drag to move polygons.

Shift+Ctrl

Click and drag to move edgeloops.

Shift+Ctrl+Alt

Click and drag to move element.

<bool>PolyToolsPolyDraw.StepBuild () 

Enters Step Build drawing mode.

Below are the different functions of the Step Build tool, depending on which keys are pressed:

Keys Pressed

Function

No Keys Pressed

Click to place vertices on grid or surface.

Shift

Hold shift and click+drag over unconnected vertices to fill in the gaps between vertices with quad polygons. It will always create a polygon from the closest 4 vertices.

Ctrl

Click to delete a polygon. The vertices will remain in the mesh so that if you accidently create a face in the wrong place it's easy to just delete the face and draw again closer to the vertices you want.

Alt

Click to remove a vertex.

Ctrl+Alt

Click to remove an edge.

Ctrl+Shift

Click to place and select, or select vertices. When 4 vertices are selected a polygon will be automatically created. The 2 last vertices from the last created polygon are included in the new selection so the user only needs to click 2 times to create the next polygon. Release ctrl and shift to clear the selection.

Shift+Alt

Hold and drag to select vertices. Click to create polygon from the selected vertices. Good for creating polygons with as an example 3 or 5 sides. When the keys are released the selection is automatically cleared.

Ctrl+Shift+Alt:

Click and drag to move a vertex around on the grid or surface. By moving the mouse around over the vertices with the keys pressed you will see which vertex the tool has snapped to.

<bool>PolyToolsPolyDraw.Extend () 

Activates theBorder tool which lets you work on the open edges of the object. Open edges are edges that have only one polygon attached to them.

Below are the different functions of the Border tool:

Keys Pressed

Function

No Keys Pressed

Click and drag to create polygons by dragging from border vertices.

Shift

Create polygons by dragging from a border edges.

Shift+Ctrl

Click and drag to create a polygon between 2 edges.

Ctrl

Click to delete a polygon and its isolated vertices.

Shift+Ctrl+Alt

Click and drag to move a vertex around on the grid or surface.

You can also use this tool to edit the object in screenspace. Sub-object elements will be moved perpendicular to the current view. There is no need to change the active coordinate system for this to work:

Keys Pressed

Function

Alt

Click and drag to create polygons in screenspace by dragging from border vertices.

Alt+Shift

Create polygons in screenspace by dragging from a border edges.

Alt+Ctrl

Click and drag to move a vertex around in screenspace.

<bool>PolyToolsPolyDraw.Optimize () 

Activates the Optimizer tool which can be effectively used to optimize meshes by quickly sketching away details.

Here are the functions of the Optimize tool depending on the keys pressed:

Keys Pressed

Function

No Keys Pressed

Click and drag to move vertices.

Shift+Ctrl

Click on edges to remove the edgeloops they are on.

Shift

Click and drag target weld vertices, collapsing the first selected vertex into the next dragged over. Several vertices can be welded in a single stroke.

Shift+Alt

Click on an edge to collapse all the edges in the edgering it resides on.

Alt

Click to remove vertex.

Ctrl+Alt

Click to remove edge.

Ctrl

Click and drag to paint connections between vertices.

Shift+Ctrl+Alt

Click and drag to move a vertex around on the grid or surface.

<bool>PolyToolsPolyDraw.Shapes () 

Activates theShapes tool which lets you quickly draw polygon shapes on grid or surface.

The result after one click-drag will be a single polygon shaped as you drew it, projected onto a model or grid. This tool has the complementary tool "SolveSurf" to create a workable mesh from the shape. With these two tools combined it is very easy and fast to create as an example details on the surfaces of other object. See below for more info about SolveSurf.

Here are the different functions for the Shapes tool depending on the keys pressed:

Keys Pressed

Function

No Keys Pressed

Click and drag to draw polygon shape.

Ctrl

Click to delete polygon.

Shift+Ctrl+Alt

Click and drag to move a polygon.

<bool>PolyToolsPolyDraw.Splines () 

Activates the Splines tool which lets you draw spline shapes on a geometry surface or grid. These splines can then be made renderable or used in a loftting operation to create quick details.

The functions of the Splines tool:

Keys Pressed

Function

No Keys Pressed

Click and drag to draw splines.

Ctrl

Click to delete spline.

Shift+Ctrl+Alt

Click and drag to move the closestspline.

NOTE:Due to certain technical limitations this tools has no Undo functionality.
<bool>PolyToolsPolyDraw.Surface () 

Enters Surface mode - drawing on the grid or other objects will create a mesh of polygons. If the property PolyToolsPolyDraw.SurfaceDoQuads is set to true , the polygons will be mostly quads.

Returns true on success, false on failure.

<bool>PolyToolsPolyDraw.Topology () 

Activates the Topologytool.

It lets you draw lines on a surface where the lines form a grid of quads or triangles, then automatically create a mesh from that grid.

When the user right-clicks to step out of the tool a polygon mesh is automatically created from the lines.

If the PolyToolsPolyDraw.TopoAutoWeld property is set to true , the created mesh will be attached to the selected Editable poly object and vertices that are close on the border will be welded together. This way you can continue adding to the surface of the selected object.

The distance set in the PolyToolsPolyDraw.MinDistance property will determine the resolution of the lines. If the value is too small some faces might be missed in the polygon creation. A value of 10 with the unit type set to pixels should work well in most cases.

Here are the different functions of the PolyTopo tool that depend on which keyboard key is pressed:

Keys Pressed

Function

No Keys Pressed

Click and drag to draw lines on surface or grid.

Shift

Click and drag to continue a line from the closest endpoint of the line.

Ctrl

Click to delete a line.

Mouse RightClick

Exit tool and create polygon mesh.

<bool>PolyToolsPolyDraw.Strips () 

Activates the Strips tool which lets you paint strips of polygons where the strips turns to follow the movements of the mouse. This provides a good way to quickly lay out the topology foundation for a mesh.

Here are the functions of the Strips tool depending on the keys pressed:

Keys Pressed

Function

No Keys Pressed

Click and drag to draw polygon strips.

Shift

Click and drag to start painting strip from existing edge The closest edge will be picked.

Alt

Press while drawing stripto enter a mode where the strip currently being painted will be closed by dragging close to another edge. A polygon will be created between the "front" edge of the strip and the close edge.

<bool>PolyToolsPolyDraw.Branch () 

Activates the Branch tool which lets you paint multi segmented extrusions from polygons with optional tapering to form "branches". The extrusions will be aligned to the screen.

The value of the PolyToolsPolyDraw.BranchTaper property determines the difference in size between the first and the last polygon in the branch. A value of -1.0 will make the last polygon as small as possible. The PolyToolsPolyDraw.MinDistance property lets you set the distance between the segments in the extrusion.

Here are the functions of the Branch tool depending on the keys pressed:

Keys Pressed

Function

No Keys Pressed

Click and drag to draw extruded branches from the polygon closest to the mouse.

Shift

Click and drag to draw extruded branches from the selected polygon(s).

Ctrl

Click to select a polygon.

Ctrl+Alt

Click to select/deselectadditional polygons.

<bool>PolyToolsPolyDraw.EndTool () 

Exits the current tool.

Returns true on success, false on failure.

Modeling Tools Drawing Methods:

<bool>PolyToolsPolyDraw.SwiftLoop () 

Activates the Swiftloop tool which lets you place edgeloops at the position you pick on an edge. It also lets you slide edges or edge loops in different ways.

Below are the different functions of the tool, that depend on which keyboard keys are pressed:

Keys Pressed

Function

No Keys Pressed

Click to insert edgeloop on an edgering at the position of the click.

Shift

Click to insert edgeloop on an edgering and fit the new loop to the flow of the surrounding surface.

Ctrl

Click to select edgeloop. This will also automatically enter edge subobject level.

Alt

Click and drag over a vertex on a selected edgeloop to slide the edgeloop on the edgering that the loop is on. Move the mouse along the edges to the sides of the initial vertex.

Ctrl+Alt

Same as with Alt but since Ctrl is pressed the distance to the sides for all vertices of the loop will be made the same as the distance for the initial vertex.

Ctrl+Shift

Click to remove an edgeloop.

NOTE:

It does not matter which "Draw on" type is selected for this tool. It will function the same in all modes.

<bool>PolyToolsPolyDraw.PaintConnect () 

Enters Paint Connect mode.

The Connect tool lets you paint and edit connections between edges and vertices. If the "Set Flow" checkbox is checked the created edges will be automatically adjusted to fit the flow of the mesh. Below are the different functions of the tool, that depend on which keyboard keys are pressed:

Keys Pressed

Function

No Keys Pressed

Click and drag to paint a connection between edges.

Shift

Click and drag to paint a connection between edges in the middle of the edges.

Ctrl

Click and drag to select and connect vertices.

Alt

Click to remove a vertex.

Ctrl+Alt

Click to remove an edge.

Ctrl+Shift

Click to remove an edgeloop.

Shift+Alt

Click and drag to paint a double connection between edges.

Ctrl+Shift+Alt

Click and drag to move a vertex around on the grid or surface.

NOTE:

This tools works the same in all "Draw on" modes except if you move vertices with Ctrl+Shift+Alt.

See Also