Commit Graph

111 Commits

Author SHA1 Message Date
85ebea5838 When in localview, MKey moves objects out of localview, added redraw notifiers 2009-10-10 12:29:11 +00:00
5c867406aa menus are now global (like operators), so for eg, the info add menu and the 3D add menu can be shared. 2009-10-08 19:06:32 +00:00
3ebd58673f Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.

There's actually 3 levels now:

* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
  or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
  to .py files as well to make creating distributable configurations
  easier.

Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.


Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
  keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
  added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
1b7e5b9abe WM: test with context-less add notifier. Notifiers are one
of the main reasons for passing along context, while actually
they don't need much context at all. Might be removed again,
but would like to have this especially for RNA API functions.
2009-10-07 21:39:24 +00:00
0c857a4f14 - made ungrab a second function - WM_cursor_ungrab
- ungrab can restore the position of the mouse clamped to the window bounds (much nicer for transform)
2009-10-07 21:19:35 +00:00
77476b294f Experimental option to allow moving the mouse outside the view, "Continuous Grab" in the user-prefs.
- Useful for dragging buttons to the far right when theyd otherwise hit the screen edge.
- Useful for transform though probably NOT what you want when using the transform manipulator (should make an option).
- When enabled, number buttons use this as well as a different conversion of mouse movement
  float numbuts: mouse 1px == 1-clickstep
  int numbuts: 2px == 1 (tried 1:1 but its too jitter prone)

details...
- access as an option to GHOST_SetCursorGrab(grab, warp)
- Currently all operators that grab use this, could be made an operator flag
- only Ghost/X11 supported currently
2009-10-07 07:11:10 +00:00
b466286c3e Render & Compositing Thread Fixes
* Rendering twice or more could crash layer/pass buttons.
* Compositing would crash while drawing the image.
* Rendering animations could also crash drawing the image.
* Compositing could crash 
* Starting to rendering while preview render / compo was
  still running could crash.
* Exiting while rendering an animation would not abort the
  renderer properly, making Blender seemingly freeze.
* Fixes theoretically possible issue with setting malloc
  lock with nested threads.
* Drawing previews inside nodes could crash when those nodes
  were being rendered at the same time.

There's more crashes, manipulating the scene data or undo can
still crash, this commit only focuses on making sure the image
buffer and render result access is thread safe.


Implementation:
* Rather than assuming the render result does not get freed
  during render, which seems to be quite difficult to do given
  that e.g. the compositor is allowed to change the size of
  the buffer or output different passes, the render result is
  now protected with a read/write mutex.
* The read/write mutex allows multiple readers (and pixel
  writers) at the same time, but only allows one writer to
  manipulate the data structure.
* Added BKE_image_acquire_ibuf/BKE_image_release_ibuf to access
  images being rendered, cases where this is not needed (most
  code) can still use BKE_image_get_ibuf.
* The job manager now allows only one rendering job at the same
  time, rather than the G.rendering check which was not reliable.
2009-09-30 18:18:32 +00:00
26836bf44f 2.5: Python operators now have a working poll() function,
solved by wrapping all polling in WM_operator_poll and
adding a special callback for python.
2009-09-18 13:02:20 +00:00
854ea35a24 2.5: Handlers are now evaluated in a different order, fixing some
issues like Shift+R (repeat last) not giving capital R in the text
editor. There is also new modal handler list at the window level,
and the API call will always add it to that one now, since modal
handlers were not used in other levels.

The order used to be:
* window modal + keymap
* area modal + keymap
* region modal + keymap

Now it is:
* window modal
* region keymap
* area keymap
* window keymap
2009-09-18 12:43:36 +00:00
69e919530e Keymaps now have a poll() function, rather than adding/removing
their handlers based on notifiers, which is simpler and more
reliable.

This fixes for example editmode or uv edit keymaps not working
when creating a new 3dview or image space.
2009-09-17 21:36:02 +00:00
9a25d22326 2.5 filebrowser
Appending and Linking 
* Linking Operator, invokes filebrowser for Append/Link
* Separated the append/link function into three parts:
** BLO_library_append_begin finds main for appending
** BLO_library_append_named_part appends one Object,Group, Material, ...
** BLO_library_append_end actually reads and expands the libraries

