void FSLSLBridge::configureBridgePrim(LLViewerObject* object)
{
	if (!isBridgeValid())
	{
		llwarns << "Bridge not valid" << llendl;
		return;
	}

	//modify the rock size and texture
	llinfos << "Bridge container found after second attachment, resizing..." << llendl;
	setupBridgePrim(object);

	mpBridge->setDescription(mCurrentFullName);
	mpBridge->setComplete(TRUE);
	mpBridge->updateServer(FALSE);

	gInventory.updateItem(mpBridge);
	gInventory.notifyObservers();

	//add bridge script to object
	llinfos << "Creating bridge script..." << llendl;
	create_script_inner(object);
}
void FSLSLBridge :: setupBridge(LLViewerObject *object)
{
	llinfos << "enter rock change" << llendl;

	mpBridge->setDescription(mCurrentFullName);

	LLProfileParams profParams(LL_PCODE_PROFILE_CIRCLE, F32(0.230), F32(0.250), F32(0.95));
	LLPathParams pathParams(LL_PCODE_PATH_CIRCLE, F32(0), F32(0.2), F32(0.01), F32(0.01), F32(0.00), F32(0.0), 
		F32(0), F32(0), F32(0), F32(0), F32(0), F32(0.01), 0);
	
	object->setVolume(LLVolumeParams(profParams, pathParams), 0);

	for (int i = 0; i < object->getNumTEs(); i++)
	{
		object->setTETexture(i, LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903")); //transparent texture
	}

	//object->setTETexture(0, LLUUID("29de489d-0491-fb00-7dab-f9e686d31e83")); //another test texture
	object->setScale(LLVector3(F32(0.01), F32(0.01), F32(0.01)));
	object->sendShapeUpdate();
	object->markForUpdate(TRUE);

	//object->setFlags(FLAGS_TEMPORARY_ON_REZ, true);
	object->addFlags(FLAGS_TEMPORARY_ON_REZ);
	object->updateFlags();

	gInventory.updateItem(mpBridge);
    gInventory.notifyObservers();

	llinfos << "end rock change, start script creation" << llendl;

	//add bridge script to object
	if (object)
	{
		create_script_inner(object);
	}
}