diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index bbcead9e9..4edd70b24 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -121,6 +121,8 @@ BOOL LLPanelObject::postBuild() //Blink [SimmanFederal] Inspired by VLife/Oynx mClickBlink = getChild("button blink"); childSetAction("button blink",&onClickBlink,this); + mClickHardBlink = getChild("button blink hard"); + childSetAction("button blink hard",&onClickHardBlink,this); // Temporary checkbox mCheckTemporary = getChild("Temporary Checkbox Ctrl"); @@ -388,6 +390,13 @@ void LLPanelObject::getState( ) BOOL enable_rotate = TRUE; // + //[SimmanFederal]: Adding permission check to see if we can even BLINK anything not just atempting to blink even no mod sheit. + //Also a link check. (lol from the orginal enable_move bool <3) + BOOL sfBlinkOk = objectp->permMove() && !objectp->isAttachment() && (objectp->permModify() || !gSavedSettings.getBOOL("EditLinkedParts")); + childSetEnabled("button blink", sfBlinkOk); + childSetEnabled("button blink hard", sfBlinkOk); + //[/SimmanFederal] + S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )) && (selected_count == 1); @@ -481,10 +490,6 @@ void LLPanelObject::getState( ) // - // Griefer Technology ~[SimmanFederal] - childSetEnabled("button blink", root_objectp->permModify()); - // - // Select Single Message childSetVisible("select_single", FALSE); childSetVisible("edit_object", FALSE); @@ -2027,19 +2032,6 @@ void LLPanelObject::onCommitPhysics( LLUICtrl* ctrl, void* userdata ) self->sendIsPhysical(); } -//[SimmanFederal] Blinking function. Inspired by VLife/Oynx. -void LLPanelObject::onClickBlink(void* data) -{ - LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); - if(objpos) - { - LLVector3 pos = objpos->getPosition(); - pos.mV[VZ] = 9001.0f; - objpos->setPositionParent(pos); - LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION); - } -} - // static void LLPanelObject::onCommitTemporary( LLUICtrl* ctrl, void* userdata ) { @@ -2085,6 +2077,42 @@ void LLPanelObject::onCommitSculpt( LLUICtrl* ctrl, void* userdata ) self->sendSculpt(); } +//moved the Blink code below the Commit voids, Sorry about that. ~[SimmanFederal] +//[SimmanFederal] Blinking function. Inspired by VLife/Oynx. +void LLPanelObject::onClickBlink(void* data) +{ + LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); + if(objpos) + { + //printchat("Blinking...");//yes I'm too lasy to add the system chat set up to a header + LLVector3 pos = objpos->getPosition();//get the x and the y + pos.mV[VZ] = 340282346638528859811704183484516925440.0f;//create the z + objpos->setPositionParent(pos);//set the x y z + LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);//send the data + } +} + +//[SimmanFederal] HARD-Blinking function. I thought about it while fapping. +void LLPanelObject::onClickHardBlink(void* data) +{ + LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); + if(objpos) + { + //printchat("Hard blinking...");//yes I'm too lasy to add the system chat set up to a header + /* + NOTE: Temporary objects, when thrown off world/put off world, + do not report back to the viewer, nor go to lost and found. + + So we do selectionUpdateTemporary(1) + */ + LLSelectMgr::getInstance()->selectionUpdateTemporary(1);//set temp to TRUE + LLVector3 pos = objpos->getPosition();//get the x and the y + pos.mV[VZ] = 340282346638528859811704183484516925440.0f;//create the z + objpos->setPositionParent(pos);//set the x y z + LLSelectMgr::getInstance()->sendMultipleUpdate(UPD_POSITION);//send the data + } +} + // static BOOL LLPanelObject::onDropSculpt(LLUICtrl*, LLInventoryItem* item, void* userdata) { diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index 6d7d0de9b..1f191e91b 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -66,6 +66,7 @@ public: static BOOL precommitValidate(LLUICtrl* ctrl,void* userdata); static void onClickBlink(void* userdata);//[SimmanFederal] Blinking + static void onClickHardBlink(void* userdata);//[SimmanFederal] Griefer Blinking static void onCommitLock(LLUICtrl *ctrl, void *data); static void onCommitPosition( LLUICtrl* ctrl, void* userdata); @@ -153,8 +154,9 @@ protected: LLSpinCtrl* mCtrlPosX; LLSpinCtrl* mCtrlPosY; LLSpinCtrl* mCtrlPosZ; - //VLife/Oynx Inspriation. IT BLINKS PRIMS TO 9001.0 METERS. HERP. + //VLife/Oynx Inspriation. IT BLINKS PRIMS TO 340282346638528859811704183484516925440.0f METERS. HERP. LLButton* mClickBlink;//[SimmanFederal] + LLButton* mClickHardBlink;//[SimmanFederal] LLTextBox* mLabelSize; LLSpinCtrl* mCtrlScaleX; diff --git a/indra/newview/skins/default/xui/en-us/floater_tools.xml b/indra/newview/skins/default/xui/en-us/floater_tools.xml index cd60da0af..5b4861cd2 100644 --- a/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/indra/newview/skins/default/xui/en-us/floater_tools.xml @@ -910,10 +910,14 @@ Cylinder - -