Commit Graph

433 Commits

Author SHA1 Message Date
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
fb87cfbb1b More radial control work.
* Added a rotation setting to brush (and brush RNA)
* Brought back strength and rotation modes for radial control
* Brought back brush texture for radial control
* Turned off display of sculpt brush during radial control operator
2009-01-24 22:58:22 +00:00
d62955bcac Added back old sculptmode FKEY radial control. (Moved fullscreen to F11KEY for now.)
Notes:
* So far, only size mode ported and tested, still strength and rotation to do
* Brought this back for sculptmode first, still to do are particle edit, vpaint, wpaint, texpaint, and I guess image paint?
* Changed the wm paint cursor slightly, to take a customdata pointer.
* Still need to bring back brush texture display in the cursor
2009-01-24 16:59:55 +00:00
66437a62a7 2.5
Font object + editing back.

Was quite some work due to a myriad of globals all over!
Works nicely 100% local now.

To enable a single textedit operator, I've added a new
keymap entry KM_TEXTEDIT, which gives all keyboard events
to the handler. Also had to add a new keymap-add function
to force a keymap handler in beginning of region handlers.
In future this can be used to prioritize handlers.

Also: split off the arrow keys (frame change) to a separate
region level handler. Can be set with default flag in
regiontype->keymapflag ED_KEYMAP_FRAMES
2009-01-23 14:43:25 +00:00
69310fb107 2.5: WM Compositing
* Triple Buffer is now more complete:
  - Proper handling of window resize, duplicate, etc.
  - It now uses 3x3 textures (or less) if the power of two sizes
    do not match well. That still has a worst case wast of 23.4%,
    but better than 300%.
  - It can also use the ARB/NV/EXT_texture_rectangle extension
    now, which may be supported on hardware that does not support
    ARB_texture_non_power_of_two.
  - Gesture, menu and brushe redraws now require no redraws at all
    from the area regions. So even on a high poly scene just moving
    the paint cursor or opening a menu should be fast.

* Testing can be done by setting the "Window Draw Method" in the
  User Preferences in the outliner. "Overlap" is still default,
  since "Triple Buffer" has not been tested on computers other than
  mine, would like to avoid crashing Blender on startup in case
  there is a common bug, but it's ready for testing now.

  - For reference "Full" draws the full window each time.
  - "Triple Buffer" should work for both swap copy and swap exchange
    systems, the latter still need the -E command line option for
    "Overlap".
  - Resizing and going fullscreen still gives flicker here but no
    more than "Full" drawing.

* Partial Redraw was added. ED_region_tag_redraw_partial takes a
  rect in window coordinates to define a subarea of the region.
  On region draw it will then set glScissor to a smaller area, and
  ar->drawrct will always be set to either the partial or full
  window rect. The latter can then be used for clipping in the 3D
  view or clipping interface drawing. Neither is implemented yet.
2009-01-23 03:52:52 +00:00
d5f69e8552 2.5
- warning cleanup (wrong casts, unused vars, missing protos)
- removed old cruft from node_edit.c
- cleaned wm_jobs.c a bit
2009-01-22 15:46:35 +00:00
9cc59fb0c3 2.5
Added WM Jobs manager
- WM can manage threaded jobs for you; just provide a couple
  of components to get it work:
  - customdata, free callback for it
  - timer step, notifier code
  - start callback, update callback
- Once started, each job runs an own timer, and will for
  every time step check necessary updates, or close the
  job when ready. 
- No drawing happens in jobs, that's for notifiers!
- Every job stores an owner pointer, and based on this owner
  it will prevent multiple jobs to enter the stack. 
  Instead it will re-use a running job, signal it to stop
  and allow caller to re-initialize it even.
- Check new wm_jobs.c for more explanation. Jobs API is still
  under construction. 
  Fun: BLI_addtail(&wm->jobs, steve); :)

Put Node shader previews back using wmJobs
- Preview calculating is now fully threaded (1 thread still)
- Thanks to new event system + notifiers, you can see 
  previews update even while dragging sliders!
- Currently it only starts when you change a node setting.

Warning: the thread render shares Node data, so don't delete
nodes while it renders! This topic is on the todo to make safe.

Also:
- bug in region initialize (do_versions) showed channel list in
  node editor wrong.
- flagged the channel list 'hidden' now, it was really in the
  way! This is for later to work on anyway. 
- recoded Render API callbacks so it gets handlers passed on, 
  no globals to use anymore, remember?
- previewrender code gets now so much nicer! Will remove a lot
  of stuff from code soon.
