Commit Graph

134 Commits

Author SHA1 Message Date
Campbell Barton
ddc2dbc2a4 style cleanup 2012-10-22 08:15:51 +00:00
Campbell Barton
d599b643b7 style cleanup: bge, switch statements mostly.
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
Campbell Barton
4d4664d98f code cleanup: check for msvc directly when using warning pragma's. 2012-10-15 02:15:07 +00:00
Campbell Barton
2fb8292005 style cleanup 2012-09-16 04:58:18 +00:00
Campbell Barton
f608b3c444 code cleanup:
- building without python works again
- rename maxi/mini to i_max/i_min (so thay are available for function names)
- some minor edits to IK stretch setting (no functional changes).
2012-07-29 17:49:14 +00:00
Mitchell Stokes
7fb85e1fb7 BGE LibLoad: Allow the user to disable loading text datablocks if they want to attempt to increase security by not loading potential Python scripts. 2012-07-22 22:58:12 +00:00
Mitchell Stokes
d8e2c475a0 Fix for [#31396] "bge.logic.LibLoad fails to import text blocks" reported by Leonard Ritter.
Blender's import function check's the Text datablocks in main for additional modules for importing. However, libloaded scenes were 1) not loading Text datablocks and 2) not letting bpy know about them. Text datablocks are now loaded if a Scene is loaded and bpy can now looking through extra Mains to find additional modules.
2012-06-21 05:41:06 +00:00
Mitchell Stokes
ebb2dc84fc Some slight refactoring of the BGE's LibLoad code to make things a bit cleaner (no functional changes). 2012-06-07 01:46:28 +00:00
Benoit Bolsee
58bc424b3c BGE #30734: add support for physics linear and angular thresholds and deactivation time from python and GUI.
========================
The linear and angular thresholds set the speed limit (in m/s) and rotation limit (in rad/s)
under which a rigid body will go to sleep (stop moving) if it stays below the limits for a 
time equal or longer than the deactivation time (sleeping is disabled is deactivation time is 
set to 0).
These settings help reducing the processing spent on Physics during the game.

Previously they were only accessible from python but not working because of a bug. 
Now the python functions are working and the settings are available in the Physics panel
of the World settings when using the Blender Game render engine.

Python API:
  import PhysicsConstraints
  PhysicsConstraints.setDeactivationLinearTreshold(float)
  PhysicsConstraints.setDeactivationAngularTreshold(float)
2012-05-29 20:30:33 +00:00
Campbell Barton
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
Campbell Barton
b9a2741f68 code cleanup: remove unused defines 2012-04-23 08:05:02 +00:00
Campbell Barton
07065b27b8 style cleanup 2012-03-28 05:03:24 +00:00
Campbell Barton
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
Campbell Barton
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
Campbell Barton
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
Campbell Barton
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
Campbell Barton
fb4ad50cee use defines for property name lenghths in the BGE, were using 31,32,64,100. 2012-01-16 05:27:11 +00:00
Campbell Barton
6d965f4493 style edits for function declarations 2011-12-30 07:55:15 +00:00
Brecht Van Lommel
f426a74c65 Fix #27696: record animation in game engine not working with pre made fcurves. 2011-11-29 18:37:10 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton
0991bed413 fix some complier warnings and add -Wundef to CMake's default GCC warnings. 2011-09-05 23:40:52 +00:00
Campbell Barton
0cd5dce245 whitespace edits 2011-09-03 02:15:49 +00:00
Joerg Mueller
43ab8e8624 * Merge trunk up to r39790.
* Subversion bump (also for init_userdef_do_versions).
* Minor fix for compilation without ffmpeg.
2011-08-30 08:22:03 +00:00
Campbell Barton
c73d5b939d check for unlikely error when freeing a library blend file from the BGE. 2011-08-28 05:01:16 +00:00
Joerg Mueller
daab78bc61 Merging trunk up to r39145. 2011-08-07 15:25:06 +00:00
Mitchell Stokes
5cc0bb0d1b BGE Animations: The IPO conversion code relied on objects having an adt, but this isn't always the case. object->adt can be NULL, which causes a crash. Now BL_InterpolatorLists are cached by action instead of adt. 2011-08-07 04:57:23 +00:00
Campbell Barton
f77af0a8ce change BLO_library_append_begin to take a main argument rather then a context, means the BGE doesnt need to make a new empty context just to pass as an arg.
added doxygen description too.

