Age | Commit message (Collapse) | Author |
|
progress bar at all).
|
|
Make the UI API more consistent and reduce confusion with some naming.
mainly:
- API function calls
- enum values
some internal static functions have been left for now
|
|
|
|
This commit merges the code in the pie-menu branch.
As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.
Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/
Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments
Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.
Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
|
|
|
|
|
|
|
|
OPERATOR_CANCELLED.
|
|
Thanks Campbell Barton for reviewing.
|
|
also set_source_files_properties() wasn't working for rna_*_gen.c files,
set dna.c and generated data files with generated property too.
|
|
|
|
- win.cursor_set('WAIT')
- win.cursor_modal_set('TEXT')
- win.cursor_modal_restore()
|
|
related functions.
|
|
|
|
define a menu class first.
|
|
|
|
|
|
|
|
on the function instead of checking the name.
|
|
authors to avoid bugs with accessing removed data.
|
|
|
|
|
|
|
|
WM_keymap_add_item(keymap, "TEXT_OT_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0);
<--- this catch-all key map item at the end of the Text Editor keymap was
gobbling all the key events for user-defined hotkeys added after it in the
keymap. This includes all hotkeys for new operators defined by addons (via
keymap.keymap_items.new()).
As a slightly hacky workaround for this, I've added an extra parameter to
keymap_items.new() which will force the newly added item to get added to the
start of the key map items list (i.e. with top priority). To enable, simply add,
head=True to keymap_items.new() calls. For example:
keymap.keymap_items.new("MY_OP_my_operator_id", type='E', value='PRESS',
alt=True, head=True)
This should be useful for cases where there are similar catch-alls, where it is
necessary to insert our item before the offending catch-all (without knowing
which one it is). However, in general, it's recommended not to use this, unless
all other methods (inlcuding choosing another key combination if your first
choice doesn't work) fails.
|
|
|
|
|
|
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.
|
|
property names.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
Plus a few splits of very long lines…
|
|
Diff Keymaps
User edited keymaps now no longer override the builtin keymaps entirely, but
rather save only the difference and reapply those changes. This means they can
stay better in sync when the builtin keymaps change. The diff/patch algorithm
is not perfect, but better for the common case where only a few items are changed
rather than entire keymaps The main weakness is that if a builtin keymap item
changes, user modification of that item may need to be redone in some cases.
Keymap Editor
The most noticeable change here is that there is no longer an "Edit" button for
keymaps, all are editable immediately, but a "Restore" buttons shows for keymaps
and items that have been edited. Shortcuts for addons can also be edited in the
keymap editor.
Addons
Addons now should only modify the new addon keyconfiguration, the keymap items
there will be added to the builtin ones for handling events, and not get lost
when starting new files. Example code of register/unregister:
km = wm.keyconfigs.addon.keymaps.new("3D View", space_type="VIEW_3D")
km.keymap_items.new('my.operator', 'ESC', 'PRESS')
km = wm.keyconfigs.addon.keymaps["3D View"]
km.keymap_items.remove(km.keymap_items["my.operator"])
Compatibility
The changes made are not forward compatible, i.e. if you save user preferences
with newer versions, older versions will not have key configuration changes that
were made.
|
|
some other minor corrections.
|
|
|
|
gives warnings with variable length args.
|
|
|
|
modal operators).
- timer = WindowManager.event_timer_add(time_step, window=None)
- WindowManager.event_timer_remove(timer)
Still TODO, is a way for python to check the timer identity.
|
|
|
|
|
|
|
|
|
|
The problem was flag-enums were being treated as regular enums, a default value of 0 was using the first enum item, whereas with flag enums we want to be able to use 0 as a default value to specify all flags are off.
|
|
also make rna function for new images require width and hight args.
|
|
- wm.add_modal_handler -> modal_handler_add
- wm.add_fileselect -> fileselect_add
- ob.add_shape_key -> shape_key_add
- VIEW3D_OT_add_background_image -> VIEW3D_OT_background_image_add (same for remove)
Also made 2 internal cmake vars hidden.
|
|
|
|
reports (when using operator callbacks).
- when python operators fail to execute they were returning RUNNING_MODAL, now return CANCELLED
now when an operator fails it gives an error popup as well as a message in the terminal.
|
|
flagged as PROP_THICK_WRAP.
Also use const char in many other parts of blenders code.
Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
|