N_Loc 1.0.0 (maya plugin)

Design your own locator


License Type:


File ID:


File Size:

64.2 KB

Created / Updated:

Mar 20, 2011 / Mar 23, 2011


Catalin Niculescu   More free downloads from this user See users marketplace items See this users portfolio Send a Private Message


linux, windows






maya, locator, plugin

Download and n_loc blog:


N_loc is a maya locator that does not use predefined shapes. Instead, using the provided nLoc.py, you can create
any shape using either your own presets, or simply objects (curves and/or meshes) in your scene.
You can create an n_loc out of any number of curves and/or meshes. As far as meshes goes though,  keep in mind that
only quads and triangles are supported, nGons will be skipped.

Quick start:
1. Copy nLoc.py to your PYTHONPATH
2. Load the plugin
3. Python-import nLoc.py.
4. Draw a nurbsCurve or create a polyCube make sure they are selected
5. Run:

import nLoc
loc = nLoc.nLoc()

Other usage examples:
Example 1: #no arguments needed if you have a valid selection
loc = nLoc()
Example 2: #tell the class which curves and/or meshes to use
loc = nLoc(curves = ["curve1", "curve2"], meshes = ["pCube1"], name = "locName")
Example 3: #use a preset
loc = nLoc(preset = "solidCube")
Example 4: #use a preset and change the orientation
loc = nLoc(preset = "solidCube", presetOrientation = [0, 90, 0])

NOTE1:    Most importantly, because this locator is not using static, predefined position values I need to store
        these into attributes on the node itself, just like a nurbsCurve or mesh would do.
        In order to keep the computation to a minimum, these attributes are being cached.
        The only way to refresh an n_loc is by turning on the update attribute, which will re-compute
        all attributes, including the boundingBox.
        Don't forget to turn it back off!!!
        You will need to update each time you...:
        1. change any of the lines, quads or tris attributes
        2. change the localPosition and/or localScale attributes AND the useLocalOffset attribute is true

NOTE2: You can always extend the shape by adding lines, quads or tris attributes and do an
update, but if you need to remove any of these, you're better off recreating the node
NOTE3: Constantly reading the localPosition and localScale attributes slows things down a little
bit if you have a large number of n_locs in the scene, so turn on the useLocalOffset attribute only if you need it

Package contains:
1. Source code
2. Compiled plugins for Maya 2011 win32, win64 and linux64
3. Creation tools

Enjoy and drop me a line if you have any questions.

Edit1: Fixed a typo in one of the examples.

Please use the Bug System to report any bugs.
Please use the Feature Requests to give me ideas.
Please use the Support Forum to ask any questions.
Please rate my product in the Review section.

People who have favorited this file