PDA

View Full Version : Share your Macros and Layouts


ChristianFischer
09-21-2004, 04:34 PM
probably some of you have created some nice macros already.
so maybe you would like to share them :)

so let me start with a very very small one i created (just opened this thread to collect all those cool tools you created ;))

it works like the "pshift" plugin in lightwave ... it extrudes a polygon selection with a value of 0 and switches back to selection mode.

cheers chris

Griffon
09-21-2004, 05:49 PM
This script sets the pivot point to the last selected vertex. Just copy and paste it to a file. Make sure "#!perl" is the first line.

#!perl
my @verx = lxq("query layerservice verts ? selected");
my $idx = lxq("query layerservice vert.index ? @verx[$#verx]");
my @pos = lxq("query layerservice vert.pos ? $idx");
lx("tool.set pivot.move on");
lx("tool.setAttr pivot.move posX $pos[0]");
lx("tool.setAttr pivot.move posY $pos[1]");
lx("tool.setAttr pivot.move posZ $pos[2]");
lx("tool.doApply");
lx("tool.set pivot.move off");

Xacto
09-22-2004, 02:34 AM
:applause:

Thanks!

vuedesprit
09-22-2004, 02:51 AM
eric , can u tell me how to make this usefull script to work as a menu button plz?

jangell
09-22-2004, 07:00 AM
eric , can u tell me how to make this usefull script to work as a menu button plz?

- Put that script in a file called MovePivotToVertex.pl
- Open the Form Editor from the System Menu
- Find a form you want to put the button in; you'll probably want to put it in the Main Menu, or one of the modo Tools sub-forms.
- Right-click on (new control) and select Command from the menu
- Enter this as the command definition, modified for where the file actually is on your machine. The @ symbol is used to run scripts:

@C:\MovePivotToVertex.pl

You can click-pause-click on the new control's row to give it a better label.

-- Joe

vuedesprit
09-22-2004, 09:55 AM
thanx eric for this script, actually it was one my requested scripts to c , i want to c that it's ok, but need to have more function, like:
-if u select a vertex, the pivot will b this vertex
-if u select an edge, the pivot is the midle of the center of the edge
-if u select a polygon, the pivot is the center of the bouding box of this polygon
-if u apply it with no selection, the pivot is the center of the bounding box of the layer mesh

jangell
09-22-2004, 11:50 AM
thanx eric for this script, actually it was one my requested scripts to c , i want to c that it's ok, but need to have more function, like:
-if u select a vertex, the pivot will b this vertex
-if u select an edge, the pivot is the midle of the center of the edge
-if u select a polygon, the pivot is the center of the bouding box of this polygon
-if u apply it with no selection, the pivot is the center of the bounding box of the layer mesh

Well, fine then:

http://www.tmproductions.com/LuxPublic/MovePivotToElement.zip

This one is a bit too big paste into the message body. Right click to save that to disk.

-- Joe

EDIT: Fixed URL

vuedesprit
09-22-2004, 12:11 PM
the link is not working
denied

jangell
09-22-2004, 12:35 PM
the link is not working
denied

Stupid web server not letting you download .pl files from it...

I zipped it and fixed the link; try it now:

[URL]http://www.tmproductions.com/LuxPublic/MovePivotToElement.zip[/URL

-- Joe

bhealy27
09-22-2004, 12:43 PM
Gentlemen,

I tried to post a reply to this thread a moment ago but the system locked up and I don't know if it ever went thru.

Anyway, I cut and pasted the command into a .pl file and preceded the file name in the command with the @ symbol but when I ran the command I got a Run Script Implicit message box with the error message "Unknown Script 'C:\Program....'


Any suggestions?

Brian

Dion Burgoyne
09-22-2004, 04:00 PM
Yeah, just put it in your main modo directory, and take off the absolute path just put in

@name of script

vuedesprit
09-22-2004, 04:27 PM
oki, now the link is working, but once again, reporting:

-the edge mode is not working, if u select an edge and fire the pivot, it will not centre the pivot to it's centre, the centre is going to the layer mesh bounding box.

suggestion :any possibility to make the pivot stick to the mesh, like if we define the 3rd corner of a rectangle as the pivot, and once we moved this vertex, the pivot is no more this vertex, now it's in the original place, can we link the pivot translation to the new defined one, so always we can find it at the same defined place?

Griffon
09-22-2004, 05:21 PM
Gentlemen,

I tried to post a reply to this thread a moment ago but the system locked up and I don't know if it ever went thru.

Anyway, I cut and pasted the command into a .pl file and preceded the file name in the command with the @ symbol but when I ran the command I got a Run Script Implicit message box with the error message "Unknown Script 'C:\Program....'


Any suggestions?

Brian

Two possible reasons. First, the first line of the script MUST contain the line "#!perl". No blank lines above it. Second, if the perl plugin has not loaded. Any plugin the extras directory should load automatially, but you can try it manually by hitting shift-P and adding it. it is called intrperl.lx.

rob baldwin
09-22-2004, 06:18 PM
I've added a couple of new pie menus... they're designed to keep you out of the viewport popup menu:

http://www.studio-orb.com/modo/viewport_shading.CFG
http://www.studio-orb.com/modo/viewport_wires.CFG


Add them by going into your Menus->File->Config Import-> (select the files, you can even select and imprt both at the same time!)

Then, in your Form Editor(F3), you'll see two new forms at the bottom, and you can drag them into the Pie Menus category.

To assign them to keys, go to your Key Editor(F2), and pick Commands, then, in the pop-up menu, pick Popover Forms. You'll see Pie Menus halfway down, expand it, then double click on the menu that you want to assign a key to.

(If you didn't move the two menu configs into Pie Menus in the Forms Editor, shame on you, but they should still be listed at the bottom of the Popover Forms list in the Key Editor. I think that in modo configs, it's a good habit to put things where they belong!)

I've added them to the Ctrl-` and the Ctrl-1 keys, respectively, and whew, they're neato. No more three-level-deep picking of wireframe options...

enjoy!
-rob

jangell
09-22-2004, 07:01 PM
Anyway, I cut and pasted the command into a .pl file and preceded the file name in the command with the @ symbol but when I ran the command I got a Run Script Implicit message box with the error message "Unknown Script 'C:\Program....'

If there are spaces in the filename, wrap it in quotes or curly braces, like:

