How to start using ogre-python 13.1.1 Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

How to start using ogre-python 13.1.1

Post by 8Observer8 »

Hello,

I found some information here: https://wiki.ogre3d.org/Python-Ogre:
IMPORTANT PyOgre and Python-Ogre have been discontinued. OGRE >= 1.10 provides Python bindings directly as a component. For Ogre 1.12, rather use
I installed ogre-python 13.1.1. Where can I found examples in Python? I do not understand what this mean "OGRE >= 1.10 provides Python bindings directly as a component"? Can you show a link that shows how to use "Python bindings directly as a component". I am not an expert in Python. I just want to create a window and load some 3D models.

Maybe it is not a good idea to start to use Ogre with Python?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to start using ogre-python 13.1.1

Post by paroj »

for the setup tutorial:
https://ogrecave.github.io/ogre/api/latest/setup.html

there is the python translation:
https://github.com/OGRECave/ogre/blob/m ... /sample.py

this will likely complain as the python package does not come with the Sinbad.mesh asset.
However, you can replace that by "Prefab_Cube" to get it running.

For the most part you will have to read the C++ docs and "translate" them to python in your head.
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to start using ogre-python 13.1.1

Post by 8Observer8 »

Thanks for Python example. It works. I found only old examples. That yellow text ("Python-Ogre have been discontinued") in docs was confused me.

That C++ building instruction is very difficult for me because I do not now where to add that lines of CMake. I know how to use "CMake GUI" only. I have already built Ogre3D Release from source using "CMake GUI" and the "mingw32-make" command. I made a static build. I tried to build a few years ago but I had errors. Ogre3D 13.1.1 has built successfully.
User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 449
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 156

Re: How to start using ogre-python 13.1.1

Post by sercero »

Hello,

I recommend you learn a bit about CMake:
https://cmake.org/cmake-tutorial/
https://tuannguyen68.gitbooks.io/learni ... chap1.html
http://derekmolloy.ie/hello-world-intro ... -to-cmake/

Things will become much more clear once you know a bit more about CMake, then you will know that these lines:

Code: Select all

# specify which components you need.
# The CONFIG flag makes sure you get OGRE instead of OGRE-next
find_package(OGRE REQUIRED COMPONENTS Bites RTShaderSystem CONFIG)
 
# add the source files as usual
add_executable(0_Bootstrap Bootstrap.cpp)
 
# this also sets the includes and pulls third party dependencies
target_link_libraries(0_Bootstrap OgreBites OgreRTShaderSystem)
Go inside a CMakeLists file that defines your project build settings.
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to start using ogre-python 13.1.1

Post by 8Observer8 »

paroj wrote: Fri Oct 22, 2021 5:07 pm for the setup tutorial:
https://ogrecave.github.io/ogre/api/latest/setup.html

there is the python translation:
https://github.com/OGRECave/ogre/blob/m ... /sample.py

this will likely complain as the python package does not come with the Sinbad.mesh asset.
However, you can replace that by "Prefab_Cube" to get it running.

For the most part you will have to read the C++ docs and "translate" them to python in your head.
If someone have a problem with loading a model in the tutorial above see my message: Re: How to load a 3D model in ogre-python
Post Reply