diff --git a/indra/newview/app_settings/settings_ascent_coa.xml b/indra/newview/app_settings/settings_ascent_coa.xml index 9c94281c4..b76f74109 100644 --- a/indra/newview/app_settings/settings_ascent_coa.xml +++ b/indra/newview/app_settings/settings_ascent_coa.xml @@ -214,6 +214,8 @@ F32 Value 0.5 + IsCOA + 1 BuildPrefs_Ysize @@ -225,6 +227,8 @@ F32 Value 0.5 + IsCOA + 1 BuildPrefs_Zsize @@ -236,6 +240,8 @@ F32 Value 0.5 + IsCOA + 1 EmeraldBuildPrefs_Phantom @@ -247,6 +253,8 @@ Boolean Value 0 + IsCOA + 1 EmeraldBuildPrefs_Temporary @@ -258,6 +266,8 @@ Boolean Value 0 + IsCOA + 1 EmeraldBuildPrefs_Physical @@ -269,6 +279,8 @@ Boolean Value 0 + IsCOA + 1 EmeraldBuildPrefs_EmbedItem @@ -280,6 +292,8 @@ Boolean Value 0 + IsCOA + 1 BuildPrefs_Material @@ -291,6 +305,8 @@ String Value Wood + IsCOA + 1 EmeraldBuildPrefs_Color @@ -307,6 +323,8 @@ 1.0 1.0 + IsCOA + 1 EmeraldBuildPrefs_Texture @@ -318,6 +336,8 @@ String Value 89556747-24cb-43ed-920b-47caed15465f + IsCOA + 1 EmeraldBuildPrefs_Alpha @@ -329,6 +349,8 @@ F32 Value 0.0 + IsCOA + 1 EmeraldBuildPrefs_Glow @@ -340,6 +362,8 @@ F32 Value 0.0 + IsCOA + 1 EmeraldBuildPrefs_FullBright @@ -351,6 +375,8 @@ Boolean Value 0 + IsCOA + 1 EmeraldBuildPrefs_Shiny @@ -362,6 +388,21 @@ String Value None + IsCOA + 1 + + LiruEnableBuildPrefs + + Comment + When false, disables all defaults set in the building preferences panel, without resetting them. + Persist + 1 + Type + Boolean + Value + 1 + IsCOA + 1 diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index b5f17f2af..3ffb93f69 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -355,11 +355,17 @@ LLVector3 LLManip::getPivotPoint() { static LLCachedControl actual_root("AscentBuildPrefs_ActualRoot"); static LLCachedControl pivot_as_percent("AscentBuildPrefs_PivotIsPercent"); - static LLCachedControl pivot_x("AscentBuildPrefs_PivotX"); - static LLCachedControl pivot_y("AscentBuildPrefs_PivotY"); - static LLCachedControl pivot_z("AscentBuildPrefs_PivotZ"); - LLVector3 offset(pivot_x,pivot_y,pivot_z); - + LLVector3 offset(50,50,50); + //Are we are using the defaults? + if(gSavedSettings.getBOOL("LiruEnableBuildPrefs")) + { + static LLCachedControl pivot_x("AscentBuildPrefs_PivotX"); + static LLCachedControl pivot_y("AscentBuildPrefs_PivotY"); + static LLCachedControl pivot_z("AscentBuildPrefs_PivotZ"); + offset = LLVector3(pivot_x,pivot_y,pivot_z); + } + else + pivot_as_percent = true; if (mObjectSelection->getFirstRootObject(TRUE) && (mObjectSelection->getObjectCount() == 1 || actual_root) && mObjectSelection->getSelectType() != SELECT_TYPE_HUD) { if(pivot_as_percent) diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index f9b5e4541..063b28f1e 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -223,19 +223,25 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) // Set params for new object based on its PCode. LLQuaternion rotation; - LLVector3 scale = LLVector3( - gSavedSettings.getF32("BuildPrefs_Xsize"), - gSavedSettings.getF32("BuildPrefs_Ysize"), - gSavedSettings.getF32("BuildPrefs_Zsize")); + LLVector3 scale = DEFAULT_OBJECT_SCALE; U8 material = LL_MCODE_WOOD; - if(gSavedSettings.getString("BuildPrefs_Material")== "Stone") material = LL_MCODE_STONE; - else if(gSavedSettings.getString("BuildPrefs_Material")== "Metal") material = LL_MCODE_METAL; - //if(gSavedSettings.getString("BuildPrefs_Material")== "Wood") material = LL_MCODE_WOOD; redundant - else if(gSavedSettings.getString("BuildPrefs_Material")== "Flesh") material = LL_MCODE_FLESH; - else if(gSavedSettings.getString("BuildPrefs_Material")== "Rubber") material = LL_MCODE_RUBBER; - else if(gSavedSettings.getString("BuildPrefs_Material")== "Plastic") material = LL_MCODE_PLASTIC; - + static LLCachedControl enable_BP("LiruEnableBuildPrefs", true); + static LLCachedControl duplicate("CreateToolCopySelection", true); + //If we are using the defaults, and we aren't duplicating + if(enable_BP && !duplicate) + { + scale = LLVector3( + gSavedSettings.getF32("BuildPrefs_Xsize"), + gSavedSettings.getF32("BuildPrefs_Ysize"), + gSavedSettings.getF32("BuildPrefs_Zsize")); + if(gSavedSettings.getString("BuildPrefs_Material")== "Stone") material = LL_MCODE_STONE; + else if(gSavedSettings.getString("BuildPrefs_Material")== "Metal") material = LL_MCODE_METAL; + //if(gSavedSettings.getString("BuildPrefs_Material")== "Wood") material = LL_MCODE_WOOD; redundant + else if(gSavedSettings.getString("BuildPrefs_Material")== "Flesh") material = LL_MCODE_FLESH; + else if(gSavedSettings.getString("BuildPrefs_Material")== "Rubber") material = LL_MCODE_RUBBER; + else if(gSavedSettings.getString("BuildPrefs_Material")== "Plastic") material = LL_MCODE_PLASTIC; + } BOOL create_selected = FALSE; LLVolumeParams volume_params; @@ -292,7 +298,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) gMessageSystem->addU8Fast(_PREHASH_Material, material); U32 flags = 0; // not selected - if (use_physics) + if (use_physics || (enable_BP && !duplicate && gSavedSettings.getBOOL("EmeraldBuildPrefs_Physical"))) { flags |= FLAGS_USE_PHYSICS; } @@ -477,8 +483,9 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) // Pack in name value pairs gMessageSystem->sendReliable(regionp->getHost()); - //Actually call expectRez so that importtracker can do its thing - gImportTracker.expectRez(); + //If we are using the defaults, and we aren't duplicating + if(enable_BP && !duplicate) //then, actually call expectRez so that importtracker can do its thing, which sadly only works close up. + gImportTracker.expectRez(); // Spawns a message, so must be after above send if (create_selected) {