2009-01-22 14:59:49 +00:00
97692a3bf5 Changes to functions from blender/windowmanager/intern/wm_event_system.c
Python operator api was using WM_operator_name_call() which was confusing things too much.
Added WM_operator_call_py() which ended up being a very small function and split out operator creation into wm_operator_create()

Python operator now runs the poll() function and raises an error if it fails.

Eventually there should be error messages for poll that python can use to give the exact reason for failing (eg - library linked data, no active object...)
2009-01-18 10:46:26 +00:00
f08032e8f9 UI: various changes
* View2D to region now returns ints instead of shorts.
* Use "Numpad" instead of "Pad" in automatic keymap menu info.
* Menus can now use buttons other than BUTM and SEPR, in
  particular TOG and ROW are now supported instead of flipping
  bits manually.
* Added a simpler uiDefMenu* api for making menus now, and it
  only supports Operator and RNA buttons at the moment, will be
  used in next commit. Not sure how this will evolve .. makes
  menu code look cleaner anyways.
* Ensure that interface code doesn't crash when getting unknown
  Operators and RNA properties, and display their buttons grayed
  out in that case.
2009-01-15 04:13:38 +00:00
c7fa55eebd 2.5
Vertex Paint back!

Added WM level "paint cursor" system, which manages a custom painting
cursor for tools or modes. 

- Activate it with WM_paint_cursor_activate(). That function wants two
  callbacks, a poll(C) to check whether there's a cursor in given context
  and ARegion, and a draw(C, x, y) which gets called when appropriate.
- While paintcursor is active, the WM handles necessary redrawing events
  for all regions, also to nicely clear the cursor on region exit.
- WM_paint_cursor_activate returns a handle, which you have to use to
  end the paint cursor. This handle also means you can register as many
  custom cursors as you want.

At the moment, vertex paint mode registers only a mousemove handler,
all other events are still normally handled. This is stuff for the 
future todo.
2009-01-09 13:55:45 +00:00
70fe666456 2.5
- Lasso select back (CTRL+LMB), object centers only, 
  and for editmesh. See template in wm_operators.c

- Circle select for editmode back. Currently it still
  uses Ckey, and is only a temporary mode, not persistant.
  Persistant circle select can be added later with 
  tweak gesture keymap? We'll see. :) The old circle
  select was actually annoying that it was so sticky.
2009-01-02 14:11:18 +00:00
5d23eaa8f4 python support for reporting with operators.
* errors in python called operators are raised as errors
* Python defined operators errors are reported as errors (not full traceback yet)
* added BKE_reports_string, same as BKE_reports_print but it returns a string rather then printing it.
* WM_operator_name_call optionally takes an initialized report struct
2009-01-02 07:54:38 +00:00
112385660a RNA
* Object has some more properties wrapped, mostly game related.
* Scene frame changes now send a notifier.
* Added functions to create/free operator properties for calling
  operators. This also simplifies some duplicated code that did
  this. Ideally though this kind of thing should use the properties
  pointer provided by buttons and keymap items. Example code:

PointerRNA ptr;

WM_operator_properties_create(&ptr, "SOME_OT_name");
RNA_int_set(&ptr, "value", 42);
WM_operator_name_call(C, "SOME_OT_name", WM_OP_EXEC_DEFAULT, &ptr);
WM_operator_properties_free(&ptr);
2009-01-01 20:44:40 +00:00
e2e282989e 2.5
- Put back vertex/edge/face select 
- Mode menu allows going in/out editmode

- Tested some tweak event stuff in WM, made tweak event follow
  user preset for 'action' or 'select' mouse.
  (Wanted to try this for transform, but better get advise from
  Martin first :)
2009-01-01 18:05:12 +00:00
25fac7b001 2.5
Editmesh code cleaned and compiling/linking. A whopping
20k lines back! :)
Not that it does stuff... editmode in/out has to be done,
and loads of operators. Also linking/exporting editmesh
calls has to be reviewed.

Also: added a blender_test_break() mechanism in BKE.
2008-12-30 13:16:14 +00:00
0a8a00cd10 2.5: Error reporting
* Added a report list to operator, to which they can report errors and
  warnings. When the operator ends, it will display them with a popup. For
  python these should become exceptions when calling operators.
* Added a function to make a popup menu from a report list.
* Also added a utility function to prepend a string before the reports to
  indicate what they relates to. Also made the report functions used
  BLI_dynstr to simplify the code.
* Made file reading and writing report errors to the user again using this
  system, also replacing the left over uncommented bad level error() calls.
2008-12-29 13:38:08 +00:00
f0f451fc16 2.5
Notifier system upgrade, based on Brecht's doc.
Implementation notes:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers#Implementation

