aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AnimationSet.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-07-28 17:36:40 +0100
committerUbitUmarov2017-07-28 17:36:40 +0100
commit21b71ff1d857239c919ad275db5aacbf0cb6331e (patch)
treedc08d6d95a8e1d88c84ccd458a2e2e8d814391a7 /OpenSim/Framework/AnimationSet.cs
parentmantis 8218 make Meshmerizer UseMeshiesPhysicsMesh defualt to true, to match ... (diff)
downloadopensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.zip
opensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.tar.gz
opensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.tar.bz2
opensim-SC-21b71ff1d857239c919ad275db5aacbf0cb6331e.tar.xz
partial mantis 8219; on creating or updating items (animationsets, wearables) that reference assets, and user does not have permissions on those, abort and warn, instead of silent invalition of the references to those assets, creating a broken item
Diffstat (limited to 'OpenSim/Framework/AnimationSet.cs')
-rw-r--r--OpenSim/Framework/AnimationSet.cs22
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Framework/AnimationSet.cs b/OpenSim/Framework/AnimationSet.cs
index 87c4a78..8753088 100644
--- a/OpenSim/Framework/AnimationSet.cs
+++ b/OpenSim/Framework/AnimationSet.cs
@@ -31,7 +31,8 @@ using OpenMetaverse;
31 31
32namespace OpenSim.Framework 32namespace OpenSim.Framework
33{ 33{
34 public delegate bool AnimationSetValidator(UUID animID); 34// public delegate bool AnimationSetValidator(UUID animID);
35 public delegate uint AnimationSetValidator(UUID animID);
35 36
36 public class AnimationSet 37 public class AnimationSet
37 { 38 {
@@ -141,7 +142,7 @@ namespace OpenSim.Framework
141 assetData += String.Format("{0} {1} {2}\n", kvp.Key, kvp.Value.Value.ToString(), kvp.Value.Key); 142 assetData += String.Format("{0} {1} {2}\n", kvp.Key, kvp.Value.Value.ToString(), kvp.Value.Key);
142 return System.Text.Encoding.ASCII.GetBytes(assetData); 143 return System.Text.Encoding.ASCII.GetBytes(assetData);
143 } 144 }
144 145/*
145 public bool Validate(AnimationSetValidator val) 146 public bool Validate(AnimationSetValidator val)
146 { 147 {
147 if (m_parseError) 148 if (m_parseError)
@@ -164,5 +165,22 @@ namespace OpenSim.Framework
164 165
165 return allOk; 166 return allOk;
166 } 167 }
168*/
169 public uint Validate(AnimationSetValidator val)
170 {
171 if (m_parseError)
172 return 0;
173
174 uint ret = 0x7fffffff;
175 uint t;
176 foreach (KeyValuePair<string, KeyValuePair<string, UUID>> kvp in m_animations)
177 {
178 t = val(kvp.Value.Value);
179 if (t == 0)
180 return 0;
181 ret &= t;
182 }
183 return ret;
184 }
167 } 185 }
168} 186}