CommonMistakes
From PyWiki
Contents |
FAQ's
Known problems
* OgreNewt demo05 causes a windows crash message when exiting as objects are not being cleaned up correctly * I never did finish converting Demo06_Ragdoll.py (in the OgreNewt directory) so it works 'a little' - happy to take fixes from someone out there..... * if you are using the Python 2.4 version you will need to get the CTypes module for some of the demos to work (this is included in Python 2.5 so how about upgrading) * also with Python 2.4 you need to tweak conveyorbelt.py in the OgreNewt directory to make the Demo03_CollisionCallbacks demo work. Remove the () from line 5 - it should look like:
class conveyorBelt:
Windows Installation hints
See Binary_Releases
DLL Missing Error without the DLL name
If you have a failure message like:
File "C:\PYTHON25\lib\site-packages\Ogre\__init__.py", line 8, in <module> from _ogre_ import * ImportError: DLL load failed: One of the library files needed to run this application cannot be found.
Check that you have MSVCP71.DLL in your windows\system32 directory. This is the standard C++ runtime library and is needed for Ogre. It will be included in a future release of Python-Ogre. If MSVCP71 isn't the source of the problem, download the free utility Dependency Walker to determine the missing DLL (start the program, open python, import Ogre).
Error related to d3dx9_3x.dll
You really do need to update your DirectX version (as mentioned on the downloads page)
Note on distributing your program, you can just put the d3dx9_xx.dll into your program's folder and it should work fine. Lots of games which are using DirectX are doing that.
Supported Python Versions
Any recent version of Python 2.4 and above should work - we recommend Python 2.5.
Converting from PyOgre?
Converting your existing PyOgre code to Python-Ogre should be reasonably straight forward
- There is a converted version of the SampleFramework in the demos/ogre directory
- Properties are supported by dual naming conventions - both leading lowercase like pyogre, and in a form that matches the C++ library (typically leading Upper case)
- Automatic tuple to ColourValue/Vector3/Matrix3/Vector2/etc. converters ARE implemented so the following are all valid:
sceneManager.ambientLight= 0.5, 0.5, 0.5 sceneManager.setAmbientLight(0.5, 0.5, 0.5) sceneManager.setAmbientLight(Ogre.Colour(0.5, 0.5, 0.5))
- We have been conservative in creating properties (plus Boost doesn't currently support overloaded setters), check the module documentation if you have problems or revert to the C++ style function call. See here for more details.
- Some PyOgre functions would automatically unpack Vector3 objects (and possibly others) as return values. However, Python-Ogre (unless otherwise noted in PyDoc) returns the same object that the C++ call does, so e.g. returns a Vector3 object:
v3 = Ogre.Vector3(0,0,0) x,y,z = v3.position # invalid in Python-Ogre x = v3.x y = v3.y ...
Compile Problems with SVN version
Hints on building from source can be found here
