mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +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 changedProperties;
|
||||
|
||||
|
@ -1924,7 +1923,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
|
|||
// Handle conversions from old 'textures' property to "imageURL"
|
||||
{
|
||||
QScriptValue V = object.property("textures");
|
||||
if (V.isValid()) {
|
||||
if (_type == EntityTypes::Image && V.isValid() && !object.property("imageURL").isValid()) {
|
||||
bool isValid = false;
|
||||
QString textures = QString_convertFromScriptValue(V, isValid);
|
||||
if (isValid) {
|
||||
|
@ -1943,7 +1942,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
|
|||
// Handle old "faceCamera" and "isFacingAvatar" props
|
||||
{
|
||||
QScriptValue P = object.property("faceCamera");
|
||||
if (P.isValid()) {
|
||||
if (P.isValid() && !object.property("billboardMode").isValid()) {
|
||||
bool newValue = P.toVariant().toBool();
|
||||
bool oldValue = getBillboardMode() == BillboardMode::YAW;
|
||||
if (_defaultSettings || newValue != oldValue) {
|
||||
|
@ -1953,7 +1952,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
|
|||
}
|
||||
{
|
||||
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 oldValue = getBillboardMode() == BillboardMode::FULL;
|
||||
if (_defaultSettings || newValue != oldValue) {
|
||||
|
|
|
@ -11,6 +11,21 @@
|
|||
|
||||
#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 {
|
||||
NONE = 0,
|
||||
YAW,
|
||||
|
|
Loading…
Reference in a new issue