NOTE 1:
I also changed the returned properties for the filebrowser operators to the following convention:
"path" - the full path to a file or directory, means what is in directory + filename buttons in filebrowser
"directory" - the content of the directory button in filebrowser
"filename" - the content of the filename button in filebrowser
Usually only path should be required, but in some cases it might be more convenient to retrieve the parts separately.

Ton, Brecht: If you have time to take a look, let me know if anything needs to be fixed.
2009-09-12 19:54:39 +00:00
02f951c3a0 allow execution mode to be given as an argument to operators from python (requested by algorith)
example. bpy.ops.tfm.rotate('INVOKE_REGION_WIN', pivot=(0,1,2), ......)

bpy_array.c - was too strict with types, 0 should be allowed as well as 0.0 in a float array.
2009-09-03 22:37:09 +00:00
f250a92808 2.5/RNA:
* Added Context access to RNA_property_as_string. This is needed for doing a Python call to the object mode set operator, which has a dynamic enum property that needs context.
2009-08-16 14:43:08 +00:00
86cfc1966e better blender doesnt look idiot for siggraph with tips wider then the screen.
only show operator args in the tooltip that are different from the defaults.
2009-07-29 23:48:06 +00:00
239b78c637 - include operator commands in tooltips (needs sanitizing for transform operators, there are massive :|)
- WM_operator_pystring can now be used with an operator type and properties (rather then a wmOperator instance)
- removed menus from file selector
2009-07-29 23:12:30 +00:00
4a1266baad 2.5
Operator goodies!

--- Macro operators

Operators now can consist of multiple operators. Such a macro operator
is identical and behaves identical to other opererators. Macros can
also be constructed of macros even! Currently only hardcoded macros are
implemented, this to solve combined operators such as 'add duplicate' or
'extrude' (both want a transform appended).

Usage is simple:
- WM_operatortype_append_macro() : add new operatortype, name, flags
- WM_operatortype_macro_define() : add existing operator to macro

(Note: macro_define will also allow properties to be set, doesnt work
 right now)

On converting the macro wmOperatorType to a real operator, it makes a
list of all operators, and the standard macro callbacks (exec, invoke,
modal, poll) just will use all.

Important note; switching to a modal operator only works as last in the
chain now!

Macros implemented for duplicate, extrude and rip. Tool menu works fine
for it, also the redo hotkey F4 works properly.

--- Operator redo fix

The operators use the undo system to switch back, but this could give
errors if other actions added undo pushes (buttons, outliner). Now the
redo for operator searches back for the correct undo level.

This fixes issues with many redos.

Note for brecht: removed the ED_undo_push for buttons... it was called
on *every* button now, which is probably too much? For example, using
the 'toolbar' redo also caused this...
2009-07-29 17:56:38 +00:00
87b547c79f 2.5
Fix in include file, missing 'struct'
2009-07-28 16:50:13 +00:00
347a1f4376 2.5
Keymap feature: RightMouse in pulldown menus allows to assign 
a new hotkey.
2009-07-28 16:48:02 +00:00
aa44603146 2.5: File browser
* Side panels now use list widgets.
* Enabled theme colors for side panel.
* Add button in bookmarks panel.
* Operator panel title now uses operator name.
* For unix, added / to system, and home and desktop to bookmarks.

* For opening fileselect with filter, cleaned up the code a bit,
  adding WM_operator_properties_filesel instead of duplicating code.
* Also added filter for all operators calling fileselect, only image
  and file open did it before.
* Hide . files by default, and also hide files ending with ~.

* Added back .. (but not .) in the file list, I really missed this.
* File highlight now only happens when you're actually over a file,
  instead staying after you move the mouse away.
* Fix some redraw/refresh issues.
2009-07-28 16:46:14 +00:00
9ac754eca5 2.5
First step towards keymap editor!
Before getting too excited:
- doesn't save yet
- no rna properties can be defined
- no insert/remove keymap options yet
- no option yet to set 'key press/release'

But what does work;
- Keymap list is in outliner, new category 
  (Keymaps are listed in order as being created now)
- enable/disable a keymap entry: click on dot icon
- it displays python api names for ops
- browse new operator for keymap (menu button)
- set keymap to use other keys, mouse or tweak events
- four modifier key options

I first intent to test it all well, there are still
quite some modal map conflicts (like border select) and
there's problems assigning items to tweaks

