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
2016-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
2016-03-13More compile fixes - Game EngineJoshua Leung
2016-02-15Cleanup: reorganize BKE ID tagging functions.Bastien Montagne
BKE_main_id_tag_/BKE_main_id_flag_ were horrible naming now that we split those into flags (for presistent one) and tags (for runtime ones). Got rid of previous 'tag_' functions behavior (those who were dedicated shortcuts to set/clear LIB_TAG_DOIT), so now '_tag_' functions affect tags, and '_flag_' functions affect flags.
2015-12-27Split id->flag in two, persistent flags and runtime tags.Bastien Montagne
This is purely internal sanitizing/cleanup, no change in behavior is expected at all. This change was also needed because we were getting short on ID flags, and future enhancement of 'user_one' ID behavior requires two new ones. id->flag remains for persistent data (fakeuser only, so far!), this also allows us 100% backward & forward compatibility. New id->tag is used for most flags. Though written in .blend files, its content is cleared at read time. Note that .blend file version was bumped, so that we can clear runtimeflags from old .blends, important in case we add new persistent flags in future. Also, behavior of tags (either status ones, or whether they need to be cleared before/after use) has been added as comments to their declaration. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1683
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-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-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-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-08BGE: Use BLI_task instead of pthread in KX_BlenderSceneConverter.Porteries Tristan
2015-07-09Use it->second instead of (*it).second in KX_BlenderSceneConverter.Porteries Tristan
2015-07-02BGE: Fix T45267 Lib load without material caching.Porteries Tristan
2015-07-01BGE: Fix T44069 playing action during libfree.Porteries Tristan
2015-05-19BGE: Fix T40555: LibLoad material caching issuePorteries Tristan
Previously we don't merge material cached list, it create dangling pointer and memory leak. Now we merge material cache list during the scene merge, and remove material in this list during the library free. Reviewers: agoose77, dfelinto, hg1, pgi, campbellbarton, moguri Reviewed By: campbellbarton, moguri Subscribers: campbellbarton, youle, kupoman Projects: #game_engine Differential Revision: https://developer.blender.org/D1278
2015-05-04BGE: Cleanup KX_BlenderSceneConverter.cppPorteries Tristan
This commit is a little cleanup for whitspaces, braces, spaces around operators and useless keywords struct/class. Reviewers:sybren
2015-05-02Fix ghash assert during BGE libload.Porteries Tristan
The assert message was caused by the multi call of BLO_library_append_begin in KX_BlenderSceneConverter::LinkBlendFile.
2015-04-04Missed in recent cleanupCampbell Barton
2015-03-24BGE: Remove BlenderWorldInfoThomas Szepe
This patch will remove the BlenderWorldInfo and move the source into KX_WorldInfo. Reviewers: brecht, moguri Reviewed By: brecht, moguri Differential Revision: https://developer.blender.org/D156
2015-02-21scene conversion: style cleanupInes Almeida
2015-02-21gameengine: removing addInitFromFrame hackInes Almeida
2015-01-09Fix T43174: "Record animation" does not update fcurve handlesBastien Montagne
`INSERT_FAST` implies you call `calchandles_fcurve()` at the end... For now, since we do not store edited FCurves nor can we get them easily (requires RNA...), just update handles of all fcurves, it's much more performant than removing usage of `INSERT_FAST` anyway.
2014-05-21BGE LibNew: Only warn about meshes with users in debug builds.Mitchell Stokes
This information only really seems to be for helping developers track down bugs, and isn't really something the user needs. So, lets not spam their console.
2014-05-15Fix T40199: bge.logic.LibFree() could cause crashes by leaving dangling ↵Mitchell Stokes
pointers in the rasterizer.
2014-05-14Fix T40172: LibFree() crashes with shared materials (e.g., from multiple ↵Mitchell Stokes
LibNew() calls)
2014-05-02Fix T39932: LibNew can't find LibLoaded meshes.Mitchell Stokes
LibNew now searchs dynamic (i.e., LibLoaded) mains instead of just the current main.
2014-04-24BGE Cleanup: Moving reinstancing physics shapes from KX_ConvertPhysicsObject ↵Mitchell Stokes
to PHY_IPhysicsController This was the last item in KX_ConvertPhysicsObject. Therefore, KX_ConvertPhysicsObject.h and KX_ConvertPhysicsObjects.cpp have been removed.
2014-04-24BGE Cleanup: Reducing KX_BlenderSceneConverter's dependence on Bullet.Mitchell Stokes
* Moving the BlenderDebugDraw (derived from btIDebugDraw) from KX_BlenderSceneConverter to CcdPhysicsEnvironment * Moving CcdPhysicsEnvironment initialization to CcdPhysicsEnvironment (this could probably be cleaned up some more with some sort of factory, or at least moving code to CcdPhysicsEnvironment's constructor) * Simplifying physics environment initialization (went from two switches to one)
2014-04-24BGE Cleanup: Removing the empty KX_ClearBulletSharedShapes() functionMitchell Stokes
2014-03-25Fix T38929: BGE: Strange behaving from addObject after trying to add an ↵Mitchell Stokes
nonexisting overlay scene If bge.logic.addScene() could not find the scene to add it would add the first scene again, which is just silly. Now, if no scene is found, a warning is printed and nothing is added.
2014-02-14Code cleanup: duplicate headersCampbell Barton
2014-01-22Revert "Fix T37920: BGE LibLoad failed for meshes with no materials"Campbell Barton
This reverts commit 6a473305af22468abfc4c4f8f3002dc0a97fffd7. Caused T38296, need to investigate this further but for now better not leave blender in unstable state.
2013-12-30Fix T37920: BGE LibLoad failed for meshes with no materialsCampbell Barton
2013-12-30Main API: refactor naming, use BKE_main_ prefix and add main arg.Campbell Barton
2013-12-30Fix for crash with game engines LibLoad featureCampbell Barton
2013-12-09Game Engine: Option to record static objects animationJames Yonan
2013-11-04BGE: Cleaning up the BGE's physics code and removing KX_IPhysicsController ↵Mitchell Stokes
and KX_BulletPhysicsController. Instead, we just use PHY_IPhysicsController, which removes a lot of duplicate code. This is a squashed commit of the following: BGE Physics Cleanup: Fix crashes with LibLoading and replication. Also fixing some memory leaks. BGE Physics Cleanup: Removing KX_IPhysicsController and KX_BulletPhysicsController. BGE Physics Cleanup: Moving the replication code outside of KX_BlenderBulletController and switching KX_ConvertPhysicsObjects to create a CcdPhysicsController instead of a KX_BlenderBulletController. BGE Physics Cleanup: Getting rid of an unsued KX_BulletPhysicsController.h include in KX_Scene.cpp. BGE Physics Cleanup: Removing unused KX_IPhysicsController and KX_BulletPhysicsController includes. BGE Physics Cleanup: Removing m_pPhysicsController1 and GetPhysicsController1() from KX_GameObject. BGE Physics Cleanup: Remove SetRigidBody() from KX_IPhysicsController and remove GetName() from CcdPhysicsController. BGE Physics Cleanup: Moving Add/RemoveCompoundChild() from KX_IPhysicsController to PHY_IPhysicsController. BGE Physics Cleanup: Removing GetLocalInertia() from KX_IPhysicsController. BGE Physics Cleanup: Making BlenderBulletCharacterController derive from PHY_ICharacter and removing CharacterWrapper from CcdPhysicsEnvironment.cpp. Also removing the character functions from KX_IPhysicsController. BGE Physics Cleanup: Removing GetOrientation(), SetOrientation(), SetPosition(), SetScaling(), and GetRadius() from KX_IPhysicsController. BGE Physics Cleanup: Removing GetReactionForce() since all implementations returned (0, 0, 0). The Python interface for KX_GameObject still has reaction force code, but it still also returns (0, 0, 0). This can probably be removed as well, but removing it can break scripts, so I'll leave it for now. BGE Physics Cleanup: Removing Get/SetLinVelocityMin() and Get/SetLinVelocityMax() from KX_IPhysicsController. BGE Physics Cleanup: Removing SetMargin(), RelativeTranslate(), and RelativeRotate() from KX_IPhysicsController. BGE Physics Cleanup: Using constant references for function arguments in PHY_IPhysicsController where appropriate. BGE Physics Cleanup: Removing ApplyImpulse() from KX_IPhysicsController. BGE Physics Cleanup: Removing ResolveCombinedVelocities() from KX_IPhysicsController. BGE Physics Cleanup: Accidently removed a return when cleaning up KX_GameObject::PyGetVelocity(). BGE Physics Cleanup: Remove GetLinearVelocity(), GetAngularVelocity() and GetVelocity() from KX_IPhysicsController. The corresponding PHY_IPhysicsController functions now also take Moto types instead of scalars to match the KX_IPhysicsController interface. BGE Physics Cleanup: Moving SuspendDynamics, RestoreDynamics, SetMass, GetMass, and SetTransform from KX_IPhysicsController to PHY_IPhysicsController. BGE Physics Cleanup: PHY_IPhysicsEnvironment and derived classes now use the same naming scheme as PHY_IController. BGE Physics Cleanup: PHY_IMotionState and derived classes now use the same naming convention as PHY_IController. BGE Phsyics Cleanup: Making PHY_IController and its derived classes follow a consistent naming scheme for member functions. They now all start with capital letters (e.g., setWorldOrientation becomes SetWorldOrientation). BGE Physics Cleanup: Getting rid of KX_GameObject::SuspendDynamics() and KX_GameObject::RestoreDynamics(). Instead, use the functions from the physics controller. BGE: Some first steps in trying to cleanup the KX_IPhysicsController mess. KX_GameObject now has a GetPhysicsController() and a GetPhysicsController1(). The former returns a PHY_IPhysicsController* while the latter returns a KX_IPhysicsController. The goal is to get everything using GetPhysicsController() instead of GetPhysicsController1().
2013-11-04BGE Rasterizer Cleanup: Removing the Singletexture material mode. More ↵Mitchell Stokes
conversion code will probably be needed.
2013-11-04BGE Rasterizer Cleanup: Removing RAS_IRenderTools and moving the ↵Mitchell Stokes
functionality to RAS_IRasterizer. RAS_OpenGLRasterizer is a bit of a mess now with references to Ketsji and other modules it shouldn't be accessing.
2013-08-04code cleanup: replace strncpy -> BLI_strncpy, skip first 2 chars when making ↵Campbell Barton
a hash from the object name.
2013-07-16BGE: Fix for [#36023] "Objects of added scene are lit by lights of current ↵Mitchell Stokes
scene" reported by Raf Colson (raco). The material caching now keeps a cache per scene. Before materials from different scenes were sharing the same cache.
2013-06-21BGE: fix [#32775] LibFree crashingDaniel Stokes
Used the engine's RemoveScene (which ultimately calls the converter's RemoveScene) instead of the converter's RemoveScene when the converter free a blend file. This handles the scene removal in a safer fashion and solves the crash described in part 2 of the bug report. Part 1 no longer appears to cause a crash.
2013-06-20BGE: fix [#35447] LibLoad Meshes and Scenes causes crash of blenderDaniel Stokes
KX_BlenderSceneConverter's destructor freed the contents of several std::vectors without removing those contents from the vectors. Later these vectors are iterated through. Making sure the vectors get cleared solves this problem.
2013-05-11BGE: Fix for [#34044] "Objects with no material don't have their "face ↵Mitchell Stokes
image" always working on bge" reported by Dalai Felinto (dfelinto). NULL materials are no longer cached.
2013-03-17use const pointers for file loading and booleans for animation system return ↵Campbell Barton
values passed as pointers.
2013-02-16BGE: Fix for issue #34242 "It does not render in "P" mode for Game engine if ↵Mitchell Stokes
you UV mapa a face of a cube" reported by joaclint. Material caching can now be disabled for Multitexture and GLSL Materials.
2013-01-23make bullet optional againCampbell Barton
2012-12-24BGE: "Fix" for issue [#33663] "Objects Share Materials / Textures When ↵Mitchell Stokes
Grouped In SingleTexture / MultiTexture Mode" reported by Josiah Lane (solarlune). This commit adds a UI option in the Render properties to enable the new material caching in the converter. This caching can cause problems with Singletexture and Multitexture materials when texface is being used to handle materials. By default this option is enabled and users with broken games have two options: 1) Fix up their materials so they are properly using textures 2) Disable the material caching and take a speed hit during conversion time Regardless of the setting, caching is always enabled for GLSL materials.
2012-12-22BGE: Committing async LibLoad from Swiss. This does the lib loading in a ↵Mitchell Stokes
separate thread to keep the BGE from freezing. Here is an example from the docs: # Print a message when an async LibLoad is done import bge def finished_cb(status): print("Library (%s) loaded in %.2fms." % (status.libraryName, status.timeTaken)) bge.logic.LibLoad('myblend.blend', 'Scene', async=True).onFinish = finished_cb LibLoad() now returns a KX_LibLoadStatus object for information on the library loading. LibNew() and LibFree() are unaffected by this commit. In other words, the async option only works for LibLoad(). Furthermore it only works for Scenes, not Actions or Meshes.
2012-12-19BGE: Some as of yet unmerged work I did in the Swiss branch. These changes ↵Mitchell Stokes
include: * Cleaning up the conversion code to avoid a per-face material conversion. Materials are now stored in buckets and only converted if a new material is found. This replaces some of Campbell's earlier work on the subject. His work wasn't as thorough, but it was much safer for a release. * Shaders are only compiled for LibLoaded materials once. Before they could be compiled twice, which could really slow things down. * Refactoring the rasterizer code to use a strategy design pattern to handle different geometry rendering methods such as immediate mode, vertex arrays and vertex buffer objects. VBOs are added, but they will be disabled in a following commit since they are still slower than vertex arrays with display lists. However, VBOs are still useful for mobile, so it's good to keep them around. * Better multi-uv support. The BGE should now be able to handle more than two UV layers, which should help it better match the viewport.
2012-11-10code cleanup: some warnings and formatting for PyMethodDef's in the BGE.Campbell Barton