Jump to content

[SOLVED] Tools->Validator ignores NodeReference's node file and ObjectMeshClusters mesh


photo

Recommended Posts

Posted

We use validator a lot in our common works. but recently, I've found that validator always ignores some files which actually are referenced by current world.

 

try this by youself,

 

Open a world contains ObjectMeshCluster or many NodeReference, the validator will told you there are some node file, and some mesh file are not used in current world. but those node file are NodeReference, and mesh files are ObjectMeshCluster's mesh.

  • 2 weeks later...
Posted

ah~~ seems it's not fixed, all ObjectMeshCluster still reported as unused mesh files.

Posted

the validate_meshes function in editor_validator.h should be like this:

int validate_meshes(string path) {

       int ret = 1;

       // mesh names
       string meshes[];
       foreach(Object object; objects) {
  	     string name;
  	     switch(object.getType()) {
  	     case NODE_OBJECT_MESH:
  		     name = ObjectMesh(object).getMeshName();
  		     break;
  	     case NODE_OBJECT_MESH_SKINNED:
  		     name = ObjectMeshSkinned(object).getMeshName();
  		     break;
  	     case NODE_OBJECT_MESH_CLUSTER:
  		     name = ObjectMeshCluster(object).getMeshName();
  		     break;
  	     case NODE_OBJECT_MESH_CLUTTER:
  		     name = ObjectMeshClutter(object).getMeshName();
  		     break;
  	     default:
  		     continue;
  	     }

  	     meshes.append(name);
       }

       // validate directory
       ret &= validate_directory(meshes,path);

       return ret;
   }

 

then the ObjectMeshCluster and ObjectMeshClutter should be fine.

Posted

even more, the validator told me that current world and world script file are unused files too..

  • 2 weeks later...
Posted

I'm afraid I cannot reproduce it.

post-13-0-45027200-1348559552_thumb.gif

Are you sure you've updated to the latest script? If you did, can you give step-by-step details?

Posted

strange, see these highlighted part:

 

post-49-0-47361600-1348633821_thumb.jpg

 

this ObjectMeshCluster is enabled and it's a child of other objects.

×
×
  • Create New...