Age | Commit message (Collapse) | Author |
|
|
|
This patch changes most of the reamining degrees usage in internal code into radians.
I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them.
WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly
in previous versions (a few angle properties would use radians values as degrees...).
Details:
- Data:
-- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such
(using getter/setter functions), still using radians internally.
-- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev.
- Modifiers:
-- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done.
- Postprocessing:
-- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done.
- BGE:
-- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type,
it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence
can be either distance or angle values, depending on the mode. Will leave this to BGE team.
-- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself,
as it seems this is the expected value here...).
-- bRadarSensor.angle: Done.
Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt
Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt
Thanks to all!
Differential Revision: http://developer.blender.org/D59
|
|
used elsewhere.
also minor style cleanup.
|
|
sensors.
|
|
with those names (notably "Clip" one, and "Screen" too) in some translations. Also move "Key" as "Keyboard" (opposed to "Keyframe") to same context.
|
|
Also done a few cleanup here and there...
|
|
|
|
|
|
[Patch] - based on the patch from HG1
|
|
|
|
|
|
|
|
else if's
|
|
Note about long lines: I did not touch to two pieces of code (because I don’t see any way to keep a nicely formated, compact code, with shorter lines):
* The node types definitions into rna_nodetree_types.h
* The vgroup name functions into rna_particle.c
|
|
|
|
Addresses:
* C++ comments.
* Spaces after if/for/while/switch statements.
* Spaces around assignment operators.
|
|
it exposes sensor.controllers and controller.actuators
this is how the data is exposed in blender.
to have controller.sensors or actuator.controllers is not that straightforward
|
|
while translating in french).
|
|
Check for unique name when setting name for logic bricks.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
left/right both are just one axis each. So, in actuality, the number of directions = 2, not 4, and thus JOYAXIS_MAX/directions = 16/2 = 8. 8 was also the max used in 2.4x.
|
|
from 2 to 4. The BGE supports up to 16 axis. For Axis events (not Single Axis), you get for directions per axis (up, down, left, right). So, the max should be JOYAXIS_MAX/directions = 16/4 = 4.
|
|
needed for dynamic python enums.
|
|
|
|
The Logic Bricks that use angles (Radar Sensor and Constraint Actuator) do so in degree.
Reverting for the time being. Ideally we want to make them to use radians internally (that requires at least a doversion and a convert from radians to degree in BGE Converter routine).
If someone feels like helping on that, please go ahead.
|
|
|
|
|
|
- Armature Actuator now only shows the "Secondary Target" option when the Bone Constraint supports it (IK only now).
-- that may be overkill I don't know. It shouldn't slow down the UI considerably, so it should be fine. Easy to revert if needed though.
- renaming things such as "Start frame" to "Start Frame"
|
|
Visibility Actuator
* fix for armature sensor (Status Changed doesn't use any value to evaluate itself) + renamed "Test Type" to "Test"
* visibility tooltip was wrong - now we can change visibility from the physic buttons instead of the outliner
* bonus * when you change the visibility from the physics panel the icon in the outliner wasn't changing
|
|
field of the physic sensors + using PROP_ANGLE for Radar Sensor
(to work in tooltips bring good karma !)
|
|
|
|
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
|
|
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
|
|
RNA_struct_is_a + making rna_sensor future proof
|
|
(oui, a french bug report :)
we were using SENSOR_RAY for the radar sensor axis. However the Ray axis is inverted (God knows why) so I created a set of defines only for radar sensor.
Also I thought it was a good idea to replace some hardcoded values in Radar and Ray codes by their defines in DNA_sensor_types.h (similar to what Benoit did for Armature Sensor, so I see no problem on that).
|
|
I also changed the order of them (target and log toggle) in the UI to match 2.49
|
|
with underscore, or were simply not set correctly after code copy/paste.
|
|
Otherwise you had no way to set it to none. This doesn't really matter, but it's nice "userwise" to be able to clear the pressed key.
|
|
|
|
|
|
After initial talk with Matt (awhile ago) we realzed that rna_api would fit well for this instead of an operator.
The next step would be to move the current UI code to use the rna funcs instead.
Note: it takes the s/c/a as argument, not its name. (e.g. cont.link(actuator=act) )
Sample code to link all the logic bricks between each other:
ob = bpy.context.object
for cont in ob.game.controllers:
for sens in ob.game.sensors:
cont.link(sensor=sens)
for act in ob.game.actuators:
cont.link(actuator=act)
For a script to create bricks, link bricks, unlink bricks and remove them:
http://www.pasteall.org/14266
|
|
- implemented the old functionality of pin a sensor or actuator when "show state" is on.
- fixed code for setting/resetting VISIBLE and LINKED flags for sensors and actuators
(so states buttons is working for actuators and sensors)
- move the flag setting code (^^^) to a pre-processing part of the logic ui code.
|
|
Using custom setfuncs to avoid increase/decrease of usercount.
That way nothing stops you from removing a material that is used by a
sensor, or a mesh, an action ... (this is how 2.49 works too)
* also some general code cleaning/fix (adding static casts, replacing libaddr_us by lib_addr for dome text (I had no idea how user count worked back then)
|
|
* Keyboard Sensor entry keys (key, modifier 1 and 2) can actually be any key
- (you can use Shift as main key, and D as modifier if you want). It's
- strange in my opinion, but it's 2.49 way of doing it.
* Copy Game Property (operator found in SPACE menu)
- reorganized it so the properties appear as submenu items.
- a "little lot" of work for such a small eye-candie but well I hope more
- people like it as well :)
Matt, I had to recreate the dynamic_enum to make it work. I'm count on you
for a real fix for this ;)
|
|
on copy logic bricks operator (and moved to OBJECT_OT)
* adjusts on Layout:
- in order to avoid much changes when copying Logics, it's nice to have the logic s/c/a always displaying even though it's not valid (e.g. edit mesh used from a camera object).
Now a message shows in the s/c/a alerting to the problem.
* logic operators under OBJECT_OT - copy properties and logics
Matt, is it possible to have the object game properties listed as a submenu from "Copy Properties" ?
So from the "Copy Game Property" menu we would have three options:
"Copy a property" -> (submenu) prop1, prop2, prop3
"Replace all Properties"
"Merge all Properties"
For the current task list in Logic Editor:
http://www.pasteall.org/13245
|
|
(i.e. no DNA changes here)
Also: extra set funcs, layout adjustments
The patch for the subversion commit was getting too big, and it will be hard to distinguish what was essentially do_version + DNA changes and what was layout adjustments.
So this is the first part of the commit. The next may take a bit more because I'm not so confident in my readfile changes.
|
|
|
|
I based this code on drawnode, so I hope this is the right way of doing this.
Working Sensors:
- keyboard
- property
Working Actuators:
- property (partly)
- ipo
- action
- shape action
- message
- random
Need help with:
- actuator sensor
- property actuator (for the second object)
- touch/ray/collision sensors + constraint actuator
(for the material lookup, not the property one)
maybe a doversion + changing the type to material work better here
(as we have in touch sensor)
+ added notifier for the game property.
|
|
you change the value through script) + some layout adjusments.
|
|
(normal key, modifier key, etc)
|