@"d:\Some Path\My Script.pl"

And the stuff Eric and Dion said.

-- Joe

ambient-whisper
09-22-2004, 09:10 PM
i got a question on scripting toggle keys.( unless theres an easier way to do this. )

lets say that i want to make a single command that toggles wireframe on. and off.
the script would work something like

if wire "off"
then wire "on"

if wire "on"
then wire "off"

something like that. but i dont know any of the scripting languages to do this. so an example would rock how to make the if/then statements in either perl or xml, or whatever?

Turq
09-22-2004, 09:56 PM
lets say that i want to make a single command that toggles wireframe on. and off.
the script would work something like Theres actually a script that comes with modo that does this. Its located in Modo\resrc\MSWireframeToggle.pl

Heres the script itself:

#perl
my $cages, $guides;
$wire = lxq("viewport.3dView wireframe:?");
if ($wire) {
$wire = 0;
}
else {
$wire = 2;
}
lx("viewport.3dView wireframe:$wire");

pabloD
09-23-2004, 12:11 AM
Here are a couple of macros I find useful.

The first is for fixing symmetry. You select the half of your model that you don't like and run the macro. The macro deletes the selected half and mirrors what's left. Simple but quite useful. Of course if you have special vmaps on the selected half you don't want to use this because it will kill them...
http://www.podagraph.com/scripts/modo/poda_mirrorHalf.lxm

The other is even simpler but I still use it often. It simply opens a Command History window.
http://www.podagraph.com/scripts/modo/poda_openHistoryWindow.lxm

You can run these by hitting F6 and selecting the file or you can assign it to a hotkey by opening the Key Editor (F2) and adding an @ followed by the script name including full path next to the Key of your choice. If you already ran a script once you can also just open the Command History Window and RMB on the script on the History tab. modo will present you with an option to Map To Key.

Hope someone finds these useful.

Xacto
09-23-2004, 01:48 AM
Ok, I can figure out how to create a button but linking it to a file is not working. It looks like you use the c: for the PC, what do you use for the MAC?

command: @scriptName/MacintoshHD/ ...... / ....... ?

The mirror script looks very helpful!

Griffon
09-23-2004, 01:53 AM
Ok, I can figure out how to create a button but linking it to a file is not working. It looks like you use the c: for the PC, what do you use for the MAC?

command: @scriptName/MacintoshHD/ ...... / ....... ?

The mirror script looks very helpful!

more like this:

@/Users/home/scriptName.pl

Dion Burgoyne
09-23-2004, 02:33 AM
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 @scriptname.pl in the command line, button definition etc... and it will find it (as opposed to putting the entire path c:\program files\etc...)

Xacto
09-23-2004, 02:47 AM
Ok, I am still getting "Unknown script "/Users/...../scriptName.pl

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?

Griffon
09-23-2004, 02:51 AM
Ok, I am still getting "Unknown script "/Users/...../scriptName.pl

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.

lluistar
09-23-2004, 03:04 AM
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)

Salut,
Lluis

Xacto
09-23-2004, 03:09 AM
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:
@/Users/home/scriptName.pl

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

jangell
09-23-2004, 03:43 AM
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)

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

Xacto
09-23-2004, 04:01 AM
YES!!! :buttrock:

That worked! Thank you...

leuey
09-23-2004, 06:43 AM
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 ; )

-Greg



I've added a couple of new pie menus... they're designed to keep you out of the viewport popup menu:

http://www.studio-orb.com/modo/viewport_shading.CFG
http://www.studio-orb.com/modo/viewport_wires.CFG


Add them by going into your Menus->File->Config Import-> (select the files, you can even select and imprt both at the same time!)

Then, in your Form Editor(F3), you'll see two new forms at the bottom, and you can drag them into the Pie Menus category.

To assign them to keys, go to your Key Editor(F2), and pick Commands, then, in the pop-up menu, pick Popover Forms. You'll see Pie Menus halfway down, expand it, then double click on the menu that you want to assign a key to.

(If you didn't move the two menu configs into Pie Menus in the Forms Editor, shame on you, but they should still be listed at the bottom of the Popover Forms list in the Key Editor. I think that in modo configs, it's a good habit to put things where they belong!)

I've added them to the Ctrl-` and the Ctrl-1 keys, respectively, and whew, they're neato. No more three-level-deep picking of wireframe options...

enjoy!
-rob

Nando
09-26-2004, 01:34 AM
edgeloopextend.lxm
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

#LXMacro#
tool.set "actr.selectauto" "on"
select.typeFrom "polygon;edge;vertex;item" [1]
vert.center "all"
select.edgeLoop "base" [0]
tool.set "edge.extend" "on"
#Command Block Begin: ToolAdjustment
tool.setAttr "center.select" "cenX" [0 m]
tool.setAttr "center.select" "cenY" [0 m]
tool.setAttr "center.select" "cenZ" [0 m]
tool.setAttr "axis.auto" "axisX" [0.0 %]
tool.setAttr "axis.auto" "axisY" [-100.0 %]
tool.setAttr "axis.auto" "axisZ" [0.0 %]
tool.setAttr "axis.auto" "axis" [1]
tool.setAttr "axis.auto" "upX" [0.0 %]
tool.setAttr "axis.auto" "upY" [0.0 %]
tool.setAttr "axis.auto" "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.doApply
tool.set "xfrm.stretch" "on"
#Command Block Begin: ToolAdjustment
tool.setAttr "center.select" "cenX" [0 m]
tool.setAttr "center.select" "cenY" [0 m]
tool.setAttr "center.select" "cenZ" [0 m]
tool.setAttr "axis.auto" "axisX" [0.0 %]
tool.setAttr "axis.auto" "axisY" [0.0 %]
tool.setAttr "axis.auto" "axisZ" [100.0 %]
tool.setAttr "axis.auto" "axis" [2]
tool.setAttr "axis.auto" "upX" [0.0 %]
tool.setAttr "axis.auto" "upY" [100.0 %]
tool.setAttr "axis.auto" "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
tool.doApply

Sha_Man
09-26-2004, 07:11 AM
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)

Salut,
Lluis
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.

jangell
09-26-2004, 08:13 AM
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

noclue
09-26-2004, 08:57 AM
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

NoClue

noclue
09-26-2004, 03:14 PM
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!)

