How to remove cameras?

How to remove cameras?

Anonymous
Not applicable
25,498 Views
11 Replies
Message 1 of 12

How to remove cameras?

Anonymous
Not applicable

Hello, somehow I duplicated cameras I don't need them and I tried to remove them, but they can't be deleted. How to disable them?

 

Help please.

0 Likes
Accepted solutions (2)
25,499 Views
11 Replies
Replies (11)
Message 2 of 12

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

I just tried this and selected them in the Outliner and was able to delete them.

 

Did you try deleting them through the Outliner? Do any error messages appear?

 

Let me know if anything changes!

 

 

0 Likes
Message 3 of 12

Anonymous
Not applicable

They can't be deleted via delete button.

Cameras always get in the way when I model, so I put all cameras to a layer and hid it. But the new cameras created themselves and I can't delete them.

0 Likes
Message 4 of 12

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Hmm this is unusual.

 

When you get a chance, can you please zip and attach the scene file here or via dropbox/google drive or another file sharing program so I can take a look at it?

 

 

0 Likes
Message 5 of 12

Anonymous
Not applicable

Here is the file: http://rgho.st/7wSSH5xGh

0 Likes
Message 6 of 12

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Thanks for attaching the scene file!

 

I just opened it and was able to select all of the cameras and delete them using the delete key.

 

If this isn't working for you, you may want to try deleting your settings/preferences then try deleting the cameras again.

 

Please let me know if this works or if you need any more assistance!

 

 

If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

 

Kudos are greatly appreciated. Everyone likes a thumbs up!

 

 

0 Likes
Message 7 of 12

Anonymous
Not applicable

Strange, didn't work for me. However I just created a new scene and imported everything there and just deleted cameras from a new scene.

He is the video where I dropped prefs and tried to delete cameras.

Message 8 of 12

mspeer
Consultant
Consultant
Accepted solution

Hi!

@Anonymous and @sean.heasley.

 

These cameras are set to be startup cameras and therefore are read only and cannot be deleted by default.

This maybe happened by importing or referencing an other scene-file + an unknown action that broke the usual behavior.

 

Use this MEL command to remove the startup flag from cameras (,example for camera "persp1"):

camera -e -startupCamera false persp1;
Message 9 of 12

sean.heasley
Alumni
Alumni

Thanks for the tip @mspeer!

 

 

0 Likes
Message 10 of 12

Anonymous
Not applicable

Thank @mspeer . I replaced the persp1 with the name of my camera:

 

camera -e -startupCamera false dougliehillReservoirBaseScene_v07:_UNKNOWN_REF_NODE_fosterParent1;

 

It returned this line:

 

// Error: line 1: Non camera object in the list. //

 

Any thoughts?

0 Likes
Message 11 of 12

mspeer
Consultant
Consultant

Hi!

 

@Anonymous .

The problem in your case seems to be more complex, i can't help you further without a scene-file.

0 Likes
Message 12 of 12

vivekmandapeta007
Explorer
Explorer
Accepted solution

#  Non-deletable node Delete

# Python Code
import maya.cmds as cmds
camera_to_delete = "side1"   #Camera Name
cmds.camera(camera_to_delete, e=True, startupCamera=False)
cmds.delete(camera_to_delete)

0 Likes