Download Version 0.5b: jj_loopstep

Introduction

The major feature of the script is that it allows you to select multiple loops in one go spaced apart by a 'step' size that you choose - this is great for creating corrugations in geometry.

This script is very much in beta at the moment whilst I try and find a quicker set of algorithms to collect the loops and determine the correct direction. On high poly count objects there's a significant lag before the script completes (5-10s) when selecting large ranges of loops e.g. 100+ loops.

JJ_loopstep is also a simple tool to shift loops. You can choose the direction you want to go in and the 'step' i.e. the number of loops you skip over for each call to the command. The tool is very similar to modo's brilliant previous/next loop command.

At the moment, the tool is a very rough and ready work in progress (more alpha than beta) and will be extended to cover edges and provide all the necessary checks for user input (not there at the moment).

  • Move to adjacent polygon loops quickly and easily
  • Select multiple spaced loops simultaneously (see animated gifs below)

Range Select
Here, multiple poly loops are selected in one direction terminating only when there are no more loops in that direction at a step of 2.

Application.jj_loopstep(0,2,'infin')


Range Select
Here, multiple poly loops are selected in one direction terminating only when there are no more loops in that direction at a step of 2 but, in this case, starting from the far edge ensures you select every other poly loop on the geometry.

Application.jj_loopstep(0,2,'infin')


Range Select
Here, multiple poly loops are selected in one direction but since the sphere has no obvious termination point the script checks that it's not iterating over loops that have already been made.

Here the step setting is 4.

Application.jj_loopstep(0,4,'infin')

Adjacent Loop
Here, the selected polys are moved in a single direction at a step of 1. The command for this is:

Application.jj_loopstep(0,1,'next')

(If you drag this command from the script window to a toolbar it will automatically create a button for you)


Adjacent Loop
Here, the selected polys are moved in the other direction at a step of 1. The command for this is:

Application.jj_loopstep(1,1,'next')

Adjacent Loop Large Step
Here, the selected polys are moved in a single direction at a step of 4. The command for this is:

Application.jj_loopstep(0,4,'next')

How This Works
Here's the workflow that the script uses. I'm pretty sure this is less than optimal!


How to Use jj_loopstep

Install the script using the instructions below.

Select two polys that describe the loop or the whole loop.

Type the command into the script window:

Application.jj_loopstep(0,4,'infin')

The first argument is the direction: either 0 or 1 for positive or negative translation
The second argument is the step setting: i.e. how many loops you want to skip
The third argument is the mode: either 'next' for individual loop traversal or 'infin' for iterating until the loops naturally terminate in any given direction.

Notes on Usage

1. You only need to select two polygons to describe a loop.
2. Probably best to create script buttons on toolbars when you use this script.
3. The direction toggle i.e 0 or 1 is probably best viewed as a 'one way or the other' toggle. Depending on the orientation of the loop in 3D space, it's hard to define what a 'positive' or 'negative' direction means so really it's a case of trial and error.

How to Install jj_loopstep

jj_loopstep is a Python script which means that you'll need a copy of Python installed on your machine and a copy of the PyWin32 extension.

Installing Python takes a couple of minutes. You can either download these separately from here:

PyWin32

Python

or download a single bundle from ActiveState which does the complete install in one hit:

http://www.activestate.com/Products/ActivePython/?tn=1

Once you've installed Python you just need to drag jj_loopstep into your plugin directory.

C:\users\xxxxx\Softimage\XSI_5.11\Application\Plugins

Then, go to File: Plugin Manager and hit 'Update All'. The commands should now be available.





Julian Johnson
julian@exch.demon.co.uk