Notifications
Clear all

[Closed] adding skew fails

The script doesn’t do anything fancy in my opinion. A callback registers when an object has been created and adds a skew modifier to it. That’s it.

It works fine with a teapot, but throws an error (system exception) if it’s a freecamera, and max crashes entirely when it is a targetcamera. I just can’t figure out why. I need to get it working with targetcameras.

fn addskew =
    (
    	cam = (callbacks.notificationparam())
    	callbacks.removescripts #sceneNodeAdded id:#tests
    	
    	addmodifier cam (skew())
    )
    
    callbacks.addscript #sceneNodeAdded "addskew()" id:#tests
    --t = teapot() --this works
    
    c = freecamera() -- throws system exception
    
    --c = targetCamera pos:[0,0,0] target:(targetObject pos:[0, 0, 30]) --crashes