this quiets the print when the BGE does linking.
2011-08-05 05:26:19 +00:00
Campbell Barton
e070975ae4 missed this in recent commit. 2011-05-26 22:48:06 +00:00
Brecht Van Lommel
cb12337363 Code cleanup: remove source/kernel module, this wasn't really the kernel of
anything, only contained a hash map and functions to pass command line args
to the game engine. Moved those to container and BlenderRoutines modules.
2011-05-06 20:18:42 +00:00
Campbell Barton
1c6956a4d6 quiet msvc/mingw compiler warnings. 2011-04-10 09:37:04 +00:00
Campbell Barton
a7507e945d fix [#26803] Libs paths are case sensitive in windows
use case insensitive path comparison on windows: BLI_path_cmp
2011-04-06 06:03:48 +00:00
Mitchell Stokes
3384679aec BGE Dynamic Loading:
* Adding keyword arguments to LibLoad
   - load_actions (Default: False) Ensures that all actions are loaded. Otherwise, just actions used by objects in the scene are loaded.
   - verbose (Default: False) Turns on extra prints (eg SceneName: MyScene).
 * Also making error reporting better for when an invalid group/idcode is given.
2011-03-22 02:39:08 +00:00
Mitchell Stokes
500f393bda BGE Dynamic Loading: Fixing a particularly nasty leak that occurred if LibLoad() errored. 2011-03-21 09:32:54 +00:00
Mitchell Stokes
35dbf67c00 Fixing the other crash mentioned in bug #25083. m_current_scene isn't always pointing to valid memory by the time LinkBlendFile is called. So, use the supplied scene_merge scene instead. Scene LibLoad was already doing this, so I just made Mesh and Action follow suit. 2011-03-19 22:47:51 +00:00
Mitchell Stokes
815a795be9 Fixing 1/2 crashes mentioned in bug #25083. This crash happens when LibLoad tries to grab bad mesh data from a previous Load/Free via FindGameMesh(). FindGameMesh() makes use of m_map_mesh_to_gamemesh, so the mesh needs to be removed from this on free. 2011-03-19 22:37:27 +00:00
Campbell Barton
a5e59ede6e pass report list along to BLO_blendhandle_from_file(), avoid unlikely crash in the append operator. 2011-03-12 15:15:40 +00:00
Campbell Barton
a416949382 - BKE_idcode_iter_step() - function to step over all ID codes.
- BLO_blendhandle_get_datablock_names() now takes an arg for the total items in the list, saves the caller counting.
2011-03-12 14:38:00 +00:00
Nathan Letwory
ab523e91d0 doxygen: gameengine/Converter tagged. 2011-02-25 13:30:41 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
Campbell Barton
5a37333053 fixes from r33127 2010-11-17 14:36:19 +00:00
Campbell Barton
0876fce009 rename and negate DISABLE_PYTHON --> WITH_PYTHON 2010-10-31 04:11:39 +00:00
Campbell Barton
8aa4f5ea14 fix for BGE define in recent math changes. 2010-10-22 06:00:12 +00:00
Campbell Barton
bd00aa9727 patch [#23781] Dynamically Load Actions
from Mitchell Stokes (moguri)
2010-10-09 10:45:25 +00:00
Campbell Barton
9b518710c6 update for MingW/CMake
- ignore MSVC warnings when FREE_WINDOWS is defined to quiet warnings.
- the CMake flags were not being set correctly making blender have weirdo colors (no -funsigned-char).
2010-09-15 16:13:32 +00:00
Mitchell Stokes
5c23537daa Committing patch [#23278] (by me)
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)
2010-08-28 02:07:55 +00:00
Campbell Barton
ad4fc20ec9 moved idcode functions into their own file (was added as a todo in the comments), these were mixed in with file reading code - BLO_readfile.h bot these functions are not spesific to reading. 2010-08-10 15:14:19 +00:00
Campbell Barton
64fbe2ee21 Minor modification to how objects are selected for animation baking,
Rather then only baking parent objects. Only bake objects which are have no parents in the original scene.
This allows for parenting and unparenting within the game engine without gaps in the animation curves.
2010-06-10 14:42:24 +00:00
Dalai Felinto
c6bec43330 reverting previous commit from Mitchell. His commit went to the trunk instead of the branch :)
svn merge -r 29067:29066 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2010-05-29 21:31:57 +00:00
Mitchell Stokes
9d3157eed0 Reversing the last merge because I botched it. 2010-05-29 21:22:24 +00:00
Joshua Leung
1cf95d2494 Keying Set Fixes:
* 'Export Keying Set' operator works again - a change in the previous commit broke the created code
* Relative Keying Sets don't get their paths shown 
* Keying Set paths show options for inserting keyframes too now

---

Another attempt at fixing compile troubles, and removed some commented out + obsolete stuff.
2010-03-16 10:18:19 +00:00