diff options
Diffstat (limited to 'indra/newview/llselectmgr.h')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llselectmgr.h | 67 |
1 files changed, 61 insertions, 6 deletions
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 87ada5ac6b..d4b736640c 100644..100755 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -43,10 +43,12 @@ #include "llpermissions.h" #include "llcontrol.h" #include "llviewerobject.h" // LLObjectSelection::getSelectedTEValue template +#include "llmaterial.h" #include <deque> #include <boost/iterator/filter_iterator.hpp> #include <boost/signals2.hpp> +#include <boost/make_shared.hpp> // boost::make_shared class LLMessageSystem; class LLViewerTexture; @@ -83,6 +85,12 @@ struct LLSelectedTEFunctor virtual bool apply(LLViewerObject* object, S32 face) = 0; }; +struct LLSelectedTEMaterialFunctor +{ + virtual ~LLSelectedTEMaterialFunctor() {}; + virtual LLMaterialPtr apply(LLViewerObject* object, S32 face, LLTextureEntry* tep, LLMaterialPtr& current_material) = 0; +}; + template <typename T> struct LLSelectedTEGetFunctor { virtual ~LLSelectedTEGetFunctor() {}; @@ -121,6 +129,8 @@ typedef enum e_selection_type SELECT_TYPE_HUD }ESelectType; +const S32 TE_SELECT_MASK_ALL = 0xFFFFFFFF; + // Contains information about a selected object, particularly which TEs are selected. class LLSelectNode { @@ -143,7 +153,7 @@ public: // *NOTE: invalidate stored textures and colors when # faces change void saveColors(); void saveTextures(const uuid_vec_t& textures); - void saveTextureScaleRatios(); + void saveTextureScaleRatios(LLRender::eTexIndex index_to_query); BOOL allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const; @@ -307,6 +317,15 @@ public: bool applyToRootNodes(LLSelectedNodeFunctor* func, bool firstonly = false); bool applyToNodes(LLSelectedNodeFunctor* func, bool firstonly = false); + /* + * Used to apply (no-copy) textures to the selected object or + * selected face/faces of the object. + * This method moves (no-copy) texture to the object's inventory + * and doesn't make copy of the texture for each face. + * Then this only texture is used for all selected faces. + */ + void applyNoCopyTextureToTEs(LLViewerInventoryItem* item); + ESelectType getSelectType() const { return mSelectType; } private: @@ -334,6 +353,9 @@ typedef LLSafeHandle<LLObjectSelection> LLObjectSelectionHandle; extern template class LLSelectMgr* LLSingleton<class LLSelectMgr>::getInstance(); #endif +// For use with getFirstTest() +struct LLSelectGetFirstTest; + class LLSelectMgr : public LLEditMenuHandler, public LLSingleton<LLSelectMgr> { public: @@ -498,10 +520,14 @@ public: void saveSelectedObjectColors(); void saveSelectedObjectTextures(); + // Sets which texture channel to query for scale and rot of display + // and depends on UI state of LLPanelFace when editing + void setTextureChannel(LLRender::eTexIndex texIndex) { mTextureChannel = texIndex; } + LLRender::eTexIndex getTextureChannel() { return mTextureChannel; } + void selectionUpdatePhysics(BOOL use_physics); void selectionUpdateTemporary(BOOL is_temporary); void selectionUpdatePhantom(BOOL is_ghost); - void selectionUpdateCastShadows(BOOL cast_shadows); void selectionDump(); BOOL selectionAllPCode(LLPCode code); // all objects have this PCode @@ -529,6 +555,8 @@ public: void selectionSetClickAction(U8 action); void selectionSetIncludeInSearch(bool include_in_search); void selectionSetGlow(const F32 glow); + void selectionSetMaterialParams(LLSelectedTEMaterialFunctor* material_func); + void selectionRemoveMaterial(); void selectionSetObjectPermissions(U8 perm_field, BOOL set, U32 perm_mask, BOOL override = FALSE); void selectionSetObjectName(const std::string& name); @@ -539,8 +567,6 @@ public: void selectionTexScaleAutofit(F32 repeats_per_meter); void adjustTexturesByScale(BOOL send_to_sim, BOOL stretch); - void selectionResetRotation(); // sets rotation quat to identity - void selectionRotateAroundZ(F32 degrees); bool selectionMove(const LLVector3& displ, F32 rx, F32 ry, F32 rz, U32 update_type); void sendSelectionMove(); @@ -563,6 +589,33 @@ public: BOOL selectGetRootsModify(); BOOL selectGetModify(); + // returns TRUE if is all objects are non-permanent-enforced + BOOL selectGetRootsNonPermanentEnforced(); + BOOL selectGetNonPermanentEnforced(); + + // returns TRUE if is all objects are permanent + BOOL selectGetRootsPermanent(); + BOOL selectGetPermanent(); + + // returns TRUE if is all objects are character + BOOL selectGetRootsCharacter(); + BOOL selectGetCharacter(); + + // returns TRUE if is all objects are not permanent + BOOL selectGetRootsNonPathfinding(); + BOOL selectGetNonPathfinding(); + + // returns TRUE if is all objects are not permanent + BOOL selectGetRootsNonPermanent(); + BOOL selectGetNonPermanent(); + + // returns TRUE if is all objects are not character + BOOL selectGetRootsNonCharacter(); + BOOL selectGetNonCharacter(); + + BOOL selectGetEditableLinksets(); + BOOL selectGetViewableCharacters(); + // returns TRUE if selected objects can be transferred. BOOL selectGetRootsTransfer(); @@ -712,6 +765,9 @@ private: static void packGodlikeHead(void* user_data); static bool confirmDelete(const LLSD& notification, const LLSD& response, LLObjectSelectionHandle handle); + // Get the first ID that matches test and whether or not all ids are identical in selected objects. + void getFirst(LLSelectGetFirstTest* test); + public: // Observer/callback support for when object selection changes or // properties are received/updated @@ -730,10 +786,9 @@ private: LLVector3 mGridOrigin; LLVector3 mGridScale; EGridMode mGridMode; - BOOL mGridValid; - BOOL mTEMode; // render te + LLRender::eTexIndex mTextureChannel; // diff, norm, or spec, depending on UI editing mode LLVector3d mSelectionCenterGlobal; LLBBox mSelectionBBox; |