Lazy Primitives V1.0

Max scripts

Moderatorer: Super Moderatorer, Admins

Brukeravatar

Trådstarter
tassel
Innlegg: 3986
Registrert: man 26 sep, 2005
Sted: Oslo
Kontakt:

Lazy Primitives V1.0

Legg innav tassel » ons 21 sep, 2011

Hei folkens, Dette er et script jeg har laget til meg selv for å slippe å navigere meg rundt i menyene for å oprette endel primitives.
Så egentlig ikke noe poeng i å dele dette scriptet men gjorde det uansett.
Om dere ikke vil at det skal startte opp hver gang max starter, så flytt det ut av scripts/startup i 3dsmax folderen.


[DESCRIPTION]
Lazy Primitives V1.0 – Helps you Quickly Add Primitives.

[INFO]
- Drag & drop the Lazy_Primitives_V1.0.mzp to you max viewport to install.
- Or Browse to the file from Max Menu “MaxScript/Run Script”


[CREATION INFO]
Author: Raymond Homme Ingebretsen
Last Modified: Sep 20, 2011


[HISTORY]
V1.1: Second version and probably the last ;o)

[NOTE]
Use & modify at you own risk.

[spoiler]

Kode: Velg alt

--Destroy the dialog if it is already open
try (cui.unregisterDialogBar roll_LazyPrimitives) catch()
try(destroyDialog roll_LazyPrimitives)catch()
 
--Create a rollout
rollout roll_LazyPrimitives "Lazy Primitives V1.0 <> Raymond Homme Ingebretsen'2011 <> www.homme3d.com"
    (
            -- UI STUFF
            button btn_Box "Box" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,1,11,1,11) tooltip:"Create Box" across:27
            button btn_Cyl "Cylinder"  width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,2,12,2,12) tooltip:"Create Cylinder"
            button btn_Plane "Plane" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,3,13,3,13) tooltip:"Create Plane"
            button btn_Tube "Tube" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,4,14,4,14) tooltip:"Create Tube"
            button btn_Thorus "Thorus" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,5,15,5,15) tooltip:"Create Thorus"
            button btn_Sphere "Sphere" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,6,16,6,16) tooltip:"Create Sphere"
            button btn_Oiltank "Oil Tank" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,7,17,7,17) tooltip:"Create OilTank"
            button btn_Capsule "Capsule" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,8,18,8,18) tooltip:"Create Capsule"
            button btn_Lext "L_Ext" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,9,19,9,19) tooltip:"Create L-Ext"
            button btn_Cext "C_Ext" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,10,20,10,20)  tooltip:"Create C-Ext"
            button btn_Hose "Hose" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,21,22,21,22) tooltip:"Create Hose"
            button btn_Teapot "Teapot" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,23,24,23,24)  tooltip:"Create Teapot"
 
            button btn_sCircle "Circle" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,25,26,25,26) tooltip:"Create Cirlce Spline"
            button btn_sRectangle "Rectangle" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,27,28,27,28) tooltip:"Create Rectangle Spline"
            button btn_sLine "Line" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,29,30,29,30) tooltip:"Create Line Spline"
            button btn_sText "Text" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,31,32,31,32) tooltip:"Create Text Spline"
            button btn_sHelix "Helix" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,33,34,33,34) tooltip:"Create Helix Spline"
            button btn_sWalledRectangle "Walled Rectangle" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,35,36,35,36) tooltip:"Create Walled Rectangle Spline"
            button btn_sChannel "Channel" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,37,38,37,38) tooltip:"Create Channel Spline"
            button btn_sAngle "Angle" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,39,40,39,40) tooltip:"Create Angle Spline"
            button btn_sTee "Tee" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,41,42,41,42) tooltip:"Create Tee Spline"
            button btn_sWideFlange "Wide Flange" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,43,44,43,44) tooltip:"CreateWide Flange Spline"
 
            button btn_Dummy "Dummy" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,45,46,45,46) tooltip:"Create Dummy Helper"
            button btn_Point "Point" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,47,48,47,48) tooltip:"Create Point Helper"
            button btn_Tape "Tape" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,49,50,49,50) tooltip:"Create Tape Helper"
            button btn_Compass "Compass" width:32 height:32 align:#center images:#("Lazy_Primitives_V1.0.png","Lazy_Primitives_V1.0.png",52,51,52,51,52) tooltip:"Create Compass Helper"
 
            button btn_About "?" width:32 height:32 align:#center tooltip:"About"
 
        -- Create Geometry / Primitives
        on btn_Box pressed do startObjectCreation box
        on btn_Cyl pressed do startObjectCreation cylinder
        on btn_Plane pressed do startObjectCreation plane
        on btn_Tube pressed do startObjectCreation tube
        on btn_Thorus pressed do startObjectCreation torus
        on btn_Sphere pressed do startObjectCreation sphere
        on btn_Oiltank pressed do startObjectCreation oiltank
        on btn_Capsule pressed do startObjectCreation capsule
        on btn_Lext pressed do startObjectCreation L_Ext
        on btn_Cext pressed do startObjectCreation C_Ext
        on btn_Hose pressed do startObjectCreation Hose
        on btn_Teapot pressed do startObjectCreation Teapot
 
        -- Create Splines
        on btn_sCircle pressed do startObjectCreation Circle
        on btn_sLine pressed do startObjectCreation Line
        on btn_sText pressed do startObjectCreation Text
        on btn_sRectangle pressed do startObjectCreation Rectangle
        on btn_sHelix pressed do startObjectCreation Helix
        on btn_sWalledRectangle pressed do startObjectCreation WalledRectangle
        on btn_sChannel pressed do startObjectCreation Channel
        on btn_sAngle pressed do startObjectCreation Angle
        on btn_sTee pressed do startObjectCreation Tee
        on btn_sWideFlange pressed do startObjectCreation WideFlange
 
        -- Create Helpers
        on btn_Dummy pressed do startObjectCreation dummy
        on btn_Point pressed do startObjectCreation point
        on btn_Tape pressed do startObjectCreation tape
        on btn_Compass pressed do startObjectCreation compass
 
        -- Browse Webpage
        on btn_About pressed do
        (
            ShellLaunch "http://www.homme3d.com" ""
        )
 
    )
 
