diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llinventorytype.cpp | 7 | ||||
-rw-r--r-- | indra/llinventory/llinventorytype.h | 4 | ||||
-rw-r--r-- | indra/llinventory/llpermissions.h | 32 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 28 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.h | 21 |
5 files changed, 32 insertions, 60 deletions
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 303dd8b711..3dd1a5638d 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -83,6 +83,8 @@ LLInventoryDictionary::LLInventoryDictionary() addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION)); addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE)); addEntry(LLInventoryType::IT_MESH, new InventoryEntry("mesh", "mesh", 1, LLAssetType::AT_MESH)); + addEntry(LLInventoryType::IT_GLTF, new InventoryEntry("gltf", "gltf", 1, LLAssetType::AT_GLTF)); + addEntry(LLInventoryType::IT_GLTF_BIN, new InventoryEntry("glbin", "glbin", 1, LLAssetType::AT_GLTF_BIN)); addEntry(LLInventoryType::IT_WIDGET, new InventoryEntry("widget", "widget", 1, LLAssetType::AT_WIDGET)); addEntry(LLInventoryType::IT_PERSON, new InventoryEntry("person", "person", 1, LLAssetType::AT_PERSON)); addEntry(LLInventoryType::IT_SETTINGS, new InventoryEntry("settings", "settings", 1, LLAssetType::AT_SETTINGS)); @@ -153,9 +155,12 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] = LLInventoryType::IT_NONE, // 52 AT_RESERVED_3 LLInventoryType::IT_NONE, // 53 AT_RESERVED_4 LLInventoryType::IT_NONE, // 54 AT_RESERVED_5 + LLInventoryType::IT_NONE, // 55 AT_RESERVED_6 - LLInventoryType::IT_SETTINGS, // 55 AT_SETTINGS <- why doesnt this match the value in llassettype.h? -brad + LLInventoryType::IT_SETTINGS, // 56 AT_SETTINGS LLInventoryType::IT_MATERIAL, // 57 AT_MATERIAL + LLInventoryType::IT_GLTF, // 58 AT_GLTF + LLInventoryType::IT_GLTF_BIN, // 59 AT_GLTF_BIN }; // static diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index fd80a0be04..c90f8aa107 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -66,7 +66,9 @@ public: IT_PERSON = 24, IT_SETTINGS = 25, IT_MATERIAL = 26, - IT_COUNT = 27, + IT_GLTF = 27, + IT_GLTF_BIN = 28, + IT_COUNT = 29, IT_UNKNOWN = 255, IT_NONE = -1 diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h index dfe527f314..a68abcfa34 100644 --- a/indra/llinventory/llpermissions.h +++ b/indra/llinventory/llpermissions.h @@ -270,6 +270,7 @@ public: inline bool allowModifyBy(const LLUUID &agent_id) const; inline bool allowCopyBy(const LLUUID& agent_id) const; inline bool allowMoveBy(const LLUUID& agent_id) const; + inline bool allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const; inline bool allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const; inline bool allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const; @@ -278,27 +279,11 @@ public: // current owner is allowed to transfer to the specified agent id. inline bool allowTransferTo(const LLUUID &agent_id) const; - // - // DEPRECATED. - // - // These return true if the given agent can perform the function. - // They also return true if the object isn't owned, or the - // requesting agent is a system agent. See llpermissionsflags.h - // for bits. - //bool allowDeleteBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } - //bool allowEditBy(const LLUUID& agent_id) const { return allowModifyBy(agent_id); } - // saves last owner and sets current owner - //bool setOwner(const LLUUID& agent, const LLUUID& owner); - // This method saves the last owner, sets the current owner to the - // one provided, and sets the base mask as indicated. - //bool setOwner(const LLUUID& agent, const LLUUID& owner, U32 new_base_mask); - - // Attempt to set or clear the given bitmask. Returns true if you - // are allowed to modify the permissions. If you attempt to turn - // on bits not allowed by the base bits, the function will return - // true, but those bits will not be set. - //bool setGroupBits( const LLUUID& agent, bool set, PermissionMask bits); - //bool setEveryoneBits(const LLUUID& agent, bool set, PermissionMask bits); + // Returns true if the object can exported by the given agent + // (e.g. saved as a local .gltf file) + // The current test should return true if the agent is the owner + // AND the creator of the object. + inline bool allowExportBy(const LLUUID& agent_id) const; // // MISC METHODS and OPERATORS @@ -353,6 +338,11 @@ bool LLPermissions::allowMoveBy(const LLUUID& agent) const return allowOperationBy(PERM_MOVE, agent, LLUUID::null); } +bool LLPermissions::allowExportBy(const LLUUID& agent) const +{ + return agent == mOwner && agent == mCreator; +} + bool LLPermissions::allowTransferTo(const LLUUID &agent_id) const { if (mIsGroupOwned) diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 3fedd61082..e14b2f25ed 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -407,7 +407,6 @@ LLSettingsSky::LLSettingsSky(const LLSD &data) : mNextRainbowTextureId(), mNextHaloTextureId() { - mCanAutoAdjust = !data.has(SETTING_REFLECTION_PROBE_AMBIANCE); } LLSettingsSky::LLSettingsSky(): @@ -430,8 +429,6 @@ void LLSettingsSky::replaceSettings(LLSD settings) mNextBloomTextureId.setNull(); mNextRainbowTextureId.setNull(); mNextHaloTextureId.setNull(); - - mCanAutoAdjust = !settings.has(SETTING_REFLECTION_PROBE_AMBIANCE); } void LLSettingsSky::replaceWithSky(LLSettingsSky::ptr_t pother) @@ -444,7 +441,6 @@ void LLSettingsSky::replaceWithSky(LLSettingsSky::ptr_t pother) mNextBloomTextureId = pother->mNextBloomTextureId; mNextRainbowTextureId = pother->mNextRainbowTextureId; mNextHaloTextureId = pother->mNextHaloTextureId; - mCanAutoAdjust = pother->mCanAutoAdjust; } void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf) @@ -1146,7 +1142,6 @@ void LLSettingsSky::setSkyIceLevel(F32 ice_level) void LLSettingsSky::setReflectionProbeAmbiance(F32 ambiance) { - mCanAutoAdjust = false; // we've now touched this sky in a "new" way, it can no longer auto adjust setValue(SETTING_REFLECTION_PROBE_AMBIANCE, ambiance); } @@ -1448,24 +1443,6 @@ F32 LLSettingsSky::getReflectionProbeAmbiance(bool auto_adjust) const return mSettings[SETTING_REFLECTION_PROBE_AMBIANCE].asReal(); } -F32 LLSettingsSky::getTotalReflectionProbeAmbiance(F32 cloud_shadow_scale, bool auto_adjust) const -{ -#if 0 - // feed cloud shadow back into reflection probe ambiance to mimic pre-reflection-probe behavior - // without brightening dark/interior spaces - F32 probe_ambiance = getReflectionProbeAmbiance(auto_adjust); - - if (probe_ambiance > 0.f && probe_ambiance < 1.f) - { - probe_ambiance += (1.f - probe_ambiance) * getCloudShadow() * cloud_shadow_scale; - } - - return probe_ambiance; -#else - return getReflectionProbeAmbiance(auto_adjust); -#endif -} - F32 LLSettingsSky::getSkyBottomRadius() const { return mSettings[SETTING_SKY_BOTTOM_RADIUS].asReal(); @@ -1810,3 +1787,8 @@ LLUUID LLSettingsSky::getNextBloomTextureId() const return mNextBloomTextureId; } +// if true, this sky is a candidate for auto-adjustment +bool LLSettingsSky::canAutoAdjust() const +{ + return !mSettings.has(SETTING_REFLECTION_PROBE_AMBIANCE); +} diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 8aade96484..222ab040cb 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -62,7 +62,7 @@ public: static const std::string SETTING_DOME_OFFSET; static const std::string SETTING_DOME_RADIUS; static const std::string SETTING_GAMMA; - static const std::string SETTING_GLOW; + static const std::string SETTING_GLOW; static const std::string SETTING_LIGHT_NORMAL; static const std::string SETTING_MAX_Y; static const std::string SETTING_MOON_ROTATION; @@ -92,7 +92,7 @@ public: static const std::string SETTING_DENSITY_PROFILE_EXP_SCALE_FACTOR; static const std::string SETTING_DENSITY_PROFILE_LINEAR_TERM; static const std::string SETTING_DENSITY_PROFILE_CONSTANT_TERM; - + static const std::string SETTING_SKY_MOISTURE_LEVEL; static const std::string SETTING_SKY_DROPLET_RADIUS; static const std::string SETTING_SKY_ICE_LEVEL; @@ -117,7 +117,7 @@ public: virtual std::string getSettingsType() const SETTINGS_OVERRIDE { return std::string("sky"); } virtual LLSettingsType::type_e getSettingsTypeValue() const SETTINGS_OVERRIDE { return LLSettingsType::ST_SKY; } - // Settings status + // Settings status virtual void blend(const LLSettingsBase::ptr_t &end, F64 blendf) SETTINGS_OVERRIDE; virtual void replaceSettings(LLSD settings) SETTINGS_OVERRIDE; @@ -129,7 +129,7 @@ public: F32 getSkyBottomRadius() const; F32 getSkyTopRadius() const; F32 getSunArcRadians() const; - F32 getMieAnisotropy() const; + F32 getMieAnisotropy() const; F32 getSkyMoistureLevel() const; F32 getSkyDropletRadius() const; @@ -139,10 +139,6 @@ public: // auto_adjust - if true and canAutoAdjust() is true, return 1.0 F32 getReflectionProbeAmbiance(bool auto_adjust = false) const; - // get the probe ambiance setting to use for rendering (adjusted by cloud shadow, aka cloud coverage) - // auto_adjust - if true and canAutoAdjust() is true, return 1.0 - F32 getTotalReflectionProbeAmbiance(F32 cloud_shadow_scale, bool auto_adjust = false) const; - // Return first (only) profile layer represented in LLSD LLSD getRayleighConfig() const; LLSD getMieConfig() const; @@ -200,7 +196,7 @@ public: F32 getCloudShadow() const; void setCloudShadow(F32 val); - + F32 getCloudVariance() const; void setCloudVariance(F32 val); @@ -299,7 +295,7 @@ public: // color based on brightness LLColor3 getMoonlightColor() const; - + LLColor4 getMoonAmbient() const; LLColor3 getMoonDiffuse() const; LLColor4 getSunAmbient() const; @@ -340,7 +336,7 @@ public: virtual void updateSettings() SETTINGS_OVERRIDE; // if true, this sky is a candidate for auto-adjustment - bool canAutoAdjust() const { return mCanAutoAdjust; } + bool canAutoAdjust() const; protected: static const std::string SETTING_LEGACY_EAST_ANGLE; @@ -385,9 +381,6 @@ private: mutable LLColor4 mTotalAmbient; mutable LLColor4 mHazeColor; - // if true, this sky is a candidate for auto adjustment - bool mCanAutoAdjust = true; - typedef std::map<std::string, S32> mapNameToUniformId_t; static mapNameToUniformId_t sNameToUniformMapping; |