Another issue is that a visual editor for keymaps might be
quite hard to use... the amount of data and options is just not
so fun for a buttons menu. There are ways to improve this though.
Maybe do this via a script?
2009-07-26 12:52:39 +00:00
6abddb0fc4 2.5
New feature: allowing to open temporarily windows for output.
Implemented for:

- Render output (use output menu "new window" option).
- User Preferences (alt+U, plus added in 'File' menu)

Currently the window opens where your mouse is. The Render window
works as usual, with ESC or F11 moving it to back or front again.
That allows the window position to remain where you moved it on 
new renders.
If you close a render window when it renders, the render thread
will be killed.

User prefs show 'info window' now... i thought we'd use outliner?
Anyhoo, I've made the 'save settings' to close the 2nd window as
well.

Opening a secondary file window for save I'll check on later,
this has to be checked with the current event system still.

the WM_window_open_temp() api call for this maintains currently
a *single* temp window. If you have a render window open, and call
for the preferences, the render window will be used for it. And
the other way around.

On closing the blender window, the temp windows close automatically
when there's no regular window open, and blender quits.
2009-07-24 12:43:59 +00:00
1ee8038e41 2.5: Top Menu
* Clean up File menu, added back recover last session op.
* .blend compress now behaves a bit different, previously
  it would only respect the user preference. Now it saves
  existing files the same way they are saved, and new files
  following the user preference. The save operator has a
  Compress toggle in the file browser left panels now.

* Add menu working again, some fixes to make these operators
  work outside the 3d view were needed.
* Timeline menu removed, its contents will be moved to the
  timeline header menus.
* Game menu can now start game, changed the start game op
  to choose another 3d view if none is available.
* Render menu has a few items now.
* Help menu contains a few links again.
2009-07-23 21:35:11 +00:00
ed92105857 2.5
Modal keymaps.

I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support.

The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way.
This system also allows to still handle hardcoded own events.

Tech doc:

1) define keymap
- Create map with unique name, WM_modalkeymap_add()
- Give map property definitions (EnumPropertyItem *)
  This only for UI, so user can get information on available options

2) items
- WM_modalkeymap_add_item(): give it an enum value for events

3) activate
- In keymap definition code, assign the modal keymap to operatortype
  WM_modalkeymap_assign()

4) event manager
- The event handler will check for modal keymap, if so:
  - If the modal map has a match:
    - Sets event->type to EVT_MODAL_MAP
    - Sets event->val to the enum value

5) modal handler
- If event type is EVT_MODAL_MAP:
  - Check event->val, handle it
- Other events can just be handled still

Two examples added in the code:

editors/transform/transform.c: transform_modal_keymap()
editors/screen/screen_ops.c: keymap_modal_set()

Also: to support 'key release' the define KM_RELEASE now is officially
used in event manager, this is not '0', so don't check key events with
the old convention if(event->val) but use if(event->val==KM_PRESS)
2009-07-21 11:03:07 +00:00
2d88c069bc missed this file in last commit. 2009-07-18 19:42:13 +00:00
9b75187c55 initialize keymaps after python so python keymaps, solves the problem of keymaps complaining about python operators not existing, but at the expense of some annoying init flags/functions. :/
Brecht/Ton you may want to check that C->data.py_init is a good place to store this.
2009-07-18 19:40:26 +00:00
a705f64245 python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator -> some.operator
this works for the calling operators from python and using the RNA api.

bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec()

eg.
split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit")

For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup.

bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__

personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
2009-07-17 12:26:40 +00:00
89830ea0c8 calling operators from python was raising an error without returning an error value.
brecht, switched the order back to fix this, added an argument for WM_operatortype_find() to fail without printing an error.
2009-07-13 08:33:51 +00:00
b00409e72d 2.5: X11
* Pass on mouse location on window leave/enter too, fixing some
  issues with button highlights and tooltips.
* When a modal operator runs, grab the mouse cursor so that for
  example transform still works when you move your mouse outside
  of the window, previously it would just stop then. This is
  automatic now for all modal ops, perhaps not always needed?
* Fix for a trailing button highlight issue.
2009-07-09 16:05:01 +00:00
51ae88aa3b 2.5: Mesh and Various Fixes
* 3D view Mesh menu works again, but incomplete.
* Add Properties and Toolbar to 3D View menu.
* Added "specials" menus back, vertex/edge/face and general.
* Various fixes in existing mesh operators, some were not working.
* Add MESH_OT_merge.
* Merge all subdivide ops into MESH_OT_subdivide, subdivide code
  changes to make smooth + multi give good results.