Turq
09-26-2004, 10:14 PM
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.

#LXMacro#
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.doapply
tool.set "poly.bevel" "off"
tool.setPreset "tool.previous"
tool.set "actr.select" "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! :)

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

jangell
09-26-2004, 10:16 PM
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

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

Nando
09-26-2004, 10:44 PM
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
NoClue
Some macros can be tunred interactive by placing this line in it

#LXMacro#
select.typeFrom "polygon;edge;vertex;item" [1] <---------

instead of the paint select ,line

jangell
09-26-2004, 11:11 PM
Some macros can be tunred interactive by placing this line in it

#LXMacro#
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

Labuzz
09-27-2004, 07:39 AM
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!

Griffon
09-29-2004, 12:20 AM
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.


#!perl

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");
die;
}

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("tool.doApply");
lx("select.drop tool");
lx("poly.makeFace");

annaleah
09-29-2004, 01:00 AM
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.




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.

Dion Burgoyne
09-29-2004, 01:14 AM
Copy and paste it into a text file, save it as any name you want then hit F6 and select it, or in a command line type @pathtofile\filename

jangell
09-29-2004, 01:32 AM
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.

Unfortunately, I discovered a similar bug in workplane.edit when I was trying to create a Center on Workplane script this morning. Because of this bug, it is not currently possible to get or set the workplane position or orientation numerically.

-- Joe

annaleah
09-29-2004, 01:55 AM
Copy and paste it into a text file, save it as any name you want then hit F6 and select it, or in a command line type @pathtofile\filename

Thannnnk you!:)

Turq
09-29-2004, 06:09 AM
Here's some cleaner versions of the 0 bevel and 0 extrude tools. These will bevel/extrude by 0 and then return to your last mode (transform, selection, etc) as well as keep your previous action center.


Quick Bevel:

#perl
my $seltype;
if( lxq( "tool.set actr.select ?") )
{
$seltype = "actr.select";
}
elsif( lxq( "tool.set actr.selectauto ?") )
{
$seltype = "actr.selectauto";
}
elsif( lxq( "tool.set actr.element ?") )
{
$seltype = "actr.element";
}
elsif( lxq( "tool.set actr.screen ?") )
{
$seltype = "actr.screen";
}
elsif( lxq( "tool.set actr.origin ?") )
{
$seltype = "actr.origin";
}
elsif( lxq( "tool.set actr.local ?") )
{
$seltype = "actr.local";
}
elsif( lxq( "tool.set actr.pivot ?") )
{
$seltype = "actr.pivot";
}
elsif( lxq( "tool.set actr.auto ?") )
{
$seltype = "actr.auto";
}
else
{
$seltype = "actr.auto";
}
lx( "tool.makePreset name:tool.previous" );
lx( "tool.set tool.previous off" );
lx( "bevel yes" );
lx( "tool.setAttr poly.bevel shift [0 m]" );
lx( "tool.setAttr poly.bevel inset [0 m]" );
lx( "tool.doapply" );
lx( "tool.set poly.bevel off" );
lx( "tool.setPreset preset:tool.previous" );
lx( "tool.set {$seltype} on" );

__________________________________________________________________________

Quick Extrude:

#perl
my $seltype;
if( lxq( "tool.set actr.select ?") )
{
$seltype = "actr.select";
}
elsif( lxq( "tool.set actr.selectauto ?") )
{
$seltype = "actr.selectauto";
}
elsif( lxq( "tool.set actr.element ?") )
{
$seltype = "actr.element";
}
elsif( lxq( "tool.set actr.screen ?") )
{
$seltype = "actr.screen";
}
elsif( lxq( "tool.set actr.origin ?") )
{
$seltype = "actr.origin";
}
elsif( lxq( "tool.set actr.local ?") )
{
$seltype = "actr.local";
}
elsif( lxq( "tool.set actr.pivot ?") )
{
$seltype = "actr.pivot";
}
elsif( lxq( "tool.set actr.auto ?") )
{
$seltype = "actr.auto";
}
else
{
$seltype = "actr.auto";
}
lx( "tool.makePreset name:tool.previous" );
lx( "tool.set tool.previous off" );
lx( "select.edge remove poly less 2" );
lx( "tool.set edge.extend on" );
lx( "tool.attr edge.extend offZ [0 m]" );
lx( "tool.attr edge.extend offX [0 m]" );
lx( "tool.attr edge.extend offY [0 m]" );
lx( "tool.doapply" );
lx( "tool.set edge.extend off 0" );
lx( "tool.setPreset preset:tool.previous" );
lx( "tool.set {$seltype} on" );

brutal
09-29-2004, 07:16 AM
my @selEdges = lxq(qq(query layerservice edges ? selected));

@selEdges always empty with or without selected edges.

Is it a bug or I do something wrong ?

Griffon
09-29-2004, 08:27 AM
This script moves down the selected (or all if none selected) vertices so that the lowest one is resting on the ground plane.


#!perl

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

