Share your Macros and Layouts

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Search this Thread Display Modes
Old 09 September 2004   #1
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)
__________________
www.chrisfischerart.com

Last edited by Chrischan : 09 September 2004 at 03:38 PM. Reason: updated macro
 
Old 09 September 2004   #2
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 September 2004   #3


Thanks!
 
Old 09 September 2004   #4
eric , can u tell me how to make this usefull script to work as a menu button plz?
 
Old 09 September 2004   #5
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 September 2004   #6
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 September 2004   #7
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 September 2004 at 12:34 PM.
 
Old 09 September 2004   #8
the link is not working
denied
 
Old 09 September 2004   #9
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 September 2004   #10
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 September 2004   #11
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 September 2004   #12
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 September 2004   #13
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 September 2004   #14
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 September 2004   #15
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



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 09:11 PM.


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