Fixing a broken link to an OBJ model
![MaxHancock](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/userpics/043/nB0083D14FEF2.jpg)
This rarely happens but I have a .duf file with a broken link to an .obj file. When transfering a .duf file from my Mac to PC the link the the OBJ is broken. I thought .obj files are embeded when you save a scene. The message DAZ Studio gives me shows that it is looking for the Mac directory, not a relative path. I've never had an issue with transferring the same times of files with OBJ models from Mac to PC before so this is a bit puzzling.
I know where the original file is, so I could relink it. I'm sure there's a way to fix this, but I don't know how. Is there anyone here that can help?
Thanks.
Comments
If the OBJ was not imported from a content directory then the full path will have been stored. You can edit the .duf file (uncompressing it first if need be) but be aware that the path is stored in URI format, so many "special" characters (including spaces) will be replaced with their hex codes.
Thank you. That's what I though, it should embed. I don't know how to edit a .duf file. But anyway, I think the file was corupt. I saved it out again under a differnt name and transfered it to the PC and it opened without an issue.
It doesn't embed the object file. A reference to the file is placed in the scene files, that reference will either be an absolute or relative path. It will be absolute if the object was not in the folder or a sub-folder of a mapped DS library and therefore will only be found if it continues to have the exact same path.
No, I'm pretty sure it does embed the .obj, but apparently not always. The .duf file I transferred from my Mac to PC doesn't have the .obj file anywhere near it, and when I open it the model is in fact there in the scene, not linked. The file size of that .duf is rather large, so I know it's embedding more than just the scene. Now I know there is a case where if the .obj is part of the library it won't embed. When I got the problem with the broken link, the only thing different I was doing than what I was doing before was to not group the objects to null. I'm not sure if grouping to null has anything to do with linkage or embedding, but it appears to.
Side note: Why don't textures load when they are in the same folder as the .duf? They do load if it's on the same machine, but when I transfer from Mac to PC, then the link to texture is broken, even if it's in the same folder. Anyway to fix that?
Are the folders in the same relative path in a content directory on both systems?
No, neither are in the content directory. I hardly remember how to add my work to the directory. I guess it won't link textures until I do.
There's a better than even chance you'll solve all your broken link problems, maybe even the original one, if you do put your content files into your content folder. D|S is set up to do exactly this, so that the files making up a content item can be moved from a content location on one computer to a completely different content location on any other computer, with no broken links.
If you don't know how to find your content folder, the best thing you can do to avoid future problems is to find out. Open the Content Directory Manager dialog (in the Content Library tab, click on the Options button at top right) and click on the "+" to open the "DAZ Studio Formats" section. That shows where your content folder is, and that's where D|S expects to find its files.
You are correct, SpottedKitty. That was so much easier. On a Mac it's under the user/shared folder, and on a PC it is under user/Public folder. I simple save the scene in a folder there and load textures from those folders and resave, then transfer from one machine to the other and it works great. You need to restart DAZ to have it show up in the content directory, but no problem.