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
2009-02-24Making KX_GameObject names read only.Campbell Barton
This was committed in revision 2832 but never accounted for existing object name hashes which existed since revision 2. Its possible to update the names elsewhere but unlikely anyone ever used this successfully so removing.
2009-02-24BGE Py APICampbell Barton
* Made GameLogic.addActiveActuator(actu, bool) to raise an error if the actuator is not in the list. Before it would allow any value as the actuator and fail silently (makes debugging scripts more difficult). * Allow the actuator to be a string which is convenient if you dont want to change the settings of the actuator. * Added activate/deactivate functions to the controller, this is more logical since the GameLogic.addActiveActuator() function is running through the controller anyway. GameLogic.addActiveActuator(controller.getActuator("SomeAct"), True) ...can be replaced with... controller.activate("SomeAct")
2009-02-19"object" and "objectLastCreated" attribute for actuators, deprecates ↵Campbell Barton
getObject/setObject() & getLastCreatedObject() also removed some warnings
2009-02-07BGE Py API cleanup: Camera Actuator.Benoit Bolsee
2009-01-22BGE API cleanup: shape action actuator.Benoit Bolsee
2009-01-21BGE API cleanup: action actuator.Benoit Bolsee
2008-12-29First batch of GE API cleanup.Benoit Bolsee
The principle is to replace most get/set methods of logic bricks by direct property access. To make porting of game code easier, the properties have usually the same type and use than the return values/parameters of the get/set methods. More details on http://wiki.blender.org/index.php/GameEngineDev/Python_API_Clean_Up Old methods are still available but will produce deprecation warnings on the console: "<method> is deprecated, use the <property> property instead" You can avoid these messages by turning on the "Ignore deprecation warnings" option in Game menu. PyDoc is updated to include the new properties and display a deprecation warning for the get/set methods that are being deprecated.
2008-12-09patch from Mitchell StokesCampbell Barton
#18045] [patch] A patch that exposes the rest of the motion functions of KX_GameObject to Python. *applyForce => setForce *applyTorque => setTorque *applyRotation => setDRot *applyMovement => setDLoc
2008-10-30* Build aborts when giving options on command-line when WITH_BF_DOCS=TrueNathan Letwory
- make sure epydoc generation doesn't get a fit over options given on scons command-line -> don't use arguments from command-line.
2008-10-27face transp option CLIP wasnt added to the py api.Campbell Barton
added gameObject.replaceMesh(meshname) - needed this for an automatically generated scene where 100's of objects would have needed logic bricks automatically added. Quicker to run replace mesh on all of them from 1 script.
2008-10-21renamed WITH_BF_BPYDOC to WITH_BF_DOCS, added SConscript for building BGE ↵Campbell Barton
docs too.
2008-10-18Added joystick epydocs, only changed incorrect docstrings in ↵Campbell Barton
SCA_JoystickSensor.cpp patch [#17857] HotKeys Update by dfelinto - SmoothStroke and Anchored. Made own edits, removed videoscape and added curve and armature specials.
2008-10-15cleanup epydoc errorsCampbell Barton
2008-09-25BGE patch: add advanced parameters for SoftBody. Add Rasterizer.drawLine() ↵Benoit Bolsee
Python function.
2008-09-23BGE patch #17569 approved: Make FrameProp: work in Shape Action. PyDoc updated.Benoit Bolsee
2008-09-13Game engine: added Rasterizer.get/setMaterialMode to set texface,Brecht Van Lommel
multitexture or glsl materials. This does not affect existing scenes, only newly created ones.
2008-09-10BGE bug #17549: fix crash on removeParent() with static mesh. Fix scaling ↵Benoit Bolsee
bug on setParent(). Add python setWorldPosition() to allow setting object position in world coordinate regardless if it is a root or a child object.
2008-09-05BGE Py APICampbell Barton
added exception messages for replaceMesh.setMesh() and allowed None as an argument. added exception messages for other BGE module functions.
2008-09-05Merge of first part of changes from the apricot branch, especiallyBrecht Van Lommel
the features that are needed to run the game. Compile tested with scons, make, but not cmake, that seems to have an issue not related to these changes. The changes include: * GLSL support in the viewport and game engine, enable in the game menu in textured draw mode. * Synced and merged part of the duplicated blender and gameengine/ gameplayer drawing code. * Further refactoring of game engine drawing code, especially mesh storage changed a lot. * Optimizations in game engine armatures to avoid recomputations. * A python function to get the framerate estimate in game. * An option take object color into account in materials. * An option to restrict shadow casters to a lamp's layers. * Increase from 10 to 18 texture slots for materials, lamps, word. An extra texture slot shows up once the last slot is used. * Memory limit for undo, not enabled by default yet because it needs the .B.blend to be changed. * Multiple undo for image painting. * An offset for dupligroups, so not all objects in a group have to be at the origin.
2008-09-03BGE patch 17547 approved: Cleaned up pydoc for BGE, compiles now error freeBenoit Bolsee
2008-08-31BGE patch 17547 applied in trunk: Cleaned up pydoc for BGE, compiles now ↵Benoit Bolsee
error free
2008-08-29BGE Py API - GameKeys.EventToString() utility function, makes key ↵Campbell Barton
configuration menu's easier to write. own error with blenderplayer, wasnt decreffing the GameLogic module, probably didnt matter since python was restarted anyway, but is incorrect.
2008-08-27BGE patch: KX_GameObject::rayCast() improvements to have X-Ray option, ↵Benoit Bolsee
return true face normal and hit polygon information. rayCast(to,from,dist,prop,face,xray,poly): The face paremeter determines the orientation of the normal: 0 or omitted => hit normal is always oriented towards the ray origin (as if you casted the ray from outside) 1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect) The ray has X-Ray capability if xray parameter is 1, otherwise the first object hit (other than self object) stops the ray. The prop and xray parameters interact as follow: prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray. prop off, xray on : idem. prop on, xray off: return closest hit if it matches prop, no hit otherwise. prop on, xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray. if poly is 0 or omitted, returns a 3-tuple with object reference, hit point and hit normal or (None,None,None) if no hit. if poly is 1, returns a 4-tuple with in addition a KX_PolyProxy as 4th element. The KX_PolyProxy object holds information on the polygon hit by the ray: the index of the vertex forming the poylgon, material, etc. Attributes (read-only): matname: The name of polygon material, empty if no material. material: The material of the polygon texture: The texture name of the polygon. matid: The material index of the polygon, use this to retrieve vertex proxy from mesh proxy v1: vertex index of the first vertex of the polygon, use this to retrieve vertex proxy from mesh proxy v2: vertex index of the second vertex of the polygon, use this to retrieve vertex proxy from mesh proxy v3: vertex index of the third vertex of the polygon, use this to retrieve vertex proxy from mesh proxy v4: vertex index of the fourth vertex of the polygon, 0 if polygon has only 3 vertex use this to retrieve vertex proxy from mesh proxy visible: visible state of the polygon: 1=visible, 0=invisible collide: collide state of the polygon: 1=receives collision, 0=collision free. Methods: getMaterialName(): Returns the polygon material name with MA prefix getMaterial(): Returns the polygon material getTextureName(): Returns the polygon texture name getMaterialIndex(): Returns the material bucket index of the polygon. getNumVertex(): Returns the number of vertex of the polygon. isVisible(): Returns whether the polygon is visible or not isCollider(): Returns whether the polygon is receives collision or not getVertexIndex(vertex): Returns the mesh vertex index of a polygon vertex getMesh(): Returns a mesh proxy New methods of KX_MeshProxy have been implemented to retrieve KX_PolyProxy objects: getNumPolygons(): Returns the number of polygon in the mesh. getPolygon(index): Gets the specified polygon from the mesh. More details in PyDoc.
2008-08-27get/set Angular velocity for KX_GameObjects python api and for the AddObject ↵Campbell Barton
actuator. Needed so objects created in an explosion could start spinning without having motion actuators and collision sensors on each item.
2008-08-23BGE state system improvement: the sensor with Level option enabled will ↵Benoit Bolsee
trigger the controller of a newly activated state, even if the sensor is already connected to an active state; new isTriggered() python function to determine which sensor triggered the current controller. Previously, this behaviour was available only for sensors that were not connected to any active state, which was forcing the game designer to duplicate sensors in some cases. For example the Always sensors used to initialize the states needed to be duplicated for each state. With this patch, a single Always sensor with Level option enabled will suffice to initialize all the states. A Python controller can determine which sensor did trigger with the new SCA_ISensor::isTriggered() function. Notes: - When a sensor with level option enabled is connected to multiple controllers, only those of newly activated states will be triggered. The controllers of already activated states will receive no trigger, unless the sensor internal state toggled, in which case all the controllers are triggered as always. - The old isPositive() function returns the internal state of the sensor, positive or negative; the new isTriggered() function returns 1 only for sensors that generated an event in the current frame.
2008-08-22BGE Python API - GameLogic.getBlendFileList(path='//') to return a list of ↵Campbell Barton
blend's in the current directory. Needed for creating a level selector that lists all files in the level directory. CMakeFile include path to compile with recent changes.
2008-08-17BGE patch: New Delay sensor (derived from patch #17472) Benoit Bolsee
Introduction of a new Delay sensor that can be used to generate positive and negative triggers at precise time, expressed in number of frames. The delay parameter defines the length of the initial OFF period. A positive trigger is generated at the end of this period. The duration parameter defines the length of the ON period following the OFF period. A negative trigger is generated at the end of the ON period. If duration is 0, the sensor stays ON and there is no negative trigger. The sensor runs the OFF-ON cycle once unless the repeat option is set: the OFF-ON cycle repeats indefinately (or the OFF cycle if duration is 0). The new generic SCA_ISensor::reset() Python function can be used at any time to restart the sensor: the current cycle is interrupted and no trigger is generated.
2008-08-14Python API get/setObject update for Actuators. (SetParent, AddObject, Camera ↵Campbell Barton
and TrackTo) * bugfix for BGE python api - SetParent actuator getObject would segfault if the object was not set. * Added utility function ConvertPythonToGameObject() that can take a GameObject, string or None and set the game object from this since it was being done in a number of places. * allow setObject(None), since no object is valid for actuators, Python should be able to set this. * added optional argument for getObject() so it returns the KX_GameObject rather then its name, would prefer this be default but it could break existing games.
2008-08-04BGE patch #17398 approved: implementation of BGE method getVectTo().Benoit Bolsee
2008-07-24BGE patch: Add PyDoc for new logic bricks, set exception message on Py ↵Benoit Bolsee
error, remove args on Py functions that don't take any to save CPU time
2008-07-20GameObject functions getChildren() and getChildrenRecursive()Campbell Barton
2008-07-10Adding an option for action actuator - "Continue" this means animations ↵Campbell Barton
always play from where they left off. Continue was the 2.46 operation too, so new functionality is the option to disable. When using states, an action like kick or throw can often switch out before finishing playing the action, and there was no way to play from the start frame the second time round. (even setting the actions current frame through python doesn't work work)
2008-07-04non user visible changes and small optimizations to the game engine pyapi as ↵Campbell Barton
well as fixing some bugs. * 2 returning errors without exception set another return None instead of NULL. * a missing check for parent relation * BPY matrix length was incorrect in matrix.c, this change could break some scripts, however when a script expects a list of lists for a matrix, the len() function is incorrect and will give an error. This was the only thing stopping apricot game logic running in trunk. Also added a function for GameObjects - getAxisVect(vec), multiplies the vector be the objects worldspace rotation matrix. Very useful if you want to know what the forward direction is for an object and dont want to use Blender.Mathutils which is tedious and not available in BlenderPlayer yet.
2008-07-03Adding GameObject setLinearVelocity(), without this interacting with objects ↵Campbell Barton
requires them to have logic bricks to apply force which doesn't work well when the character is in a seperate blend file to the levels. (its also messy to have a script & multiple motion actuators on each object you can pickup and throw). This is also needed for removing any force that existed before suspending dynamics - In the case of franky hanging, resuming dynamics when he fell would apply the velocity he had when grabbing making dropping to the ground work unpredictably. Also note in pydocs that enable/disable rigidbody physics doesn't work with bullet yet.
2008-06-30BGE python api addition, GameObject get/setState and Controller.getState()Campbell Barton
Also added a note in the tooltip for action priority when using more then 1 action at a time.
2008-06-27patch [#15865] BGE API call to delete objectsCampbell Barton
from Dalai Felinto (dfelinto) renamed deleteObject to endObject() to match the user interface.
2008-06-26Python API/Game engine fixes, dosn't affect 2.47Campbell Barton
* Action FrameProp was checking if the string was true, not that it contained any text. * Added GameObject.getVisible() since there is already a getVisible * Added GameObject.getPropertyNames() Needed in apricot so Franky can collect and throw items in the level without having the names defined elsewhere or modifying his game logic which is stored in a separate blend file.
2008-06-25Commented out face transp changing when switching images, this is more ↵Campbell Barton
annoying then helpful. Edited Game engine docs to note that the matrix will need to be transposed if used with Mathutils.Matrix() Edited "Collision" button since ray-sensor also uses collision.
2008-06-21* Documented that get/setOrientation use an inverted rotation matrixCampbell Barton
* OB prefix is needed when specifying the object for the Message Actuator, this is very bad since other object fields in the BGE dont need this prefix - a real fix would need do_versions to keep old files running. * RotationMatrix was all nans if the rotation vector axis was 0,0,0, Changed so in this case just return a matrix that doesn't rotate anything, spent some angry hours to find these issues, maybe this will save others the hassle ;)
2008-06-14Added access for adjusting timeOffset value at runtime, used for apricot ↵Campbell Barton
(Franky climbing walls)
2008-06-02Patch #11000 approved: [new function] KX_GameObject::alignAxisToVect() Align ↵Benoit Bolsee
an object's axis to a given vector
2008-05-25BGE patch: rename rayCastToEx() to rayCast() - better nameBenoit Bolsee
2008-05-24BGE patch: add rayCastToEx(), an extended version of rayCastTo() for use in ↵Benoit Bolsee
game script
2008-05-20replacing epydoc generation script with one copied from bpy docsCampbell Barton
2008-05-11fix BGE bug #8668: Behavior of os.getcwd() is not consistent between ↵Benoit Bolsee
operating systems Add a function GameLogic.expandPath() that works like Blender.sys.expandpath() and is also available in the BlenderPlayer. Fix the game actuator in the BlenderPlayer to work like in Blender: - try first to load the .blend from the current working directory - if not found, try to load from the startup .blend or runtime base directory
2008-05-07BGE patch #10492 approved: getLinearVelocity() now can provide local ↵Benoit Bolsee
velocity as well. This patch is harmless and backward compatible; it can go safely into 2.46 release
2008-04-07add KX_GameObject::rayCastTo() PyDocBenoit Bolsee
2008-04-06Commit patch #8799: Realtime SetParent function in the BGEBenoit Bolsee
This patch consists in new KX_GameObject::SetParent() and KX_GameObject::RemoveParent() functions to create and destroy parent relation during game. These functions are accessible through python and through a new actuator KX_ParentActuator. Function documentation in PyDoc. The object keeps its orientation, position and scale when it is parented but will further rotate, move and scale with its parent from that point on. When the parent relation is broken, the object keeps the orientation, position and scale it had at that time. The function has no effect if any of the X/Y/Z scale of the object or its new parent are below Epsilon.
2005-04-23Added the docs & use Python booleans for physics reinstance.Kester Maddock
2005-03-25Big patches:Kester Maddock
Erwin Coumans: Abstract the physics engine Charlie C: Joystick fixes Me: Moved the ray cast (shadows, mouse sensor & ray sensor)