Notifications
Clear all

[Closed] Maxscript editor tip/tutorial

and I really wished the output pane could be used as a listener, so we could ditch the clumsy listener and have a streamlined window for editing and output.

totally agree

Thank for the tip , very useful !!

 JHN

Maybe we should put up our abbreviations for other to have a look see.
Here are mine so far


 /* COMMENTS */
 menu=--@categorie:CAT;name:NAME;description:DESC
 header=
--***************************************************************************************************
-- Created: 		00-00-2009
-- Last Updated:	00-00-2009
-- Version:			0.10
--
-- Author :  Johan Boekhoven / johan.boekhoven@gmail.com / subd.nl
-- Version:  3ds max 2009 (10) (should work in older versions too!)
--
-- Discription: DESCRIPTION
-- Usage: RUN IT
--
-- Wishlist:
--
--***************************************************************************************************
-- MODIFY THIS AT YOUR OWN RISK

 doc=/*
<DOC> Description here.
Arguments:
	<bool> arg_a:		A description of the argument.
Return:
	<bool>		Function returns (anything?).
*/
 
 /* CODE STRUCTURES */
 if=if ARG then
(
	STATE1
) -- end if
else
(
	STATE2
) -- end else
 fn=fn NAME arg_a arg_b =
(
	doc
	fnBody
)
 str=struct NAME
(
	VAR1,
	VAR2,
	fn
)
 fora=for  in  do
(
	
)

 foraw=for  in  where ARG1 == ARG2 do
(
	
)

 fori=for i = 0 to 100 do
(
	
)

 foriw=for i = 0 to 100 where ARG1 == ARG2 do
(
	
)

 foribw=for i = 0 to 100 by  where ARG1 == ARG2 do
(
	
)

 rol=rollout ""
(
	btn
	spn
)


/* GENERIC */
 start=menu header
(
	
)
 
 /*CONTROLS*/
 btn=button btn_ "" width: height: offset:[0,0] across:
 pbn=pickButton pbn_ "" width: height: offset:[0,0] across:
 spn=spinner spn_ "" width: range:[,,] type: offset:[0,0] across:
 chb=checkButton chb_ "" width: height: offset:[0,0] across:
 grp=group ""
(
	btn
	spn
	chb
	pbn
)
 

Some are obviously specific for my needs, but maybe somebody can use it.
I think especially in the commenting and UI building and CA building department lot of speed can be gained by some well balanced abbreviations.

Has any also checked out the great work Rob is doing over at TAO and I try to follow the http://tech-artists.org/wiki/TAO:Code_Conventions , I think some public accepted abbreviations could help on good coding practice, but that’s me.

@Mathieson, that’s a really good tip!!

Cheers,
-Johan

do you know if it’s possible to remap the shortcut , I don’t find it very straight forward ??

you must edit the MXS_Editor.properties file.
To do this choose the option ‘open global option file’ from the tool menu.
Search the line ‘# User defined key commands’
and then add a line with your shortcut and the command you need.

you can find the explanation in the ‘[color=white]MAXScript Editor – Defining Custom Keyboard Shortcuts’[/color] tread, from the maxscript help

sorry for my english

cheers

Thank ! this work very well :applause:
the line to add is : Ctrl+?|IDM_ABBREV|

some dotnet one that I often use :rolleyes:


 /* .NET */
  
 dcol=(dotnetclass "system.drawing.color").fromargb 0 0 0
 dstr=(dotnetobject "system.string" "")
 darr=(dotnetclass "system.array")
 darrr=(dotnetobject "system.array[]" 1)
 dpt=dotnetobject "system.drawing.point" 0 0
 dsize=dotnetobject "system.drawing.size" 0 0
 dpad=dotnetobject "system.windows.forms.padding" 0 0 0 0
 dpen=(dotnetobject "system.drawing.pen" (dotnetobject "system.drawing.solidbrush"((dotnetclass "system.drawing.color").fromargb 0 0 0)) 1)
 dbrush=(dotnetobject "system.drawing.solidbrush" ((dotnetclass "system.drawing.color").fromargb 0 0 0))
 stcp=(dotnetobject "system.windows.forms.columnstyle" (dotnetclass "system.windows.forms.sizetype").percent 50)
 stca=(dotnetobject "system.windows.forms.columnstyle" (dotnetclass "system.windows.forms.sizetype").absolute 20)
 strp=(dotnetobject "system.windows.forms.rowstyle" (dotnetclass "system.windows.forms.sizetype").percent 50)
 stra=(dotnetobject "system.windows.forms.rowstyle" (dotnetclass "system.windows.forms.sizetype").absolute 20)

 

This thread is so usefull Thx to all involved
Should be stickied !!!

Ha Johan you’ve really hit upon a common note < :

FWIW I qwish we could open multiple script windows as well but i don’t think it is possible.

J.

wooow!this thread very useful for me!thanks a lot! :bowdown:

:wavey: :bowdown:

Page 2 / 5