mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-06 09:43:17 +02:00
fix component mode serialization
This commit is contained in:
parent
356ccc8b15
commit
729b85062d
6 changed files with 28 additions and 28 deletions
|
@ -257,7 +257,7 @@ const QHash<QString, ComponentMode> stringToComponentMode = [] {
|
|||
addComponentMode(toReturn, ComponentMode::COMPONENT_MODE_ENABLED);
|
||||
return toReturn;
|
||||
}();
|
||||
QString EntityItemProperties::getComponentModeAsString(uint32_t mode) { return ComponentModeHelpers::getNameForComponentMode((ComponentMode)mode); }
|
||||
QString EntityItemProperties::getComponentModeAsString(uint8_t mode) { return ComponentModeHelpers::getNameForComponentMode((ComponentMode)mode); }
|
||||
QString EntityItemProperties::getSkyboxModeAsString() const { return getComponentModeAsString(_skyboxMode); }
|
||||
QString EntityItemProperties::getKeyLightModeAsString() const { return getComponentModeAsString(_keyLightMode); }
|
||||
QString EntityItemProperties::getAmbientLightModeAsString() const { return getComponentModeAsString(_ambientLightMode); }
|
||||
|
|
|
@ -117,7 +117,7 @@ public:
|
|||
|
||||
@ENTITY_ITEM_PROPERTY_DEFINES@
|
||||
|
||||
static QString getComponentModeAsString(uint32_t mode);
|
||||
static QString getComponentModeAsString(uint8_t mode);
|
||||
|
||||
public:
|
||||
float getMaxDimension() const { return glm::compMax(_dimensions); }
|
||||
|
|
|
@ -176,15 +176,15 @@ group:ambientOcclusion recordChange,
|
|||
enum:FLYING_ALLOWED prop:flyingAllowed type:bool default:ZoneEntityItem::DEFAULT_FLYING_ALLOWED basicProp,
|
||||
enum:GHOSTING_ALLOWED prop:ghostingAllowed type:bool default:ZoneEntityItem::DEFAULT_GHOSTING_ALLOWED basicProp,
|
||||
enum:FILTER_URL prop:filterURL type:QString default:ZoneEntityItem::DEFAULT_FILTER_URL urlPermission,
|
||||
enum:KEY_LIGHT_MODE prop:keyLightMode type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:AMBIENT_LIGHT_MODE prop:ambientLightMode type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:SKYBOX_MODE prop:skyboxMode type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:HAZE_MODE prop:hazeMode type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:BLOOM_MODE prop:bloomMode type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:AVATAR_PRIORITY prop:avatarPriority type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum basicProp,
|
||||
enum:SCREENSHARE prop:screenshare type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum basicProp,
|
||||
enum:TONEMAPPING_MODE prop:tonemappingMode type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:AMBIENT_OCCLUSION_MODE prop:ambientOcclusionMode type:uint32_t default:(uint32_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:KEY_LIGHT_MODE prop:keyLightMode type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:AMBIENT_LIGHT_MODE prop:ambientLightMode type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:SKYBOX_MODE prop:skyboxMode type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:HAZE_MODE prop:hazeMode type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:BLOOM_MODE prop:bloomMode type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:AVATAR_PRIORITY prop:avatarPriority type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum basicProp,
|
||||
enum:SCREENSHARE prop:screenshare type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum basicProp,
|
||||
enum:TONEMAPPING_MODE prop:tonemappingMode type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum,
|
||||
enum:AMBIENT_OCCLUSION_MODE prop:ambientOcclusionMode type:uint8_t default:(uint8_t)COMPONENT_MODE_INHERIT enum,
|
||||
PolyVox
|
||||
enum:VOXEL_VOLUME_SIZE prop:voxelVolumeSize type:vec3 default:PolyVoxEntityItem::DEFAULT_VOXEL_VOLUME_SIZE noGetterSetterProp,
|
||||
enum:VOXEL_DATA prop:voxelData type:QByteArray default:PolyVoxEntityItem::DEFAULT_VOXEL_DATA noGetterSetterProp,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include <PropertyFlags.h>
|
||||
|
||||
enum EntityPropertyList {
|
||||
enum EntityPropertyList : uint16_t {
|
||||
PROP_PAGED_PROPERTY,
|
||||
PROP_CUSTOM_PROPERTIES_INCLUDED,
|
||||
|
||||
|
|
|
@ -239,80 +239,80 @@ void ZoneEntityItem::resetRenderingPropertiesChanged() {
|
|||
});
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setSkyboxMode(const uint32_t value) {
|
||||
void ZoneEntityItem::setSkyboxMode(const uint8_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT && value != _skyboxMode) {
|
||||
_skyboxMode = value;
|
||||
_skyboxPropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getSkyboxMode() const {
|
||||
uint8_t ZoneEntityItem::getSkyboxMode() const {
|
||||
return _skyboxMode;
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setKeyLightMode(const uint32_t value) {
|
||||
void ZoneEntityItem::setKeyLightMode(const uint8_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT && value != _keyLightMode) {
|
||||
_keyLightMode = value;
|
||||
_keyLightPropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getKeyLightMode() const {
|
||||
uint8_t ZoneEntityItem::getKeyLightMode() const {
|
||||
return _keyLightMode;
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setAmbientLightMode(const uint32_t value) {
|
||||
void ZoneEntityItem::setAmbientLightMode(const uint8_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT && value != _ambientLightMode) {
|
||||
_ambientLightMode = value;
|
||||
_ambientLightPropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getAmbientLightMode() const {
|
||||
uint8_t ZoneEntityItem::getAmbientLightMode() const {
|
||||
return _ambientLightMode;
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setHazeMode(const uint32_t value) {
|
||||
void ZoneEntityItem::setHazeMode(const uint8_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT && value != _hazeMode) {
|
||||
_hazeMode = value;
|
||||
_hazePropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getHazeMode() const {
|
||||
uint8_t ZoneEntityItem::getHazeMode() const {
|
||||
return _hazeMode;
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setBloomMode(const uint32_t value) {
|
||||
void ZoneEntityItem::setBloomMode(const uint8_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT && value != _bloomMode) {
|
||||
_bloomMode = value;
|
||||
_bloomPropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getBloomMode() const {
|
||||
uint8_t ZoneEntityItem::getBloomMode() const {
|
||||
return _bloomMode;
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setTonemappingMode(const uint32_t value) {
|
||||
void ZoneEntityItem::setTonemappingMode(const uint8_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT && value != _tonemappingMode) {
|
||||
_tonemappingMode = value;
|
||||
_tonemappingPropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getTonemappingMode() const {
|
||||
uint8_t ZoneEntityItem::getTonemappingMode() const {
|
||||
return _tonemappingMode;
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setAmbientOcclusionMode(const uint32_t value) {
|
||||
void ZoneEntityItem::setAmbientOcclusionMode(const uint8_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT && value != _ambientOcclusionMode) {
|
||||
_ambientOcclusionMode = value;
|
||||
_ambientOcclusionPropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getAmbientOcclusionMode() const {
|
||||
uint8_t ZoneEntityItem::getAmbientOcclusionMode() const {
|
||||
return _ambientOcclusionMode;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <QString>
|
||||
|
||||
enum ComponentMode {
|
||||
enum ComponentMode : uint8_t {
|
||||
COMPONENT_MODE_INHERIT,
|
||||
COMPONENT_MODE_DISABLED,
|
||||
COMPONENT_MODE_ENABLED,
|
||||
|
@ -22,7 +22,7 @@ enum ComponentMode {
|
|||
COMPONENT_MODE_ITEM_COUNT
|
||||
};
|
||||
|
||||
enum AvatarPriorityMode {
|
||||
enum AvatarPriorityMode : uint8_t {
|
||||
AVATAR_PRIORITY_INHERIT,
|
||||
AVATAR_PRIORITY_CROWD,
|
||||
AVATAR_PRIORITY_HERO,
|
||||
|
|
Loading…
Reference in a new issue