Created
April 23, 2011 09:29
-
-
Save iRi-E/938497 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/QMA/QMAWindow.cc b/QMA/QMAWindow.cc | |
index ad68606..366fe57 100644 | |
--- a/QMA/QMAWindow.cc | |
+++ b/QMA/QMAWindow.cc | |
@@ -261,8 +261,11 @@ void QMAWindow::togglePhysicSimulation() | |
MMDAI::SceneController *controller = m_widget->getSceneController(); | |
int count = controller->countPMDObjects(); | |
m_enablePhysicsSimulation = !m_enablePhysicsSimulation; | |
- for (int i = 0; i < count; i++) | |
- controller->getPMDObject(i)->getPMDModel()->setPhysicsControl(m_enablePhysicsSimulation); | |
+ for (int i = 0; i < count; i++) { | |
+ MMDAI::PMDObject *object = controller->getPMDObject(i); | |
+ if (object->isEnable()) | |
+ object->getPMDModel()->setPhysicsControl(m_enablePhysicsSimulation); | |
+ } | |
} | |
void QMAWindow::toggleShadowMapping() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment