MAINT-5364 FIXED Object with invalid sculpt topology type cannot be seen or selected
parent
078612e292
commit
d43cef4ed5
|
|
@ -3178,6 +3178,16 @@ BOOL LLVolume::isFlat(S32 face)
|
|||
}
|
||||
|
||||
|
||||
LLVolumeParams::LLVolumeParams( LLProfileParams &profile,
|
||||
LLPathParams &path,
|
||||
LLUUID sculpt_id,
|
||||
U8 sculpt_type) :
|
||||
mProfileParams(profile),
|
||||
mPathParams(path)
|
||||
{
|
||||
setSculptID(sculpt_id, sculpt_type);
|
||||
}
|
||||
|
||||
bool LLVolumeParams::isSculpt() const
|
||||
{
|
||||
return mSculptID.notNull();
|
||||
|
|
@ -3494,7 +3504,24 @@ bool LLVolumeParams::setSkew(const F32 skew_value)
|
|||
bool LLVolumeParams::setSculptID(const LLUUID sculpt_id, U8 sculpt_type)
|
||||
{
|
||||
mSculptID = sculpt_id;
|
||||
mSculptType = sculpt_type;
|
||||
// Check sculpt type value, it consist of type and flags
|
||||
U8 type = sculpt_type & LL_SCULPT_TYPE_MASK;
|
||||
U8 flags = sculpt_type & LL_SCULPT_FLAG_MASK;
|
||||
if (sculpt_type != (type | flags) || type > LL_SCULPT_TYPE_MAX)
|
||||
{
|
||||
if (sculpt_id != LLUUID::null)
|
||||
{
|
||||
mSculptType = LL_SCULPT_TYPE_MESH;
|
||||
}
|
||||
else
|
||||
{
|
||||
mSculptType = LL_SCULPT_TYPE_SPHERE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mSculptType = sculpt_type;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,8 +190,12 @@ const U8 LL_SCULPT_TYPE_MESH = 5;
|
|||
const U8 LL_SCULPT_TYPE_MASK = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE |
|
||||
LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH;
|
||||
|
||||
// for value checks, assign new value after adding new types
|
||||
const U8 LL_SCULPT_TYPE_MAX = LL_SCULPT_TYPE_MESH;
|
||||
|
||||
const U8 LL_SCULPT_FLAG_INVERT = 64;
|
||||
const U8 LL_SCULPT_FLAG_MIRROR = 128;
|
||||
const U8 LL_SCULPT_FLAG_MASK = LL_SCULPT_FLAG_INVERT | LL_SCULPT_FLAG_MIRROR;
|
||||
|
||||
const S32 LL_SCULPT_MESH_MAX_FACES = 8;
|
||||
|
||||
|
|
@ -556,11 +560,10 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
LLVolumeParams(LLProfileParams &profile, LLPathParams &path,
|
||||
LLUUID sculpt_id = LLUUID::null, U8 sculpt_type = LL_SCULPT_TYPE_NONE)
|
||||
: mProfileParams(profile), mPathParams(path), mSculptID(sculpt_id), mSculptType(sculpt_type)
|
||||
{
|
||||
}
|
||||
LLVolumeParams( LLProfileParams &profile,
|
||||
LLPathParams &path,
|
||||
LLUUID sculpt_id = LLUUID::null,
|
||||
U8 sculpt_type = LL_SCULPT_TYPE_NONE);
|
||||
|
||||
bool operator==(const LLVolumeParams ¶ms) const;
|
||||
bool operator!=(const LLVolumeParams ¶ms) const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue