Creating a collada effect with Maxscript

Hello,

our artists and level designer use the standard 3ds max effects when they create new levels. However, for the export the effects have to be converted into collada effects. This they should be able to do via a button that converts all effects into collada effects automatically.

This is how far I have gotten:


for s = 1 to selection.count do	
(
	isCollada = false

	--check if material is not collada material
	if not isCollada then
	(
		-- create new collada material
		ce = 	ColladaEffect()
		
                -- add technique
		ce.techniques[1] = ColladaEffectTechnique()   --does not work

                -- todo: add pass

                -- todo: assign diffuse map

                -- todo: assign bump map
	)
)

The constructor ColladaEffectTechnique() does not work and returns a runtime error:
– Runtime error: Not creatable: ColladaEffectTechnique

Where can I find the proper constructor names?
We found ColladaEffect() by using MacroRecorder when selecting the effect from the Material Browser. However adding techniques and passes in the material editor are not recorded.

Thank you for your help :slight_smile:

Christian

I got an answer elsewhere,
“the full functionality of the Collada Effect is not exposed to MaxScript.”

but thank you for reading :slight_smile: