Notifications
Clear all

[Closed] MacroScripts aer being truncated by max

Hi all,
I’ve got a bit of a strange one here.

I’m creating macroscripts, and running them, then you’d expect max to create them automatically in the usermacros directory.

It is doing this, but a file that should be 6K is coming out at 2K, with most of the middle of the script MISSING, from the end of my interface code, right down to the couple of lines of the mcr:

macroScript TransformPresets
  	category:"Animation Tools"
  	buttonText:"Add transform presets"
  	tooltip:"Transform presets"
  	(
  	
  	-------------------------------------------------------------------------------------------------------------------------------
  	-- CA definition
  	-------------------------------------------------------------------------------------------------------------------------------
  	
  		if transformPresetsCA == undefined do transformPresetsCA = attributes transformPresetsAtts
  			(
  			parameters main rollout:params
  				(
  				targetTransforms type:#matrix3tab tabSize:0 tabSizeVariable:true
  				objectTransforms type:#matrix3tab tabSize:0 tabSizeVariable:true
  				listboxNames type:#stringtab tabSize:0 tabSizeVariable:true
  				)
  			 
  			rollout params "Stored Transforms"
  				(
  				
  				-------------------------------------------------------------------------------------------------------------------------------
  				-- variables
  				-------------------------------------------------------------------------------------------------------------------------------
  		
  					local obj
  		
  				-------------------------------------------------------------------------------------------------------------------------------
  				-- interface
  				-------------------------------------------------------------------------------------------------------------------------------
  				
  					GroupBox grpNames "Named Transforms" pos:[4,8] width:152 height:196
  						listbox lbxNames "	
  
 
  -- THE WHOLE OF THE MIDDLE OF THE SCRIPT IS MISSING!
 
 
  	-------------------------------------------------------------------------------------------------------------------------------
  	-- apply CA
  	-------------------------------------------------------------------------------------------------------------------------------
  	
  		custAttributes.add $ transformPresetsCA baseObject:true
  	)
  

Any ideas?

Thanks,
Dave

4 Replies
 JHN

No error messages in the listener? If not I think it’s hard to guess without seeing the code…
Haven’t had this problem before.

-Johan

Nope, nothing in the listener.

Where the yellow MISSING bit I typed is:

[ul]
[li]Some more interface items[/li][li]Functions[/li][li]Handlers[/li][/ul]And that’s it – nothing special.

Well, I’ve worked around it by using a .mzp file.

name "Transformation Presets"
version 1
extract to $usermacros
run "$usermacros/Animation Tools-TransformPresets.mcr"
clear temp

New to me, but it seems to work.

the only time I’ve seen something go ‘missing from a macroscript’ is when that code was actually -outside- the macroscript definition.

Anything not between “macroscript (” and its closing “)” gets tossed by max when it copies the file into the macroscripts folder.