mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
merge with NOverlays3
This commit is contained in:
commit
cd83be162c
2 changed files with 18 additions and 4 deletions
|
@ -347,7 +347,6 @@ void EntityItemProperties::setBillboardModeFromString(const QString& materialMap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
||||||
EntityPropertyFlags changedProperties;
|
EntityPropertyFlags changedProperties;
|
||||||
|
|
||||||
|
@ -1924,7 +1923,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
|
||||||
// Handle conversions from old 'textures' property to "imageURL"
|
// Handle conversions from old 'textures' property to "imageURL"
|
||||||
{
|
{
|
||||||
QScriptValue V = object.property("textures");
|
QScriptValue V = object.property("textures");
|
||||||
if (V.isValid()) {
|
if (_type == EntityTypes::Image && V.isValid() && !object.property("imageURL").isValid()) {
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
QString textures = QString_convertFromScriptValue(V, isValid);
|
QString textures = QString_convertFromScriptValue(V, isValid);
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
|
@ -1943,7 +1942,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
|
||||||
// Handle old "faceCamera" and "isFacingAvatar" props
|
// Handle old "faceCamera" and "isFacingAvatar" props
|
||||||
{
|
{
|
||||||
QScriptValue P = object.property("faceCamera");
|
QScriptValue P = object.property("faceCamera");
|
||||||
if (P.isValid()) {
|
if (P.isValid() && !object.property("billboardMode").isValid()) {
|
||||||
bool newValue = P.toVariant().toBool();
|
bool newValue = P.toVariant().toBool();
|
||||||
bool oldValue = getBillboardMode() == BillboardMode::YAW;
|
bool oldValue = getBillboardMode() == BillboardMode::YAW;
|
||||||
if (_defaultSettings || newValue != oldValue) {
|
if (_defaultSettings || newValue != oldValue) {
|
||||||
|
@ -1953,7 +1952,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
QScriptValue P = object.property("isFacingAvatar");
|
QScriptValue P = object.property("isFacingAvatar");
|
||||||
if (P.isValid()) {
|
if (P.isValid() && !object.property("billboardMode").isValid() && !object.property("faceCamera").isValid()) {
|
||||||
bool newValue = P.toVariant().toBool();
|
bool newValue = P.toVariant().toBool();
|
||||||
bool oldValue = getBillboardMode() == BillboardMode::FULL;
|
bool oldValue = getBillboardMode() == BillboardMode::FULL;
|
||||||
if (_defaultSettings || newValue != oldValue) {
|
if (_defaultSettings || newValue != oldValue) {
|
||||||
|
|
|
@ -11,6 +11,21 @@
|
||||||
|
|
||||||
#include "QString"
|
#include "QString"
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* <p>How an entity is billboarded.</p>
|
||||||
|
* <table>
|
||||||
|
* <thead>
|
||||||
|
* <tr><th>Value</th><th>Description</th></tr>
|
||||||
|
* </thead>
|
||||||
|
* <tbody>
|
||||||
|
* <tr><td><code>none</code></td><td>The entity will not be billboarded.</td></tr>
|
||||||
|
* <tr><td><code>yaw</code></td><td>The entity will yaw, but not pitch, to face the camera. Its actual rotation will be ignored.</td></tr>
|
||||||
|
* <tr><td><code>full</code></td><td>The entity will be billboarded to face the camera. Its actual rotation will be ignored.</td></tr>
|
||||||
|
* </tbody>
|
||||||
|
* </table>
|
||||||
|
* @typedef {string} BillboardMode
|
||||||
|
*/
|
||||||
|
|
||||||
enum class BillboardMode {
|
enum class BillboardMode {
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
YAW,
|
YAW,
|
||||||
|
|
Loading…
Reference in a new issue