aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AnimationSet.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/Framework/AnimationSet.cs b/OpenSim/Framework/AnimationSet.cs
index e81d978..8ac9081 100644
--- a/OpenSim/Framework/AnimationSet.cs
+++ b/OpenSim/Framework/AnimationSet.cs
@@ -37,6 +37,54 @@ namespace OpenSim.Framework
37 { 37 {
38 private bool m_parseError = false; 38 private bool m_parseError = false;
39 39
40 public const uint createBasePermitions = (uint)(PermissionMask.All); // no export ?
41 public const uint createNextPermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify);
42
43 public const uint allowedBasePermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify);
44 public const uint allowedNextPermitions = 0;
45
46 public static void setCreateItemPermitions(InventoryItemBase it)
47 {
48 if (it == null)
49 return;
50
51 it.BasePermissions = createBasePermitions;
52 it.CurrentPermissions = createBasePermitions;
53 // it.GroupPermissions &= allowedPermitions;
54 it.NextPermissions = createNextPermitions;
55 // it.EveryOnePermissions &= allowedPermitions;
56 it.GroupPermissions = 0;
57 it.EveryOnePermissions = 0;
58 }
59
60 public static void enforceItemPermitions(InventoryItemBase it, bool IsCreator)
61 {
62 if (it == null)
63 return;
64
65 uint bp;
66 uint np;
67
68 if (IsCreator)
69 {
70 bp = createBasePermitions;
71 np = createNextPermitions;
72 }
73 else
74 {
75 bp = allowedBasePermitions;
76 np = allowedNextPermitions;
77 }
78
79 it.BasePermissions &= bp;
80 it.CurrentPermissions &= bp;
81 // it.GroupPermissions &= allowedPermitions;
82 it.NextPermissions &= np;
83 // it.EveryOnePermissions &= allowedPermitions;
84 it.GroupPermissions = 0;
85 it.EveryOnePermissions = 0;
86 }
87
40 public int AnimationCount { get; private set; } 88 public int AnimationCount { get; private set; }
41 private Dictionary<string, UUID> m_animations = new Dictionary<string, UUID>(); 89 private Dictionary<string, UUID> m_animations = new Dictionary<string, UUID>();
42 public AnimationSet(Byte[] data) 90 public AnimationSet(Byte[] data)