Merge branch 'ubitwork'

avinationmerge
Melanie 2012-03-09 02:11:25 +01:00
commit e1be1c5263
4 changed files with 253 additions and 171 deletions

View File

@ -11518,166 +11518,113 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// } // }
UpdatePrimGroupRotation handlerUpdatePrimGroupRotation; UpdatePrimGroupRotation handlerUpdatePrimGroupRotation;
UpdateVector handlerUpdatePrimGroupScale;
Quaternion arot;
Vector3 ascale;
Vector3 apos;
/*ubit from ll JIRA:
* 0x01 position
* 0x02 rotation
* 0x04 scale
* 0x08 LINK_SET
* 0x10 UNIFORM for scale
*/
switch (block.Type) switch (block.Type)
{ {
case 1: case 1: //change position sp
Vector3 pos1 = new Vector3(block.Data, 0); apos = new Vector3(block.Data, 0);
UpdateVector handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; UpdateVector handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null) if (handlerUpdatePrimSinglePosition != null)
{ {
part.StoreUndoState();
part.IgnoreUndoUpdate = true;
// m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); // m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
handlerUpdatePrimSinglePosition(localId, pos1, this); handlerUpdatePrimSinglePosition(localId, apos, this);
part.IgnoreUndoUpdate = false;
} }
break; break;
case 2: case 2: // rotation sp
Quaternion rot1 = new Quaternion(block.Data, 0, true); arot = new Quaternion(block.Data, 0, true);
UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation; UpdatePrimSingleRotation handlerUpdatePrimSingleRotation = OnUpdatePrimSingleRotation;
if (handlerUpdatePrimSingleRotation != null) if (handlerUpdatePrimSingleRotation != null)
{ {
// m_log.Info("new tab rotation is " + rot1.X + " , " + rot1.Y + " , " + rot1.Z + " , " + rot1.W); part.StoreUndoState();
handlerUpdatePrimSingleRotation(localId, rot1, this); part.IgnoreUndoUpdate = true;
handlerUpdatePrimSingleRotation(localId, arot, this);
part.IgnoreUndoUpdate = false;
} }
break; break;
case 3: case 3: // position plus rotation
Vector3 rotPos = new Vector3(block.Data, 0); apos = new Vector3(block.Data, 0);
Quaternion rot2 = new Quaternion(block.Data, 12, true); arot = new Quaternion(block.Data, 12, true);
UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition; UpdatePrimSingleRotationPosition handlerUpdatePrimSingleRotationPosition = OnUpdatePrimSingleRotationPosition;
if (handlerUpdatePrimSingleRotationPosition != null) if (handlerUpdatePrimSingleRotationPosition != null)
{ {
// m_log.Debug("new mouse rotation position is " + rotPos.X + " , " + rotPos.Y + " , " + rotPos.Z); part.StoreUndoState();
// m_log.Info("new mouse rotation is " + rot2.X + " , " + rot2.Y + " , " + rot2.Z + " , " + rot2.W); part.IgnoreUndoUpdate = true;
handlerUpdatePrimSingleRotationPosition(localId, rot2, rotPos, this);
handlerUpdatePrimSingleRotationPosition(localId, arot, apos, this);
part.IgnoreUndoUpdate = false;
} }
break; break;
case 4: case 4: // scale sp
case 20: case 0x14: // uniform scale sp
Vector3 scale4 = new Vector3(block.Data, 0); ascale = new Vector3(block.Data, 0);
UpdateVector handlerUpdatePrimScale = OnUpdatePrimScale; UpdateVector handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null) if (handlerUpdatePrimScale != null)
{ {
// m_log.Debug("new scale is " + scale4.X + " , " + scale4.Y + " , " + scale4.Z); part.StoreUndoState();
handlerUpdatePrimScale(localId, scale4, this);
}
break;
case 5:
Vector3 scale1 = new Vector3(block.Data, 12);
Vector3 pos11 = new Vector3(block.Data, 0);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale1, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, pos11, this);
}
}
break;
case 9:
Vector3 pos2 = new Vector3(block.Data, 0);
UpdateVector handlerUpdateVector = OnUpdatePrimGroupPosition;
if (handlerUpdateVector != null)
{
handlerUpdateVector(localId, pos2, this);
}
break;
case 10:
Quaternion rot3 = new Quaternion(block.Data, 0, true);
UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
if (handlerUpdatePrimRotation != null)
{
// Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W);
handlerUpdatePrimRotation(localId, rot3, this);
}
break;
case 11:
Vector3 pos3 = new Vector3(block.Data, 0);
Quaternion rot4 = new Quaternion(block.Data, 12, true);
handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
if (handlerUpdatePrimGroupRotation != null)
{
// m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W);
handlerUpdatePrimGroupRotation(localId, pos3, rot4, this);
}
break;
case 12:
case 28:
Vector3 scale7 = new Vector3(block.Data, 0);
UpdateVector handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null)
{
// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
handlerUpdatePrimGroupScale(localId, scale7, this);
}
break;
case 13:
Vector3 scale2 = new Vector3(block.Data, 12);
Vector3 pos4 = new Vector3(block.Data, 0);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
//m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale2, this);
// Change the position based on scale (for bug number 246)
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
// m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, pos4, this);
}
}
break;
case 29:
Vector3 scale5 = new Vector3(block.Data, 12);
Vector3 pos5 = new Vector3(block.Data, 0);
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null)
{
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true; part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupScale(localId, scale5, this);
handlerUpdateVector = OnUpdatePrimGroupPosition;
if (handlerUpdateVector != null) handlerUpdatePrimScale(localId, ascale, this);
{
handlerUpdateVector(localId, pos5, this);
}
part.IgnoreUndoUpdate = false; part.IgnoreUndoUpdate = false;
} }
break; break;
case 21: case 5: // scale and position sp
Vector3 scale6 = new Vector3(block.Data, 12); apos = new Vector3(block.Data, 0);
Vector3 pos6 = new Vector3(block.Data, 0); ascale = new Vector3(block.Data, 12);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
part.StoreUndoState();
part.IgnoreUndoUpdate = true;
handlerUpdatePrimScale(localId, ascale, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, apos, this);
}
part.IgnoreUndoUpdate = false;
}
break;
case 0x15: //uniform scale and position
apos = new Vector3(block.Data, 0);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimScale = OnUpdatePrimScale; handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null) if (handlerUpdatePrimScale != null)
@ -11686,17 +11633,157 @@ namespace OpenSim.Region.ClientStack.LindenUDP
part.IgnoreUndoUpdate = true; part.IgnoreUndoUpdate = true;
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); // m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
handlerUpdatePrimScale(localId, scale6, this); handlerUpdatePrimScale(localId, ascale, this);
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition; handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
if (handlerUpdatePrimSinglePosition != null) if (handlerUpdatePrimSinglePosition != null)
{ {
handlerUpdatePrimSinglePosition(localId, pos6, this); handlerUpdatePrimSinglePosition(localId, apos, this);
} }
part.IgnoreUndoUpdate = false; part.IgnoreUndoUpdate = false;
} }
break; break;
// now group related (bit 4)
case 9: //( 8 + 1 )group position
apos = new Vector3(block.Data, 0);
UpdateVector handlerUpdateVector = OnUpdatePrimGroupPosition;
if (handlerUpdateVector != null)
{
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdateVector(localId, apos, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0A: // (8 + 2) group rotation
arot = new Quaternion(block.Data, 0, true);
UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
if (handlerUpdatePrimRotation != null)
{
// Console.WriteLine("new rotation is " + rot3.X + " , " + rot3.Y + " , " + rot3.Z + " , " + rot3.W);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimRotation(localId, arot, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0B: //( 8 + 2 + 1) group rotation and position
apos = new Vector3(block.Data, 0);
arot = new Quaternion(block.Data, 12, true);
handlerUpdatePrimGroupRotation = OnUpdatePrimGroupMouseRotation;
if (handlerUpdatePrimGroupRotation != null)
{
// m_log.Debug("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// m_log.Debug("new group mouse rotation is " + rot4.X + " , " + rot4.Y + " , " + rot4.Z + " , " + rot4.W);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupRotation(localId, apos, arot, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0C: // (8 + 4) group scale
// only afects root prim and only sent by viewer editor object tab scaling
// mouse edition only allows uniform scaling
// SL MAY CHANGE THIS in viewers
ascale = new Vector3(block.Data, 0);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
part.StoreUndoState(false); // <- SL Exception make it apply to root prim and not group
part.IgnoreUndoUpdate = true;
handlerUpdatePrimScale(localId, ascale, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x0D: //(8 + 4 + 1) group scale and position
// exception as above
apos = new Vector3(block.Data, 0);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimScale = OnUpdatePrimScale;
if (handlerUpdatePrimScale != null)
{
//m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
part.StoreUndoState(false); // <- make it apply to root prim and not group
part.IgnoreUndoUpdate = true;
handlerUpdatePrimScale(localId, ascale, this);
// Change the position based on scale (for bug number 246)
handlerUpdatePrimSinglePosition = OnUpdatePrimSinglePosition;
// m_log.Debug("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
if (handlerUpdatePrimSinglePosition != null)
{
handlerUpdatePrimSinglePosition(localId, apos, this);
}
part.IgnoreUndoUpdate = false;
}
break;
case 0x1C: // (0x10 + 8 + 4 ) group scale UNIFORM
ascale = new Vector3(block.Data, 0);
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null)
{
// m_log.Debug("new scale is " + scale7.X + " , " + scale7.Y + " , " + scale7.Z);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupScale(localId, ascale, this);
part.IgnoreUndoUpdate = false;
}
break;
case 0x1D: // (UNIFORM + GROUP + SCALE + POS)
apos = new Vector3(block.Data, 0);
ascale = new Vector3(block.Data, 12);
handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
if (handlerUpdatePrimGroupScale != null)
{
// m_log.Debug("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
part.StoreUndoState(true);
part.IgnoreUndoUpdate = true;
handlerUpdatePrimGroupScale(localId, ascale, this);
handlerUpdateVector = OnUpdatePrimGroupPosition;
if (handlerUpdateVector != null)
{
handlerUpdateVector(localId, apos, this);
}
part.IgnoreUndoUpdate = false;
}
break;
default: default:
m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type)); m_log.Debug("[CLIENT]: MultipleObjUpdate recieved an unknown packet type: " + (block.Type));
break; break;
@ -11704,6 +11791,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// for (int j = 0; j < parts.Length; j++) // for (int j = 0; j < parts.Length; j++)
// parts[j].IgnoreUndoUpdate = false; // parts[j].IgnoreUndoUpdate = false;
} }
} }
} }

