Copyright (c) 2020, Mike Green
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
I don't use LSED for my programming, I use Context which is a language independent programming environment, which you can load up your own language highlighter. Here's my highlighter for it. It may be missing some commands, I'd be grateful if you point any omissions out to me :)
Here's my lscript reference manual compiled from both the LW reference manual and the release notes, as far as I've got through them.
Download Lscript zip
BlurVMaps0.5 (06/06/08) Uses a more accurate method of blurring.
Blurs selected vmaps.
Box by Connected1.0 (29/08/16)
Converts all connected groups of polygons into boxes in the background layer, for whatever purpose, say LOD.
BreakUp0.71 (03/06/08) Now works with any LW (Prototype)
Breaks your object into bits. Dependent on the LW boolean so might be a little flakey in places, but I've tried to minimise this
BuildWeb1.1 (10/06/18) 1.1 Added a Minimum distance value
Connects selected points by two point polygons. Useful for building structures for dynamics, like balls that will stay spherical.
Convert VMapsv1.1 27/08/08
This allows you to convert one vmap to another, or choose which values from a vmap you want to use to make another vmap. So for example you can use the Green channel from a colour map and the z channel from a morph map to make a new UV map.
Images To Planesv1.8 06/03/2014 Fixed bug in pixels/m
Images To Planes v2.0 26/11/2018 Updated to work with 2018, including Alpha channel support
This takes a selection of images and creates a series of planes with an image on each one. Useful for compositing etc. You also have the option to make a caption for the image as a 3d object, and select a suffix which will match images with their alpha for the transparency channel.
Inverse Bridgev1.1 (18/02/08) Fixed a bug for certain arrangements of polygons.Thanks to Exception for the report.
This works like bridge, but inverted. So you select a loop, or string of polygons and it will replace them with two polygon caps. This is useful for creating floors in buildings etc.
This will allow you to select and invert weightmaps either around 0 or 50% with an option to invert points which have no value in the map.
Julienne 3d4/06/2014 v1
This will allow you to slice your selected polys along 3 axes interactively. Download MG_Julienne_3D_MD.zip
JulienneRT18/10/2009 V1.3 Fixed Division by zero bug.
This will allow you to slice your selected polys along one axis interactively. Download MGJulienneRT.zip
This allows you to lathe around an arbitary axis as defined by two selected points.
Download(8 only) MGLatheAxis.zip
Download(9 only) MG_Lathe_Axis_MD.zip
This allows you to split selected 4 sided polys into grids.
LW8 : MGLatticeSplitPolygons85.zip
Multi Rail Clonev1.0 (28/08/16)
Clones the foreground layer along ALL the background curves.
Radial_Array_Packed 05/12/09 Added Fibonacci cloning
This clones an item into a radial array. I wrote this as a way to make sunflower heads, which are packed with seeds.
This will allow you to select points/polys by a percentage.
This scatters connected groups of polys according to the settings.
Select Polygons By Size
This will allow you to select polys either by x/y/z size or by radius.
Designed as a replacement for LW's curve smooth command, (ctrl-s) this will
a) if you have curves selected, smooth those curves as normal.
b) if you have points on curves selected, will split/or unsmooth those curves at those points.
Basically it acts as a toggle between a sharp and a smooth corner on a point.
SmoothAssist v1.2 (new method)
For all you smooth shift modelers out there. When you smooth shift 0m and then drag points about, this will clean up after you. If you merge after smooth shifting, you can end up with 2 point polys around the polys you've smooth shifted, but whose points you haven't moved. This selects them all and removes them, leaving you free to continue modeling.
Split by Seamsv1.1 Now no requester.Yay!
This will split the selected points along UV seams, allowing you to perform operations on discontinuous UVs .
This plugin makes 8 sided cylinders with quad poly ends in real time suitable for turning into subpatched cylinders.
Ultimate Clonev1.3 02/01/10(Fixed random rotation bug)
This allows you to clone multiple background objects across the points or polys of a mesh. You can have random sizes, rotations, align the clones to axes or the poly/point normals, or just clone to a percentage of the mesh. It's trying to do what all the other clone plugins do, hence the ultimate name.
This performs a quantize function, like LW's own, on your UVs.
UV NormaliseV1.0 (29/08/16)
This normalises your UVs, scaling them so they range between 0 and 1 in UV space. It works on selected points, but you'll probably need to unweld them as Modeler doesn't distinguish between selected discontinuous points and unselected discontinuous points.
UV Relaxv1.3 Now no requester!
This smooths out overlapping UVs which you might get when you UV map an ear for example.
This breaks an object up according to the Voronoi method. It uses Lightwave's own boolean function to do the breaking, and thus becomes more likely to create bad geometry the more pieces an object is broken into. User beware!
This generates Hair guides for FFX. You can grow multiple areas of hair, have the splines for the hair in the forground, and polygons which share the spline's Surface or Part in the background. Hair will sprout from the polygons and follow their respective splines
This allows you to select items with instancers applied to them, for example nulls, and clone the instanced meshes to their positions in the instancer. Useful if you need to replace instances with actual meshes. It parents the new clones to the item they were instanced by. Some limitations: Due to a limitation in the SDK it only copies in Local mode (ie the mode which doesn't use the instanced objects position/rotation/scale) and it only does it for the current frame.
Save with SuffixV1
This allows you to save all objects in a scene with an additional suffix
Copy Paste KeysV1
This allows you to select an object and copy a section of it's keys to a selection of objects.
Clone Item to ItemsV1
This allows you to select an object and copy it to the position and rotations of a selection of objects.
These set the selected objects to 100% or 0% dissolved, and if they have an envelope on them, it will create a key for it at the current time, using the key type (TCB, Linear, Stepped etc) that the first key on the channel has.
This allows you to convert an object with a colour Vmap into an array of coloured lights at it's vertices.
This creates a goal item at the position of the first item, parented to the second item selected. This way you can move your IKB hand to your IKB head and pin it there easily.
This can be used instead of LW's own slightly faulty MirrorHierarchy command.
MotionMixerControlV1 (for 9.2+ only)
This allows you to turn off/on MotionMixer plugins for a selection of items and their children, so it can beused alongside IKB
Assigned to a hotkey, this will flick the preview range between the render range, and 100 frames either side of the current frameslider position, allowing you to switch between an overview of your animation, and a working area.
Renamer21/04/08 Fixes bugs and now if one object is selected, renamer will work on it and its children.
This allows you to rename multiple items. Find/replace, numeric increments and other forms of renaming are supported.
This allows you to replace images en masse in your scene. For example, you might want to replace all psds with tgas, or replace all images with images of the same name from another directory.
With the Save transformed script, you can select items in a scene and save them in their current positions/deformations. It comes with a second script which allows you to load a lot of meshes from a directory into one obect. With the two scripts together, you can compile a scene into one object.
With these you can select children of selected objects or recursively select all it's descendants.
With this you can greatly speed up sewing set up by selecting all your items to be sewn, and using this. If the seams have coincident points (points in the same place) then they will be sewn together. It saves a clothfx SETTINGS file for each object, which can then be loaded for each item using the Load button. You can greatly speed up processing by making a selection set vmap of the points to be sewn.
Assign these three to a hot key each and switch between 1/2/3 levels of subdivivision more easily.
Update bones(13/12/09)v1.8 Now optionally moves IK goals to their IK chains.
This modifies the current skeleton in an object so that it's position/rotation/scale matches that of the skelegons in the object. So if you've added motion modifiers and set up IK on your skeleton you can go back into Modeler and change the Skelegons position in there and update Layout to match. It will optionally add in new skelegons, or remove ones not belonging to the Skelegons, reparenting their children if neccesary. The brand new version also switches on and off motion modifiers while working, so should avoid any screw ups with them, but channel modifiers aren't affectable in this way, so try not to use them unless they won't affect your bones in the rest pose.
Download MGUpdateBonesGN.zip(9.2 or above)
Download MGUpdateBone.zip(9 or earlier)
This copies your config files but changes their filenames to a new version number and saves them to a new subdirectory so you don't have to do everything from scratch.
These allow you to hot key the visibilty of your selected objects between invisible, bounding box,frontface wireframe, polygons and textured.
v3.2 (19/01/10) fixes minor bug when clearing layout items from the scene
This adds layers functionality to LW. You can group items one of 3 ways, as a Display layer, Render layer or Selection layer. Display layers allow you to hide or view your group in different ways, or lock them from selection. Render layers allow you to set the render flags (Visible by camera/rays, or shadow options) for the group. Selection layers are just selection sets which WORK with load from scene.
You also now have the ability to assign hotkeys to all the items of a certain type in a certain layer. You could for example group all your characters fingers in a Selection layer, then when the panel is active you hit the hotkey to select those fingers. I assign '8' to the MGOpenLayersGN command so I can just hit 8 to select the layers panel, and then hit the hotkey of the layer that I want to select.
Note: If you're using a version of lw before 9.6 use the legacy LayersMC as NT recently fixed item referencing(Maybe from 9.5 too) and the latest version cleans up the hack which tried to work around the problem, but doesn't load items lists generated by the hack version
Download MGLayersMCLegacy.zip (For use with older scenes which used layersMC previously)
This adds a little motion capture control to Lightwave. You choose the tool (move, rotate etc) you want to capture and press go. The plugin will then countdown and start playing in Layout so you can animate your item and then it will stop on the last frame.
This allows you to selecta group of objects and parent collision spheres to them which are scaled roughly to the objects size and shape. This can be used as a faster though less accurate collision model which you might be able to get away with.
Copy Paste Poses
This allows you to copy and paste poses from one object to all selected objects.
This enables you to toggle on and off various motion and view based attributes to make setting up a character easier. You could do all this in the spreadsheet scene editor, but this collects the settings all in the same place.
Make Muscle Bonev1.5(21/07/12) Fixed UI glitch
This enables you to select a bone and a target bone, and applies a muscle motion modifier, so as the target moves towards the first bone, the bone expands around the x and y axis and shrinks on the z-axis, bulging like a muscle.
Download MGMakeMuscleBoneLegacy.zip(For use with older scenes which used layersMC previously)
This turns all selected items into stretchy items which can be scaled in any axis without affecting the size of their children.
Download MGMakeStretchyLegacy.zip(For use with older scenes which used layersMC previously)
Motion Limiterv1.1 Now interactive
This limits an object between adjustable intervals on any axis (in parent coordinates) This works interactively if you have motion paths on
Hierarchy to Bones1/10/2008 Rewrite. Should be more robust, and makes joints separately from influence bones.
This allows you to convert a hierarchy to bones, for example motion capture in the form of nulls to a skeleton animated the same way. Select the hierarchy's parent and off you go. You can scale the hierarchy.
Parent FollowerV1.1 (fixed small bug in calculation)
This is a quick to apply follower for parent rotations which obeys rotation channel locks and Bone rest positions along with an easy setup script.
This does a standard record pivot rotation/reset pivot rotation, but does it for all items selected.
Select a hierarchy for which you wish to reset the IK goals to their IK controlled object's positions and run this.
SpringyThingyv 2.81(19/10/07)Fixed bug with start time
This makes an object follow another with proper wibbly inertia. Good for antennae, tails or other wobbly bits.
Download MGSpringLegacy.zip(For use with older scenes which used layersMC previously)
Wheelv1.7 10/03/08(now saves rotation direction)
This makes an object rotate around it's axis the further it moves.
Download MGWheelLegacy.zip(For use with older scenes which used layersMC previously)
Import CSV1/07/18 v1.1 Will now import all values not just the first 3 in the line.
This script imports a text file and applies it to the position of the selected item. Each line of the text file must be of the form
minutes:seconds,X,Y,Z,H,P,B,SX,SY,SZ etc (filling the item's channels as it finds them) ie
Save and Backup
These two scripts will save backups (with incremental suffixes) of the current lws/lwo to directories called Old in the Scenes and Objects directories respectively, keeping the original name as the current version.
MTL Import/ExportV1.6 Added a work around to .obj imported objects
This allows you to load and save MTL files (AliasMaterial files) for use with .obj format. There is also a Maya MTL exporter,which produces mtl files in the same format as Maya, for those programs which only adhere to the Maya format. The original is more flexible, but some programs have problems with this.
Papagayo Importerv1.3 20/01/10 There's now a Smooth interpolation option and a fade frames setting.
This allows you to select an object with morph targets, and load a .dat file exported from the free lip sync program Papagayo (available from here) It has the option of fading phonemes depending on how close the surrounding phonemes are, much like the human mouth will skip shapes when speaking quickly.
This allows you to save only selected objects in layout.
3rd PartyThese are plugins which seem to have disappeared from the net, so I've put them up on my page to keep them available. If the originator of them is unhappy with this, just contact me and I'll take them down.
AutoIKSelect the top of your item chain, and the bottom of your item chain, and apply this to add a goal and set the selected channel controllers of your items to IK.
Background conform plusJust like BGCOnform, but with more control..
Boolean textureThis can be applied as a clip map to two objects, and by setting the options, you can get an animated boolean on those objects.
Shift Spline TransformLike the spline deformation tool for layout, but on steroids.
mn_DrainBGVMapAllows you to transfer a vmap from a background object to a foreground object irrespective of point count
MotionBakerThis allows you to bake moho/animestudio animations per frame, allowing them to be imported into other packages so the animation to be read correctly.
Bone Parent MasterThis matches a bone's name in on layer, with a bone of the same name in the parent layer, and makes the parent bone control the child's bone. This is useful where you have a switch layer with a bone layer parent, and you want to animate the bones in the bone layer but still deform the switch layers. Just copy the bones from your parent object to the switch layer, then apply this script in the Embedded script toggle in the Layer properties panel. It will control the length, strength, offset and position/angle/scale of the matching bone.
Line Width Magnet23/10/10 Added sensetivity for the resize control
This is like the line width tool, but has a fall off. It is an adapted script from the original by Ramón López
A modification of the FA_Magnet tool which allows you to alter the falloff using the Alt key and dragging.
Dat to Morph Dial24/05/110
A menu addon for keying the selected bone to the positions of bones named after papagayo phonemes in its exported .dat file. Export the voice dat file from papagayo, select the MorphDials blending bone (the one called "AI;E;...") and choose the script, which will then prompt you for the .dat file. It will then move that bone to the position of each of the phoneme bones and key it.