Commit Graph

38 Commits

Author SHA1 Message Date
Campbell Barton
a17d81cabf add access to radius for game objects (static objects can have radius) as well as anisotropic friction. 2011-02-07 11:42:49 +00:00
Dalai Felinto
d58c31704b BGE: option in the UI to start with the mouse cursor visible. Patch by Vitor Balbio, changes by me.
----------------------------------
While we are more and more moving towards enabling features in the Python API, it's also important to have Logic Bricks working with no scripts.

This option allows you to start the game with the mouse cursor on (it's on Render Buttons). The defalt is still off (no do_version needed here).
2011-01-23 17:25:27 +00:00
Campbell Barton
115b256738 ran through pep8 checker 2010-09-07 15:17:42 +00:00
Campbell Barton
e7c4a0d53b rna api - replace panel properties bl_default_closed and bl_show_header with bl_options which has 2 flags: 'DEFAULT_CLOSED' and 'HIDE_HEADER'.
this matches operators which also uses bl_options like this
2010-08-26 01:05:37 +00:00
Campbell Barton
a60f79daf7 - rna py-api bug fix, a NULL item in a collection was raising an error
eg: mesh.materials[0] 
 ... when this was an empty slot.

- game world mist panel wasnt updated for rna renaming.
2010-08-22 17:23:08 +00:00
Campbell Barton
0267f6a0a3 patch [#23449] RNA renaming bugs
from Jacob F (raccoon)
2010-08-22 16:33:26 +00:00
Campbell Barton
4f5f868a52 rna data path names which are more likely to break animations.
Added an operator "Update Animation Data",
access from the search menu to update drivers and fcurves.
2010-08-20 06:09:58 +00:00
Campbell Barton
7c98860a0d rna renaming FModifier & GameObjectSettings 2010-08-19 17:10:43 +00:00
Campbell Barton
c04199b3a1 rna naming mainly for Scene/IK/KeyingSet's 2010-08-18 08:58:37 +00:00
Campbell Barton
55ed0f0507 more rna renaming. 2010-08-18 08:26:18 +00:00
Campbell Barton
7da5d9faec rna renaming, still only adjusting properties that wont be animated (at least its very unlikely). 2010-08-18 07:14:10 +00:00
Campbell Barton
3bd039eff9 apply rna rename most of the show_*, names. 2010-08-17 17:03:52 +00:00
Campbell Barton
a6f13f9d7b poll() as a python '@staticmethod' was too limiting and didnt allow useful base class poll functions in many cases.
now rna functions that dont have a 'self' are automatically assumed '@classmethods'.

de-duplicated poll functions and made some minor tweaks too.
2010-08-09 01:37:09 +00:00
Campbell Barton
acca04bf33 remove narrow ui feature
- re-arranged UI in a way that gave far too much vert scrolling.
- was added all over for simple things like making text="", layout engine should handle this.
- Ton and Brecht are ok with removing this now. Ton would like to work on the layout engine to make it better support these cases.
2010-08-06 15:17:44 +00:00
Campbell Barton
163f6055d2 bugfix [#23182] Using self.report() inside poll() gives crash
poll() function is now a static method in python, this is more correct, matching C where the operator is not created to run poll.


    def poll(self, context): ...

is now...

    @staticmethod
    def poll(context): ...

Pythons way of doing static methods is a bit odd but cant be helped :|

This does make subclassing poll functions with COMPAT_ENGINES break, so had to modify quite a few scripts for this.
2010-08-05 16:05:30 +00:00
Martin Poirier
5b345524ea RNA Types metaclass registration
See mailing list posts for details [1][2][3]

Addons still need to be fixed; Campbell said he'd do it today.

See any of the py files (outside netrender) in this commit for how to do it (it's rather simple).

[1] http://lists.blender.org/pipermail/bf-committers/2010-February/026328.html
[2] http://lists.blender.org/pipermail/bf-committers/2010-August/028311.html
[3] http://lists.blender.org/pipermail/bf-committers/2010-August/028321.html
2010-08-02 02:55:12 +00:00
Campbell Barton
02da5ecfed Apply first pass of edits to rna values from rna_booleans.txt.
These are not animated and are best not change names like this too late in the release.

ActionGroup.selected -> select:    boolean    Action Group is selected
BezierSplinePoint.hidden -> hide:    boolean    Visibility status
BezierSplinePoint.selected_control_point -> select_control_point:    boolean    Control point selection status
BezierSplinePoint.selected_handle1 -> select_left_handle:    boolean    Handle 1 selection status
BezierSplinePoint.selected_handle2 -> select_right_handle:    boolean    Handle 2 selection status
Bone.restrict_select -> hide_select:    boolean    Bone is able to be selected
Bone.selected -> select:    boolean
CurveMapPoint.selected -> select:    boolean    Selection state of the curve point
EditBone.restrict_select -> hide_select:    boolean    Bone is able to be selected
EditBone.selected -> select:    boolean
EditBone.selected_head -> select_head:    boolean
EditBone.selected_tail -> select_tail:    boolean
EditBone.locked -> lock:    boolean    Bone is not able to be transformed when in Edit Mode
EditBone.hidden -> hide:    boolean    Bone is not visible when in Edit Mode
NEGATE * FCurve.disabled -> enabled:    boolean    F-Curve could not be evaluated in past, so should be skipped when evaluating
FCurve.locked -> lock:    boolean    F-Curve's settings cannot be edited
FCurve.muted -> mute:    boolean    F-Curve is not evaluated
FCurve.selected -> select:    boolean    F-Curve is selected for editing
NEGATE * FCurve.visible -> hide:    boolean    F-Curve and its keyframes are shown in the Graph Editor graphs
FCurveSample.selected -> select:    boolean    Selection status
GPencilFrame.selected -> select:    boolean    Frame is selected for editing in the DopeSheet
GPencilLayer.locked -> lock:    boolean    Protect layer from further editing and/or frame changes
GPencilLayer.selected -> select:    boolean    Layer is selected for editing in the DopeSheet
Keyframe.selected -> select:    boolean    Control point selection status
Keyframe.selected_handle1 -> select_left_handle:    boolean    Handle 1 selection status
Keyframe.selected_handle2 -> select_right_handle:    boolean    Handle 2 selection status
MeshEdge.selected -> select:    boolean
MeshEdge.hidden -> hide:    boolean
MeshFace.hidden -> hide:    boolean
MeshFace.selected -> select:    boolean
MeshVertex.hidden -> hide:    boolean
MeshVertex.selected -> select:    boolean
MotionPathVert.selected -> select:    boolean    Path point is selected for editing
NlaStrip.selected -> select:    boolean    NLA Strip is selected
NlaTrack.locked -> lock:    boolean    NLA Track is locked
NlaTrack.muted -> mute:    boolean    NLA Track is not evaluated
NlaTrack.selected -> select:    boolean    NLA Track is selected
Object.restrict_render -> hide_render:    boolean    Restrict renderability
Object.restrict_select -> hide_select:    boolean    Restrict selection in the viewport
Object.restrict_view -> hide:    boolean    Restrict visibility in the viewport
Object.selected -> select:    boolean    Object selection state
ObjectBase.selected -> select:    boolean    Object base selection state
PoseBone.selected -> select:    boolean
Sequence.right_handle_selected -> select_right_handle:    boolean
Sequence.selected -> select:    boolean
SplinePoint.selected -> select_control_point:    boolean    Selection status
TimelineMarker.selected -> select:    boolean    Marker selection state
Sequence.left_handle_selected -> select_left_handle:    boolean
ActionGroup.locked -> lock:    boolean    Action Group is locked
Bone.hidden -> hide:    boolean    Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)
SplinePoint.hidden -> hide:    boolean    Visibility status
FModifier.muted -> mute:    boolean    F-Curve Modifier will not be evaluated

 note: rebaned uv_select to select_uv
2010-07-15 16:56:04 +00:00
Campbell Barton
4aa2ad003b game world buttons had old property name for mist toggle 2010-06-11 09:09:57 +00:00
Dalai Felinto
b45b0512c8 create COMPAT_ENGINE in game panels to allow external game engines - patch from Xavier Thomas(xat) 2010-06-10 23:53:13 +00:00
Thomas Dinges
e1bf9d30bc Properties Window:
*The narrowui value was hard coded in all ui scripts, made an user preferences option. Basically this value determines on which area width, it should switch between dual/single column layout. 

ToDo: The Changes only take effect when reloading scripts/restarting Blender (after saving as default). Will maybe add the "Reload Scripts" operator next to the button in the future. 

* Small fix for Fluid Add Button, when in single column mode. Didn't expand like the other "Add" Buttons.
2010-05-16 10:21:00 +00:00
Campbell Barton
78bb45931c scene.render_data -> scene.render
bpy.types.SceneRenderData -> bpy.types.RenderSettings

better do these changes before there are too many scripts out.
2010-02-23 12:48:35 +00:00
Campbell Barton
97bdfe6f1b pep8 cleanup + correction for external player operator return value. 2010-02-22 23:32:58 +00:00
Campbell Barton
85b7e19805 game settings wasnt checking if the scene has a world set (giving python errors while drawing) 2010-02-22 14:04:04 +00:00
Campbell Barton
4ef1fd1078 game engine support for recording animation back & some other minor changes. 2010-02-22 12:25:58 +00:00
Campbell Barton
23efeff6a9 [#21177] Text editor
Running scripts directly didnt call the register function, even though this is not essential its good to be able to run a script directly and see changes in the UI.
2010-02-16 09:55:07 +00:00
Campbell Barton
39c04315e2 change python scripts so modules which register with blender have a register() function rather then making import automatically run the register functions (generally considered bad practice by python people) 2010-02-14 11:21:21 +00:00
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Dalai Felinto
e37e3845a1 BGE: stereoscopic settings changes: (1) eye separation is the UI (2) focallength uses camera focallength
Now the default eye separation value is 0.10 (reasonable for games with 1 meter == 1 B.U.
The focallength used is the camera focal length (DOF settings). It allow you to even use different focal lengths for different scenes (good for UI)

In order to change it you can change the camera focal length or use Rasterizer.setFocalLength.
If you use the Rasterizer method it will use this value for all the cameras.

ToDo:
- Blenderplayer settings
- Update wiki documentation (any volunteer)?

* Note to stereo fans:
I don't have a real stereo environment to test it (other than cheap cyan-red glasses). If you can give it a try in a more robust system and report bugs or problems with BGE current system please let me know. I would be glad to help to make it work 100% by the time Blender 2.5 is out.

For the record, BGE is using the method known as 'parallel axis asymmetric frustum perspective projection'. This method is well documented here:
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/stereographics/stereorender/
2009-12-29 15:47:20 +00:00
Dalai Felinto
acdc3f4a44 commenting out "Todo" labels from bge player stereo options
the To Do was more like self-remaining since no one else is currently working with stereo :)
I will get back to that once 2.5alpha0 is out. In the mean time let's have a cleaner interface.
2009-11-24 01:09:19 +00:00
Campbell Barton
caab05ec8c rna UI api rename...
note: this aims to follow pep8 however I chose to use 'prop/props' rather then 'property/properties' because it would make function names too long.

itemR() --> prop()
items_enumR() --> props_enum()
item_menu_enumR() --> prop_menu_enum()
item_pointerR() --> prop_pointer()
itemO() --> operator()
item_enumO() --> operator_enum()
items_enumO() --> operator_enums()
item_menu_enumO() --> operator_menu_enum()
item_booleanO() --> operator_boolean()
item_intO() --> operator_int()
item_floatO() --> operator_float()
item_stringO() --> operator_string()
itemL() --> label()
itemM() --> menu()
itemS() --> separator()

batch script used http://www.pasteall.org/9345
2009-11-23 00:27:30 +00:00
Campbell Barton
6073bc9bc3 pep8 cleanup & default select axis to negative (artist requst, make sense if you model the RHS and spend most time looping at the models front) 2009-11-21 00:05:43 +00:00
Thomas Dinges
2577bfddfd Renamed "col2" to "wide_ui" which is more meaningful. 2009-11-19 13:26:51 +00:00
William Reynish
888565e248 *More single column stuff.
*Fixed and changed minor layout issues in curve and game properties
*Merged Curve and Text properties py file as they share a lot of options.
2009-11-14 23:24:15 +00:00
Campbell Barton
cbc5a78576 whitespace commit, (was some tabs mixed with spaces too) 2009-11-03 07:23:02 +00:00
Martin Poirier
9ea292290b Correct GPL license header for all python scripts 2009-11-01 15:21:20 +00:00
Campbell Barton
d964808846 made scripts pass the pep8 test (though not fully pep8 yet)
added comment in header to know if a script has been converted or not.
2009-10-31 23:35:56 +00:00
Campbell Barton
41c0236aaa GPL2 header from firebird (without disclaimer), notice theres no copyright attributed and only the GPLv2 (without the v2 or later clause).
Contributors list isnt used much in our C code so probably its easier if people just use svn blame for this.

Can change if this isnt acceptable but I guessed people didnt care so much since most scripts had no header.
2009-10-31 20:16:59 +00:00
Campbell Barton
944a8d33fe renamed buttons ui files to properties to match UI name change, needed to update some imports too 2009-10-31 19:57:59 +00:00