In short: let's try to strictly communicate in a notifier what happened.
The listeners then can act themselves. It also means that a frame-changed
notifier doesn't send out redraws, the editors themselves can decide.
2008-12-27 16:09:56 +00:00
0714d28236 python operators (in bpy_opwrapper.*)
This means you can define an operator in python that is called from C or Python - like any other operator.

Python functions for invoke and exec can be registered with an operator name.

keywords are read from the python exec() function, then used to create operator properties. The default python values are used to set the property type and defaults.

def exec(size=2.0, text="blah"): ...

is equivalent to...
prop = RNA_def_property(ot->srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_default(prop, 2.0f);

prop = RNA_def_property(ot->srna, "size", PROP_STRING, PROP_NONE);
RNA_def_property_string_default(prop, "blah");


TODO -
* make use of events
* return OPERATOR_CANCELLED/OPERATOR_FINISHED.. etc
* add support for array args
* more testing
2008-12-27 14:52:49 +00:00
bf956bb475 2.5
Timers: added extra 'event type' argument to call to add a timer:
WM_event_add_window_timer(win, event_type, interval)

This way other timer systems don't generate overhead on the queues.
(button timers were creating unused animation-playback operators)
2008-12-26 13:29:47 +00:00
0054e6d354 * added RNA_property_as_string to rna_access.c - can print most types except for pointers and collections.
* WM_operator_pystring to print the python func+args for an operator
* call WM_operator_print(op) in wm_operator_invoke(), simple echo mode should be moved later.
2008-12-26 03:56:52 +00:00
febb2c21e4 2.5
Further simplifying making operators with menus;
now you can add an 'invoke' callback:

    WM_menu_invoke

which will automatically generate a menu with choices and assign
it to the property 'type'.
What also helps typing is the new RNA_enum_is_equal() function.

Here's a paste of the now committed 'clear parent'. Note the
undo push will become a flag too.

http://pasteall.org/3660

(Brecht; fixed small bug in RNA_enum_is_equal!)

To evaluate: solving dependencies for multipe scenes... probably
will make a more generic flush call.
2008-12-24 18:06:51 +00:00
3c612bc0e2 2.5
Fix: popup menus were not freeing operators.
Made a new Popup menu call for this case:

uiPupmenuOperator(C, maxrow, op, propname, menustr);

It will set enum "propname" to the menu item and call operator,
register it optionally and free it. Use it in "invoke" calls.

Next: automatic menu generating for enum properties!
2008-12-24 14:52:17 +00:00
9e38e6aeb0 2.5
Better implementation of own window timers, not using ghost.
That makes blender's WM nice in control, and gives callers
of timers the opportunitie to evaluate time passed since
previous step. This system also only generates one timer 
event per main loop (events - handlers - notifiers - draw)

Small fix: allow keymap modifier to give KM_ANY to ignore
modifier keys, this to have TIMER keymap work.
2008-12-22 12:57:53 +00:00
eb8e220f26 2.5
- Added default Circle 'gesture' operator callbacks.
  As test, added in view3d window as Ckey, paint over object centers.
- Fixed notifier for gesture, to only cause redraws in own region.
2008-12-21 16:24:19 +00:00
4a86a07f8a wip operator py-api
"operator.ED_VIEW3D_OT_viewhome(center=1)" calls the operator, converting keyword args to properties.
Need a way to run scripts in the UI for useful testing.

Still need to deal with operator exceptions and verifying args against operator options. 

Added temporary WM_operatortype_first() to allow python to return a list if available operators, can replace this with something better later (operator iterator?)
2008-12-21 08:53:36 +00:00
12ad72ba8f 2.5
Two bugfixes:
- new WM_error() needed 'struct' in definition 
- fixed crash rrors reading files with curves.
2008-12-19 18:48:41 +00:00
a3d3619898 2.5
- CTRL+O "open recent file" is back. Need it for testing :)
- Added a simple WM_error() to replace old error()
2008-12-19 18:28:37 +00:00
62a03ea1b6 2.5
All of the view3d drawing code is now 'Context' free.
The idea is:

- ED_region_do_draw() sets and freezes drawing context
- regiontype draw() callback then can pass on other relevant 
  context stuff as function args.

Also cleaned up the WM opengl wrappers, to mimic opengl state;
no reason to give window pointer anymore.
2008-12-19 14:14:43 +00:00
d92b45d558 2.5
Drawing code for space_view3d module.
It's still not cleaned, have to check on context usage still.
Also missing is editmodes, armatures, and probably more.

Known issue: splitting to 2nd window gives bad opengl lighting.
Picture for fun:
http://www.blender.org/bf/rt2.jpg

Current stat: brought back almost 10k lines! :)
2008-12-19 12:14:58 +00:00