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
2010-05-17convert GameTypes from epydoc into sphinx compatible markup, also removed ↵Campbell Barton
deprecated functions
2010-04-20BGE EPY Docs: PhysicsConstraints and fixes in other modulesDalai Felinto
PhysicsConstraints module documented by Jean-François (Ninja Goliath) based on GameKit 2nd ed. Thanks for the initiative and the great help! General advice for anyone helping with EpyDocs: * use :: instead of : to keep the indentation correct, * use B{} for clarity when needed (e.g. createConstraints) Adding F13 to F19 to complement Matt's recent commit * There are other (not so important) functions in PhysicsConstraints module that are not exposed in the documentation right now. The generated page is temporarily here, if someone want to review it: http://blenderecia.orgfree.com/blender/tmp/PhysicsConstraints-module.html
2010-04-17Patch #21789 - BGE Keyboard and Mouse Python types - by Mitchell Stokes(Moguri)Dalai Felinto
The patch exposes mouse and keyboard read-only properties in the GameLogic module Also renames bge.keys to bge.events (* Note: name of bge submodules (logic, render, ...) may change before 2.5 final release [right Campbell?]). """ This patch adds two new types to the BGE: SCA_PythonKeyboard SCA_PythonMouse These two types allow users to make use of the keyboard and mouse without the need for a keyboard or mouse sensor. SCA_PythonKeyboard has an events property that acts just like SCA_KeyboardSensor.events. SCA_PythonMouse also has an events property to check for mouse events. Further more it supports getting and setting normalized cursor position (from 0.0 to 1.0) with SCA_PythonMouse.position. The cursor can be shown/hidden using SCA_PythonMouse.visible. """ Its use is similar with current mouse and keyboard controllers. With the exception of mouse position being normalized and writable as well (replacing Rasterizer.setMousePosition). Code Sample: ###### from bge import logic, events mouse = logic.mouse keyboard = logic.keyboard for key,status in keyboard.events: if status == logic.KX_INPUT_JUST_ACTIVATED: if key == events.WKEY: print(mouse.position) # move_forward() mouse.visible = True # turn cursor visible mouse.position = 0.5,0.5 # centralize mouse - use tuple ###### * Important Note: mouse.position still will not work properly for Letterbox mode. In order to fix letterboxing I may need to move the set x,y mouse function to inside the canvas code (to avoid duplicated code between mouse sensor and bge.logic.mouse). I'll leave this for another commit though. Thanks Mitchell for the work on that.
2010-04-11PyAPICampbell Barton
- added new mathutils.Color() type, use with rna so we can do for eg: material.diffuse_color.r = 1.0 # also has hsv access material.diffuse_color.s = 0.6 - made Mathutils and Geometry module names lowercase.
2010-03-30BGE PyDoc: fix for KX_Object not linked to the class in some actuators API pageDalai Felinto
2010-03-29BGE patch [#21019]: Python function for Scene suspend/resume.Benoit Bolsee
2010-03-26BGE: fix for [#21180] - missing min and max values in the API + mode fix ↵Dalai Felinto
(interval wasn't working) of course it wasn't only a matter of adding the properties in the api :) The code of validValueForIntervalProperty and modeChange are the same BUT in the future they shouldn't be, for I think it's fine to keep them as separated functions. Bonus fix: Also we are now checking if the new mode is interval and update the range expression.
2010-02-11BGE API DOC update - scene add/restart/end. patch by GomerDalai Felinto
2010-01-31rename game object obcolor to colorCampbell Barton
2010-01-30BGE: patch [#20293] Added python sensor attribute: Status.Benoit Bolsee
2010-01-10BGE API_DOC: VideoTexture and PhysicsConstraints templates (need the ↵Dalai Felinto
functions to be filled with their description). PhysicsConstraints is documented in the Game Kit Book: http://download.blender.org/documentation/gamekit1/ VideoTexture is documented in the wiki: http://wiki.blender.org/index.php/Dev:Source/GameEngine/2.49/VideoTexture I don't think I will have time to fill the documentation. But I hope this commit helps someone interested in helping it. Therefore volunteers to document those modules are highly welcome !!! (let's give to BGE the documentation it deserves)! * + added GameLogic.Lave/LoadGlobalDict + some typo fixes
2009-12-08BGE: add hitUV property to mouse focus sensor to return UV coordinates under ↵Benoit Bolsee
mouse pointer. Useful for texture painting. More details in PyDoc.
2009-12-04BGE: Add option to return UV coordinates aofthe hit point to ↵Benoit Bolsee
KX_GameObject::rayCast(). Details in PyDoc.
2009-11-23epydocs for bge pre/post render callbacksCampbell Barton
2009-11-22BGE: Removing OB prefix from object names - This will break scripts !!!! ↵Dalai Felinto
(also removing AC and ME :: internal changes only) How it works now: whenever you have to read/write object names you can do it without the prefix "OB". (it's not hard at all to fix scripts) How it was before: It was a mess :) We had an inconsistent API where sometimes you had to input "OBname" and other "name" directly to assign object as data (usually in actuators). Justification for the change: Talking with Campbell we had since a while ago this feeling that this should be changed any time we were going to deprecate the API. So in order to deliver Blender 2.5beta0 with a more close-to-the-final API we decided that today was a good day to implement that. Remaining issues: 1) VideoTexture uses IM or MA to identify the output material/texture. I haven't touched that, but it does look a bit off. (i.e. I didn't changed any MA, IM naming) 2) I didn't see the code of dynamic mesh. It may need to be edited as well.
2009-09-25Merge of itasc branch. Project files, scons and cmake should be working. ↵Benoit Bolsee
Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library.
2009-08-25remove gameOb.has_key(key) method from KX_GameObject and ListValue since ↵Campbell Barton
python 3.x removes has_key from dictionaries. Instead use __contains__, eg. if key in gameOb: ... Mathutils returns from PyMath.cpp were incorrectly using wrapped Mathutils types. Wrapped types should only be used with a callback now.
2009-08-25patch from Mitchell Stokes adding dictionary like access to a scene. (like ↵Campbell Barton
KX_GameObjects have) val = scene["prop"] scene["prop"] = newval if "prop" in scene: ... val = scene.get("prop", fallback_val)
2009-08-23svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22704:22717Campbell Barton
2009-08-23Option for MouseFocus sensor. only used when 'Mouse over any' type is set.Campbell Barton
Previously the only way to detect if the mouse moved over a different object was to enable true-level-triggering and have a python script detect the change. When the Pulse option is set, focusing on a different object pulses true. Python attribute is focusSensor.usePulseFocus. This is similar to the collision sensors pulse option where changes in the set of collision objects generates an event too. Found this functionality missing when trying to make a logic demo that used mouse-over with overlapping objects.
2009-08-102.5 audio cleanup:Joerg Mueller
* Removed CD Actuator * Removed bSample and bSoundListener * Removed SoundSystem * Removed -noaudio parameter
2009-07-26ReplaceMesh Actuator option to replace the physics mesh and display mesh + ↵Campbell Barton
python api options. When the mesh field is left blank and Physics option is enabled, it reinstances the physics mesh from the existing mesh. like calling gameOb.reinstancePhysicsMesh() from python.
2009-07-26BGE PhysicsCampbell Barton
Add support back for reinstancePhysics mesh, a frequently requested feature in the BGE forums. from what I can tell Sumo supported this but bullet never did. Currently only accessible via python at the moment. - rigid body, dynamic, static types work. - instanced physics meshes are modified too. - compound shapes are not supported. Physics mesh can be re-instanced from... * shape keys & armature deformations * subsurf (any other modifiers too) * RAS_TexVert's (can be modified from python) Moved the reinstancePhysicsMesh functions from RAS_MeshObject into KX_GameObject since the physics data is stored here. video and blend file demo. http://www.graphicall.org/ftp/ideasman42/reinstance.ogv http://www.graphicall.org/ftp/ideasman42/reinstance_demo.blend
2009-06-17BGE PyAPICampbell Barton
while making a demo of using python to control bones found some more problems. also added channelNames attribute to BL_ActionActuator to get a list of valid channels to use. demo: http://www.graphicall.org/ftp/ideasman42/armature_python.blend its still not that useful since theres not way to know rest bone locations yet but better then nothing.
2009-06-16BGE Action Actuator setChannel() function was broken in a number of ways. Campbell Barton
* extract_pose_from_pose only checked one of the list items for NULL when looping over them yet its possible they are different sizes. * game_free_pose needed to be used rather then MEM_freeN, channels would never be freed leaking memory. * setChannel() would make a new pose that wasnt aligned with the existing pose, the lists are assumed aligned so when extracting the channels its unlikely this was ever useful. * Added getChannel() - returns pose loc/size/quat * Added option args for setChannel(channel, matrix) or setChannel(channel, loc, size, quat)
2009-05-29workaround for strange python problem in the BGE and BPy API where printing ↵Campbell Barton
warnings mistook the blender binary for a script - argv[0], Binary lines were printed into the console sometimes causing console beeps and corrupting future console output. Internal texts file on disk is not used it seems python warnings dont support this (even though exceptions do). The most common cause of this is passing a float as an argument to a method that took an int. get around this by setting __file__ in the namespace to the script name before executing the script, the file lines are not found but at least the output is not weird and confusing. Added read only 'mode' attribute to the python controller so there is a way to tell if its executing a module or a script. Updated docs to better explain execution methods.
2009-05-28renamed python 'bookmark' attribute to 'useHighPriority', was renamed in the ↵Campbell Barton
UI but not in python.
2009-05-26BGE Py APICampbell Barton
- Deprecation warnings for using attribute access - Added dictionary functions to KX_GameObject and ListValue ob.get(key, default=None) ob.has_key(key) ob.has_key is important since there was no way to do something like hasattr(ob, "attr") which can be replaced by ob.has_key("attr") - (both still work of course). ob.get is just useful in many cases where you want a property if it exists but can fallback to a default. - CListValue::FindValue was adding a reference but the ~3 places it was used were releasing the reference. added a FindValue that accepts a const char* type to avoid converting python strings to STR_String.
2009-05-25BGE Joystick Hat BugfixCampbell Barton
bug reported by blenderage on blenderartist (found other bugs too). - "All Hat Events" didnt work. - Multiple hats didnt work - use a menu with direction names rather then have the user guess. disallow zero as a direction. - Allow up to 4 hats (was 2). - Python api was clamping the axis to 2, maximum is currently JOYAXIS_MAX - 16 - New python attributes hatValues and hatSingle, match axis functions. - Use SDL Axis events to fill in the axis and hat array rather then filling in every axis with SDL_JoystickGetAxis for each axis event.
2009-05-24Patch #18815: BGE: More updates to deprecation documentation and 2.49 ↵Dalai Felinto
conversion script by Alex Frases(z0r) - Fixed some deprecation warnings in documentation. - Added more conversions to script. - Added more attributes to script todo list. - Print out name of text buffer when encountering an error in batch mode. - Refactor: Simplified attribute map. - Added notImplemented function to print warnings for missing conversions. References documentation.
2009-05-23[#18802] BGE conversion script: more attributes; updated GameTypes.pyCampbell Barton
Patch from Alex Fraser (z0r) - All attributes in the conversion map have been checked against the docs. More ambiguities have been resolved. - Added option to convert all text buffers in Blender. - Updated GameTypes.py: there were inconsistencies. The script works well (causes no errors) with 0_FPS_Template.blend and vehicle_demo.blend from the physics-2.43-physics-testfiles pack. Caveats: - Conversions were checked against other deprecated attributes. I may have missed some cases where a deprecated attribute has the same name as a non-deprecated attribute. I did catch a few though. - As with the last version, the conversion is purely text-based and doesn't compile the code. It's easy to create a script that would break on conversion. Still, it should get you 90% of the way to a converted script.
2009-05-21BGE: user control to compound shape and setParent.Benoit Bolsee
Compound shape control ====================== 1) GUI control It is now possible to control which child shape is added to a parent compound shape in the Physics buttons. The "Compound" shape button becomes "Add to parent" on child objects and determines whether the child shape is to be added to the top parent compound shape when the game is stated. Notes: * "Compound" is only available to top parent objects (objects without parent). * Nesting of compound shape is not possible: a child object with "Add to parent" button set will be added to the top parent compound shape, regardless of its position in the parent-child hierarchy and even if its immediate parent doesn't have the "Add to parent" button set. 2) runtime control It is now possible to control the compound shape at runtime: The SetParent actuator has a new "Compound" button that indicates whether the object shape should be added to the compound shape of the parent object, provided the parent has a compound shape of course. If not, the object retain it's individual state while parented. Similarly, the KX_GameObject.setParent() python function has a new compound parameter. Notes: * When an object is dynamically added to a compound shape, it looses temporarily all its physics capability to the benefit of the parent: it cannot register collisions and the characteristics of its shape are lost (ghost, sensor, dynamic, etc.). * Nested compound shape is not supported: if the object being parented is already a compound shape, it is not added to the compound parent (as if the Compound option was not set in the actuator or the setParent function). * To ensure compatibility with old blend files, the Blender subversion is changed to 2.48.5 and the old blend files are automatically converted to match the old behavior: all children of a Compound object will have the "Add to parent" button set automatically. Child ghost control =================== It is now possible to control if an object should becomes ghost or solid when parented. This is only applicable if the object is not added to the parent compound shape (see above). A new "Ghost" button is available on the SetParent actuator to that effect. Similarly the KX_GameObject.setParent() python function has a new compound parameter. Notes: * This option is not applicable to sensor objects: they stay ghost all the time. * Make sure the child object does not enter in collision with the parent shape when the Ghost option if off and the parent is dynamic: the collision creates a reaction force but the parent cannot escape the child, so the force builds up and produces eratic movements. * The collision capability of an ordinary object (dynamic or static) is limited when it is parented: it becomes automatically static and can only detect dynamic and sensor objects. * A sensor object retain its full collision capability when parented: it can detect static and dynamic object. Python control ============== KX_GameObject.setParent(parent,compound,ghost): Sets this object's parent. Control the shape status with the optional compound and ghost parameters: compound=1: the object shape should be added to the parent compound shape (default) compound=0: the object should keep its individual shape. In that case you can control if it should be ghost or not: ghost=1 if the object should be made ghost while parented (default) ghost=0 if the object should be solid while parented Note: if the object type is sensor, it stays ghost regardless of ghost parameter parent: KX_GameObject reference or string (object name w/o OB prefix)
2009-05-21fix for [#18772] c3d_import script crashesCampbell Barton
Patch from Roger Wickes update to 2.48 sFrame, eFrame, fps. [#18794] GE API conversion script: 2.48 -> 2.49 patch from Alex Fraser (z0r), will test further in the next few days. --- This is text plug in and standalone script that updates Blender 2.48 Game Engine scripts to be compatible with the 2.49 API. The script contains a mapping of attribute names to functions that do the conversion. Most of the mappings were extracted from the documentation in GameTypes.py. Where the conversion is ambiguous, the script will not change the source except to insert a warning as a comment. This means that the script does not completely automate the conversion process, but will do a lot of the work. The script still needs a fair bit of testing. Many of the mappings have not been tested and could result in broken scripts. I'm submitting this patch now to start the review process early. I think I might need help if it is to be included in 2.49.
2009-05-20Moving ScreenSpace methods from Rasterizer to KX_Camera (getScreenPos, ↵Dalai Felinto
getScreenVect, getScreenRay) The modules were moved in order to access the camera internal matrixes. It will make then compatible with multiple viewports in a near future. So far the problem I found was: 1) KX_Camera doesn't store the canvas viewport 2) RAS_ICanvas methods: GetDisplayArea and GetWindowArea are affected by multiple viewports (and they shouldn't). Test file is here: http://www.pasteall.org/blend/68
2009-05-18BGE #18665: Servo control and relative motionBenoit Bolsee
Servo control motion actuator did not work as expected when the object is moving on a moving platform. This patch introduces a new Ref field in the servo motion actuator to set a reference object for the velocity calculation. You can set the object during the game using the actuator "reference" attribute; use an object name or an object reference. The servo controller takes into account the angular velocity of the reference object to compute the relative local velocity.
2009-05-18BGE: bookmark option on controller to make them run before all other ↵Benoit Bolsee
controllers. A new bookmark button is available on the controller UI. When set, the controller is guaranteed to execute before all other non-bookmarked controllers, provided it is scheduled for execution. This is useful for initialization scripts that run once at startup or scripts that must set some prerequisite for the other controllers at the start of each logic frame. This feature is also available at python level with the "bookmark" attribute. It can be changed during the game. Note that if several script are bookmarked, their relative order of execution is not guaranteed. Make sure they don't depend on each other.
2009-05-17While testing YoFrankie with the new API attributes found some issues...Campbell Barton
- corrections to docs - disallow calling controller.activate(actuator) when the controller is not active. (Raise a SystemError) - Added 2 new attributes, CValue.name - deprecates CValue.getName(), KX_GameObject.children deprecated KX_GameObject.getChildren(), (same for getChildrenRecursive()).
2009-05-16BGE Py API BugfixesCampbell Barton
KX_GameObject.getVelocity() would set an error but nor return an error value when an non vector argument was given. KX_PythonSeq_Type was not initialized with PyType_Ready which could crash blender when inspecting the type.
2009-05-15Name attributes added since 2.48a more consistently.Campbell Barton
BL_ActionActuator::blendin -> blendIn BL_ActionActuator::end -> frameEnd BL_ActionActuator::property -> propName BL_ActionActuator::start -> frameStart BL_ActionActuator::type -> mode BL_ShapeActionActuator::blendin -> blendIn BL_ShapeActionActuator::end -> frameEnd BL_ShapeActionActuator::frameProperty -> framePropName BL_ShapeActionActuator::property -> propName BL_ShapeActionActuator::start -> frameStart BL_ShapeActionActuator::type -> mode KX_CameraActuator::xy -> useXY KX_ConstraintActuator::property -> propName KX_GameActuator::file -> fileName KX_GameObject::localScaling -> localScaling KX_GameObject::worldScaling -> worldScaling KX_IpoActuator::endFrame -> frameEnd KX_IpoActuator::startFrame -> frameStart KX_IpoActuator::type -> mode KX_RaySensor::property -> propName KX_SCA_DynamicActuator::operation -> mode KX_Scene::objects_inactive -> objectsInactive KX_SoundActuator::filename -> fileName KX_SoundActuator::type -> mode KX_TouchSensor::objectHit -> hitObject KX_TouchSensor::objectHitList -> hitObjectList KX_TouchSensor::property -> propName KX_TouchSensor::pulseCollisions -> usePulseCollision KX_VisibilityActuator::occlusion -> useOcclusion KX_VisibilityActuator::recursion -> useRecursion SCA_2DFilterActuator::passNb -> passNumber SCA_PropertyActuator::property -> propName SCA_PropertyActuator::type -> mode SCA_PropertySensor::property -> propName SCA_PropertySensor::type -> mode SCA_RandomActuator::property -> propName
2009-05-15minor change - mistake in joystick fix, util function for getting attrs from ↵Campbell Barton
BGE types
2009-05-15BGE PyAPICampbell Barton
[#18701] Issues with camera.pointInsideFrustum method - note in docs that the projection matrix is not correct for first logic tick. Renamed... KX_Camera.isViewport -> KX_Camera.useViewport KX_Lamp.quat_attenuation -> KX_Lamp.quad_attenuation Deprecated KX_Camera.getProjectionMatrix(), KX_Camera.setProjectionMatrix() for projection_matrix attr Added most missing docs reported by the doc-checker script
2009-05-14BGE Py APICampbell Barton
scene.active_camera can now be set so you can more easily set the current camera from python scripts without using an actuator. ConvertPythonToCamera utility function to get a camera from a python string or KX_Camera type.
2009-05-14* More updates to game engine type docs from Roelf de KockCampbell Barton
* FBX Bugfix, was exporting all animation curves as 'Constant' type (no docs for this so could only guess), Thanks to Sander Brandenburg for spotting this problem. Also improved keyframe removal to work on animation curves an angle
2009-05-13BGE API cleanup: motion actuator. Apply patch from Moguri.Benoit Bolsee
2009-05-13use epy deprecated field and link to attributesCampbell Barton
2009-05-13Moved game engine types into GameTypes.py because every type put into a ↵Campbell Barton
module giving lots of references to KX_GameObject.KX_GameObject and having to write in links like L{CListValue<CListValue.CListValue>}. Looked into ways around this but epydoc has no way to import a class without its module and the @include field is maked as 'TODO'. Also removed the outdated 'WhatsNew' section and linked to the 2.49 release notes.
2009-04-13SVN maintenance.Guillermo S. Romero
2009-04-06BGE Epydocs were missing some functionsCampbell Barton
renamed KX_Light -> KX_LightObject added some missing controllers