diff options
author | Dave Parks <davep@lindenlab.com> | 2022-10-13 16:16:04 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-10-13 16:16:04 -0500 |
commit | 15c3c3f94d6d1b3007f3135602bf3f65dc791f57 (patch) | |
tree | 6f65ef700c2372f036d1d866a2a18e66dcbc5766 | |
parent | bc6ad18826995103015cfba6018cf1de30070fee (diff) | |
parent | 16a7989f065ac0870ad147592e4604cdcb204405 (diff) |
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
-rw-r--r-- | indra/newview/app_settings/settings.xml | 55 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/skyF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/llfloaterperms.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 22 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_perms_default.xml | 68 |
6 files changed, 151 insertions, 9 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2eee9f2f25..4171b52938 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -16136,6 +16136,61 @@ <key>Value</key> <integer>1</integer> </map> + <key>MaterialsNextOwnerCopy</key> + <map> + <key>Comment</key> + <string>Newly created GLTF material can be copied by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>MaterialsNextOwnerModify</key> + <map> + <key>Comment</key> + <string>Newly created GLTF material can be modified by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>MaterialsNextOwnerTransfer</key> + <map> + <key>Comment</key> + <string>Newly created GLTF material can be resold or given away by next owner</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>MaterialsEveryoneCopy</key> + <map> + <key>Comment</key> + <string>Everyone can copy the newly created GLTF material</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>MaterialsShareWithGroup</key> + <map> + <key>Comment</key> + <string>Newly created GLTF materials are shared with the currently active group</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> <key>DefaultUploadPermissionsConverted</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl index 7146349453..7a229e0f5e 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyF.glsl @@ -33,7 +33,7 @@ out vec4 frag_color; // The fragment shader for the sky ///////////////////////////////////////////////////////////////////////// -VARYING vec4 vary_HazeColor; +VARYING vec3 vary_HazeColor; /// Soft clips the light with a gamma correction vec3 scaleSoftClip(vec3 light); @@ -45,7 +45,7 @@ void main() // the fragment) if the sky wouldn't show up because the clouds // are fully opaque. - vec4 color; + vec3 color; color = vary_HazeColor; color.rgb *= 2.; /// Gamma correct for WL (soft clip effect). diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 649a107d74..fb55c6c6c4 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -123,6 +123,7 @@ const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] = "Gestures", "Wearables", "Settings" + "Materials" }; BOOL LLFloaterPermsDefault::postBuild() diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index dfb43dfe0d..4a75426265 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -935,7 +935,7 @@ bool LLMaterialEditor::saveIfNeeded() tid.generate(); // timestamp-based randomization + uniquification LLAssetID new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); std::string res_desc = buildMaterialDescription(); - U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Uploads"); + U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials"); LLUUID parent = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_MATERIAL); const U8 subtype = NO_INV_SUBTYPE; // TODO maybe use AT_SETTINGS and LLSettingsType::ST_MATERIAL ? @@ -948,11 +948,11 @@ bool LLMaterialEditor::saveIfNeeded() { // create_inventory_item doesn't allow presetting some permissions, fix it now LLPermissions perm = item->getPermissions(); - if (perm.getMaskEveryone() != LLFloaterPerms::getEveryonePerms("Uploads") - || perm.getMaskGroup() != LLFloaterPerms::getGroupPerms("Uploads")) + if (perm.getMaskEveryone() != LLFloaterPerms::getEveryonePerms("Materials") + || perm.getMaskGroup() != LLFloaterPerms::getGroupPerms("Materials")) { - perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Uploads")); - perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Uploads")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Materials")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Materials")); item->setPermissions(perm); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 2265379ce4..b4feafb7ff 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -999,6 +999,21 @@ void create_notecard_cb(const LLUUID& inv_item) } } +void create_gltf_material_cb(const LLUUID& inv_item) +{ + if (!inv_item.isNull()) + { + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + set_default_permissions(item, "Materials"); + + gInventory.updateItem(item); + gInventory.notifyObservers(); + } + } +} + LLInventoryCallbackManager gInventoryCallbacks; void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, @@ -1623,6 +1638,13 @@ void create_new_item(const std::string& name, next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Notecards"); break; } + + case LLInventoryType::IT_MATERIAL: + { + cb = new LLBoostFuncInventoryCallback(create_gltf_material_cb); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials"); + break; + } default: break; } diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml index 49dc719a24..9ca61671e1 100644 --- a/indra/newview/skins/default/xui/en/floater_perms_default.xml +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="250" + height="266" layout="topleft" name="perms default" help_topic="perms_default" @@ -10,7 +10,7 @@ width="700"> <panel follows="left|top|right|bottom" - height="200" + height="216" label="Default Permissions" layout="topleft" left="10" @@ -549,6 +549,70 @@ left_pad="0" top_delta="0" width="100" /> + <text + name="label_14" + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="0" + tool_tip="Set default permissions for when GLTF Materials are created" + width="100"> + Materials + </text> + <icon + follows="left|top" + height="16" + image_name="Inv_Material" + layout="topleft" + left_pad="2" + width="18"/> + <check_box + control_name="MaterialsNextOwnerCopy" + height="16" + layout="topleft" + name="env_material_c" + left_pad="45" + top_delta="0" + width="100"> + <check_box.commit_callback + function="PermsDefault.Copy" + parameter="Materials" /> + </check_box> + <check_box + control_name="MaterialsNextOwnerModify" + height="16" + layout="topleft" + name="env_materials_m" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + enabled_control="MaterialsNextOwnerCopy" + control_name="MaterialsNextOwnerTransfer" + height="16" + layout="topleft" + name="env_materials_t" + left_pad="0" + top_delta="0" + width="100" /> + <check_box + control_name="MaterialsShareWithGroup" + height="16" + layout="topleft" + name="env_materials_s" + left_pad="0" + top_delta="0" + width="120" /> + <check_box + control_name="MaterialsEveryoneCopy" + height="16" + layout="topleft" + name="env_materials_e" + left_pad="0" + top_delta="0" + width="100" /> </panel> <button height="20" |