View File

@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Framework.Scenes
// "[SCENE OBJECT GROUP]: Processing OnGrabPart for {0} on {1} {2}, offsetPos {3}", // "[SCENE OBJECT GROUP]: Processing OnGrabPart for {0} on {1} {2}, offsetPos {3}",
// remoteClient.Name, part.Name, part.LocalId, offsetPos); // remoteClient.Name, part.Name, part.LocalId, offsetPos);
part.StoreUndoState(); // part.StoreUndoState();
part.OnGrab(offsetPos, remoteClient); part.OnGrab(offsetPos, remoteClient);
} }
@ -3119,7 +3119,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE OBJECT GROUP]: Group resizing {0} {1} from {2} to {3}", Name, LocalId, RootPart.Scale, scale); // "[SCENE OBJECT GROUP]: Group resizing {0} {1} from {2} to {3}", Name, LocalId, RootPart.Scale, scale);
RootPart.StoreUndoState(true); // RootPart.StoreUndoState(true);
scale.X = Math.Min(scale.X, Scene.m_maxNonphys); scale.X = Math.Min(scale.X, Scene.m_maxNonphys);
scale.Y = Math.Min(scale.Y, Scene.m_maxNonphys); scale.Y = Math.Min(scale.Y, Scene.m_maxNonphys);
@ -3230,7 +3230,7 @@ namespace OpenSim.Region.Framework.Scenes
if (obPart.UUID != m_rootPart.UUID) if (obPart.UUID != m_rootPart.UUID)
{ {
obPart.IgnoreUndoUpdate = true; // obPart.IgnoreUndoUpdate = true;
Vector3 currentpos = new Vector3(obPart.OffsetPosition); Vector3 currentpos = new Vector3(obPart.OffsetPosition);
currentpos.X *= x; currentpos.X *= x;
@ -3245,7 +3245,7 @@ namespace OpenSim.Region.Framework.Scenes
obPart.Resize(newSize); obPart.Resize(newSize);
obPart.UpdateOffSet(currentpos); obPart.UpdateOffSet(currentpos);
obPart.IgnoreUndoUpdate = false; // obPart.IgnoreUndoUpdate = false;
} }
// obPart.IgnoreUndoUpdate = false; // obPart.IgnoreUndoUpdate = false;
@ -3270,7 +3270,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
// m_log.DebugFormat("[SCENE OBJECT GROUP]: Updating group position on {0} {1} to {2}", Name, LocalId, pos); // m_log.DebugFormat("[SCENE OBJECT GROUP]: Updating group position on {0} {1} to {2}", Name, LocalId, pos);
RootPart.StoreUndoState(true); // RootPart.StoreUndoState(true);
// SceneObjectPart[] parts = m_parts.GetArray(); // SceneObjectPart[] parts = m_parts.GetArray();
// for (int i = 0; i < parts.Length; i++) // for (int i = 0; i < parts.Length; i++)
@ -3311,17 +3311,17 @@ namespace OpenSim.Region.Framework.Scenes
{ {
SceneObjectPart part = GetChildPart(localID); SceneObjectPart part = GetChildPart(localID);
SceneObjectPart[] parts = m_parts.GetArray(); // SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++) // for (int i = 0; i < parts.Length; i++)
parts[i].StoreUndoState(); // parts[i].StoreUndoState();
if (part != null) if (part != null)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos); // "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos);
part.StoreUndoState(false); // part.StoreUndoState(false);
part.IgnoreUndoUpdate = true; // part.IgnoreUndoUpdate = true;
// unlock parts position change // unlock parts position change
if (m_rootPart.PhysActor != null) if (m_rootPart.PhysActor != null)
@ -3340,7 +3340,7 @@ namespace OpenSim.Region.Framework.Scenes
m_rootPart.PhysActor.Building = false; m_rootPart.PhysActor.Building = false;
HasGroupChanged = true; HasGroupChanged = true;
part.IgnoreUndoUpdate = false; // part.IgnoreUndoUpdate = false;
} }
} }
@ -3377,16 +3377,16 @@ namespace OpenSim.Region.Framework.Scenes
} }
//We have to set undoing here because otherwise an undo state will be saved //We have to set undoing here because otherwise an undo state will be saved
if (!m_rootPart.Undoing) // if (!m_rootPart.Undoing)
{ // {
m_rootPart.Undoing = true; // m_rootPart.Undoing = true;
AbsolutePosition = newPos; AbsolutePosition = newPos;
m_rootPart.Undoing = false; // m_rootPart.Undoing = false;
} // }
else // else
{ // {
AbsolutePosition = newPos; // AbsolutePosition = newPos;
} // }
HasGroupChanged = true; HasGroupChanged = true;
if (m_rootPart.Undoing) if (m_rootPart.Undoing)
@ -3416,9 +3416,9 @@ namespace OpenSim.Region.Framework.Scenes
// for (int i = 0; i < parts.Length; i++) // for (int i = 0; i < parts.Length; i++)
// parts[i].StoreUndoState(); // parts[i].StoreUndoState();
m_rootPart.StoreUndoState(true); // m_rootPart.StoreUndoState(true);
m_rootPart.UpdateRotation(rot); // m_rootPart.UpdateRotation(rot);
PhysicsActor actor = m_rootPart.PhysActor; PhysicsActor actor = m_rootPart.PhysActor;
if (actor != null) if (actor != null)
@ -3445,8 +3445,8 @@ namespace OpenSim.Region.Framework.Scenes
// for (int i = 0; i < parts.Length; i++) // for (int i = 0; i < parts.Length; i++)
// parts[i].StoreUndoState(); // parts[i].StoreUndoState();
RootPart.StoreUndoState(true); // RootPart.StoreUndoState(true);
RootPart.IgnoreUndoUpdate = true; // RootPart.IgnoreUndoUpdate = true;
m_rootPart.UpdateRotation(rot); m_rootPart.UpdateRotation(rot);
@ -3462,7 +3462,7 @@ namespace OpenSim.Region.Framework.Scenes
HasGroupChanged = true; HasGroupChanged = true;
ScheduleGroupForTerseUpdate(); ScheduleGroupForTerseUpdate();
RootPart.IgnoreUndoUpdate = false; // RootPart.IgnoreUndoUpdate = false;
} }
/// <summary> /// <summary>
@ -3511,8 +3511,8 @@ namespace OpenSim.Region.Framework.Scenes
// "[SCENE OBJECT GROUP]: Updating single position and rotation of {0} {1} to {2}", // "[SCENE OBJECT GROUP]: Updating single position and rotation of {0} {1} to {2}",
// part.Name, part.LocalId, rot); // part.Name, part.LocalId, rot);
part.StoreUndoState(); // part.StoreUndoState();
part.IgnoreUndoUpdate = true; // part.IgnoreUndoUpdate = true;
if (m_rootPart.PhysActor != null) if (m_rootPart.PhysActor != null)
m_rootPart.PhysActor.Building = true; m_rootPart.PhysActor.Building = true;
@ -3541,7 +3541,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_rootPart.PhysActor != null) if (m_rootPart.PhysActor != null)
m_rootPart.PhysActor.Building = false; m_rootPart.PhysActor.Building = false;
part.IgnoreUndoUpdate = false; // part.IgnoreUndoUpdate = false;
} }
} }
@ -3557,7 +3557,7 @@ namespace OpenSim.Region.Framework.Scenes
Quaternion axRot = rot; Quaternion axRot = rot;
Quaternion oldParentRot = m_rootPart.RotationOffset; Quaternion oldParentRot = m_rootPart.RotationOffset;
m_rootPart.StoreUndoState(); // m_rootPart.StoreUndoState();
//Don't use UpdateRotation because it schedules an update prematurely //Don't use UpdateRotation because it schedules an update prematurely
m_rootPart.RotationOffset = rot; m_rootPart.RotationOffset = rot;
@ -3573,7 +3573,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart prim = parts[i]; SceneObjectPart prim = parts[i];
if (prim.UUID != m_rootPart.UUID) if (prim.UUID != m_rootPart.UUID)
{ {
prim.IgnoreUndoUpdate = true; // prim.IgnoreUndoUpdate = true;
Quaternion NewRot = oldParentRot * prim.RotationOffset; Quaternion NewRot = oldParentRot * prim.RotationOffset;
NewRot = Quaternion.Inverse(axRot) * NewRot; NewRot = Quaternion.Inverse(axRot) * NewRot;
@ -3585,7 +3585,7 @@ namespace OpenSim.Region.Framework.Scenes
axPos *= Quaternion.Inverse(axRot); axPos *= Quaternion.Inverse(axRot);
prim.OffsetPosition = axPos; prim.OffsetPosition = axPos;
prim.IgnoreUndoUpdate = false; // prim.IgnoreUndoUpdate = false;
} }
} }

