Commit Graph

90 Commits

Author SHA1 Message Date
Campbell Barton 133f79e449 Cleanup: warnings, typos 2014-10-29 14:15:21 +01:00
HG1 12a0cccfbf BGE: Add level mode to property actuator
This patch adds to the existing property actuator a level mode, which is switching the property depending on the input level.

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D652
2014-07-17 22:49:40 -07:00
Jorge Bernal 1bf87fa26c BGE: TrackTo actuator: increasing up & track axis options
This is related to Task T34861 to increase up & track axis options for TrackTo actuator. I've just added it to differential to facilitate an easier review.

With the patch applied you can select X, Y and Z axis for the Up axis, and X, Y, Z, -X, -Y and -Z for the track axis.

Related to the implementation I have used the algorithm from Trackto constrain placed in constrain.c but adapted to be used with MOTO library.

The wiki docs are here (http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Actuators/Edit_Object#Trackto_Actuator).

Test file is here: {F97623}

I have also uploaded 2 screenshots showing the UI modifications to the TrackTo actuator:

{F91992} {F91990}

Reviewers: moguri, dfelinto

Reviewed By: moguri

CC: Genome36

Differential Revision: https://developer.blender.org/D565
2014-07-14 18:30:27 -07:00
Jorge Bernal 7d99a4ded9 BGE: New Mouse Actuator
Disclaimer: The author of this patch is Geoffrey Gollmer (gomer). I only updated the patch to the current git master status, reworked several parts to fit well with current coding style and applied several fixes.

This actuator allows users to show/hide the mouse cursor using logic bricks, as well as control object rotation with a mouse in the BGE.
The mouse rotation is flexible enough to allow any type of mouse look, as well as banking for flight controls.

{F94520}

{F91859}

Blend file for testing Mouse actuator (with default parameters and crosshair): {F94920}

Reviewers: moguri

Reviewed By: moguri

CC: gomer, lordodin

Differential Revision: https://developer.blender.org/D559
2014-06-25 15:47:37 -07:00
Jorge Bernal a5b9f22454 BGE - button for deactivate sensors, controllers and actuators
This change introduces a new checkbox to deactivate the sensors, controllers and/or actuators. It is useful during the development phase to avoid delete sensors, controllers or actuators if you want to test something new.

NOC: The wiki page is being updated (the images mostly), but the feature is already in the 2.71 release log.

{F61628}

Reviewers: moguri, dfelinto, campbellbarton, dingto, #user_interface, billrey

Reviewed By: moguri

CC: billrey

Differential Revision: https://developer.blender.org/D16
2014-04-16 22:40:07 -03:00
Mitchell Stokes 196d30e004 BGE: The Action Actuator can now make use of additive blending. 2013-08-14 23:32:00 +00:00
Campbell Barton 8f01b50e14 code cleanup: clarify comment about virtial-modifiers, also add comments to DNA headers when its not so obvious what their purpose is. 2013-03-02 07:27:19 +00:00
Mitchell Stokes 9191b783bb BGE: Some various changes to make moving the character physics type easier:
* Undoing the previous applyMovement() changes for characters. This was causing bugs for the Motion Actuator.
  * Creating a Character Motion type for the Motion Actuator with specific controls for characters. This includes moving, rotating and jumping.
  * Adding a KX_CharacterWrapper.walkDirection to set the character's direction and speed.

Note, this also resolves the following bugs:
[#33585] "Setting dLoc of motion actuator [0,0,0] via python won't stop object" reported by Manuel Bellersen (urfoex)
[#33503] "Character physics type won´t accept more than one motion anymore" reported by Mr Larodos
2013-01-30 05:55:17 +00:00
Campbell Barton f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
Campbell Barton d5032657ed style cleanup 2012-06-06 22:38:39 +00:00
Campbell Barton 89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
Dalai Felinto 1f928833f3 option for the Armature Actuator to change the influence of a bone constraint.
Also adds DampedTrackTo to the list of supported constraints in the BGE

Test file:
http://www.pasteall.org/blend/11715

Patch developed as part of a project to NF-UBC Nereus Program.
Development time 'sponsored' by the project.
www.nereusprogram.org
2012-03-03 02:47:01 +00:00
Campbell Barton 47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Campbell Barton 2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Sergey Sharybin 51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
Dalai Felinto 782f0b6382 bge camera actuator: -X and -Y axis
The camera actuator only allows to look the object from its front face.

Given that Blender takes -Y as the default forward orientation, the current
functionality doesn't let a camera to track an actor from behind.

This patch allows for -X and -Y axis tracking. This way a camera over the
shoulders of a character is possible (without resorting to rotate the
mesh/armature original orientation.

- patch reviewed by Campbell Barton, thanks
2012-01-11 07:27:39 +00:00
Campbell Barton 0b00bb236c make MOD_dynamicpaint.c use more typical gpl2+ text and some formatting edits in DNA 2011-12-28 11:08:38 +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
Benoit Bolsee dbd6658d73 svn merge -r 37306:39975 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-07 15:34:04 +00:00
Mitchell Stokes 5f4f75c51a BGE Animations: Adding in layer weights to allow for layer blending. 2011-07-03 01:59:17 +00:00
Mitchell Stokes 47b061609d BGE Animations: FCurve Actuators are now converted to Action Actuators in do_versions(). Note: The fcurve actuator still needs to be removed from menus and such. 2011-06-16 01:57:39 +00:00
Joerg Mueller 8ff0c2e107 Merge with trunk r37475. 2011-06-14 12:06:21 +00:00
Dalai Felinto a2dda7c74d BGE Patch: [#27425] Allow to change the damping of the camera actuator
##########
original name: "Allow to change the strenght of the "go behind" constraint of the camera actuator"

The camera actuator is an actuator that drive the camera to follow an object, with a set of constraint.
Currently, when the object followed rotate on himself (like a person, or an helicopter), the camera is really slow to go behind (at least 10 seconds).

This patch gives the UI to tweak the strenght of the 'go behind'[named damping] constraint.
###########

epydocs (rst) updated too
2011-06-13 17:08:33 +00:00
Mitchell Stokes 8e85491ab7 BGE Animations: Adding a layer option to Action actuators. 2011-06-11 01:03:03 +00:00
Nick Samarin a918040902 synched with trunk at revision 36569 2011-05-16 20:30:59 +00:00
Nathan Letwory 6aae3bb5c8 doxygen: small fixes and tag adding 2011-02-25 10:20:37 +00:00
Nathan Letwory f336b80d7f Starting work on doxygen cleanup. Many things still to be done. 2011-02-17 05:57:18 +00:00
Nick Samarin c5f6a01dd5 synched with trunk at revision 34793 2011-02-16 17:07:18 +00:00
Dalai Felinto 8fd81ab9e6 BGE: frame start/end in action/fcurves/shapekey to support floats
after discussion over the mailing-list it seems that it really makes no sense to restrict that. Specially since we have the "Property" playback mode that usually will be a float.

Since there is no need for do_version or whatoever I don't see a problem. Any Thoughts? Maube to allow it only through the Python API?
2011-02-11 00:03:26 +00:00
Campbell Barton 4dceafc928 bugfix [#24995] Object rotation seems to be applied incorrectly
- Object actuator rotation was being scaled by: (1/0.02)*2*PI/360 == 0.872, since revision 2. 
- Remove scaling and use do_versions to adjust existing files.
2010-12-06 07:45:07 +00:00
Nick Samarin b5f4144d25 added option to set "up" vector of the actor orientation using navmesh normal (steering actuator) 2010-08-15 17:40:57 +00:00
Nick Samarin b822f0bb7a added option for automatic facing in steering actuator 2010-08-15 12:58:13 +00:00
Nick Samarin f09cd6974e synched with trunk at revision 31065 2010-08-05 13:54:56 +00:00
Campbell Barton 708ef64663 include cleanup, no functional changes
- removed DNA_brush_types.h from DNA_scene_types.h (and some other similar cases)
- removed DNA_wave_types.h (never used)
- removed Main.wave
2010-08-04 04:01:27 +00:00
Nick Samarin c6ea23c77c synched with trunk at revision 30597 2010-07-21 20:54:53 +00:00
Campbell Barton 75410037fd - correct some spelling errors.
- remove FreeCamera struct (wasnt used)
- remove world color alpha values (not used anywhre).
2010-07-20 10:41:08 +00:00
Nick Samarin 0fbca1dc19 - added options to enable visualization for obstacle simulation and steering actuator
- added python attributes for parameters of steering actuator
2010-07-15 18:41:29 +00:00
Nick Samarin c92d0dfdf6 Added:
- obstacle culling for correct simulation in 3d
- flag for steering actuator termination on reaching target
- path recalculation period
- advance by waypoints (for path following)
2010-06-18 23:48:52 +00:00
Nick Samarin 147e8d01eb - added acceleration and turn speed parameters for obstacle simulation
- added debug visualization for object velocities
2010-06-11 21:13:59 +00:00
Nick Samarin 0932f365bf added obstacle avoidance code; object movement is implemented via setting velocity 2010-06-04 23:29:49 +00:00
Nick Samarin 05b92f0fc9 Added new actuator type for following steering behaviors: seek, flee, path following; renamed KX_Pathfinder to KX_NavMeshObject 2010-05-31 22:35:22 +00:00
Dalai Felinto 22978ebfdc Logic UI - fixing missing rna default values
there are some cases (i.e. Constraint Actuator) where the same DNA property is being used by different RNAs with different ranges.
It's easy to change (reset the values to their default in the set func of the constrant type rna).
Not sure it's necessary though.
2010-05-07 18:53:28 +00:00
Dalai Felinto 092bd9f300 Logic UI: actuators - action+rna 100%, sound 100%, constraint+rna 50%
Notes:
1) I had to pass Context to the draw_actuator_sound in order to access the open_sound_operator
uiTemplateID(layout, C, ptr, "sound", NULL, "SOUND_OT_open", NULL);
According to Campbell they are better ways to do that (mdef bind for reference). but for now it works.

2) for the record: action actuator is equal to shape actuator (but runs in armature)

3) in Constraint Actuator I think I should unify all the limit_loc_max_, loc_min, ... properties. I was thinking about replacing it with a single limit_loc_max, limit_loc_min, range, distance, and use get/set funcs to find the correct one.
2010-05-06 12:01:44 +00:00
Dalai Felinto 74f5a0928f BGE Logic UI: more actuators + almost all sensors
* Matt, I'm marking some "property" rna properties that will need some speacial lookup.
Talking with Campbell we thought that it will be nice to have the lookup with autocomplete for the properties, but giving you the freedom to type whatever prop_name you want (so you can use python created properties).
That way we would still store it as a string.

Whenever the property doesn't exist (or was renamed, therefore can't be found) the property name tints in red ...
Is that possible?

* Matt: in draw_actuator_random I used a uiItemL for one of the modes. Is there another way to do that (having the label in the rna file?). I noticed draw_nodes has some cases of that as well.

* Andrea, the actuator_game property filename (in rna_actuator) is the one that needs to open the filebrowser but saving the result as relative path (or to have relative path as the default in this case)
2010-05-04 21:31:46 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Dalai Felinto 3189732ab6 BGE: rna update for Logic Bricks
New Actuators done:
* EDIT_OBJECT
* SHAPE_ACTION

Actuators to be done:
* CONSTRAINT

Actuators done already:
* ALL THE OTHERS 16

+ some DNA padding

There is one Actuator left. This one is tricky because (as many others) the tooltip changes according to the actuator type value. Not sure how to solve this yet. I'll probably have to make different rna properties for the same values (it includes some enums this time). Not so animated to finish this one :/
2010-02-11 06:00:16 +00:00
Dalai Felinto d2e41b38df BGE: rna update for Logic Bricks
New Actuators done:
* OBJECT (aka MOTION)
* SOUND
* PROPERTY
* CONSTRAINT
* EDIT_OBJECT
* ACTION
* STATE
* ARMATURE

Actuators to be done:
* CONSTRAINT
* EDIT_OBJECT
* SHAPE_ACTION

Actuators done already:
* IPO
* CAMERA
* SCENE
* RANDOM
* MESSAGE
* GAME
* VISIBILITY
* TWODFILTER
* PARENT

once again: feedback is appreciated.
+ some typos
+ some DNA padding

Thanks for Mitchell Stokes (Moguri) for his patch on that. It saved me some time on the ENUMs and some actuator descriptions :)
2010-02-09 21:18:50 +00:00
Dalai Felinto b2926cf8e2 BGE: rna update for Logic Bricks
New Actuators done:
* SCENE
* RANDOM
* MESSAGE
* GAME
* VISIBILITY
* TWODFILTER
* PARENT

Actuators to be done:
* OBJECT (aka MOTION)
* SOUND
* PROPERTY
* CONSTRAINT
* EDIT_OBJECT
* ACTION
* SHAPE_ACTION
* STATE
* ARMATURE

Actuators done already:
* IPO
* CAMERA

once again: feedback is appreciated.
2010-02-06 06:21:42 +00:00
Dalai Felinto 443d913f72 BGE: rna update for Logic Bricks
Sensor and Controllers: small fixes and suggestion (comments) for future improvement - mainly to replace text properties to material, text or object datablocks.

Actuators done:
* IPO
* CAMERA

Actuators to be done:
All the others (their structure is in the file)

Adding NC_LOGIC

** If someone want to help on that:
Files used for actuator RNA:
- logic_window.c
- DNA_actuator_types.h

*** my first big RNA operation. critics/suggestions are welcome

**** padded some DNA variables that were not been used.
2010-02-05 23:50:33 +00:00
Benoit Bolsee 1483fafd13 Merge of itasc branch. Project files, scons and cmake should be working. Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library. 2009-09-24 21:22:24 +00:00