Commits

VirLinden  committed 9e6c1f4 Merge

merge

  • Participants
  • Parent commits 0af1a0f, 9fcbe0a

Comments (0)

Files changed (2)

File indra/newview/llfloatermodelpreview.cpp

 	{
 		llwarns << "document has no visual_scene" << llendl;
 		setLoadState( ERROR_PARSING );
-		return false;
-	}
+		return true;
+	}
+	
 	setLoadState( DONE );
 
-	processElement(scene);
+	bool badElement = false;
+	
+	processElement( scene, badElement );
+	
+	if ( badElement )
+	{
+		setLoadState( ERROR_PARSING );
+	}
 	
 	return true;
 }
     return NULL;
 }
 
-void LLModelLoader::processElement(daeElement* element)
+void LLModelLoader::processElement( daeElement* element, bool& badElement )
 {
 	LLMatrix4 saved_transform = mTransform;
 
 				}
 			}
 		}
+		else 
+		{
+			llinfos<<"Unable to resolve geometry URL."<<llendl;
+			badElement = true;			
+		}
+
 	}
 
 	domInstance_node* instance_node = daeSafeCast<domInstance_node>(element);
 		daeElement* instance = instance_node->getUrl().getElement();
 		if (instance)
 		{
-			processElement(instance);
+			processElement(instance,badElement);
 		}
 	}
 
 	daeTArray< daeSmartRef<daeElement> > children = element->getChildren();
 	for (S32 i = 0; i < children.getCount(); i++)
 	{
-		processElement(children[i]);
+		processElement(children[i],badElement);
 	}
 
 	domNode* node = daeSafeCast<domNode>(element);

File indra/newview/llfloatermodelpreview.h

 	void loadModelCallback();
 
 	void loadTextures() ; //called in the main thread.
-	void processElement(daeElement* element);
+	void processElement(daeElement* element, bool& badElement);
 	std::vector<LLImportMaterial> getMaterials(LLModel* model, domInstance_geometry* instance_geo);
 	LLImportMaterial profileToMaterial(domProfile_COMMON* material);
 	std::string getElementLabel(daeElement *element);