--Create the dialog and stuff
createDialog roll_LazyPrimitives 900 40
 
cui.RegisterDialogBar roll_LazyPrimitives minSize:[900,40] maxSize:[900,40] style:\
#(#cui_dock_top, #cui_dock_bottom, #cui_floatable,#cui_handles,#cui_max_sized)
 
-- ADD "--" to the line below if you dont want it to start docked at the top.
cui.dockDialogBar roll_LazyPrimitives #cui_dock_top
[/spoiler]
Du har ikke de nødvendige tillatelsene for å vise filene som er tilknyttet dette innlegget.

Brukeravatar

krth8
Innlegg: 1070
Registrert: man 29 okt, 2007

Legg innav krth8 » ons 21 sep, 2011

Ser jeg div steel beams?

ty!
Russia is not a country, it's a lifestyle...

National Oilwell Varco

www.1kvisuals.com

Brukeravatar

Trådstarter
tassel
Innlegg: 3986
Registrert: man 26 sep, 2005
Sted: Oslo
Kontakt:

Legg innav tassel » ons 21 sep, 2011

krth8 skrev:Ser jeg div steel beams?

ty!


Bare splines (primitives) fra max i dette men jeg har satt igang å lage et script som lager forskjellige stålprofiler osv. men det ligger litt på hold for øyeblikket :)


Gå tilbake til «Max scripts»

Hvem er online

Brukere i dette forumet: Ingen registrerte brukere og 1 gjest

cron