diff options
| -rw-r--r-- | indra/newview/llmaterialmgr.cpp | 43 | ||||
| -rw-r--r-- | indra/newview/llpanelface.cpp | 37 | ||||
| -rw-r--r-- | indra/newview/lltexturectrl.h | 1 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_tools_texture.xml | 8 | 
5 files changed, 52 insertions, 47 deletions
| diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index 81284e42dd..fb8cffa4ef 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -93,6 +93,7 @@ LLMaterialsResponder::~LLMaterialsResponder()  void LLMaterialsResponder::result(const LLSD& pContent)  { +	LL_DEBUGS("Materials") << LL_ENDL;  	mCallback(true, pContent);  } @@ -176,35 +177,43 @@ const LLMaterialPtr LLMaterialMgr::get(const LLUUID& region_id, const LLMaterial  boost::signals2::connection LLMaterialMgr::get(const LLUUID& region_id, const LLMaterialID& material_id, LLMaterialMgr::get_callback_t::slot_type cb)  { +	boost::signals2::connection connection; +	  	material_map_t::const_iterator itMaterial = mMaterials.find(material_id);  	if (itMaterial != mMaterials.end())  	{ +		LL_DEBUGS("Materials") << "region " << region_id << " found materialid " << material_id << LL_ENDL;  		get_callback_t signal;  		signal.connect(cb);  		signal(material_id, itMaterial->second); -		return boost::signals2::connection(); +		connection = boost::signals2::connection();  	} - -	if (!isGetPending(region_id, material_id)) +	else  	{ -		get_queue_t::iterator itQueue = mGetQueue.find(region_id); -		if (mGetQueue.end() == itQueue) +		if (!isGetPending(region_id, material_id))  		{ -			LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id<<" material id " << material_id << LL_ENDL; -			std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t())); -			itQueue = ret.first; +			get_queue_t::iterator itQueue = mGetQueue.find(region_id); +			if (mGetQueue.end() == itQueue) +			{ +				LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id << LL_ENDL; +				std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t())); +				itQueue = ret.first; +			} +			LL_DEBUGS("Materials") << "adding material id " << material_id << LL_ENDL; +			itQueue->second.insert(material_id); +			markGetPending(region_id, material_id);  		} -		itQueue->second.insert(material_id); -		markGetPending(region_id, material_id); -	} -	get_callback_map_t::iterator itCallback = mGetCallbacks.find(material_id); -	if (itCallback == mGetCallbacks.end()) -	{ -		std::pair<get_callback_map_t::iterator, bool> ret = mGetCallbacks.insert(std::pair<LLMaterialID, get_callback_t*>(material_id, new get_callback_t())); -		itCallback = ret.first; +		get_callback_map_t::iterator itCallback = mGetCallbacks.find(material_id); +		if (itCallback == mGetCallbacks.end()) +		{ +			std::pair<get_callback_map_t::iterator, bool> ret = mGetCallbacks.insert(std::pair<LLMaterialID, get_callback_t*>(material_id, new get_callback_t())); +			itCallback = ret.first; +		} +		connection = itCallback->second->connect(cb);;  	} -	return itCallback->second->connect(cb);; +	 +	return connection;  }  bool LLMaterialMgr::isGetAllPending(const LLUUID& region_id) const diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 2d2a0d6d0c..685614a8c4 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -300,9 +300,9 @@ void LLPanelFace::sendBump()  	U32 bumpiness = mComboBumpiness->getCurrentIndex();  	if (bumpiness < BUMPY_TEXTURE)  	{ -		LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control"); -		//texture_ctrl->setImageAssetID(LLUUID()); -		texture_ctrl->clear(); +		LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL; +		LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control"); +		bumpytexture_ctrl->clear();  		LLSD dummy_data;  		onSelectMaterialTexture(dummy_data);  	} @@ -397,10 +397,6 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor  			if (valid)  			{  				value = ctrlTexScaleS->get(); -				//if( checkFlipScaleS->get() ) -				//{ -				//	value = -value; -				//}  				if (comboTexGen &&  				    comboTexGen->getCurrentIndex() == 1)  				{ @@ -635,20 +631,11 @@ void LLPanelFace::getState()  		}  		else  		{ -			llwarns << "failed getChild for 'combobox mattype'" << llendl; +			LL_WARNS("Materials") << "failed getChild for 'combobox mattype'" << LL_ENDL;  		}  		getChildView("combobox mattype")->setEnabled(editable);  		onCommitMaterialsMedia(NULL, this); -		 -		//if ( LLMediaEngine::getInstance()->getMediaRenderer () ) -		//	if ( LLMediaEngine::getInstance()->getMediaRenderer ()->isLoaded () ) -		//	{	 -		//		 -		//		//mLabelTexAutoFix->setEnabled ( editable ); -		//		 -		//		//mBtnAutoFix->setEnabled ( editable ); -		//	}  		bool identical;          bool identical_diffuse; @@ -813,7 +800,7 @@ void LLPanelFace::getState()  				updateAlphaControls(getChild<LLComboBox>("combobox alphamode"),this);  			} -			if(texture_ctrl) +			if(texture_ctrl && !texture_ctrl->isPickerShown())  			{                  if (identical_diffuse)  				{ @@ -849,7 +836,7 @@ void LLPanelFace::getState()                  }              } -            if (shinytexture_ctrl) +            if (shinytexture_ctrl && !shinytexture_ctrl->isPickerShown())              {                  if (identical_spec)                  { @@ -871,7 +858,7 @@ void LLPanelFace::getState()                  }              } -            if (bumpytexture_ctrl) +            if (bumpytexture_ctrl && !bumpytexture_ctrl->isPickerShown())              {                  if (identical_norm)  				{ @@ -1656,12 +1643,13 @@ void LLPanelFace::getState()  void LLPanelFace::refresh()  { +	LL_DEBUGS("Materials") << LL_ENDL;  	getState();  }  void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMaterialPtr material)  { //laying out UI based on material parameters (calls setVisible on various components) -	LL_DEBUGS("Materials") << "Loaded material " << material_id.asString() << material->asLLSD() << LL_ENDL; +	LL_DEBUGS("Materials") << "material id " << material_id.asString() << " data " << material->asLLSD() << LL_ENDL;  	//make a local copy of the material for editing   	// (prevents local edits from overwriting client state on shared materials) @@ -1941,7 +1929,7 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)  	LLComboBox* combo_bumpiness = self->getChild<LLComboBox>("combobox bumpiness");  	if (!combo_mattype || !combo_matmedia || !combo_shininess || !combo_bumpiness)  	{ -		llwarns << "Combo box not found...exiting." << llendl; +		LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL;  		return;  	}  	U32 materials_media = combo_matmedia->getCurrentIndex(); @@ -2127,7 +2115,7 @@ void LLPanelFace::updateBumpyControls(LLUICtrl* ctrl, void* userdata, bool mess_  	LLPanelFace* self = (LLPanelFace*) userdata;  	LLTextureCtrl* texture_ctrl = self->getChild<LLTextureCtrl>("bumpytexture control");  	LLUUID bumpy_texture_ID = texture_ctrl->getImageAssetID(); -	LL_DEBUGS("Materials") << "Bumpy texture selected: " << bumpy_texture_ID << LL_ENDL; +	LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL;  	LLComboBox* comboBumpy = self->getChild<LLComboBox>("combobox bumpiness");  	if (!comboBumpy)  	{ @@ -2453,6 +2441,7 @@ void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata)  void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)  { +	LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL;  	LLComboBox* combo_mattype = getChild<LLComboBox>("combobox mattype");  	if (!combo_mattype)  	{ @@ -2470,7 +2459,7 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)  			break;  		// no default needed  	} -		 +	LL_DEBUGS("Materials") << "control " << which_control << LL_ENDL;  	LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(which_control);  	if (texture_ctrl)  	{ diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 599d9c70c5..3fd024082e 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -126,6 +126,7 @@ public:  	// LLTextureCtrl interface  	void			showPicker(BOOL take_focus); +	bool			isPickerShown() { return !mFloaterHandle.isDead(); }  	void			setLabel(const std::string& label);  	void			setLabelWidth(S32 label_width) {mLabelWidth =label_width;}	  	const std::string&	getLabel() const							{ return mLabel; } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 53e6f44760..edd47b68c3 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1861,7 +1861,7 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)  	const LLTextureEntry *tep = getTE(te);  	if (!tep)  	{ -		llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; +		LL_WARNS("MaterialTEs") << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;  	}  	else if (color != tep->getColor())  	{ @@ -1975,6 +1975,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow)  void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams)  { +	LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << LL_ENDL;  	for (U8 i = 0; i < getNumTEs(); i++)  	{  		if (getTE(i) && (getTE(i)->getMaterialID().isNull() || (getTE(i)->getMaterialID() == pMaterialID))) @@ -1987,9 +1988,11 @@ void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, co  S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)  {  		S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID); +		LL_DEBUGS("MaterialTEs") << "te "<< (S32)te << " materialid " << pMaterialID.asString() << " res " << res +								 << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) +								 << LL_ENDL;  		if (res)  		{ -			LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL;  			LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2));  			gPipeline.markTextured(mDrawable);  			mFaceMappingChanged = TRUE; @@ -2000,6 +2003,9 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)  S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)  {  	S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); +	LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << pMaterialParams->asLLSD() << " res " << res +							 << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) +							 << LL_ENDL;  	if (res)  	{  		gPipeline.markTextured(mDrawable); diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index 042134a8c6..678b4f43cd 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -644,8 +644,8 @@               layout="topleft"  			 label_width="205"               left="10" -             max_val="9999" -             min_val="-9999" +             max_val="180" +             min_val="-180"               name="bumpyRot"               width="265" /> @@ -707,8 +707,8 @@               layout="topleft"  			 label_width="205"               left="10" -             max_val="9999" -             min_val="-9999" +             max_val="180" +             min_val="-180"               name="shinyRot"               width="265" /> | 
