AlphA
05-21-2003, 06:02 PM
Is there a plugin that will change the location of where an object looks for it's maps? EG: I have an object that has an image map located in "C:images\coolmap.tga". I want it to find that same map in "M:coolmap.tga". I know I could simply change them manually but I have a ton of objects that have many mapped images on them and it would take forever to do it manually.
How this problem happened:
I'm setting up a lightnet farm and everything works but 1 thing. All of my objects have there maps located on my local drive. I've shared this directory as M: Now I need to tell them to look for images on M: instead of the local directory.
I've tried:
opened up objects in text editor and did a search and replace but if you change the length of any string in those files, the objects will no longer load into LightWave. Tried hex editor too. No luck. The length of the strings MUST not change. EG: "C:images\coolmap.tga" is a lot longer than "M:coolmap.tga".
Last resort:
If nothing else works I'll have to change the name of my maps folder. Load every object 1 at a time and when the requester comes up stating "can't find the maps, want to look somewhere else?" I'll point them to the new M: location. That, too, will take some time.
Any ideas?
Thanks
-AlphA
kevman3d
05-21-2003, 10:35 PM
Ahhh, yes, this is the problem that Content Directories were designed to avoid... The idea of a 'Content Directory' is very simple...
Working with a content directory
Press 'O' and in the options panel, select content directory. Select the root directory (for example, C:\myProjects\Robot_Wars) and then LightWave will look for all images, objects and scenes from folders underneath this root directory.
When you create your project, make sure you copy all your images you need to use into a folder called 'images', objects into a folder called 'objects' and scenes into a folder called 'scenes'. These are all under that root 'content directory'
eg. C:\myProjects\Robot_Wars\images
C:\myProjects\Robot_Wars\objects
C:\myProjects\Robot_Wars\scenes
You really want to try and not link to images or objects outside a content folder if at all possible (If an image is part of a project, copy it into the content directory's 'IMAGES' folder)
These kinds of images are usually referred to as Externals and they are a major nightmare when it comes to moving projects between machines and onto renderfarms.
But Why?
Content Directories are cool, cause they when you need to backup a complete project, you simply back up the folder C:\myProjects\Robot_Wars
When you need to move the scene to a new machine, or onto a render farm, just move the folder C:\myProjects\Robot_Wars and point lightwave to the new folder name - It can then find all the files it needs in the sub-folders 'images','objects' and 'scenes.
How to fix the situation?
What you can do (and I recommend) is first Load your working version of the scene, go to Layout -> Scene Tab -> Generics and run 'Content Manager'
This will allow you to move all objects, images and the scene to a nice clean content directory (if you use 'Export') or you can suck all those external images, models, etc into the existing content folder (if you use 'Consolidate')
There are a few issues that unfortunately Content Manager does seem to miss however - Usually some images in objects that are external don't seem to update properly so the models still have paths that point to the incorrect file. It still seems to move the images, etc, just the objects don't correctly seem to get relinked to the images in the content folder...
Also, multi-layered objects need to have all their layers (or just the first one, I think?) in the scene
For instance, say you had a model with 8 layers, but that first layer was just a few splines you set up to do some rail-extrudes in modeler - So you removed it from your scene in Layout - Don't.
Why? Layout will try and save all objects once its moved all the files and ends up complaining that 'Object Conversion Failed' because obviously it must need that layer to 'save' properly. This isn't critical, but it does mean your scene won't have shifted across to the new directory (but all the images and objects have).
You'll have to manually move it... You can then quickly fix up the scene by:
(a) Setting lightwave to point to the new content directory
(b) Loading the scene - When it complains that it can't find a file, just click 'Yes' to load the file from the 'Objects' or 'Images' folder in the content directory. DO NOT go and load the old file - You just end up back at the same problem you are trying to clean up.
(c) Once its all loaded, do a 'Save all objects' and 'save scene' to update everything...
(d) Clear the scene, and reload it to make sure it all works...
What I also tend to do is rename any folder paths where previous images were stored (like add an 'x_' to the start of the folder name). This then forces any models that refer to files there to complain - Just say 'yes' to select new image and pick the ones from the Images folder. Then Save all objects.
Hope that helps make life a little easier? :)
AlphA
05-22-2003, 12:26 AM
Neato! Content manager is a superb, life saving tool! I can't believe I've never used it before. Works like a charm.
THANKS so much! :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.