if($#verx < 0)
{
@verx = lxq("query layerservice verts ? all");
}

my @pos = lxq("query layerservice vert.pos ? $verx[0]");


my $dist = $pos[1];

foreach my $vert (@verx)
{
@pos = lxq("query layerservice vert.pos ? $verx[$vert]");

if($pos[1] < $dist)
{
$dist = $pos[1];
}

}

$dist = -$dist;

lx("tool.set xfrm.move on");
lx("tool.setAttr \"xfrm.move\" \"Y\" $dist");
lx("tool.doApply");
lx("tool.set xfrm.move off");

Labuzz
09-29-2004, 12:26 PM
Hey Griffon any news on the workplane problems?
Any chance to see the Set value command work in the active Workplane CS?
I can use scale to align components with the axis center at the origin but its a workaround...
there's really some inconsitances because when you get a primitive the position is related to the current workplane.

Steve McRae
09-30-2004, 02:00 PM
Turq - check your Private Messages

eFFeFFe
10-04-2004, 08:52 AM
Hi ... I was trying to create a macro or script for Modo that I can link to a key for selecting the next or previous layer (or going to the first and last layer) ...

Created a very very simple macro ... >


#LXMacro#
select.layer [256] "set" [0] [0] [-1]


Now I was wandering if you could replace the layer number (256) by a instructions something like "currentLayer + 1" ... Somebody knows if that is possible ? Or does somebody know the instructions to access layers in Perl script ?

many thanks,
{eƒ}

Griffon
10-04-2004, 08:32 PM
Hey Griffon any news on the workplane problems?
Any chance to see the Set value command work in the active Workplane CS?
I can use scale to align components with the axis center at the origin but its a workaround...
there's really some inconsitances because when you get a primitive the position is related to the current workplane.

Yes, it's a issue. We're working on it.

Griffon
10-04-2004, 08:36 PM
Posted this to another thread, but didn't want it to get lost
It aligns points to the last point selected on the specified axis.

The arguements are any combo of XYZ. ie:

alignToPoint.pl XY
alignToPoint.pl Z
alignToPoint.pl XYZ

#----------cut-----------------------
#!perl

if($#ARGV < 0)
{
lxout("Arguement missing. Needs Axis. ie. \"XY\"");
return;
}

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

if($#verx < 0)
{
@verx = lxq("query layerservice verts ? all");
}

my @pos = lxq("query layerservice vert.pos ? $verx[$#verx]");

if($ARGV[0] =~ /x/i)
{
lxout("X");
lx("vert.set X $pos[0]");
}

if($ARGV[0] =~ /y/i)
{
lxout("Y");
lx("vert.set Y $pos[1]");
}

if($ARGV[0] =~ /z/i)
{
lxout("Z");
lx("vert.set Z $pos[2]");
}
#----------cut-----------------------

yog
10-05-2004, 06:19 PM
This script moves down the selected (or all if none selected) vertices so that the lowest one is resting on the ground plane.

A big thanks for this one Eric. :thumbsup:
I was just thinking today that it would be useful.

OpenNode
10-08-2004, 10:47 PM
I'm sure i'v just not found the spin tri's yet.
But how about this .....
1. You press the triple key to triple a polygon.
2. But woops it's made the edge of the two tri's
in the opposite direction you wanted it to go.
3.You press the same triple key and it spins the tri.

"This would have to call on a selected poly that has already
been tripled and if true spin tri or some thing like that . I really
don't know."

Modo Is a very cool software and been camping out at a friends
to use his copy. lol

P.S. I found Spin Edge "If your in poly mode you select the edge
mode then select the edge then spin edge then return to poly mode
if that's the tool you were using in the first place.
...but would still be nice with both options.
I would like a triple key ......but when pressed a second time it spins the tri.

OpenNode
10-08-2004, 11:06 PM
15min later

I'v made a hack to do this"it only works on one poly at a time"
-once assigning this macro to a key pressing it will-
1.Take a polygon that you have selected and it will triple it.
2.Pressing the same key will spin it's tri's

Anyone out there go right ahead do what yeh like with this. A nice clean scrip
would be nice. If you take a look at the macro you can see it's a mess and only
works on one poly at a time.

Butt it dose the trick for me now and I'm already using it so i'm happy.
here it is! Just copy it to a wordpad and give it the .LXM extension
I'v named it
"TripleOrSpin.LXM"
---------------------------------------------------

#LXMacro#
poly.triple
select.convert "edge"
select.contract
edge.spinQuads
select.expand
select.convert "polygon"
select.typeFrom "edge;vertex;polygon;item" [1]
select.contract
select.contract
select.typeFrom "polygon;edge;vertex;item" [1]


----------------------------------------------------

brutal
10-18-2004, 01:22 PM
Hi !
Following script works like Bridge in LW.
Now it works only with two polygons selected.

------------------------------------

#!perl

#This script creates a "bridge" between 2 selected polygons
#

my @fg_layers;
my @polyEdges;
my $polyIndex;

#lxout("Bridge 0.4.0 started\n");

sub getFGLayer
{
@fg_layers = lxq(qq(query layerservice layers ? fg));
( @fg_layers ) or die "Foreground layers didn\'t found\n";
}

sub detectPolyEdges
{
my ( $polygon ) = @_;
my @verts = lxq(qq(query layerservice poly.vertList ? $polygon));

foreach my $i ( 0..$#verts - 1)
{
push @{$polyEdges[$polyIndex]}, [$verts[$i], $verts[$i + 1],1];
}
push @{$polyEdges[$polyIndex]}, [$verts[$#verts], $verts[0], 1];

$polyIndex++;
}


sub getCenter
{
my ( $edge ) = @_;
my @pos1 = lxq(qq(query layerservice vert.pos ? @{$edge}[0]));
my @pos2 = lxq(qq(query layerservice vert.pos ? @{$edge}[1]));

my @center;
$center[0] = ($pos2[0] - $pos1[0]) * 0.5;
$center[1] = ($pos2[1] - $pos1[1]) * 0.5;
$center[2] = ($pos2[2] - $pos1[2]) * 0.5;

$center[0] += $pos1[0];
$center[1] += $pos1[1];
$center[2] += $pos1[2];

return @center;
}

sub getDistance
{
my ( $edge1, $edge2 ) = @_;

my @center1 = getCenter($edge1);
my @center2 = getCenter($edge2);

my $distance = sqrt(($center1[0]-$center2[0])**2+($center1[1]-$center2[1])**2+($center1[2]-$center2[2])**2);

return $distance;
}

sub getVector
{
my ( $edge, $direction ) = @_;
my @pos1 = lxq(qq(query layerservice vert.pos ? @{$edge}[0]));
my @pos2 = lxq(qq(query layerservice vert.pos ? @{$edge}[1]));

my @vector;
if ( $direction )
{
@vector = map {$pos1[$_] - $pos2[$_]} 0..$#pos1;
}
else
{
@vector = map {$pos2[$_] - $pos1[$_]} 0..$#pos1;
}
return @vector;
}

sub getMod
{
my @vec = @_;
my $res;
foreach my $i ( 0..$#vec )
{
$res += $vec[$i] ** 2;
}

return sqrt($res);
}

sub createPoly
{
my ( $edge1, $edge2, $direction ) = @_;
lx("select.drop vertex");
lx("select.element layer:$fg_layers[0] type:vertex mode:set index:@{$edge1}[0]");
lx("select.element layer:$fg_layers[0] type:vertex mode:set index:@{$edge1}[1]");

if ( $direction )
{
lx("select.element layer:$fg_layers[0] type:vertex mode:set index:@{$edge2}[1]");
lx("select.element layer:$fg_layers[0] type:vertex mode:set index:@{$edge2}[0]");
}
else
{
lx("select.element layer:$fg_layers[0] type:vertex mode:set index:@{$edge2}[0]");
lx("select.element layer:$fg_layers[0] type:vertex mode:set index:@{$edge2}[1]");
}

lx("poly.make type:face");
}


sub getNormal
{
my ( $x1, $y1, $z1, $x2, $y2, $z2, $x3, $y3, $z3 ) = @_;
my @norm_vector = ( $y1*$z2 - $y2*$z1, $x2*$z1 - $z2*$x1, $x1*$y2 - $x2*$y1 );
return @norm_vector;
}

sub calcNormalAngles
{
my ( $edge1, $edge2, $direction ) = @_;
my @norm1;
my @norm2;

if ( $direction )
{
@norm1 = getVector ( $edge1, 0 );
@norm2 = getVector ( $edge2, 1 );
}
else
{
@norm1 = getVector ( $edge1, 0 );
@norm2 = getVector ( $edge2, 0 );
}

my $cos_fi;
foreach my $i ( 0..$#norm1 )
{
$cos_fi += $norm1[$i]*$norm2[$i];
}
$cos_fi /= ( getMod(@norm1) * getMod(@norm2));
return $cos_fi;
}

sub markEdges
{
my ( $mEdge, $ec, @mPolyEdges ) = @_;
my $mark_count = 0;
my $edge_index;

foreach $edge_index ( 0..$#mPolyEdges )
{
if ( $mPolyEdges[$edge_index] == $mEdge )
{
if ( $ec > 0 )
{
@{$mEdge}[2] = 0;
}
my $mark_index;
my $mi;

foreach $mark_index (( $edge_index + 1)..( $#mPolyEdges ))
{
$mi = $mark_index;

if ( @{$mPolyEdges[$mark_index]}[2] == 0 )
{
return ($edge_index, $mark_count);
}
if ( $ec > 0 )
{
@{$mPolyEdges[$mark_index]}[2] = $ec;
}
$mark_count ++;

}

if (($edge_index == $#mPolyEdges) ||
(( $mi == $#mPolyEdges ) && ( @{$mPolyEdges[$mi]}[2] != 0)))
{
foreach $mark_index ( 0..( $edge_index - 1))
{
if ( @{$mPolyEdges[$mark_index]}[2] == 0 )
{
return ( $edge_index, $mark_count );
}
if ( $ec > 0 )
{
@{$mPolyEdges[$mark_index]}[2] = $ec;
}
$mark_count ++;
}
}
return ( $edge_index, $mark_count );
}
}
return ( $edge_index, $mark_count );
}


sub getNextEdge
{
my ( $edge_index, $edge_shift, @mPolyEdges ) = @_;
my $next_index;
if ( $edge_index + $edge_shift <= $#mPolyEdges )
{
$next_index = $edge_index + $edge_shift;
}
else
{
$next_index = $edge_shift - ( $#mPolyEdges - $edge_index ) - 1;
}

return $mPolyEdges[$next_index];
}


sub createBridge
{
my ( $polyIndex1, $polyIndex2 ) = @_;
my @polyEdges1 = @{$polyEdges[$polyIndex1]};
my @polyEdges2 = @{$polyEdges[$polyIndex2]};

( $#polyEdges1 == $#polyEdges2 ) or die "Now works only for polygons with the same count of vertices";

my @distances1, @distances2;
foreach my $edge ( @polyEdges1 )
{
foreach my $edge2 ( @polyEdges2 )
{
my $distance = getDistance( $edge, $edge2);

my $angle1 = calcNormalAngles( $edge, $edge2, 0 );
my $angle2 = calcNormalAngles( $edge, $edge2, 1 );
push @distances1, [ $edge, $edge2, $distance, $angle1, 0, 0, 0 ];
push @distances2, [ $edge, $edge2, $distance, $angle2, 1, 0, 0 ];
}
}

@distances1 = sort { ( @{$a}[3] <=> @{$b}[3] ) ||
( @{$a}[2] <=> @{$b}[2] )
} @distances1;
@distances2 = sort { ( @{$a}[3] <=> @{$b}[3] ) ||
( @{$a}[2] <=> @{$b}[2] )
} @distances2;

my @distances = ( @distances1, @distances2 );
foreach my $index ( reverse ( 0..$#distances ))
{
@{$distances[$index]}[5] = $index;
}
@distances = sort { @{$a}[2] <=> @{$b}[2] } @distances;
foreach my $index ( reverse ( 0..$#distances ))
{
@{$distances[$index]}[6] = $index;
}
@distances = sort {( @{$a}[5] + @{$a}[6] ) <=> ( @{$b}[5] + @{$b}[6] ) } @distances;


my $edge_counter = 1;
while ( @distances )
{
my $created;
EDGE : foreach my $edgeMeasure ( @distances )
{
my $edge1 = @{$edgeMeasure}[0];
my $edge2 = @{$edgeMeasure}[1];
if (( @{$edge1}[2] != @{$edge2}[2] ) && ( $#distances > 1 ))
{
next EDGE;
}

my $angle_normal = @{$edgeMeasure}[4];
createPoly( $edge1, $edge2, @{$edgeMeasure}[4] );
@distances = grep { (@{$_}[0] != $edge1) && (@{$_}[1] != $edge2) } @distances;

my ( $edge1_index, $edge1_shift ) = markEdges( $edge1, $edge_counter, @polyEdges1 );
my ( $edge2_index, $edge2_shift ) = markEdges( $edge2, $edge_counter, reverse @polyEdges2 );

if ( $edge1_shift == $edge2_shift )
{
foreach my $edge_shift ( 1..$edge1_shift )
{
my $edge1 = getNextEdge ( $edge1_index, $edge_shift, @polyEdges1 );
my $edge2 = getNextEdge ( $edge2_index, $edge_shift, reverse @polyEdges2 );
createPoly( $edge1, $edge2, $angle_normal );
@distances = grep { (@{$_}[0] != $edge1) && (@{$_}[1] != $edge2) } @distances;
}
}

$edge_counter ++;
$created = 1;
last EDGE;

}
return unless defined $created;
}
}

getFGLayer;

my @polygons = lxq(qq(query layerservice polys ? selected));
$#polygons == 1 or die ("now only 2 polygons supported");
foreach my $polygon ( @polygons )
{
detectPolyEdges($polygon);
}

createBridge(0, 1);

lx("select.drop polygon");
foreach my $polygon ( @polygons )
{
lx("select.element layer:$fg_layers[0] type:polygon mode:set index:$polygon");
}
lx("poly.remove");

---------------------------------

Phil Lawson
10-18-2004, 09:44 PM
Great work brutal !!Works well. :)

Dion Burgoyne
10-18-2004, 11:23 PM
Very Impressive! Excellent work!

rbtwhiz
10-26-2004, 01:12 AM
A quick question, if I may?

Shy of using vertMap.applyMorph and then using vert.pos, how would one go about retrieving the value of a vmap (type:morph) for any given vert? I've tried using select.vertexMap and then vert.pos... but that still only returns pos for the base.

Thanks in advance.

-Rob

KrazyKlown
10-27-2004, 02:43 AM
This may seem like a very stupid question.......but I need help anyway.

How would I go about writing a macro that simply saves a mesh and changes its name by increasing the number at the end.

I've programmed before, so I see the logic in my head (I could do ti in VB, C or Java :P) but I know nothing about the syntax that would be required for modo. I do not need someone to write it for me, just to explain a couple of commands. Any help would be appreicated.

thank you

Xacto
10-27-2004, 03:48 AM
Posted this to another thread, but didn't want it to get lost
It aligns points to the last point selected on the specified axis.

The arguements are any combo of XYZ. ie:

alignToPoint.pl XY
alignToPoint.pl Z
alignToPoint.pl XYZ



Where do you input the arguments? :sad:

mrcz
10-27-2004, 10:31 AM
Where do you input the arguments? :sad: In the command line.

h4sh
10-27-2004, 10:39 AM
I think there should be a very useful script to toggle layout. I wrice in C, but don't know perl. I tried to write it, but I what would be the request for Modo to check what's the current layout?

I just want to create a layout with only 1 3d viewport, like clicking tab in photoshop.
Or maybe there's a better way to do it?

Para
10-27-2004, 11:25 AM
h4sh: Well, just like in LW just place your mouse cursor over a viewport and press 0 in the numpad.

Rigley
10-27-2004, 03:33 PM
h4sh:

You can try this:

Simply just create your custom layouts, and save them. Then after you switch to another layout, open the Command History, and assign a key to "restore layout blabla ...". You can map every layout to a hotkey. I think its useful this way.

Griffon
10-27-2004, 08:18 PM
Where do you input the arguments? :sad:

On the command line. Generally what you'll do is die X, Y and Z alignment to seperate keys of buttons.

Xacto
10-27-2004, 09:45 PM
On the command line. Generally what you'll do is die X, Y and Z alignment to seperate keys of buttons.

I mapped this scipt to a button. I then select 4 points and hit the button, nothinig happens (me thinks) So when I look at the command history and select the script that was just produced and look at the "Fired names and Aruguments" I get "@"/Users/home/documents/modoScripts/alignToPoint.pl" Is this where you are suppose to edit?

My command line under all of this is blank untill I select something from the history.

Sorry, but I am lost. (slap me please) :wip:

Dion Burgoyne
10-29-2004, 03:48 AM
Super simple script, but oddly useful...

This is part of a larger script that I've been working on, it selects all of the active layers that you have.

#perl
#Select all active layers script
#Dion Burgoyne, Luxology LLC
#
@activelayer = lxq("query layerservice layers ? all");

foreach $layer (@activelayer)
{
lx("select.layer [$layer+1] add");
}

oliverz3d
10-30-2004, 08:52 AM
If you'd like to remove the join vertices pop-up requester for faster joining, adding "set" (" included) to the vert.join command does just that....

oxicus
10-31-2004, 05:35 AM
anyone figure out a way to do an incrimental save like in lightwave? im not a programmer so i dont have any idea how to do it...

h4sh
10-31-2004, 11:11 PM
h4sh:

You can try this:

Simply just create your custom layouts, and save them. Then after you switch to another layout, open the Command History, and assign a key to "restore layout blabla ...". You can map every layout to a hotkey. I think its useful this way.
thanks, but i was thinking of toggle. you know just 1 key to switch layouts. very useful.

pressing 0 is not gonna work on 3d viewport. I wonder why. I want the FULL screen to be covered with the viewport, no menus at all.

harlan_hill
11-01-2004, 03:33 AM
Just build your layout with the "fullscreen" 3D Viewport & whatever other customizations you want, save it as a uniquely named layout ie: 3dFull - and then map the following command to a key *layout.restore "3dFull"* no asterisks and use the name you gave the layout. Unless I'm not quite grasping the whole of your issue - I read the whole thread a while ago, but don't remember the exact issue you were wanting to resolve, but hopefully that'll help.

h4sh
11-01-2004, 11:56 AM
Thats' exactly what i want, but I need the toggle for it. So just like there is a script in Modod to toggle between wiref and no wire. I want to press a button once and the viewport would maximise. I want to press the same button again and it would come back to normal. It would work if I could map something like 'restore previous layout". I "previous" is not implemented in modo, then I need a script that:

-checks current layout,
-saves it to variable,
-if current layout=modo restore viewport fullscreen; else restore viewport modo

so, all the scripting people, how do I check the current layout in perl?

BertD
11-15-2004, 10:57 PM
Is there a way to pass a filename with the scene.save or scene.saveAs to create an automatic save of a new file created by a script?

Bert

deltare
11-16-2004, 08:16 AM
Well i am very interested in the ways to modeling in modo and the workflow.

Is there any macro to do this?
I want to create a polygon and create other with the same vertices only pointer over one of the vertices

ihope the images show this better than my words;)

thanks to everybody and excuse my bad english

http://www.brilliant-creations.com/Timmy_avi.htm

pd its a great tutoby poly by poly modelling

joo
11-26-2004, 09:28 AM
I want to create a polygon and create other with the same vertices only pointer over one of the vertices
Hi, I may not understand your question well, this is a simple macro of extend the vertices, ideal for point by point modeling. Btw, why not just select the edges then press “z”?

With the desire vertices selected, apply the macro below:

#LXMacro#
select.convert "edge"
tool.set "edge.extend" "on"
tool.reset
tool.doApply
select.convert "vertex"
select.type "edge"
select.drop "edge"
select.type "vertex"
tool.set "xfrm.move" "on"
tool.reset
tool.doApply

Cheers:)

Dion Burgoyne
12-10-2004, 12:20 AM
Fun little macro

#LXMacro#
#LXMacro#
select.nextMode
select.editSet "TEMP_IGNOREME" "add"
select.drop
poly.convert "face" "subpatch" 1
select.useSet "TEMP_IGNOREME" "select"
select.editSet "TEMP_IGNOREME" "remove"
select.nextMode
select.nextMode


What it allows you to do is swap back and forth between subdivisions and normal poly's without having to drop your current selection. :D

h4sh
12-14-2004, 07:55 PM
looks like you liked my idea, dion ;]

h4sh
12-18-2004, 12:25 AM
ok, so
we're sharing layouts here right?

I'm attaching a screen grab of what works best for me. Just 1 big modeling view, and 2 smaller for tracing from background pictures. When I don't need them I press 0 to switch to 1 huge view. The window nr 2 replaces modo's usual menu, but this one is portable, and it's usually off. I call it hitting ctrl-2. when I hit ctrl-1 the modo tools pop over. It's pretty much useless for me, but If i dont' remember a shortcut I just go there. ctrl 3- is a vertex/poly/edge pop over- useful when converting selections.

I operate pretty much on shortcuts only. I added a command ctrl-alt-c - making a cube and alt-m - merge vertexes. These were the only reason I used "modo tools" for ;]

I also assigned wireframe toggle to `.
I switch between layers alt-1, 2 , 3 etc, unless I'm trying to select both, or make a background. Instead of quit for ctrl-q (i dont need a shortcut for quit!) I assigned smartquad.

tab is replaced with Dion's script "toggle modes with selection".

I find this layout highly functional. I don't have any crap distracting me from work, and If I want I can still get to any menu in no time.

There's one more cool possibility I was concidering-to switch the whole menu 1 and 2 views on the left. then I could hide-show menu by pressing 0.

cheers.

meloncully
12-28-2004, 07:20 PM
THe layout i use is pretty simple. i have all the poly/edge/vert menus layed out to ctrl+shift+ a/s/d/f ( f for the mesh menu ) and it seems to work fast. i sitll havent gotten all my shortcut keys figured out much, i just got my int organized how i like it so they are next in line.

as bananapunk suggested im going to make prim cube a hotkey becuase i seem to use alot of them :)

i also plan on getting all my modo shortcuts setup with my nostromo n52 to make modeling even faster than before :)

Frankie
01-23-2005, 10:49 PM
Hi, I think my macro will be strange to most people, but I don't really like working with edges, it probably comes from working with lightwave. Anway, I have no idea how to make scripts with perl so after some cunning thinking I came up with these

this one is called poly.lxm


#LXMacro#
select.type "polygon"
cmds.mapKey "space" "@point.lxm"

and this is called point.lxm

#LXMacro#
select.type "vertex"
cmds.mapKey 'space" "@poly.lxm"

and you have to put them both in your modo dir and link one of them to space


hehehe, I think this is very hacky :) If someone could help me put the same functionality into a script it would be very helpfull. I know I should beable to modify one of the existing scripts, such as wireframe toggle, but I just cant figure it out.

EDIT
actually its not very good at all, I think I can fix it but not tonight.

Ariyoshi
01-25-2005, 05:36 PM
Posted this to another thread, but didn't want it to get lost
It aligns points to the last point selected on the specified axis.

The arguements are any combo of XYZ. ie:

alignToPoint.pl XY
alignToPoint.pl Z
alignToPoint.pl XYZ

__________________
-Eric
Luxology LLC



I´ve made 3 buttons, one for each orientation ¿can be merged all orientations in only one button?

Example: Press button, then selects one or more orientations from buttons or anywhere in the screen.

¿It´s possible?

Thx for all.

imsof
02-16-2005, 10:05 PM
can i make any kind of tool i want with scripting and o marcos? say i wanna emmulate another tool in another program that modo dont have...say i wanna make it so i can save a backdrop when i save the file..or say i wanna be able to import a dxf or whatever file.. can i just make a script to do it?? can i script to do anything i want? it it open ended and they give you the code so i can change the program? like is there an SDK kit o something...

imsof
02-16-2005, 10:45 PM
anyone have a lofting macro???.......

seneca
02-17-2005, 03:34 AM
finally posted my scripts.... There's about 25 in there right now..
I've downloaded tons of plugins over the years for all the different apps I use, so it's nice to finally be able to start giving back. :P

http://www.indigosm.com

TanJooLee
02-17-2005, 04:42 AM
Very cool! Thanks a lot Seneca!:)

Mylenium
02-17-2005, 05:50 AM
Hey, nice tools, Seneca.

Mylenium

Para
02-17-2005, 08:06 AM
Thanks a lot seneca, that's a really nice set of tools you're sharing! :thumbsup:

EDIT: 1000th post! :bounce:

i3du3d
03-14-2005, 08:09 AM
what do you think of this layout. my right click mouse button has all the tools i need. my viewports are as big as possible. i can get the tools i need just by right clicking. i had to have the tool properties and other things on the right, cause i cant get those into the right mouse button menu.

[URL=http://www.imageshack.us]http://img230.exs.cx/img230/6230/rclick5og.jpg

i3du3d
03-14-2005, 08:13 AM
heres my layout. and my right click mouse button menu.

[URL=http://www.imageshack.us]http://img230.exs.cx/img230/6230/rclick5og.jpg

ngrava
03-26-2005, 12:25 AM
Has anyone made a Layout that completely mimics LightWave modeler? Especially the shortcut keys?

-=GB=-

Steve McRae
03-26-2005, 02:38 AM
someone has posted something that might work -

http://www.vertexmonkey.com/scripts_interface.php

ngrava
04-11-2005, 07:39 AM
Thanks! Not quite it but it's interesting none the less. :)

-=GB=-

pabloD
04-24-2005, 12:08 AM
Hey i3du3d that's cool.

I have two questions for you.

1. How did you map that menus to your mouse button (i've only been able to do it to keys)
2. What do you use in place of the normal RMB functions i.e. front face lasso selecting and adjusting tool falloffs?

Arkitectural
06-01-2005, 01:33 PM
Here a couple of pie menus and popovers i made to pop up workflow speed.


Add them by going into your Menus->File->Config Import-> (select the files, you can even select and imprt both at the same time!)

Then, in your Form Editor(F3), you'll see two new forms at the bottom, and you can drag them into the Pie Menus category.

To assign them to keys, go to your Key Editor(F2), and pick Commands, then, in the pop-up menu, pick Popover Forms. You'll see Pie Menus halfway down, expand it, then double click on the menu that you want to assign a key to.

kiwi123
07-03-2005, 10:51 AM
Would be hard to make something like KO_pointfit (http://www1.plala.or.jp/Otsuka/graphics/plugins/POINTFIT.HTML) in LW ? For me that is one of my most used plugins in LW. Couldn't find anything like it in Modo. Basically the flat projection alone is worth it !!

Dresse
07-24-2005, 09:46 PM
inspired on lw, but still modo...
http://users.pandora.be/Dresse/3D/modo.jpg

silba
07-25-2005, 06:34 PM
Would be hard to make something like KO_pointfit (http://www1.plala.or.jp/Otsuka/graphics/plugins/POINTFIT.HTML) in LW ? For me that is one of my most used plugins in LW. Couldn't find anything like it in Modo. Basically the flat projection alone is worth it !!

There is a shrink wrap tool coming with the next version of modo.

Parsec3d
07-26-2005, 05:52 AM
mmmm spoilers, spoilers,,,,

toonafish
08-01-2005, 03:40 PM
I'm a real newbie at macro's and scripting but maybe someone else finds this usefull.

Here's a little something I cooked up because I switch between "smooth shaded/subpatch/no wireframe" and "flat shaded/poly/wireframe" a lot. So this macro toggles between the two.

I hope the autors don't mind but embedded 2 other scripts to make it work, so you have to download these 2 from vertexmonkey to make it work:
Michael Scaramozzino's DLI_3dViewCmd.pl to prevent the "no viewport selected" error message:
http://www.vertexmonkey.com/downloads/scripts/viewport/DLI_3DViewCmd_v1.1.zip
and seneca's WireframeToggle.pl bacause I don't know how to toggle between wire and no wire with a macro :
http://www.vertexmonkey.com/downloads/scripts/viewport/wireframeToggle_v1.4.zip (http://www.vertexmonkey.com/downloads/scripts/viewport/wireframeColorToggle_v1.1.zip)

so here's it is :

#LXMacro#
poly.convert "face" "subpatch" [1]
@scripts/DLI_3dViewCmd.pl
viewport.3dView smoothing:"-1"
@scripts/wireframeToggle.pl

save as .LXM and adjust the path's to where you put the 2 scripts.

LunchBox
09-27-2005, 07:33 PM
fairly simple script, it enables both the Move Pivot Tool and Geometry snap. If you press your bound key again it will disable both.

i've bound this to my INSERT key. (like in maya)


#perl
#Name: MovePivotWithGeometrySnap
#Version: 1.0
#Author: Stefan Verbakel

my $movePivot = lxq("tool.set pivot.move ?");
if ($movePivot=="off"){
lx("tool.set snap.element on");
lx("tool.set pivot.move on")
}else{
lx("tool.set snap.element off");
lx("tool.set pivot.move off")
}

Hexodus
04-27-2006, 08:17 AM
@LunchBox Thank you so much! This script ist exactly I've looking for.

behindfaces
04-27-2006, 06:41 PM
hi fellowes 2 questions plz :shrug:

how do i get the 4 demintoins on modo as iam working like the one below i mean how to make the 4 demintions appear at once ?

what you mean by script here ?

easy questions :blush:

chiak
05-29-2006, 10:14 AM
hi,

thx fellows for all those helpful scripts ! :thumbsup:
i am learning as fast as possible an hope
to post my first modo scripts soon. :)

thx,
marc

gaiXyn
05-30-2007, 08:39 PM
I had asked this over @ luxology, but I figured it wouldn't hurt to ask here as well....

I've been trying to figure out how to add a newTab under the render properties....myGoal is to setUp a preset botton ( two actually ) for my lowTest renders and my high outPut ones.....

for example.....right now I run back and forth setting all the paramaters back to defaults or below defaults for my test renders...when I think I like what I see I have to go back and set every up high again for a highRez test render....granted it doesn't take that long to do....but I think it would be cool to have a custom botton that does this when I click it....which automatically does this for me (frameSize, rayBounces, samples..etc...)......does that make anySense?....can anyOne help me out?....I'm pretty sure it can be done in Modo.....:)
ltr-

nio103
10-11-2007, 11:36 PM
I need a script exactly just like the add points in Lightwave. Slicing with the slice tool is like the knife tool in Lightwave and adding knots with the patch tool in modo is not the same as adding points in the clicked area with Lightwaves add points button. Thanks

P.S :)

Womball
02-16-2009, 03:54 PM
Where's a good place to go for tutorials on interface and basic poly operations in modo?

RedRowan
02-16-2009, 04:47 PM
Where's a good place to go for tutorials on interface and basic poly operations in modo?

Have you tried vertexmonkey?

www.vertexmonkey.com/tutorials_general_interface.php

Steve

Womball
02-18-2009, 09:15 PM
Any other places for video and written tutorials on how to use it? A project based tutorial would be nice.

yevgenykudinov
03-09-2010, 10:40 AM
vertexmonkey dead? :(

threedeworks
08-14-2011, 11:32 AM
wow this area seems to be pretty abandoned... there are so many great scripts out there for modo 501. here a short list of my preferred free scripts, feel free to add the missing ones:

moto for modo -> http://www.modomancer.com/
senecas's scripts (updated for 501) -> http://forums.luxology.com/discussion/topic.aspx?id=52061
VR tools -> http://forums.luxology.com/discussion/topic.aspx?id=58566
etérea uv tools -> http://forums.luxology.com/discussion/topic.aspx?id=53060

cheers

markus

csprance
11-06-2013, 01:31 AM
I'm a huge fan of PipeLineIO (Finally cage baking for modo...sort of...using xNormal)
http://community.thefoundry.co.uk/discussion/topic.aspx?f=37&t=41509

Vertex Normal toolkit (Finally a decent way of doing edge smoothing)
http://community.thefoundry.co.uk/discussion/topic.aspx?f=83&t=77919