removed unneccesary code (Issue #429)

removed unneccesary code (Issue #429)

fn findTimeControl = (
	if selection.count == 0 then print "Cannot find time control. Selection is empty."

	for i = 1 to selection.count do
	(
		if classof selection[i] == AlembicTimeControl then
		(
			return selection[i]
		)
	)
)

fn connectTimeControl obj timeCtrl = (
	print obj
	if obj.time.isAnimated then
	(
		obj.time.controller = float_expression()
		local nCtrl = obj.time.controller
		nCtrl.AddScalarTarget "current" timeCtrl.time.controller
		nCtrl.setExpression "current"

		print "connected"
	)
	else
	(
		print "not animated"
	)
 )

fn createTimeControl name = (
	cntl = AlembicTimeControl name: name
)

fn connectTimeControlToObjects timeCtrl = (

	if selection.count == 0 then print "Cannot connect time control to objects. Selection is empty."

	for i = 1 to selection.count do
	(
		local n = selection[i]

		if classof n == PolyMeshObject or \
		classof n == Alembic_Particles or \
		classof n == NURBSCurveshape or \
		classof n == SplineShape then
		(

			if n.transform.isAnimated and \
				classof n.transform.controller == Alembic_Xform then
			(
				connectTimeControl n.transform.controller timeCtrl
			)

			if n.visibility.isAnimated and \
				classof n.visibility.controller == Alembic_Visibility then
			(
				connectTimeControl n.visibility.controller timeCtrl
			)
		)

		if classof n == PolyMeshObject then
		(

			for j = 1 to n.modifiers.count do
			(
				modj = n.modifiers[j]
				case (classof modj) of
				(
					Alembic_Mesh_Normals:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Mesh_Geometry:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Mesh_UVW:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Mesh_Topology:
					(
						connectTimeControl modj timeCtrl
					)
				)
			)

		)
		else if classof n == Freecamera then
		(
			connectTimeControl n.FOV timeCtrl
			connectTimeControl n.MultiPass_Effect.focalDepth timeCtrl
			connectTimeControl n.nearclip timeCtrl
			connectTimeControl n.farclip timeCtrl

			--local camMod = n.modifiers["Alembic Camera Properties"]
			--if camMod != undefined then
			--(
			--	connectTimeControl camMod.hfov timeCtrl
			--	connectTimeControl camMod.vfov timeCtrl
			--	connectTimeControl camMod.focallength timeCtrl
			--	connectTimeControl camMod.haperature timeCtrl
			--	connectTimeControl camMod.vaperature timeCtrl
			--	connectTimeControl camMod.hfilmoffset timeCtrl
			--	connectTimeControl camMod.vfilmoffset timeCtrl
			--	connectTimeControl camMod.lsratio timeCtrl
			--	connectTimeControl camMod.loverscan timeCtrl
			--	connectTimeControl camMod.roverscan timeCtrl
			--	connectTimeControl camMod.toverscan timeCtrl
			--	connectTimeControl camMod.boverscan timeCtrl
			--	connectTimeControl camMod.fstop timeCtrl
			--	connectTimeControl camMod.focusdistance timeCtrl
			--	connectTimeControl camMod.shutteropen timeCtrl
			--	connectTimeControl camMod.shutterclose timeCtrl
			--	connectTimeControl camMod.nclippingplane timeCtrl
			--	connectTimeControl camMod.fclippingplane timeCtrl
			--)
		)
		else if classof n == Alembic_Particles then
		(
			connectTimeControl n timeCtrl
		)
		else if classof n == NURBSCurveshape then
		(
			for j = 1 to n.modifiers.count do
			(
				modj = n.modifiers[j]
				case (classof modj) of
				(
					Alembic_NURBS:
					(
						connectTimeControl modj timeCtrl
					)
				)
			)
		)
		else if classof n == SplineShape then
		(
			for j = 1 to n.modifiers.count do
			(
				modj = n.modifiers[j]
				case (classof modj) of
				(
					Alembic_Spline_Geometry:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Spline_Topology:
					(
						connectTimeControl modj timeCtrl
					)
				)
			)
		)
	)

)

macroScript NewTimeControlUI
    category:"Alembic"
    buttonText:"Create Time Control"
    tooltip:"Create Time Control"
(
    on execute do
    (
         AlembicTimeControl()
    )
)

macroScript NewTimeControlForSelectionUI
    category:"Alembic"
    buttonText:"New Time Control For Selection"
    tooltip:"New Time Control For Selection"
(
    on execute do
    (
    	local timeCtrl = AlembicTimeControl()
        connectTimeControlToObjects(timeCtrl)
    )
)

macroScript SetTimeControlForSelectionUI
    category:"Alembic"
    buttonText:"Set Time Control For Selection"
    tooltip:"Set Time Control For Selection"
(
    on execute do
    (
    	local timeCtrl = findTimeControl()
    	if timeCtrl != undefined then
    	(
    		connectTimeControlToObjects(timeCtrl)
    	)
    	else
    	(
    		print "Could not find time control in selection."
    	)
    )
)

fn findTimeControl = (
	if selection.count == 0 then print "Cannot find time control. Selection is empty."

	for i = 1 to selection.count do
	(
		if classof selection[i] == AlembicTimeControl then
		(
			return selection[i]
		)
	)
)

fn connectTimeControl obj timeCtrl = (
	print obj
	if obj.time.isAnimated then
	(
		obj.time.controller = float_expression()
		local nCtrl = obj.time.controller
		nCtrl.AddScalarTarget "current" timeCtrl.time.controller
		nCtrl.setExpression "current"

		print "connected"
	)
	else
	(
		print "not animated"
	)
 )

fn createTimeControl name = (
	cntl = AlembicTimeControl name: name
)

fn connectTimeControlToObjects timeCtrl = (

	if selection.count == 0 then print "Cannot connect time control to objects. Selection is empty."

	if timeCtrl == undefined then
	(
		timeCtrl = AlembicTimeControl()
	)

	for i = 1 to selection.count do
	(
		local n = selection[i]

		if classof n == PolyMeshObject or \
		classof n == Alembic_Particles or \
		classof n == NURBSCurveshape or \
		classof n == SplineShape then
		(

			if n.transform.isAnimated and \
				classof n.transform.controller == Alembic_Xform then
			(
				connectTimeControl n.transform.controller timeCtrl
			)

			if n.visibility.isAnimated and \
				classof n.visibility.controller == Alembic_Visibility then
			(
				connectTimeControl n.visibility.controller timeCtrl
			)
		)

		if classof n == PolyMeshObject then
		(

			for j = 1 to n.modifiers.count do
			(
				modj = n.modifiers[j]
				case (classof modj) of
				(
					Alembic_Mesh_Normals:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Mesh_Geometry:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Mesh_UVW:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Mesh_Topology:
					(
						connectTimeControl modj timeCtrl
					)
				)
			)

		)
		else if classof n == Freecamera then
		(
			connectTimeControl n.FOV timeCtrl
			connectTimeControl n.MultiPass_Effect.focalDepth timeCtrl
			connectTimeControl n.nearclip timeCtrl
			connectTimeControl n.farclip timeCtrl

			--local camMod = n.modifiers["Alembic Camera Properties"]
			--if camMod != undefined then
			--(
			--	connectTimeControl camMod.hfov timeCtrl
			--	connectTimeControl camMod.vfov timeCtrl
			--	connectTimeControl camMod.focallength timeCtrl
			--	connectTimeControl camMod.haperature timeCtrl
			--	connectTimeControl camMod.vaperature timeCtrl
			--	connectTimeControl camMod.hfilmoffset timeCtrl
			--	connectTimeControl camMod.vfilmoffset timeCtrl
			--	connectTimeControl camMod.lsratio timeCtrl
			--	connectTimeControl camMod.loverscan timeCtrl
			--	connectTimeControl camMod.roverscan timeCtrl
			--	connectTimeControl camMod.toverscan timeCtrl
			--	connectTimeControl camMod.boverscan timeCtrl
			--	connectTimeControl camMod.fstop timeCtrl
			--	connectTimeControl camMod.focusdistance timeCtrl
			--	connectTimeControl camMod.shutteropen timeCtrl
			--	connectTimeControl camMod.shutterclose timeCtrl
			--	connectTimeControl camMod.nclippingplane timeCtrl
			--	connectTimeControl camMod.fclippingplane timeCtrl
			--)
		)
		else if classof n == Alembic_Particles then
		(
			connectTimeControl n timeCtrl
		)
		else if classof n == NURBSCurveshape then
		(
			for j = 1 to n.modifiers.count do
			(
				modj = n.modifiers[j]
				case (classof modj) of
				(
					Alembic_NURBS:
					(
						connectTimeControl modj timeCtrl
					)
				)
			)
		)
		else if classof n == SplineShape then
		(
			for j = 1 to n.modifiers.count do
			(
				modj = n.modifiers[j]
				case (classof modj) of
				(
					Alembic_Spline_Geometry:
					(
						connectTimeControl modj timeCtrl
					)
					Alembic_Spline_Topology:
					(
						connectTimeControl modj timeCtrl
					)
				)
			)
		)
	)

)

macroScript NewTimeControlUI
    category:"Alembic"
    buttonText:"Create Time Control"
    tooltip:"Create Time Control"
(
    on execute do
    (
         AlembicTimeControl()
    )
)

macroScript NewTimeControlForSelectionUI
    category:"Alembic"
    buttonText:"New Time Control For Selection"
    tooltip:"New Time Control For Selection"
(
    on execute do
    (
    	local timeCtrl = AlembicTimeControl()
        connectTimeControlToObjects(timeCtrl)
    )
)

macroScript SetTimeControlForSelectionUI
    category:"Alembic"
    buttonText:"Set Time Control For Selection"
    tooltip:"Set Time Control For Selection"
(
    on execute do
    (
    	local timeCtrl = findTimeControl()
    	if timeCtrl != undefined then
    	(
    		connectTimeControlToObjects(timeCtrl)
    	)
    	else
    	(
    		print "Could not find time control in selection."
    	)
    )
)


better height for 3ds max export dialog.

--------------------------------------------------------------------------------------------------------
-- Custom import/export dialog with settings

rollout AlembicExportSettings "Alembic Export Settings" width:288 height:528
(
	GroupBox selectGroup "Selection" pos:[8,16] width:272 height:40
	checkbox exportSelectedCheckbox "Export Selected Objects" pos:[32,32] width:232 height:16 checked:true

	GroupBox animGroup "Animation" pos:[8,64] width:272 height:96
	label inLabel "Frame In" pos:[16,88] width:128 height:21
	label outLabel "Frame Out" pos:[16,104] width:128 height:21
	label stepsLabel "Frame Steps" pos:[16,120] width:128 height:21
	label subStepsLabel "Frame Sub-Steps" pos:[16,136] width:128 height:21
	spinner inSpinner "" pos:[112,88] width:160 height:16 range:[0,1e+006,0] type:#integer
	spinner outSpinner "" pos:[112,104] width:160 height:16 range:[1,1e+006,100] type:#integer
	spinner stepsSpinner "" pos:[112,120] width:160 height:16 range:[1,1e+006,1] type:#integer
	spinner subStepsSpinner "" pos:[112,136] width:160 height:16 range:[1,1e+006,1] type:#integer

	GroupBox geoGroup "Geometry" pos:[8,168] width:272 height:256

	dropdownList meshTopologyDropDown "Mesh Topology" pos:[16,186] width:256 height:40 items:#("Just Surfaces (No Normals)", "Point Cache (No Surfaces)", "Surface + Normals (Everything)") selection:3
	dropdownList particleSystemExportMethod "Particle System Export Method" pos:[16,228] width:256 height:40 items:#("Automatic Instancing", "Merged Mesh") selection:1
	dropdownList facesetExportMethod "Faceset Export Method" pos:[16,270] width:256 height:40 items:#("Partitioning Facesets only", "All") selection:1

	checkbox materialIdsCheckbox "Material Ids" pos:[32,310] width:107 height:14 checked:true
	checkbox uvCheckbox "UVs" pos:[32,326] width:128 height:15 checked:true
	checkbox flattenHierarchyCheckbox "Flatten Hierarchy" pos:[32,342] width:107 height:14 checked:true
	checkbox transformCacheCheckbox "Transform Cache" pos:[32,358] width:200 height:14 checked:false
	checkbox validateMeshTopology "Validate Mesh Topology" pos:[32,374]
	checkbox renameConflictingNodes "Rename Conflicting Nodes" pos:[32,390]
	checkbox mergeSelectedPolymeshSubtree "Merge Selected Polymesh Subtree" pos:[32,406]
	checkbox includeParentNodes "Include Parent Nodes" pos:[32,432]

	dropdownList storageFormat "Storage Format" pos:[16,454] width:256 height:40 items:#("HDF5", "Ogawa") selection:1

	button exportButton "Export" pos:[16,500] width:64 height:24
	button cancelButton "Cancel" pos:[208,500] width:64 height:24

	on exportButton pressed do
	(
	    filename = getSaveFileName caption:"Export to Alembic File:" types:"Alembic(*.abc)|*.abc|All(*.*)|*.*" historyCategory:"Alembic"
	    if (filename != undefined) do
	    (

	    	jobString = "filename=" + (filename as string)
	    	jobString += ";in=" + (inSpinner.value as string)
	    	jobString += ";out=" + (outSpinner.value as string)
	    	jobString += ";step=" + (stepsSpinner.value as string)
	    	jobString += ";substep=" + (subStepsSpinner.value as string)
	    	if(meshTopologyDropDown.selection == 1) do
	    	(
	    		jobString += ";normals=false"
	    		jobString += ";purepointcache=false"
	    	)
	    	if(meshTopologyDropDown.selection == 2) do
	    	(
	    		jobString += ";normals=false"
	    		jobString += ";purepointcache=true"
	    	)
	    	if(meshTopologyDropDown.selection == 3) do
	    	(
	    		jobString += ";purepointcache=false"
	    		jobString += ";normals=true"
	    	)
	    	jobString += ";uvs="
	    	jobString += (uvCheckbox.checked as string)
	    	jobString += ";materialids="
	    	jobString += (materialIdsCheckbox.checked as string)
	    	jobString += ";exportselected="
	    	jobString += (exportSelectedCheckbox.checked as string)
	    	jobString += ";flattenhierarchy="
	    	jobString += (flattenHierarchyCheckbox.checked as string)
	    	if(particleSystemExportMethod.selection == 1) do jobString += ";automaticinstancing=true"
	    	if(particleSystemExportMethod.selection == 2) do jobString += ";particlesystemtomeshconversion=true"
	    	jobString += ";transformCache="
	    	jobString += (transformCacheCheckbox.checked as string)
	    	jobString += ";validateMeshTopology="
	    	jobString += (validateMeshTopology.checked as string)
	    	jobString += ";renameConflictingNodes="
	    	jobString += (renameConflictingNodes.checked as string)
	    	jobString += ";mergePolyMeshSubtree="
	    	jobString += (mergeSelectedPolymeshSubtree.checked as string)
 	jobString += ";mergePolyMeshSubtree="
	    	jobString += (mergeSelectedPolymeshSubtree.checked as string)

	    	if(storageFormat.selection == 1) do jobString += ";storageFormat=hdf5"
	    	if(storageFormat.selection == 2) do jobString += ";storageFormat=ogawa"

	    	if(facesetExportMethod.selection == 1) do jobString += ";facesets=partitioningFacesetsOnly"
	    	if(facesetExportMethod.selection == 2) do jobString += ";facesets=all"

	    	result = ExocortexAlembic.createExportJobs(jobString)
	        if( result != 0 ) do
	        (
	            	messageBox "Failure - See Maxscript Listener for details." title:"Exocortex Alembic Export"
		    )
	        destroyDialog AlembicExportSettings
	    )
	)
	on cancelButton pressed do
	(
	    destroyDialog AlembicExportSettings
	)

	on AlembicExportSettings open do
    (
		inSpinner.value = animationRange.start
		outSpinner.value = animationRange.end
    )
)
---------------------------------------------------------------------------------------------------------
-- MAXScript functions to bring up the options dialogs

fn alembicExportDialog =
(
    createDialog AlembicExportSettings
)

---------------------------------------------------------------------------------------------------------
-- MacroScript to link the menu items to MAXScript functions

macroScript AlembicExportUI
    category:"Alembic"
    buttonText:"Alembic Export..."
    tooltip:"Alembic Export..."
(
    on execute do
    (
        alembicExportDialog()
    )
)

--------------------------------------------------------------------------------------------------------
-- Custom import/export dialog with settings

rollout AlembicExportSettings "Alembic Export Settings" width:288 height:508
(
	GroupBox selectGroup "Selection" pos:[8,16] width:272 height:40
	checkbox exportSelectedCheckbox "Export Selected Objects" pos:[32,32] width:232 height:16 checked:true

	GroupBox animGroup "Animation" pos:[8,64] width:272 height:96
	label inLabel "Frame In" pos:[16,88] width:128 height:21
	label outLabel "Frame Out" pos:[16,104] width:128 height:21
	label stepsLabel "Frame Steps" pos:[16,120] width:128 height:21
	label subStepsLabel "Frame Sub-Steps" pos:[16,136] width:128 height:21
	spinner inSpinner "" pos:[112,88] width:160 height:16 range:[0,1e+006,0] type:#integer
	spinner outSpinner "" pos:[112,104] width:160 height:16 range:[1,1e+006,100] type:#integer
	spinner stepsSpinner "" pos:[112,120] width:160 height:16 range:[1,1e+006,1] type:#integer
	spinner subStepsSpinner "" pos:[112,136] width:160 height:16 range:[1,1e+006,1] type:#integer

	GroupBox geoGroup "Geometry" pos:[8,168] width:272 height:256

	dropdownList meshTopologyDropDown "Mesh Topology" pos:[16,186] width:256 height:40 items:#("Just Surfaces (No Normals)", "Point Cache (No Surfaces)", "Surface + Normals (Everything)") selection:3
	dropdownList particleSystemExportMethod "Particle System Export Method" pos:[16,228] width:256 height:40 items:#("Automatic Instancing", "Merged Mesh") selection:1
	dropdownList facesetExportMethod "Faceset Export Method" pos:[16,270] width:256 height:40 items:#("Partitioning Facesets only", "All") selection:1

	checkbox materialIdsCheckbox "Material Ids" pos:[32,310] width:107 height:14 checked:true
	checkbox uvCheckbox "UVs" pos:[32,326] width:128 height:15 checked:true
	checkbox flattenHierarchyCheckbox "Flatten Hierarchy" pos:[32,342] width:107 height:14 checked:true
	checkbox transformCacheCheckbox "Transform Cache" pos:[32,358] width:200 height:14 checked:false
	checkbox validateMeshTopology "Validate Mesh Topology" pos:[32,374]
	checkbox renameConflictingNodes "Rename Conflicting Nodes" pos:[32,390]
	checkbox mergeSelectedPolymeshSubtree "Merge Selected Polymesh Subtree" pos:[32,406]
	checkbox includeParentNodes "Include Parent Nodes" pos:[32,432]

	dropdownList storageFormat "Storage Format" pos:[16,454] width:256 height:40 items:#("HDF5", "Ogawa") selection:1

	button exportButton "Export" pos:[16,500] width:64 height:24
	button cancelButton "Cancel" pos:[208,500] width:64 height:24

	on exportButton pressed do
	(
	    filename = getSaveFileName caption:"Export to Alembic File:" types:"Alembic(*.abc)|*.abc|All(*.*)|*.*" historyCategory:"Alembic"
	    if (filename != undefined) do
	    (

	    	jobString = "filename=" + (filename as string)
	    	jobString += ";in=" + (inSpinner.value as string)
	    	jobString += ";out=" + (outSpinner.value as string)
	    	jobString += ";step=" + (stepsSpinner.value as string)
	    	jobString += ";substep=" + (subStepsSpinner.value as string)
	    	if(meshTopologyDropDown.selection == 1) do
	    	(
	    		jobString += ";normals=false"
	    		jobString += ";purepointcache=false"
	    	)
	    	if(meshTopologyDropDown.selection == 2) do
	    	(
	    		jobString += ";normals=false"
	    		jobString += ";purepointcache=true"
	    	)
	    	if(meshTopologyDropDown.selection == 3) do
	    	(
	    		jobString += ";purepointcache=false"
	    		jobString += ";normals=true"
	    	)
	    	jobString += ";uvs="
	    	jobString += (uvCheckbox.checked as string)
	    	jobString += ";materialids="
	    	jobString += (materialIdsCheckbox.checked as string)
	    	jobString += ";exportselected="
	    	jobString += (exportSelectedCheckbox.checked as string)
	    	jobString += ";flattenhierarchy="
	    	jobString += (flattenHierarchyCheckbox.checked as string)
	    	if(particleSystemExportMethod.selection == 1) do jobString += ";automaticinstancing=true"
	    	if(particleSystemExportMethod.selection == 2) do jobString += ";particlesystemtomeshconversion=true"
	    	jobString += ";transformCache="
	    	jobString += (transformCacheCheckbox.checked as string)
	    	jobString += ";validateMeshTopology="
	    	jobString += (validateMeshTopology.checked as string)
	    	jobString += ";renameConflictingNodes="
	    	jobString += (renameConflictingNodes.checked as string)
	    	jobString += ";mergePolyMeshSubtree="
	    	jobString += (mergeSelectedPolymeshSubtree.checked as string)
 	jobString += ";mergePolyMeshSubtree="
	    	jobString += (mergeSelectedPolymeshSubtree.checked as string)

	    	if(storageFormat.selection == 1) do jobString += ";storageFormat=hdf5"
	    	if(storageFormat.selection == 2) do jobString += ";storageFormat=ogawa"

	    	if(facesetExportMethod.selection == 1) do jobString += ";facesets=partitioningFacesetsOnly"
	    	if(facesetExportMethod.selection == 2) do jobString += ";facesets=all"

	    	result = ExocortexAlembic.createExportJobs(jobString)
	        if( result != 0 ) do
	        (
	            	messageBox "Failure - See Maxscript Listener for details." title:"Exocortex Alembic Export"
		    )
	        destroyDialog AlembicExportSettings
	    )
	)
	on cancelButton pressed do
	(
	    destroyDialog AlembicExportSettings
	)

	on AlembicExportSettings open do
    (
		inSpinner.value = animationRange.start
		outSpinner.value = animationRange.end
    )
)
---------------------------------------------------------------------------------------------------------
-- MAXScript functions to bring up the options dialogs

fn alembicExportDialog =
(
    createDialog AlembicExportSettings
)

---------------------------------------------------------------------------------------------------------
-- MacroScript to link the menu items to MAXScript functions

macroScript AlembicExportUI
    category:"Alembic"
    buttonText:"Alembic Export..."
    tooltip:"Alembic Export..."
(
    on execute do
    (
        alembicExportDialog()
    )
)


- Added genmesh .max exporter that was committed to 1.2 branch earlier today.

git-svn-id: 28d9401aa571d5108e51b194aae6f24ca5964c06@28042 8cc4aa7f-3514-0410-904f-f2cc9021211c

fatal: unable to access 'https://github.com/crystalspace/CS.git/': The requested URL returned error: 403


delete fucking mcr

delete fucking mcr

fatal: unable to access 'https://github.com/PixGrinder/PixGrinderScripts.git/': The requested URL returned error: 403


Remove TITLE and DESCRIPTION

Remove TITLE and DESCRIPTION

fatal: unable to access 'https://github.com/JohnGillen/cursorWin.git/': The requested URL returned error: 403


Create sample mouse macro

Create sample mouse macro


Add TITLE and DESCRIPTION attribute

Add TITLE and DESCRIPTION attribute

: Added TITLE and DESCRIPTION attribute for view macros
: removed START and STOP, unneeded.