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-21-2004, 04:34 PM   #1
ChristianFischer
skee-wee
 
ChristianFischer's Avatar
portfolio
Christian Fischer
Character Artist
Greifswald, Germany
 
Join Date: Jun 2003
Posts: 485
Share your Macros and Layouts

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
Attached Files
File Type: zip zero-extrude.zip (280 Bytes, 309 views)
__________________
h3d.de
...

Last edited by Chrischan : 09-23-2004 at 03:38 PM. Reason: updated macro
 
Old 09-21-2004, 05:49 PM   #2
Griffon
Frequenter
 
Griffon's Avatar
Griffon
code monkey
New Zealand
 
Join Date: Oct 2002
Posts: 162
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");
__________________
-Eric
 
Old 09-22-2004, 02:34 AM   #3
Xacto
Veteran
 
Join Date: Feb 2004
Posts: 60


Thanks!
 
Old 09-22-2004, 02:51 AM   #4
vuedesprit
Veteran
 
Join Date: Sep 2004
Posts: 68
eric , can u tell me how to make this usefull script to work as a menu button plz?
 
Old 09-22-2004, 07:00 AM   #5
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by vuedesprit
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
 
Old 09-22-2004, 09:55 AM   #6
vuedesprit
Veteran
 
Join Date: Sep 2004
Posts: 68
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
 
Old 09-22-2004, 11:50 AM   #7
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by vuedesprit
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/LuxPub...otToElement.zip

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

-- Joe

EDIT: Fixed URL

Last edited by jangell : 09-22-2004 at 12:34 PM.
 
Old 09-22-2004, 12:11 PM   #8
vuedesprit
Veteran
 
Join Date: Sep 2004
Posts: 68
the link is not working
denied
 
Old 09-22-2004, 12:35 PM   #9
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by vuedesprit
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
 
Old 09-22-2004, 12:43 PM   #10
bhealy27
Veteran
Brian Healy
Plano, USA
 
Join Date: Sep 2004
Posts: 80
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
 
Old 09-22-2004, 04:00 PM   #11
Dion Burgoyne
QA Manager, Luxology LLC
 
Dion Burgoyne's Avatar
QA Manager for Luxology
 
Join Date: Sep 2004
Posts: 255
Yeah, just put it in your main modo directory, and take off the absolute path just put in

@name of script
__________________
QA Manager
Luxology, LLC
 
Old 09-22-2004, 04:27 PM   #12
vuedesprit
Veteran
 
Join Date: Sep 2004
Posts: 68
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?
 
Old 09-22-2004, 05:21 PM   #13
Griffon
Frequenter
 
Griffon's Avatar
Griffon
code monkey
New Zealand
 
Join Date: Oct 2002
Posts: 162
Quote:
Originally Posted by bhealy27
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.
__________________
-Eric
 
Old 09-22-2004, 06:18 PM   #14
rob baldwin
New Member
 
Join Date: Nov 2002
Posts: 12
Post Mmmmmm... Pie!

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
 
Old 09-22-2004, 07:01 PM   #15
jangell
Luxology, LLC
Software Engineer
 
Join Date: Sep 2004
Posts: 74
Quote:
Originally Posted by bhealy27
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
 
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 10:21 AM.


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