Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-17Cleanup: trailing space in source/gameengine/Campbell Barton
2016-07-14PyAPI: fix memory leaks in dictionary assignmentCampbell Barton
Thanks to Kévin Dietrich for spotting driver leak, checked other uses of PyDict_SetItem and found more.
2016-04-11BGE: Fix T48071: Global logic managerPorteries Tristan
Previously the logic manager was used as a global variable for SCA_ILogicBrick::m_sCurrentLogicManager, this request to always update it before run any python script and allow call function like ConvertPythonTo[GameObject/Mesh]. The bug showed in T48071 is that as exepted the global m_sCurrentLogicManager is not updated with the proper scene logic manager. Instead of trying to fix it by updating the logic manager everywhere and wait next bug report to add a similar line. The following patch propose a different way: - Every logic brick now contain its logic manager to SCA_ILogicBrick::m_logicManager, this value is set and get by SCA_ILogicBrick::[Set/Get]LogicManager, It's initialized from blender conversion and scene merging. - Function ConvertPythonTo[GameObject/mesh] now take as first argument the logic manager to find name coresponding object or mesh. Only ConvertPythonToCamera doesn't do that because it uses the KX_Scene::FindCamera function. Reviewers: moguri Differential Revision: https://developer.blender.org/D1913
2015-09-15BGE: make error message more clear when trying to de/activate actuator from ↵Dalai Felinto
non-active controller
2015-07-12BGE Clean-up: New EXP prefix for the BGE Expression moduleJorge Bernal
The expression module now uses an EXP prefix and it follows a distribution similar to blender. Additionally the hash function in EXP_HashedPtr.h was simplified and the files EXP_C-Api.h &.EXP_C-Api.cpp were deleted because were unused. Reviewers: campbellbarton, moguri, sybren, hg1 Projects: #game_engine Differential Revision: https://developer.blender.org/D1221
2014-07-03Slight cleanup for 4af848e.Mitchell Stokes
2014-07-03Fix T40923: An error from a python controller on a LibFreed object causes a ↵Mitchell Stokes
crash
2013-03-17code cleanup: add 'const' to headers to quiet msvc warnings, also remove ↵Campbell Barton
(char *) casts that aren't needed now we're on Python3.3
2012-11-21py api cleanup, replace use...Campbell Barton
- PyLong_FromSsize_t --> PyLong_FromLong - PyLong_AsSsize_t --> PyLong_AsLong In all places except for those where python api expects PySsize_t (index lookups mainly). - use PyBool_FromLong in a few areas of the BGE. - fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
2012-10-22style cleanupCampbell Barton
2012-10-21style cleanup: bge, switch statements mostly.Campbell Barton
also left bmesh decimator on in previous commit.
2012-09-16style cleanupCampbell Barton
2012-07-01style cleanup: commentsCampbell Barton
2012-06-20style cleanupCampbell Barton
2012-05-17style cleanup: block commentsCampbell Barton
2012-03-24style cleanup: follow style guide for/with/if spacingCampbell Barton
2012-03-18spelling cleanupCampbell Barton
2012-03-09style cleanup: spelling.Campbell Barton
also remove large, duplicate comments from sunsky.h
2011-11-06PyUnicode_From_STR_String utility function which passes STR_String to ↵Campbell Barton
PyUnicode_FromStringAndSize (saves a call to strlen). Also made CValue::ConvertKeysToPython use faster list creation and improved some of the macro formatting.
2011-11-03python string conversionCampbell Barton
- use _PyUnicode_AsStringAndSize where possible - use %R for PyErr_Format(...) rather then running repr on the object explicitly - use const char
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-05-29access pythons code object directly rather than attribute access.Campbell Barton
2011-03-07Drop support for python 3.1.Campbell Barton
for building py3.2 on *nix see: http://wiki.blender.org/index.php?title=Dev:2.5/Doc/Building_Blender/Linux/Troubleshooting#Python also fixed possible buffer overrun with getting the fake filepath for a blender textblock.
2011-03-05patch [#26366] More detailed Python error reporting for the BGECampbell Barton
from Alex Fraser (z0r) Now object name is shown with python error.
2011-02-25doxygen: gameengine/GameLogic tagged.Nathan Letwory
2011-02-23doxygen: prevent GPL license block from being parsed as doxygen comment.Nathan Letwory
2011-01-27[#25815] Patch gcc 4.6Campbell Barton
with minor edits, made sure it works in CMake too.
2011-01-19support building with python3.2Campbell Barton
2010-10-31rename and negate DISABLE_PYTHON --> WITH_PYTHONCampbell Barton
2010-10-10enable building the game engine without bullet for scons & cmakeCampbell Barton
2010-08-16Py API (GSoC): Second merging commitJoerg Mueller
Rough summary of fixes/changes: - Blender Py API: GameLogic -> bge.logic - Blender Py API: Implemented missing KX_PYATTRIBUTE_TODOs and -DUMMYs. - Fix for [#22924] KX_PolygonMaterial.diffuse does not return expected list[r,g,b] - Py API: Renaming _owner attribute of mathutils classes to owner. - Fix some minor errors in mathutils and blf. - Enabling game engine autoplay again based on a patch by Dalai: * The biggest 3D view in the open scene is used, if there is none, blender opens the file normally and raises an error. * The 3D view are is made fullscreen. * Quad view, header, properties and toolbox panel are all hidden to get the maximum view. * If the game engine full screen setting is set, the game starts in fullscreen. - Fix for ipo conversion on file transition in the game engine.
2010-08-05bugfix [#23148] "ImportError: __import__ not found" on changing Render FPSCampbell Barton
The BGE was getting the namespace dict directly from __main__ which conflicts with my recent fix to get the pickle module working which to overwrote the __main__ module on script execution. Simple fix is to have the BGE and Blender use the same method of getting namespaces. Renamed CreateGlobalDictionary() to bpy_namespace_dict_new() and moved into bpy_internal_import.c pickle still wont work in the BGE since we make a copy of __main__ namespace but for speed would rather not have to replace the __main__ module many times per second.
2010-07-26Hopefully fix building with MSVC 2008 from rev 30746.Campbell Barton
SCA_PythonController.cpp(303) : error C2133: 'mod_path' : unknown size
2010-07-26patch from Mitchell Stokes with some changes.Campbell Barton
BGE Py Controllers were effectively doing this... "a.b.c" --> "__import__('a').b.c()" This was annoying because it meant module 'a' would need to import 'b' explicitly. Now use import like this. "a.b.c" --> "__import__("a.b").c()" Note that this has the slight disadvantage that these need to be modules, where as before they could be collections of functions in a class instance for eg. So its possible this breaks existing files but dont think anyone used this since its a fairly obscure use case.
2010-07-17spelling correction: alredy --> alreadyCampbell Barton
2010-04-18remove config.h references, was added for automake build system rev around ↵Campbell Barton
124-126 but isnt used by any build systems now.
2010-02-12correct fsf addressCampbell Barton
2009-11-22[#19258] [patch] Adding drawing capabilities to BGE PythonCampbell Barton
patch from Mitchell Stokes (moguri) simple use case scene.post_draw = [pyOpenGLFunc] this only needs to be set once, then the funcion runs each redraw. note, this patch also changes how python scripts run (not modules): Dont clear the namespace after running a script, since functions still use the namespace, BGE API is now better when dealing with stale data. made some changes to this patch. - assigning a list didnt decrement the existing list. - initialize as NULL rather then a blank list - dont use string comparisons for the callbacks, pass the python list to use instead. - dont check the list items are callable. python will display an error if they are not. - use python list macros that dont do any type checking sine blender does this when assigning the list ---- from tracker, edited since an updated patch changes some things. Here is a patch to be able to draw to the screen with BGE Python. This will be very handy for GUI stuff. This patch works by having the user register a callback in the scene. Two options are available KX_Scene.pre_draw and KX_Scene.post_draw. The difference between these is when Python draws to the screen (before or after the BGE). Each can take a list of functions. Here is an example that draws a blue semi-transparent
2009-09-30- rather then passing the python namespace dictionary to the controller ↵Campbell Barton
function get the namespace from the converter. - renamed SetPythonDictionary() to SetPyNamespace() - remove IsLight(), GetGameObjectType() existed before this but wasnt used for lights.
2009-09-30option to build the BGE without python, uses existing python check (cmake ↵Campbell Barton
and scons) when python is disabled videotextures are not built.
2009-08-26remove all python api functions deprecated in 2.49Campbell Barton
2009-08-10remove python2.x supportCampbell Barton
2009-06-29BGE PyAPI support for subclassing any BGE game type from python, scripters ↵Campbell Barton
define extra functions on gameObjects. Adding a UI to set the type on startup can be added easily. # ---- class myPlayer(GameTypes.KX_GameObject): def die(self): # ... do stuff ... self.endObject() # make an instance player = myPlayer(gameOb) # gameOb is made invalid now. player.die() # ---- One limitation (which could also be an advantage), is making the subclass instance will return that subclass everywhere, you cant have 2 different subclasses of the same BGE data at once.
2009-06-29BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.xCampbell Barton
2009-06-28BGE Python APICampbell Barton
Remove the last of the odd C++/python wrapper code from http://www.python.org/doc/PyCPP.html (~1998) * Use python subclasses rather then having fake subclassing through get/set attributes calling parent types. * PyObject getset arrays are created while initializing the types, converted from our own attribute arrays. This way python deals with subclasses and we dont have to define getattro or setattro functions for each type. * GameObjects and Scenes no longer have attribute access to properties. only dictionary style access - ob['prop'] * remove each class's get/set/dir functions. * remove isA() methods, can use PyObject_TypeCheck() in C and issubclass() in python. * remove Parents[] array for each C++ class, was only used for isA() and wasnt correct in quite a few cases. * remove PyTypeObject that was being passed as the last argument to each class (the parent classes too). TODO - * Light and VertexProxy need to be converted to using attributes. * memory for getset arrays is never freed, not that bad since its will only allocates once.
2009-06-092.50:Brecht Van Lommel
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD Notes: * Game and sequencer RNA, and sequencer header are now out of date a bit after changes in trunk. * I didn't know how to port these bugfixes, most likely they are not needed anymore. * Fix "duplicate strip" always increase the user count for ipo. * IPO pinning on sequencer strips was lost during Undo.
2009-04-202.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender ↵Brecht Van Lommel
-r19323:HEAD Notes: * blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20BGE Python APICampbell Barton
- More verbose error messages. - BL_Shader wasnt setting error messages on some errors - FilterNormal depth attribute was checking for float which is bad because scripts often expect ints assigned to float attributes. - Added a check to PyVecTo for a tuple rather then always using a generic python sequence. On my system this is over 2x faster with an optmized build.
2009-04-19BGE Python APICampbell Barton
removed redundant (PyObject *self) argument from python functions that are not exposed to python directly.
2009-04-19BGE Python API cleanup - no functionality changesCampbell Barton
- comments to PyObjectPlus.h - remove unused/commented junk. - renamed PyDestructor to py_base_dealloc for consistency - all the PyTypeObject's were still using the sizeof() their class, can use sizeof(PyObjectPlus_Proxy) now which is smaller too.