Feedback

What's your question?

By: [ Editor ] Asked

maya default camera options

What would be the way to ensure each new camera has some default settings applied? Specifically gate settings. Probably possible with a scriptJob node, but maybe it's burried somewhere in files ? I can easily override menu commands, but this wont work with createNode or camera commands.

-Michal

Add comment viewed 290 times Latest activity 10 months ago

or Cancel

2 answers

  • 1

michalf [ Editor ]

Ok, I looked into factory MEL files, and decided to put some optionVar into my userSetup.mel

optionVar -floatValue cameraHorizAper 0.98;

optionVar -floatValue cameraVertAper 0.735;

optionVar -intValue cameraFilmFitMode 1;

This doesn't work with createNode, but it's a starter.

or Cancel
  • 0

julian [ Admin ]

You could put a scriptJob in your userSetup.mel;

scriptJob -event DagObjectCreated "checkCams(`ls -cameras`)";

I don't think there's a simple way to know what camera was created. "ls -cameras" doesn't return them in the order they were created.

Also, if you put more than one creation command in a script it will still only fire once. For example:

createNode camera;
createNode camera;
createNode camera;

So its probably best to check all the cameras each time it fires.

or Cancel