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
2015-11-26BGE: Fix ray cast with unfound property.Porteries Tristan
To return a valid ray cast result the object must not be NULL and KX_RayCast::RayTest must return true.
2015-11-26Fix T46870: bge globalDict kept between sessionsCampbell Barton
2015-11-24BGE: Save screenshots in a different threadSybren A. Stüvel
This patch allows the game engine to keep running while performing things like PNG compression and disk I/O. As an example, my crowd simulation rasterizer saves a screenshot for every frame. This now takes up 13 msec per frame, which was 31 msec before this patch. Effectively, it allows the simulation to save every frame and still run at 60 FPS. Reviewers: lordloki, moguri, panzergame Reviewed By: moguri, panzergame Projects: #game_engine Differential Revision: https://developer.blender.org/D1507
2015-11-22Error out on Windows if driver does not support OpenGL 2.1 with an errorAntony Riakiotakis
messagebox.
2015-11-22Remove vertex array support from GPUBuffers. Remove USER_DISABLE_VBO. AllAntony Riakiotakis
GPUBuffer rendering is now done using vertex buffers. Vertex arrays are completely removed from GL 3.2 core profile, so we'll have to do this change at some point anyway. This commit, though big, is not modifying blender in any way. Use should be exactly as if the vetex buffer option is constantly on.
2015-11-12Cleanup: unused definesCampbell Barton
2015-11-10BGE: allow setting velocity to zero in a motion actuator.Sybren A. Stüvel
The motion actuator goes out of its way to prevent setting zero velocities, which should actually be supported. This patch just works around it as a first test. We should investigate whether the flags `m_bitLocalFlag.ZeroLinearVelocity` and `m_bitLocalFlag.ZeroAngularVelocity` are actually needed/desired at all. One of the issues that's already visible with this simple change, is that objects aren't actually frozen but still move a little bit; see test with {F241908}. Reviewers: lordloki, hg1, moguri, panzergame Reviewed By: lordloki, panzergame Differential Revision: https://developer.blender.org/D1545
2015-11-09Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.Bastien Montagne
We have callbacks for that, they also do some checks and help ensure things are done correctly. Only place where this is assumed not true is blenloader (since here we may affect refcount of library IDs as well...).
2015-11-05BGE: Cleanup occlusion buffer in CcdPhysicsEnvironment.cppPorteries Tristan
This patch cleanup spaces/braces and newlines. Reviewers: moguri, kupoman Reviewed By: moguri, kupoman Subscribers: kupoman Differential Revision: https://developer.blender.org/D1607
2015-11-03BGE: Remove KX_IPOActuator.Porteries Tristan
KX_IPOActuator is not used since 2.4. This patch removes: - KX_IPOActuator.h/cpp; - Python doc; - Write of IPO actuator in write.c; - Allocation of IPOactuator in sca.c; - Conversion in KX_ConvertActuators.cpp; - Initialization of the python proxy in KX_PythonInitTypes.cpp; - Other minor remove in logic_windows.c and in KX_PythonInit.cpp. Reviewers: sybren, campbellbarton Reviewed By: campbellbarton Subscribers: moguri Differential Revision: https://developer.blender.org/D1603
2015-10-30BGE: Fix SetMass function affecting own object gravity.Jorge Bernal
Each time we setted the mass the own object gravity was divided by its old mass (i.e you could convert you car in a flying DeLorean with a simple mass car modification). A note will be included in release notes due to retro compability issues.
2015-10-29BGE: Fix T38986: Start object position not initialized in IPO.Porteries Tristan
The start position must be initialized at the first call of KX_IpoSGController::Update when m_ipo_start_initialized is to false, not when also the frame time is not 0.
2015-10-29BGE: Cleanup KX_IPO_SGCOntroller.Porteries Tristan
- Add spaces around operators. - Replace !(a == b) by a != b - Add "f" at end of float value. - Remove extras lines in fonctions declaration. - Remove indentation to align attributes definition.
2015-10-29BGE: Fix T46338 replace mesh from an other scene.Porteries Tristan
To make consistent with KX_GameObject.replaceMesh, we don't allow this behavior but print an error message for the replace mesh actuator. e.g : Warning: object "Cube" from ReplaceMesh actuator "Edit Object" uses a mesh not owned by an object in scene "scene1" Reviewers: youle.
2015-10-29BGE: Fix T35188: Duplicate an instance of group.Porteries Tristan
This behavior caused a double free. Before when we duplicated an instance of a group the new instance keep the pointer of the group but was not added in the group instance list (normal). And during the object deletion we tried to remove the object in the instance list but anyways if it failed decrement the reference count. Set the group and the instance list to NULL in ProcessReplica avoid these kind of problems.
2015-10-28BGE: Fix T45945: Action bouncing.Porteries Tristan
Bug introduced in 583fa7d1e, KX_GameObject.setActionFrame can make BL_Action::m_starttime negative. But in BL_Action::Update m_starttime is set to the current time if it's negative. To fix it we use a boolean BL_Action::m_initializedTime to know if we should initialize the time in BL_Action::Update, it's more stable than comparing times. Tested with bug task T45945 and T32054, with an extra patch about to fix suspend resume scene issues with actions : D1569
2015-10-27BGE: Fix T43218: Text of framerate and profile glitch in Multitexture shadingUlysse Martin
Fix T43218: Text of framerate and profile glitch in Multitexture shading Reviewers: lordloki, panzergame Reviewed By: panzergame Subscribers: medved Projects: #game_engine Maniphest Tasks: T43218 Differential Revision: https://developer.blender.org/D1536
2015-10-27BGE: Fix T31357: wrong zoom when sets camera.Porteries Tristan
This patch makes independant the override camera zoom and the default camera object zoom. The override zoom is 2.0f and the camera object zoom is computed with the RegionView3D camera zoom. These features are only used for the embedded BGE, so there's no compatibility issues with the blenderplayer. I let the override zoom with a setter to allow later to create an override camera in blenderplayer easily. Tested with the 3 framing modes in embedded and standalone.
2015-10-26BGE: generic python callback list + replace KX_PythonSeq.Porteries Tristan
I made this patch to declared a python list without converting all elements in python object (too slow) or use a CListValue which required CValue items (too expensive in memory). In the case of a big list of points like a collision contacts points list, to use a CListValue we must implement a new class based on CValue for 3D vector to create a python proxy even if mathutils do it perfectly, we must also convert all points (frequently ~100 points) when fill the CListValue even if the list is not used (in the case of the collision callback). The easy way is to use callback (it doesn't worth to do an inheritance) which convert the item in PyObject only during an acces. 5 callbacks are used : - Check if the list is valid = allow acces (like PyObjectPlus.invalid) - Get the list size - Get an item in the list by index. - Get an item name in the list by index (used for operator `list["name"]`) - Set an item in the list at the index position. All of these callback take as first argument the client instance. Why do we use a void * for the client instance ? : In KX_PythonInitTypes.cpp we have to initialize each python inherited class, if we use a template (the only other way) we must add this class each time we use a new type with in KX_PythonInitTypes.cpp To check if the list can be accessed from python by the user, we check if the python proxy, which is the `m_base` member, is still a valid proxy like in PyObjectPlus. But we can use a callback for more control of user access (e.g a list of collision point invalidate a frame later, in this case no real python owner). This python list is easily defined with : ``` CPythonCallBackList( void *client, // The client instance PyObject *base, // The python instance which owned this list, used to know if the list is valid (like in KX_PythonSeq) bool (*checkValid)(void *), // A callback to check if this list is till valid (optional) int (*getSize)(void *), // A callback to get size PyObject *(*getItem)(void *, int), // A callback to get an item const char *(*getItemName)(void *, int), // A callback to get an item name (optional) use for acces by string key bool (*setItem)(void *, int, PyObject *) // A callback to set an item (optional) ) ``` To show its usecase i replaced the odd KX_PythonSeq, it modify KX_Gameobject.sensors/controllers/actuators, SCA_IController.sensors/actuators and BL_ArmatureObject.constraints/channels. Example : {F245193}, See message in console, press R to erase the object and see invalid proxy error message. Reviewers: brita_, #game_python, youle, campbellbarton, moguri, agoose77, sergey Reviewed By: campbellbarton, moguri, agoose77, sergey Subscribers: sergey Projects: #game_engine Differential Revision: https://developer.blender.org/D1363
2015-10-26Cleanup: warning & whitespaceCampbell Barton
2015-10-25BGE: Cleanup: Code style BL_ShaderThomas Szepe
Reviewers: lordloki, youle, campbellbarton, sergey, kupoman, moguri, panzergame Reviewed By: panzergame Projects: #game_engine Differential Revision: https://developer.blender.org/D1397
2015-10-25BGE: Fix issues with async libload.Porteries Tristan
This patch fixes: - the call of LibFree on a unfinished loaded library; - memory leak created on end of game : the async libraries are loaded but not converted, so not freed with the master scene. Reviewers: campbellbarton, sybren, youle, hg1, moguri, lordloki Reviewed By: moguri, lordloki Differential Revision: https://developer.blender.org/D1571
2015-10-23BGE: Fix T30179 action actuator not stoped when state changed.Porteries Tristan
The function SCA_IActuator::DecLink is now under virtual : in some case the actuator have to know when is useless.
2015-10-22BGE: Fix T46556: check on null sound datablock pointer.Porteries Tristan
2015-10-21BGE: Cleanup ConvertMaterial function.Porteries Tristan
- cleanup spaces; - add braces; - remove indendation around operator.
2015-10-21BGE: Fix physics meshes conversion with modifiers.Porteries Tristan
Previously meshes with modifiers were considerate as empty (no polys).
2015-10-20Cleanup: remove _POSIX_C_SOURCE undefineCampbell Barton
2015-10-19BGE: Cleanup BL_ActionPorteries Tristan
Remove initialization of m_endtime : fix compile about previous BL_Action cleanup.
2015-10-19BGE: Cleanup BL_Action.Porteries Tristan
- Rename m_localtime to m_localframe to avoid ambiguity : it's a count for the actual action frame, not time. - Delete m_end : it's unused.
2015-10-19BGE: Fix T46381 : last action frame not updated.Porteries Tristan
It fix T46381. Normally BL_Action::Update (manage action time, end, loop…) should be called the same number of times as BL_Action::UpdateIPO (update action position, scale ect… in the game object). But the bug report shows that UpdateIPO is called one less time than Update. To fix it i revert the commit 362b25b38287cb75e4d22b30bdbc7f47e8eb3fdf and implement a mutex in BL_Action::Update. Example file : {F245823} Reviewers: lordloki, kupoman, campbellbarton, youle, moguri, sybren Reviewed By: youle, moguri, sybren Maniphest Tasks: T39928, T46381 Differential Revision: https://developer.blender.org/D1562
2015-10-17BGE: Use references in CcdPhysicsEnvironment::RemoveConstraint.Porteries Tristan
It avoids assert calls on rigid body destructor.
2015-10-15Cleanup: BLO_read: linking API arg order and name.Bastien Montagne
linking API funcs would use 'name, idcode', when all other code here uses (more sensible) 'idcode, name'. Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and 'idname' arg name when we expect a complete ID name. And here too, idcode shall be short, not int!
2015-10-14BGE: Fix animations update when scene is suspended.Porteries Tristan
2015-10-13Fix T46458: BGE Crash on loadCampbell Barton
regression from 96dd213e7
2015-10-12Cleanup & rework of BLO_linking code.Bastien Montagne
This commits does mostly two things: * Get rid of bContext parameter: I can see no real good reason to pass such a high-level data to such low-level code... It also makes it more difficult to call when you do not have a context available. * Cleanup the instantiating part. Last point is the most risky - previous code was sometimes quite confusing and hard to follow, from tests nothing behaves differently in new code, but some hidden corner case may show up. Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
2015-10-12Cleanup in BLO API: rename 'append' funcs to 'link', since none do append, ↵Bastien Montagne
but only linking of datablocks!
2015-10-11BGE: Change KX_WolrdInfo mathutils vector to colorThomas Szepe
Change the mathutils callback from vector to color for mistColor, backgroundColor and ambientColor. Reviewers: lordloki, campbellbarton, panzergame, moguri, sybren Reviewed By: panzergame, moguri, sybren Projects: #game_engine, #game_logic Differential Revision: https://developer.blender.org/D1432
2015-10-11BGE: Adding a Max Jumps value to the character physic windowThomas Szepe
Actually we only have a Python API that allows to change the max jumps value. The patch also allows non programmers to change the maximum numbers of jumps. Reviewers: panzergame, sybren, campbellbarton, lordloki, moguri, agoose77 Reviewed By: lordloki, moguri Projects: #game_engine Differential Revision: https://developer.blender.org/D1302
2015-10-11BGE: Change character jumping to charThomas Szepe
* Change the character jumping variables and methods from int to char. * Limit the maxJumps integer value from 0 to 255. * Allow to set the minimum jump amount to 0. Reviewers: panzergame, lordloki, moguri Reviewed By: lordloki, moguri Subscribers: agoose77 Projects: #game_engine Differential Revision: https://developer.blender.org/D1305
2015-10-11BGE: Add recursive dupli group deletionThomas Szepe
This patch will delete all associated objects from a group instance (dupli group) if the are deleted. Reviewers: brita_, sybren, lordloki, moguri Reviewed By: lordloki, moguri Projects: #game_engine Maniphest Tasks: T36388 Differential Revision: https://developer.blender.org/D1205
2015-10-11BGE: Adding a screenshot function to game actuatorThomas Szepe
Extending the existing game actuator with a screenshot function, to give also non programmers the ability to take screenshots in the BGE. Reviewers: lordloki, campbellbarton, moguri Reviewed By: lordloki, moguri Subscribers: lordloki, Genome36 Projects: #game_engine Differential Revision: https://developer.blender.org/D651
2015-10-10Fix various compiler warnings.Brecht Van Lommel
2015-10-09BGE Fix T41943: Zeroing out angular velocity not possibleSybren A. Stüvel
This patch makes it possible to zero out angular velocity. tiny angular velocities may cause instabilities, according to the discussion in T41943, so they are mapped to (0, 0, 0) instead. It also applies the same reasoning to the linear velocity, unifying the different approaches. Differential revision: D952
2015-10-08BGE: Use BLI_task instead of pthread in KX_BlenderSceneConverter.Porteries Tristan
2015-10-08BLI_path api, minor changes to CWD handlingCampbell Barton
- BLI_current_working_dir's return value must be checked, since it may fail. - BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure. - avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
2015-10-07BGE : Collision mask support in raycast + and raycast cleanup.Porteries Tristan
I have removed the m_pHitObject, m_xray and m_testPropName and replace them by a temporary struct "RayCastData" which contains these datas and a collision mask. Finally i add a collision mask argument in the python function "rayCast" : ``` rayCast(to, from, dist, prop, face, xray, poly, mask) ``` It can be useful to hit only object which are on the right colision layer. for example if you have hitbox for a charater or vehicle you don't want to hit it with raycast. test file : {F237337} left mouse click on two planes and see console messages. Somewhat more elaborate test file by @sybren: {F237779} Look around and click on the cubes. One cube lamp responds, the other doesn't, based on their collision groups. Reviewers: moguri, hg1, agoose77, campbellbarton, sybren Reviewed By: agoose77, campbellbarton, sybren Subscribers: campbellbarton, sergey, blueprintrandom, sybren Projects: #game_engine, #game_physics Differential Revision: https://developer.blender.org/D1239
2015-10-07Fix for T41536: 2.71 getActionFrame no longer returns frames accuratelyMitchell Stokes
We now keep actions around when they are finished playing so scripts can still get access to information such as the current frame. Playing a new action in the same layer still overwrites the previous action as before this commit. Using an explicit KX_GameObject.stopAction() will free the memory. The action is also freed when the KX_GameObject is freed as before.
2015-10-07Fix T45886: cont.deactivate(ActionActuatorInPropertyMode) does not workMitchell Stokes
Make sure the Action Actuator actually deactivates when given a negative event while using the property play mode.
2015-10-01BGE: Fix T46302: abort call for unnormalized quaterions.Porteries Tristan
2015-09-20Fix compiling with GEJulian Eisel
Enabled Freestyle instead of GE :| Sry