EditorToySceneWindow_ScriptBinding.h 590 B

1234567891011121314151617181920212223242526
  1. ConsoleMethodGroupBeginWithDocs(EditorToySceneWindow, SceneWindow)
  2. ConsoleMethodWithDocs(EditorToySceneWindow, setEditScene, ConsoleVoid, 2, 3, (Scene))
  3. {
  4. // No scene specified?
  5. if (argc < 3)
  6. {
  7. // No, so reset the scene.
  8. object->resetEditScene();
  9. // Finish here.
  10. return;
  11. }
  12. // Find Scene Object.
  13. Scene* pScene = (Scene*)(Sim::findObject(argv[2]));
  14. // Validate Object.
  15. if (!pScene)
  16. {
  17. Con::warnf("SceneWindow::setScene() - Couldn't find object '%s'.", argv[2]);
  18. return;
  19. }
  20. // Set Scene.
  21. object->setEditScene(pScene);
  22. }