Share your Macros and Layouts


Quick tip for windows users, if you put the script that you want to run in the same directory as your modo.exe file, you can just type in the command line, button definition etc… and it will find it (as opposed to putting the entire path c:\program files\etc…)


Ok, I am still getting "Unknown script "/Users/…/

  1. Do you have to put your harddrive name before /Users?

  2. What format do you have to save file script as: simpletext, generic text, or generic OS X text file?


It MUST be regular text, and it MUST have “#!perl” as the first line in the file.


In a Mac if you try to run an script within a folder with a space in its name it will not run.

@/Users/lluistar/Lux Scripts/poda_mirrorHalf.lxm (do not work)

@/Users/lluistar/Lux_Scripts/poda_mirrorHalf.lxm (work)



Sorry about all these questions… :hmm:

It looks like I was able to make it work, however if I try to load it from my “Documents” folder inside a folder called “Modo Scripts” it tells me that it can not find the script. Is it limited to only three levels down? Can you have spaces in the folders(/“Modo Scripts”)?

Here is the command that DOES work:

Here is the command that does NOT work:
@/Users/home/Documents/Modo Scripts/


It will if you put it in quotes or curly braces:

@"/Users/lluistar/Lux Scripts/poda_mirrorHalf.lxm"
@{/Users/lluistar/Lux Scripts/poda_mirrorHalf.lxm}

Spaces mark the beginning of the argument string that is passed to scripts.

– Joe


YES!!! :buttrock:

That worked! Thank you…


Rob, you rule. I’m surprised modo doesn’t have more of these by default. Maby it does and I just haven’t gotten there yet. I’m going to be making a lot of pie meues (for selection, convert select, loop/ring/grow/ etc, transformations, deform ,etc…) Alt-space, and Ctrl-Tab are kinda wierd key combos by default - kind of interupts w/ the navigation keys (if you’re thumb is on ‘alt’ you have to curl your index finger around to hit space, not very natural…) I like Maya’s marking menues a lot and these are just as good it seems.

I want to map bridge and connect along with slice and…oops, no bridge and connect ; )



only works in front viewport, select 1 single outer edge or loop
leaves the stretch tool active to do some small tweaks.
also will center the geometry first before extending to keep things even.
Feel free to tweak and improve were needed

tool.set “actr.selectauto” “on”
select.typeFrom “polygon;edge;vertex;item” [1] “all”
select.edgeLoop “base” [0]
tool.set “edge.extend” “on”
#Command Block Begin: ToolAdjustment
tool.setAttr “” “cenX” [0 m]
tool.setAttr “” “cenY” [0 m]
tool.setAttr “” “cenZ” [0 m]
tool.setAttr “” “axisX” [0.0 %]
tool.setAttr “” “axisY” [-100.0 %]
tool.setAttr “” “axisZ” [0.0 %]
tool.setAttr “” “axis” [1]
tool.setAttr “” “upX” [0.0 %]
tool.setAttr “” “upY” [0.0 %]
tool.setAttr “” “upZ” [100.0 %]
tool.setAttr “edge.extend” “segs” [1]
tool.setAttr “edge.extend” “offX” [0 m]
tool.setAttr “edge.extend” “offY” [0 m]
tool.setAttr “edge.extend” “offZ” [0 m]
#Command Block End: ToolAdjustment
tool.set “xfrm.stretch” “on”
#Command Block Begin: ToolAdjustment
tool.setAttr “” “cenX” [0 m]
tool.setAttr “” “cenY” [0 m]
tool.setAttr “” “cenZ” [0 m]
tool.setAttr “” “axisX” [0.0 %]
tool.setAttr “” “axisY” [0.0 %]
tool.setAttr “” “axisZ” [100.0 %]
tool.setAttr “” “axis” [2]
tool.setAttr “” “upX” [0.0 %]
tool.setAttr “” “upY” [100.0 %]
tool.setAttr “” “upZ” [0.0 %]
tool.setAttr “xfrm.stretch” “factX” [100.0 %]
tool.setAttr “xfrm.stretch” “factY” [100.0 %]
tool.setAttr “xfrm.stretch” “factZ” [100.0 %]
#Command Block End: ToolAdjustment
#Command Block Begin: ToolAdjustment
tool.setAttr “xfrm.stretch” “factY” [125.0 %]
tool.setAttr “xfrm.stretch” “factX” [125.0 %]
#Command Block End: ToolAdjustment


I doubt it’s mac related, it will be the same on almost all OSes.
When you call a command line that has space in the path you generally must enquote it.

“@/Users/lluistar/Lux Scripts/poda_mirrorHalf.lxm”

Should works.


I’m pretty sure the quotes need to start after the @ (at least that’s how I coded it…)

@"/Users/lluistar/Lux Scripts/poda_mirrorHalf.lxm"
@{/Users/lluistar/Lux Scripts/poda_mirrorHalf.lxm}

– Joe


Hi People & Guru’s,

I must be completely blind, because I can’t find any where how to activate my macro recording/replay feature.

I record a macro then try to replay it, I then get an error message saying cannot replay interactive recording…

also another error message: Replay Recorded Macro
Command Disabled

I am going batty trying to find the fix for what I am trying to do.

I just want to replay the macro just like in the Soccer Ball tutorial.

But I get those error messages

If anyone could point the way to this blind idiot

It would be appreciated.

(Hopefully) Thanks in advance



I posted a question about how to stop the Interactivity Error Message before.

Sorry to all

After two days I figured it out.

If you leave Modo to take a look at another window like one of the tutorials and you are Macro recording it will not understand that and not be able to replay that recorded Macro…Duuhh

Sorry again people

NoClue …(sounds right!)


This is an alternate version to the 0 bevel macro. This one bevels the selection by 0, and then returns to your previous tool or selection mode.

tool.makePreset “tool.previous”
tool.set “tool.previous” “off”
bevel “yes”
#Command Block Begin: ToolAdjustment
tool.setAttr “poly.bevel” “shift” [0 m]
tool.setAttr “poly.bevel” “inset” [0 m]
#Command Block End: ToolAdjustment
tool.set “poly.bevel” “off”
tool.setPreset “tool.previous”
tool.set “” “on” “0”

The only problem with it currently is that I cant find a way to get it to save and reload your previous action center. So right now I just have it set the action center back to selection which is what I use most commonly with this tool. If anyone knows how to make this reload your last action center then please update this! :slight_smile:

Edit: I added the inset and shift “0” to the macro (doh)


I need more details:

  • What were the commands in the macro?
  • Can you save the macro and post it here?

Some commands cannot be used in scripts. select.paint, for example, only works in interactive mode (as in, you need to paint with your mouse).

The “Command Disabled” message is because the command isn’t usable in the current context. Then Event Log may be able to provide more useful information about which command failed.

– Joe


Some macros can be tunred interactive by placing this line in it


select.typeFrom “polygon;edge;vertex;item” [1] <---------

instead of the paint select ,line


All that line does is switch to polygon selection mode, so that will help if the tool you’re using works on polygons. The command is used to create the Polygon, Edge, Vertex, etc. buttons in the modo Modes sheet; the button will be selected if the first selection type is the topmost (most recent) selection type relative to the others in the list.

Anyway, that line is pretty much the same as doing this (at least I think there’s a select.type command that does this):

select.type “polygon”

– Joe


Hi there, I have a few questions regarding the workPlane.
Can I query the position of a vertex in the current active workplane ( btw it would be cool to have a toggle in the info and stat panel to switch between world space and workplane coordinates ).
Can I set the worplane( workplane.edit ) based on vertex selection? btw I can align the workplane the way I want but also snap it to the the first vertex selected. I have try it without succes. I have set the workplane orientation with the home hotkey then I have select a vertex. In the info panel I can grab the coordinates of this vertex then use it with workplane.edit [][][]…But it doesnt work the workplane doesnt move to the correct position. Acutally it moves correctly if I enter 0 for the orientation part of the workplane.edit command.
I think that is really important to have a very good control here to be able to align components easely in space.
Lux, gives us some more examples!


To use the script below, select 3 vertices and run it. Best used bound to a key. What it does is create the fourth vertex and make a face. Very useful for box modeling.


sub vectorAdd (@@)
my @ret;
local(*A) = shift (@);
local(*B) = shift (@
$ret[0] = $B[0] + $A[0];
$ret[1] = $B[1] + $A[1];
$ret[2] = $B[2] + $A[2];
return @ret;

sub pointToVector (@@)
my @ret;
local(*A) = shift (@);
local(*B) = shift (@
$ret[0] = $B[0] - $A[0];
$ret[1] = $B[1] - $A[1];
$ret[2] = $B[2] - $A[2];
return @ret;

my @verx = lxq("query layerservice verts ? selected");

if($#verx != 2)
	lxout("Need to select 3 vertices");

my @posA = lxq("query layerservice vert.pos ? $verx[0]");
my @posB = lxq("query layerservice vert.pos ? $verx[1]");
my @posC = lxq("query layerservice vert.pos ? $verx[2]");

my @vA = pointToVector(\@posB, \@posA);
my @vB = pointToVector(\@posB, \@posC);

my @pos = vectorAdd(\@vA, \@vB);

@pos = vectorAdd(\@pos, \@posB);
lx("tool.set prim.makeVertex on");
lx("tool.setAttr prim.makeVertex cenX $pos[0]");
lx("tool.setAttr prim.makeVertex cenY $pos[1]");
lx("tool.setAttr prim.makeVertex cenZ $pos[2]");
lx("select.drop tool");


How do you savew it?
As what kind of file and then how do you load it?
Thanks for any help…I had seen the files for Modo somewhere but it eludes me as to how to install/use the scripts.