mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 21:33:09 +02:00
remove debug
This commit is contained in:
parent
f618a2adfa
commit
68dc303603
2 changed files with 2 additions and 62 deletions
|
@ -33,8 +33,6 @@ CONSTRUCT_PROPERTY(startAutomatically, false)
|
|||
void AnimationPropertyGroup::copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties, QScriptEngine* engine, bool skipDefaults, EntityItemProperties& defaultEntityProperties) const {
|
||||
COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_ANIMATION_URL, Animation, animation, URL, url);
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::copyToScriptValue() url:" << getURL();
|
||||
|
||||
if (_animationLoop) {
|
||||
COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_ANIMATION_FPS, Animation, animation, FPS, fps, _animationLoop->getFPS);
|
||||
COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_ANIMATION_FRAME_INDEX, Animation, animation, FrameIndex, frameIndex, _animationLoop->getFPS);
|
||||
|
@ -64,8 +62,6 @@ void AnimationPropertyGroup::copyFromScriptValue(const QScriptValue& object, boo
|
|||
COPY_PROPERTY_FROM_QSCRIPTVALUE_GETTER(animationURL, QString, setURL, getURL);
|
||||
COPY_PROPERTY_FROM_QSCRIPTVALUE_NOCHECK(animationSettings, QString, setFromOldAnimationSettings);
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::copyFromScriptValue() url:" << getURL();
|
||||
|
||||
if (_animationLoop) {
|
||||
COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(animation, fps, float, _animationLoop->setFPS);
|
||||
COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(animation, frameIndex, float, _animationLoop->setFrameIndex);
|
||||
|
@ -99,9 +95,6 @@ void AnimationPropertyGroup::copyFromScriptValue(const QScriptValue& object, boo
|
|||
}
|
||||
|
||||
void AnimationPropertyGroup::setFromOldAnimationSettings(const QString& value) {
|
||||
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() url:" << getURL() << "value:" << value;
|
||||
|
||||
// the animations setting is a JSON string that may contain various animation settings.
|
||||
// if it includes fps, frameIndex, or running, those values will be parsed out and
|
||||
// will over ride the regular animation settings
|
||||
|
@ -121,42 +114,34 @@ void AnimationPropertyGroup::setFromOldAnimationSettings(const QString& value) {
|
|||
|
||||
if (settingsMap.contains("fps")) {
|
||||
fps = settingsMap["fps"].toFloat();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had fps:" << fps;
|
||||
}
|
||||
|
||||
if (settingsMap.contains("frameIndex")) {
|
||||
frameIndex = settingsMap["frameIndex"].toFloat();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had frameIndex:" << frameIndex;
|
||||
}
|
||||
|
||||
if (settingsMap.contains("running")) {
|
||||
running = settingsMap["running"].toBool();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had running:" << running;
|
||||
}
|
||||
|
||||
if (settingsMap.contains("firstFrame")) {
|
||||
frameIndex = settingsMap["firstFrame"].toFloat();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had firstFrame:" << firstFrame;
|
||||
}
|
||||
|
||||
if (settingsMap.contains("lastFrame")) {
|
||||
frameIndex = settingsMap["lastFrame"].toFloat();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had lastFrame:" << lastFrame;
|
||||
}
|
||||
|
||||
if (settingsMap.contains("loop")) {
|
||||
running = settingsMap["loop"].toBool();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had loop:" << loop;
|
||||
}
|
||||
|
||||
if (settingsMap.contains("hold")) {
|
||||
running = settingsMap["hold"].toBool();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had hold:" << hold;
|
||||
}
|
||||
|
||||
if (settingsMap.contains("startAutomatically")) {
|
||||
running = settingsMap["startAutomatically"].toBool();
|
||||
qDebug() << "AnimationPropertyGroup::setFromOldAnimationSettings() had startAutomatically:" << startAutomatically;
|
||||
}
|
||||
|
||||
if (_animationLoop) {
|
||||
|
@ -198,9 +183,6 @@ bool AnimationPropertyGroup::appendToEditPacket(OctreePacketData* packetData,
|
|||
bool successPropertyFits = true;
|
||||
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_URL, getURL());
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::appendToEditPacket() url:" << getURL();
|
||||
|
||||
if (_animationLoop) {
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_FPS, _animationLoop->getFPS());
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_FRAME_INDEX, _animationLoop->getFrameIndex());
|
||||
|
@ -232,8 +214,6 @@ bool AnimationPropertyGroup::decodeFromEditPacket(EntityPropertyFlags& propertyF
|
|||
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_URL, QString, setURL);
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::decodeFromEditPacket() url:" << getURL();
|
||||
|
||||
if (_animationLoop) {
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_FPS, float, _animationLoop->setFPS);
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_FRAME_INDEX, float, _animationLoop->setFrameIndex);
|
||||
|
@ -294,9 +274,6 @@ EntityPropertyFlags AnimationPropertyGroup::getChangedProperties() const {
|
|||
|
||||
void AnimationPropertyGroup::getProperties(EntityItemProperties& properties) const {
|
||||
COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Animation, URL, getURL);
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::getProperties() url:" << getURL();
|
||||
|
||||
if (_animationLoop) {
|
||||
COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Animation, FPS, _animationLoop->getFPS);
|
||||
COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Animation, FrameIndex, _animationLoop->getFrameIndex);
|
||||
|
@ -322,12 +299,7 @@ bool AnimationPropertyGroup::setProperties(const EntityItemProperties& propertie
|
|||
bool somethingChanged = false;
|
||||
|
||||
SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Animation, URL, url, setURL);
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::setProperties() url:" << getURL();
|
||||
|
||||
if (_animationLoop) {
|
||||
//qDebug() << "AnimationPropertyGroup::setProperties() -- apply new properties to our associated AnimationLoop";
|
||||
|
||||
SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Animation, FPS, fps, _animationLoop->setFPS);
|
||||
SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Animation, FrameIndex, frameIndex, _animationLoop->setFrameIndex);
|
||||
SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Animation, Running, running, _animationLoop->setRunning);
|
||||
|
@ -376,8 +348,6 @@ void AnimationPropertyGroup::appendSubclassData(OctreePacketData* packetData, En
|
|||
|
||||
bool successPropertyFits = true;
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::appendSubclassData() url:" << getURL();
|
||||
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_URL, getURL());
|
||||
if (_animationLoop) {
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_FPS, _animationLoop->getFPS());
|
||||
|
@ -388,8 +358,7 @@ void AnimationPropertyGroup::appendSubclassData(OctreePacketData* packetData, En
|
|||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_LAST_FRAME, _animationLoop->getLastFrame());
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_HOLD, _animationLoop->getHold());
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_START_AUTOMATICALLY, _animationLoop->getStartAutomatically());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_FPS, getFPS());
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_FRAME_INDEX, getFrameIndex());
|
||||
APPEND_ENTITY_PROPERTY(PROP_ANIMATION_PLAYING, getRunning());
|
||||
|
@ -410,11 +379,8 @@ int AnimationPropertyGroup::readEntitySubclassDataFromBuffer(const unsigned char
|
|||
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_URL, QString, setURL);
|
||||
|
||||
//qDebug() << "AnimationPropertyGroup::readEntitySubclassDataFromBuffer() url:" << getURL();
|
||||
|
||||
if (_animationLoop) {
|
||||
// apply new properties to our associated AnimationLoop
|
||||
qDebug() << "AnimationPropertyGroup::readEntitySubclassDataFromBuffer() -- apply new properties to our associated AnimationLoop";
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_FPS, float, _animationLoop->setFPS);
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_FRAME_INDEX, float, _animationLoop->setFrameIndex);
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_PLAYING, bool, _animationLoop->setRunning);
|
||||
|
@ -424,7 +390,6 @@ int AnimationPropertyGroup::readEntitySubclassDataFromBuffer(const unsigned char
|
|||
READ_ENTITY_PROPERTY(PROP_ANIMATION_HOLD, bool, _animationLoop->setHold);
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_START_AUTOMATICALLY, bool, _animationLoop->setStartAutomatically);
|
||||
} else {
|
||||
qDebug() << "AnimationPropertyGroup::readEntitySubclassDataFromBuffer() -- NO AnimationLoop store locally";
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_FPS, float, setFPS);
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_FRAME_INDEX, float, setFrameIndex);
|
||||
READ_ENTITY_PROPERTY(PROP_ANIMATION_PLAYING, bool, setRunning);
|
||||
|
@ -435,10 +400,5 @@ int AnimationPropertyGroup::readEntitySubclassDataFromBuffer(const unsigned char
|
|||
READ_ENTITY_PROPERTY(PROP_ANIMATION_START_AUTOMATICALLY, bool, setStartAutomatically);
|
||||
}
|
||||
|
||||
if (_animationLoop) {
|
||||
qDebug() << "_animationLoop->isRunning():" << _animationLoop->isRunning();
|
||||
}
|
||||
|
||||
|
||||
return bytesRead;
|
||||
}
|
||||
|
|
|
@ -48,26 +48,17 @@ ModelEntityItem::ModelEntityItem(const EntityItemID& entityItemID, const EntityI
|
|||
|
||||
EntityItemProperties ModelEntityItem::getProperties(EntityPropertyFlags desiredProperties) const {
|
||||
EntityItemProperties properties = EntityItem::getProperties(desiredProperties); // get the properties from our base class
|
||||
|
||||
//qDebug() << "ModelEntityItem::getProperties() id:" << getEntityItemID();
|
||||
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(color, getXColor);
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(modelURL, getModelURL);
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(compoundShapeURL, getCompoundShapeURL);
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(glowLevel, getGlowLevel);
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(textures, getTextures);
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(shapeType, getShapeType);
|
||||
|
||||
_animationProperties.getProperties(properties);
|
||||
|
||||
//properties.debugDump();
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
||||
bool ModelEntityItem::setProperties(const EntityItemProperties& properties) {
|
||||
qDebug() << "ModelEntityItem::setProperties() id:" << getEntityItemID();
|
||||
|
||||
bool somethingChanged = false;
|
||||
somethingChanged = EntityItem::setProperties(properties); // set the properties in our base class
|
||||
|
||||
|
@ -77,12 +68,7 @@ bool ModelEntityItem::setProperties(const EntityItemProperties& properties) {
|
|||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(textures, setTextures);
|
||||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(shapeType, updateShapeType);
|
||||
|
||||
qDebug() << "ModelEntityItem::setProperties() id:" << getEntityItemID() << "modelURL:" << getModelURL();
|
||||
qDebug() << "ModelEntityItem::setProperties() id:" << getEntityItemID() << "calling _animationProperties.setProperties()";
|
||||
bool somethingChangedInAnimations = _animationProperties.setProperties(properties);
|
||||
qDebug() << "ModelEntityItem::setProperties() id:" << getEntityItemID() << "AFTER _animationProperties.setProperties() running:" << _animationLoop.getRunning();
|
||||
qDebug() << "ModelEntityItem::setProperties() id:" << getEntityItemID() << "AFTER _animationProperties.setProperties() frameIndex:" << _animationLoop.getFrameIndex();
|
||||
|
||||
somethingChanged = somethingChanged || somethingChangedInAnimations;
|
||||
|
||||
if (somethingChanged) {
|
||||
|
@ -140,10 +126,6 @@ int ModelEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,
|
|||
|
||||
READ_ENTITY_PROPERTY(PROP_SHAPE_TYPE, ShapeType, updateShapeType);
|
||||
|
||||
|
||||
qDebug() << "ModelEntityItem::readEntitySubclassDataFromBuffer()";
|
||||
debugDump();
|
||||
|
||||
return bytesRead;
|
||||
}
|
||||
|
||||
|
@ -287,9 +269,7 @@ void ModelEntityItem::update(const quint64& now) {
|
|||
float deltaTime = (float)(now - _lastAnimated) / (float)USECS_PER_SECOND;
|
||||
_lastAnimated = now;
|
||||
_animationLoop.simulate(deltaTime);
|
||||
//qDebug() << "ModelEntityItem::update() id:" << getEntityItemID() << "frameIndex:" << _animationLoop.getFrameIndex();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
_lastAnimated = now;
|
||||
}
|
||||
EntityItem::update(now); // let our base class handle it's updates...
|
||||
|
|
Loading…
Reference in a new issue