This patch allows a user to pass binary data to LibLoad() to load a blend file from memory instead of a file path. I don't know how useful this will be for others, but I've used it so far for:
* Decrypting .blend files and loading them without having to store the .blend on the hard drive
* Pulling .blend data out of an archive and loading it (again skipping the hard drive)
So, it seems the biggest use for this is skipping a bit of file IO (and possibly some security problems).
Example usage:
import bge
with f as open('myfile.blend', 'rb'):
data = f.read()
bge.logic.LibLoad('Name', 'Scene', data)
bge.types
---------
- removed lists if they were already available in bge.logic and crosslinked
where the list contained description, moved the descriptions in bge.logic
so we have useful thing in one place only
- fixed a lot of bad formatting, like bad indentation and usage of TAB
- changed from literal to codeblocks that smerch for the useful suggestion :)
- whered appropriate I've moved code examples to the end, after notes and all
it is blocking to have a big black block before actually see a method parameters or return type
- have doubt about the list at bge.types.html#bge.types.SCA_MouseSensor.mode
possibly tomorrow will ask Dalai
bge.logic
---------
- added sensor status list
- cross linked with bge.types where needed
- added a section "ShapeAction Actuator" because in bge.types these constants are docuemented, but in 2.5 I don't see the ShapeAction Actuator
(anymore, or for now)
I'll ask Dalai tomorrow or when possible (check bge.logic.html#shape-action-actuator once cambo rebuilds the docs)
- moved descriptions from bge.types lists to logic page where appropriate
- where possible, added custom directive :value: so we have a consistent way to show the value of constants
- now that I've made syntax changes in the previous commit I moved blocks to to have sensors/actuators grouped together
- added sections to have a nice table of contents
- formatted 2 lists and links to classes
* source/blender/python/doc/sphinx_doc_gen.py
changed syntax for declating attributes type to use :type: instead of *type* os it
* source/gameengine/Ketsji/KX_PythonInit.cpp
While documenting I've found that we have two naming conventions for constraints in BGE python api,
example: KX_CONSTRAINTACT_DIRPZ and KX_ACT_CONSTRAINT_FHPX: the right convention is KX_CONSTRAINTACT_xxx
After talking with dalai and cambpell we agreed that this kind of change is better suited for NExyon GSoC
so I marked as TODO
Also, found 2 duplicate rows, fixed after askin nexyon
* source/gameengine/PyDoc/bge.logic.rst
there were 2 blocks for constraints, I've put them together in docs and fixed some other lines
* source/gameengine/PyDoc/bge.types.rst
first cleanup: mainly started using ":type:", it was mixed usage of *type* and **type**
started cleaning some bullet list in a way that varibles link to the constant in appropriate page
I'll continue later