* Rename all select inverse ops to *_OT_select_inverse.
* Fix "search for unknown operator" prints at startup, and some
  warnings in py code.
* Don't run .pyc files on startup.
* Remove unused image window header C code.
2009-07-08 21:31:28 +00:00
5e749af429 2.5: Various Fixes
* Context panel now draws without header, with arrows, no scene name.
* Softbody vertex group search popup.
* Improve names for autogenerated shortcut keys in menus.
* Make most Select menus in the 3D view header work.
* Fix armature border select selection syncing.
* Add POSE_OT_select_constraint_target,
  MESH_OT_select_by_number_vertices, MESH_OT_select_vertex_path.
* Merge mesh select similar into one operator.
* Don't give MESH_OT_select_random Space hotkey.
* Add DAG_object_flush_update to many mesh edit tools, not calling this
  will crash with modifiers.
* RNA_def_enum_funcs for dynamic enums in operators, but not very useful
  without context yet.
* Fix refresh issue with image window header + editmode.
* Fix drawing of shadow mesh for image painting.
* Remove deprecated uiDefMenuButO and uiDefMenuSep functions.
* Remove keyval.c, code is in wm_keymap.c already.
* Rename WM_operator_redo to WM_operator_props_popup.
2009-07-08 15:34:41 +00:00
9a7ea9664e BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects.
Adding a UI to set the type on startup can be added easily.

# ----
class myPlayer(GameTypes.KX_GameObject):
  def die(self):
    # ... do stuff ...
    self.endObject()

# make an instance
player = myPlayer(gameOb) # gameOb is made invalid now.
player.die()

# ----

One limitation (which could also be an advantage), is making the subclass instance will return that subclass everywhere, you cant have 2 different subclasses of the same BGE data at once.
2009-06-29 12:06:46 +00:00
524b861437 2.5
Part one (of probably many :) of Operator review/validation.
Nothing final nor defined, it's reseach :)

- Added tool buttons in "Toolbar" (Tkey). Just four examples
  for objectmode, and six for mesh editmode.

(Review in progress is operator internal state vs context, what
do redo exactly, undo vs redo syncing, when op->invoke or not,
etc. This has to be pinned down exactly and frozen asap)