View File

@ -828,7 +828,7 @@ namespace OpenSim.Region.Framework.Scenes
set set
{ {
StoreUndoState(); // StoreUndoState();
m_rotationOffset = value; m_rotationOffset = value;
PhysicsActor actor = PhysActor; PhysicsActor actor = PhysActor;
@ -1007,7 +1007,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (m_shape != null) if (m_shape != null)
{ {
StoreUndoState(); // StoreUndoState();
m_shape.Scale = value; m_shape.Scale = value;

View File

@ -74,14 +74,11 @@ namespace OpenSim.Region.Framework.Scenes
ForGroup = forGroup; ForGroup = forGroup;
Position = part.ParentGroup.AbsolutePosition; Position = part.ParentGroup.AbsolutePosition;
Rotation = part.RotationOffset; Rotation = part.RotationOffset;
if (!forGroup) Scale = part.Shape.Scale;
Scale = part.Shape.Scale;
else
Scale = Vector3.Zero; // until we fix it
} }
else else
{ {
ForGroup = false; // previus code implies only root parts can undo grp ForGroup = false; // only root parts can undo grp
Position = part.OffsetPosition; Position = part.OffsetPosition;
Rotation = part.RotationOffset; Rotation = part.RotationOffset;
Scale = part.Shape.Scale; Scale = part.Shape.Scale;
@ -108,9 +105,7 @@ namespace OpenSim.Region.Framework.Scenes
return false; return false;
if (Rotation != part.RotationOffset) if (Rotation != part.RotationOffset)
return false; return false;
if (ForGroup) return Scale == part.Shape.Scale;
return true; // for now don't do grp scale
return (Scale == part.Shape.Scale);
} }
else else
{ {
@ -144,10 +139,9 @@ namespace OpenSim.Region.Framework.Scenes
if (Scale != Vector3.Zero) if (Scale != Vector3.Zero)
{ {
// if (ForGroup) if (ForGroup)
// part.ParentGroup.GroupResize(Scale); part.ParentGroup.GroupResize(Scale);
// else else
if (!ForGroup) // we don't have grp scale for now
part.Resize(Scale); part.Resize(Scale);
} }
part.ParentGroup.ScheduleGroupForTerseUpdate(); part.ParentGroup.ScheduleGroupForTerseUpdate();