Announcements

Announcement: We’re aware of an issue affecting starting a new topic from category pages and creating new blog posts. New topics can still be started directly from the relevant board. Learn more here.

Referencing - "reference cannot be removed..."

Referencing - "reference cannot be removed..."

BenediZ
Collaborator Collaborator
13,067 Views
6 Replies
Message 1 of 7

Referencing - "reference cannot be removed..."

BenediZ
Collaborator
Collaborator

Hello,

I am testing the first time with references.

Now I have a scene, where I can't remove the referenced file anymore:

"This reference cannot be removed. Possibly items from another file are parented to items from this file. // "

 

Inside that referenced file has been another reference, maybe it has to do with it.

There is also a strange item in the outliner "unknown_ref_node_fosterParent"

 

Thanks...

 

0 Likes
Accepted solutions (1)
13,068 Views
6 Replies
Replies (6)
Message 2 of 7

sean.heasley
Alumni
Alumni

Hi @BenediZ 

 

We have an article on this that is worth checking out if you haven't seen it already.

 

Has the reference been modified at all or parented to anything in the scene?

 

Also if you modify the referenced file and tried removing the nested reference?

 

 

0 Likes
Message 3 of 7

BenediZ
Collaborator
Collaborator

Thanks, I read the article and know theoretically about the details.

It was grouped once at import and I changed attributes of the reference...

 

I have now just exported what I need to a fresh file. It's not important in this case...

 

I just tried to understand, why that happened.

I have also "imported" the referenced files and deleted them, but some items (like cameras) couldn't be deleted "because they were locked". (and even couldn't be unlocked with python command)

 

So I think, I should never import a reference that has another reference, too, inside.

 

 

 

0 Likes
Message 4 of 7

sean.heasley
Alumni
Alumni

Hi @BenediZ 

 

Were they extra cameras or the default ones in the scene?

 

I think you can use the lockNode command to unlock the camera for deleting so in the script editor you would type:

 

lockNode -lock off cameraName;

 

 

0 Likes
Message 5 of 7

BenediZ
Collaborator
Collaborator

Hi,

I have the reason:

 

- Inside the referenced file had been parented (as children) cameras from the main scene. (see attached creenshot)

I didn't create these cameras, I just used a camera from the referenced file.

Maybe by swithcing between different perspective views these cameras have been created?

 

- After I unparented these cameras, I was able to remove the reference 🙂

 

- BUT: The cameras are not only locked, they are "un-deletable":

 

lockNode -lock off persp8;
select -r persp8 ;
// Error: file: C:/Program Files/Autodesk/Maya2018/scripts/others/doDelete.mel line 111: Non-deletable node 'persp8Shape' cannot be deleted. //

 

I assume, that Maya "thinks", these all are the default camera of the scene. Is there a way to tell Maya, they weren't?

 

 

0 Likes
Message 6 of 7

sean.heasley
Alumni
Alumni
Accepted solution

Hi @BenediZ 

 

I'm not sure but its odd there's so many perspective cameras being created. Is that how it looks in the ref scene?

 

If so you could just try deleting them from there but of course if unparenting and removing them solves it you can stick with that.

 

 

0 Likes
Message 7 of 7

BenediZ
Collaborator
Collaborator

Hi,

they are even undeletable in the ref scene (which is their root scene).

Maybe the cameras were created, because I use on a hotkey

dR_DoCmd("viewPersp")

to switch to my perspective camera. And somehow it was created in the same folder like referenced camera which I used. I will check that next time more carefully.

 

But it's not important now, it was possible to remove the reference and the remaining cameras do not disturb...

 

Thanks for looking.