- On undo, clear redo-operator-stack for now (won't work)
- Added call to better detect active/current view3d region.
  ED_view3d_context_rv3d(C)
- Fixed some operators that missed correct redo (add-prim etc).

Later more fun!
2009-06-26 15:48:09 +00:00
a2f9ca3b3f 2.5
Nice goodie: Preview renders!

- Added new preview.blend, allowing super wide cinemascope previews
- Draws nicely blended inside widget type, rounded corners
- Preview now renders using all available cpus/cores.
- Uses - hopefully rock stable - method, which doesn't copy or 
  allocate anything for previews, but just uses render API calls.
- Multiple previews are possible! But, added provision in Jobs
  manager to only render one preview job at a time. If you start
  more preview jobs, they're suspended until it's their turn.

Bugfix: new buttons context code crashed when going full-window.

Tweaks are still needed for notifiers. I have to figure out still
how to retrieve SpaceButs button view types...
2009-06-07 11:12:35 +00:00
bc06159431 2.5
Fixes:

- HSV picker didn't work. Old option "No Hilite" for buttons made it not
  being checked for input anymore. Needs to be on attention list!

- Node editor wasn't drawing buttons correctly. Two things to keep track
  off:
  - Use wmLoadIdentity(), not glLoadIdentity()
  - I've added a wmPushMatrix() and wmPopMatrix() version for correct
    wm-compatible push/pop. Only one level for now.
2009-04-20 11:39:18 +00:00
38b6f8f167 UI:
* For new buttons spaces, automatically set horizontal/vertical
  align depending on size, instead of free.

* Cleaned up the UI panel API. There's now a new uiBeginPanel
  function which takes a panel type, and a uiEndPanel which takes
  the final size. uiNewPanel* functions will be phased out.
* Animate the re-alignment when a panel size changes, e.g. when
  enabling dupliframes.

* Load ui scripts from the release/ folder first if it is
  available. This makes it easier to edit ui scripts, since it
  will directly use the original files which avoids having to
  run the build system.
* Improve editing of panel types while blender is open. That
  means fixing some issues with lacking updates, overlaps, strange
  ordering. It even does an animation now when the panel resizes.
2009-04-16 21:39:45 +00:00
f3b84c9d52 2.5: added generic WM_operator_redo for use as invoke callback, similar
to WM_operator_menu for example, but popping up the redo menu. This is
useful for operators like particles rekey, which makes no sense without
specifying the number of keys.
2009-04-01 14:02:06 +00:00
6cc89b9d4e 2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:

* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
  the text editor. It's Bitstream Vera Sans Mono. This is the
  default gnome terminal font, but it doesn't fit entirely well
  with the other font I think, can be changed easily of course.

* Clipboard copy/cut/paste now always uses the system clipboard,
  the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
  as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
  windowmanager code.

* Find panel is now a kind of second header, instead of a panel.
  This needs especially a way to start editing the text field
  immediately on open still.

* Operators are independent of the actual space when possible,
  was a bit of puzzling but got it solved nice with notifiers,
  and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.

* Operators:
    * New, Open, Reload, Save, Save As, Make Internal
    * Run Script, Refresh Pyconstraints
    * Copy, Cut, Paste
    * Convert Whitespace, Uncomment, Comment, Indent, Unindent
    * Line Break, Insert
    * Next Marker, Previous Marker, Clear All Markers, Mark All
    * Select Line, Select All
    * Jump, Move, Move Select, Delete, Toggle Overwrite
	* Scroll, Scroll Bar, Set Cursor, Line Number
    * Find and Replace, Find, Replace, Find Set Selected,
	  Replace Set Selected
    * To 3D Object
    * Resolve Conflict
2009-02-28 23:33:35 +00:00
95fffbb57f 2.5
Useful goodies: most buttons for Image window back.
Not every button works! But what you can do:

- press Nkey to show/hide options
- use curves, with realtime updating
- image properties panel, load, browsing layers,
  setting types
- paint panel
- plus new paint color picker panel! (why it wasn't
  there in 2.4x is probably obvious, but now it can!)

Hrm... radial control should be added here too, and a nice
paint size cursor?
2009-02-21 18:33:09 +00:00
1090b0c598 2.5
Several things in one commit; could not split this up easily,
one job invoked another, and so on. :)

- Added pulldowns for save/load .blend file in top bar.

- To enable "Save" without further popups (save over) 
  I've added a signaling function in window header to
  indicate a succesful save.

- On any undo push it now signals 'file changed'. This
  goes by notifiers nicely, but now registers only the
  undopushes, which is quite unreliable. "Changed" state
  shows in header as "Blender*" and for OSX with the
  standard close button black dot.

- Made screencast show a button in top bar indicating such,
  and allowing quit. No hotkey for quit yet... but ESC will
  keep casting now.

- Fixed new BLF_init(), which should be in WM_init() and not
  on any .B.blend read.

- Fixed CTRL+F3 "Save Screenshot", which was still using old
  fileselect code.
2009-02-18 13:29:54 +00:00
4154e48c05 2.5
Proper integration of File-selecting in WM. The communication
flow was flawed. :) Main problem was that filewindow can change
the screen context entirely, and should not do this directly on
a call inside an operator. Another problem was that the operator
ownership was handed over to SpaceFile, which is asking for 
problems if you want to execute the operator with proper context
later on.

Solution is simple; window handlers already are valid owners of
operators and can manage context, so instead of directly talking
to the 'file space', you give the operator to a new handler this
way:

    WM_event_add_fileselect(C, op);

This handler then listens to events (OPEN, EXEC, CANCEL) sent
by the WM or by the filewindow itself. This way local context
operators (like "open new image in imagewindow") will survive
a full-window fileselector fine, and in future also secondary
windows browsing files.

Two bugfixes included in this commit too:
- Add sequence menus in Sequencer used wrong context.
- When handler executes operators, it sets stored context now
  by first checking if this is still valid.
2009-02-16 12:14:04 +00:00
875a08884b 2.5
- Node editor: link cut back, now under ALT+LMB, to prevent
  accidents. Note it now nicely intersects the real curved
  noodles with a line you draw!
- To make above work, replaced ogl curve draw with own bezier
  code.
- Added new WM standard operator callback for lines-gesture,
  the Lasso gesture now draws a closed line.
- Both callbacks have optional property 'cursor' to make it
  give modal info. For future also linestyle or color can be
  defined.
