1. simon_linden
  2. viewer-rabbit

Commits

davep  committed 770b21c

SH-1555 Disable upload button if a hull exists that has more than 256 vertices.

  • Participants
  • Parent commits b35751f
  • Branches default

Comments (0)

Files changed (1)

File indra/newview/llfloatermodelpreview.cpp

View file
 		}
 	}
 
+
+	//make sure no hulls have more than 256 points in them
+	for (U32 i = 0; upload_ok && i < mModel[LLModel::LOD_PHYSICS].size(); ++i)
+	{
+		LLModel* mdl = mModel[LLModel::LOD_PHYSICS][i];
+
+		for (U32 j = 0; upload_ok && j < mdl->mPhysics.mHull.size(); ++j)
+		{
+			upload_ok = upload_ok && mdl->mPhysics.mHull[i].size() <= 256;
+		}
+	}
+
 	bool errorStateFromLoader = getLoadState() >= LLModelLoader::ERROR_PARSING ? true : false;
 
 	bool skinAndRigOk = true;
 	{
 		mFMP->childEnable("ok_btn");
 	}
+	else
+	{
+		mFMP->childDisable("ok_btn");
+	}
 	
 	//add up physics triangles etc
 	S32 start = 0;