CGTalk > Software Specific Forums > The Foundry Modo
Login register
reply share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 09-26-2004, 08:13 AM   #31
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by Sha_Man
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
 
Old 09-26-2004, 08:57 AM   #32
noclue
New Member
 
Join Date: Sep 2004
Posts: 3
Unhappy Modo Macro record and replay error

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
 
Old 09-26-2004, 03:14 PM   #33
noclue
New Member
 
Join Date: Sep 2004
Posts: 3
Sorry For the lame question

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!)
 
Old 09-26-2004, 10:14 PM   #34
Turq
Registered User
Artist
 
Join Date: Jun 2002
Posts: 24
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)

Last edited by Turq : 09-27-2004 at 01:51 AM.
 
Old 09-26-2004, 10:16 PM   #35
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by noclue
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
 
Old 09-26-2004, 10:44 PM   #36
Nando
Bloc Party
 
Nando's Avatar
..
LA, USA
 
Join Date: Jan 2002
Posts: 462
Quote:
Originally Posted by noclue
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
 
Old 09-26-2004, 11:11 PM   #37
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by Nando
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
 
Old 09-27-2004, 07:39 AM   #38
Labuzz
hostile
 
Labuzz's Avatar
portfolio
borhan berthet
artist 3d real time
paris, France
 
Join Date: May 2002
Posts: 480
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!
 
Old 09-29-2004, 12:20 AM   #39
Griffon
Frequenter
 
Griffon's Avatar
Griffon
code monkey
New Zealand
 
Join Date: Oct 2002
Posts: 162
smart quad

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");
__________________
-Eric
 
Old 09-29-2004, 01:00 AM   #40
annaleah
Lord of the posts
 
annaleah's Avatar
Anna
Student
UniNY
Praha, Czech Republic
 
Join Date: Jan 2004
Posts: 651
Quote:
Originally Posted by Griffon
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.
__________________
 
Old 09-29-2004, 01:14 AM   #41
Dion Burgoyne
QA Manager, Luxology LLC
 
Dion Burgoyne's Avatar
QA Manager for Luxology
 
Join Date: Sep 2004
Posts: 255
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
__________________
QA Manager
Luxology, LLC
 
Old 09-29-2004, 01:32 AM   #42
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
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
 
Old 09-29-2004, 01:55 AM   #43
annaleah
Lord of the posts
 
annaleah's Avatar
Anna
Student
UniNY
Praha, Czech Republic
 
Join Date: Jan 2004
Posts: 651
Quote:
Originally Posted by Dion Burgoyne
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!
__________________
 
Old 09-29-2004, 06:09 AM   #44
Turq
Registered User
Artist
 
Join Date: Jun 2002
Posts: 24
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" );
 
Old 09-29-2004, 07:16 AM   #45
brutal
New Member
 
Join Date: Jan 2003
Posts: 11
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 ?
 
reply share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:46 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.