- Changed 'pin' icon in Image header to something that looks
  less scary... but there's no pin icon yet?
2009-02-07 14:03:34 +00:00
19896992ff 2.5
- Added back CTRL+X "reload start-up file".
  (Original name 'erase all' is a bit misleading, but we can
  go over all naming conventions later :)
- Added memfree for triple buffer data.
2009-02-07 10:00:46 +00:00
00e2d763ff 2.5
Moved 'redo last operator' stuff to WM level, with a 

  WM_operator_repeat()

Code in screen_ops was not checking all operator stuff
correctly, so repeat menu (F3 now) crashed in cases.
2009-02-01 12:00:00 +00:00
a60413abd1 2.5
Edit mesh:
- fixed compile, shul only committed the function declaration, not 
  the code for 'make fgon'. 

- Put the Fgon option under:
  ALT+F: make fgon
  SHIFT+ALT+F: clear fgon
  (note, SHIFT+F = fill :) 

- Fixed loop select to use two booleans, as Martin pointed me
  correctly at! Using 1 variable was lazy coding.
2009-01-31 09:23:17 +00:00
480be71514 2.5
- Edit mesh: Add ctrl+click add vertex or extrude.
  I've made it not move the 3d cursor in that case.

Also found out tweak events conflicted with existing
keymap definitions; on tweak failure (= no mousemove) 
it now passes on the mouse event as 'mouse down' for 
the remaining keymaps to check.
These then actually respond to mouse-up instead of down...

The location in the keymaps where tweaks get generated
remains important. Examples:

1 - 'select' mouse-handler, operator return pass-through
2 - tweak handler checks, and makes tweak event
3 - grabber responds to tweak event

1 - ctrl+mouse tweak handler checks, makes tweak event,
    or passes event on
2 - if tweak event, it runs lasso
3 - else when passed on, ctrl+click extrude happens

In the first case, select works on mouse-down, immediate.
In the second case, extrude happens on mouse-release, even
though the keymap defined mouse-press.

This will make designing nice balanced keymaps still not
simple; especially because you can't tell operators to
pass on the key... although we can add the convention that
select-mouse operators always pass on to enable tweaks.

Still a good reason to wait with custom keymaps
when this is fully settled!
2009-01-30 18:18:41 +00:00
5f9ee2cbfe 2.5
- Made WM_cursor_wait() work without context or pointers,
  like old waitcursor(). Only use when operations entirely
  block UI. It will set waitcursor for all open windows.

- Cleanup in mesh tools, removing old cruft, and prepare
  for more goodies for shul to work on!
2009-01-29 18:54:22 +00:00
b18defbffb 2.5:
* Automatic shortcut keys in menus now compare operator properties as well.
  Implemented IDP_EqualsProperties for this.
* I imagine all these compares may be a bit slow, for this case it's not
  so bad though because it only happens for one menu when it is opened.
2009-01-28 23:29:27 +00:00
c0ee40ab10 2.5
Compositor now uses threaded jobs.

- updates happen per preview node! Check this file for
  fun: http://www.blender.org/bf/composite_image.blend
  (any compo node could get preview!)
- had to ensure the composite data gets fully copied before
  it executes thread, so editing is not frustrated.
- put back node buttons (missing init)
- added WM_jobs api call to check for running job,
  illustrated with red light icon in 'use nodes' button.
- added another callback to WM_jobs, to initialize.
  use this init to ensure you only do it when job really
  starts.
- added an extra notifier option for WM_jobs, to signal
  finished job (like redraw image view)
- fixed file read error, it copied the screen it read,
  instead of using it.
- commented out annoying prints for missing ops in imagewin
2009-01-27 17:12:40 +00:00
bf05827319 * Added WM_operator_filesel which can be used for an operators invoke function (like WM_operator_confirm).
It opens the files selector if "filename" property has not been set, else it executes the operator directly. Brecht, you might want to check, currently only sequencer add operators use it.
* Added back Effects menu back, replaced SEQUENCER_OT_add_color_strip with SEQUENCER_OT_add_effect_strip.
* Made sequencer header use operator UI functions.
* gcc complains when char's are used as array indicies when they are not explicitly signed/unsigned, corrected previous change for vpaint to silence this error.
2009-01-26 09:13:15 +00:00
3d39996f0f Added radial control support to vpaint and wpaint. Added undo pushes as well. 2009-01-25 21:02:52 +00:00