Notifications
Clear all

[Closed] Custom Attribute Macro removes code

Hi

    I've just started playing around with custom attributes, and I'm getting a really odd issue that I cant figure out. I have a script that works fine, but as soon as I install it as a macro script, it removes lines of code from the .mcr file it generates.
    
    I cant understand why it removes this code when it evaluates fine?
   can anyone help me please? probably a simple mistake that I cant see.
   
   thanks
   Phil
    
    here is the code that I'm using to install from:

   (	
   bwsCameraCA = attributes bCameraToolsControls silentErrors:true 
   	(
   
   		parameters main rollout:CameraTools
   
   		(
   			cameraNoise type:#float ui:cNoise default:0
   			cameraNoisePointThree type:#point3
   			cameraTargetNoise type:#float ui:cTNoise default:0
   			cameraTargetNoisePointThree type:#point3
   			noiseType type:#boolean ui:cTypeNoise default:false
   			dummySelectCamShake type:#boolean ui:dSCamShake default:false
   			dummySelectMaster type:#boolean ui:dSMaster default:false
   			dummySelectTargetCamShake type:#boolean ui:dSTCamShake default:false
   			dummySelectTargetMaster type:#boolean ui:dSTMaster default:false
   		)
   
   		rollout CameraTools "Camera tools" 
   
   		(
   			group "Noise Settings"
   			(
   				spinner cNoise "Noise" type:#float
   				spinner cTNoise "Target Noise" type:#float
   				checkbox cTypeNoise "Fractal" type:#boolean
   			)
   			group "Dummy Selection"
   			(
   				button dSCamShake "Shake" width: 50 across:2
   				button dSTCamShake "T Shake" width: 50 
   				button dSMaster "Master"  width: 50	across:2
   				button dSTMaster "T Master" width: 50
   			)
   			on CameraTools open do
   			(
   				cameraObjectName= (custAttributes.getOwner this)
   				cameraObjectName = refs.dependents cameraObjectName
   				if cameraObjectName[1].target == undefined then
   				(
   					dSTCamShake.enabled = false
   					dSTMaster.enabled = false
   					cTNoise.enabled = false
   				)
   			)	
   			on cNoise changed i do
   			(			
   				cameraNoisePointThree = [i,i,i]
   			)
   			on cTNoise changed i do
   			(
   				if pCameraTypeFree != true then
   				(
   					cameraTargetNoisePointThree = [i,i,i]
   				)
   			)
   			
   			-- dummy selection
   			on dSCamShake pressed do
   			(
   				cameraObjectName= (custAttributes.getOwner this)
   				cameraObjectName = refs.dependents cameraObjectName
   				select cameraObjectName[1].parent
   			)
   			on dSMaster pressed do
   			(
   				cameraObjectName= (custAttributes.getOwner this)
   				cameraObjectName = refs.dependents cameraObjectName
   				select cameraObjectName[1].parent.parent
   			)
   			on dSTCamShake pressed do
   			(
   				cameraObjectName= (custAttributes.getOwner this)
   				cameraObjectName = refs.dependents cameraObjectName
   				select cameraObjectName[1].target.parent
   			)
   			on dSTMaster pressed do
   			(
   				cameraObjectName= (custAttributes.getOwner this)
   				cameraObjectName = refs.dependents cameraObjectName
   				select cameraObjectName[1].target.parent.parent
   			)
   		)
   	)
   )
        
    [font=Arial]however the .mcr file it makes only contains this:[/font]

   (	  
   bwsCameraCA = attributes bCameraToolsControls silentErrors:true 
   	(
   
   		parameters main rollout:CameraTools
   
   		(
   			cameraNoise type:#float ui:cNoise default:0
   			cameraNoisePointThree type:#point3
   			cameraTargetNoise type:#float ui:cTNoise default:0
   			cameraTargetNoisePointThree type:#point3
   			noiseType type:#boolean ui:cTypeNoise default:false
   			dummySelectCamShake type:#boolean ui:dSCamShake default:false
   			dummySelectMaster type:#boolean ui:dSMaster default:false
   			dummySelectTargetCamShake type:#boolean ui:dSTCamShake default:false
   			dummySelectTargetMaster type:#boolean ui:dSTMaster default:false
   		)
   
   		rollout CameraTools "Camera tools" 
   
   		(
   			group "Noise Settings"
   			(
   				spinner cNoise "Noise" type:#float
   				spinner cTNoise "Target Noise" type:#float
   				checkbox cTypeNoise "Fractal" type:#boolean
   			)
   			group "Dummy Selection"
   			(
   				button dSCamShake "Shake" width: 50 across:2
   				button dSTCamShake "T Shake" width: 50 
   				button dSMaster "Master"  width: 50	across:2
   				button dSTMaster "T Master)
1 Reply

This appears to be an issue that is local to our work machines, or 2011×64, as It installs fine on 2012×64. I guess this will need more investigation my end.