Age | Commit message (Collapse) | Author |
|
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!
|
|
Blender builds and links on Linux. For now without BGE and its player,
but that will come. Priorities are still a mess, so expect more commits
soon.
|
|
Our precious outliner is back! :)
Currently no operations are active there, nor notifiers to refresh
other windows. Be patient!
You can switch to RNA with the 'view' menu.
Later we'll sort out how much of both get integrated in 1 system, or
have both options, or make designated 'data view' for rna? ALso the
old Oops... bring back?
|
|
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.
|
|
Animated screen! (unfinished, now only draws, no animation code yet).
Fun though to see it all work. :)
NOTE: Mac ghost has timer bug, the GHOST_ProcessEvents() doesnt wake
up for timers.
NOTE2: Added while loop in wm_window_process_events() to force Ghost
giving all events to Blender. Timers otherwise don't accumulate...
might be needed to fix in ghost too.
I tend to think to code own timer, this ghost stuff is totally different
per platform.
|
|
- 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.
|
|
- Bugfix: loading files should close running handlers and subwindows, gave
memory leaks that way.
- Bugfix: space image copy function didn't do curvemap
- Cleanup: moved view operators from view3d_select to view3d_view
|
|
- View3D: added ALT+B clipping operator. Note this needs a call to
the new function view3d_operator_needs_opengl(C) to ensure you
can use opengl functions. Event handling by default doesn't set
opengl per subwindow, it's also forbidden to draw then!
We might consider to tag operators that need opengl...
- Forgot to include creator.c fix for loading builtin vector font
|
|
Brought back WIN32 hack to disable glScissor before swapbuffer.
Joshua was reporting swapbuffer glitches...
|
|
"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?)
|
|
- View3D: selecting added. Note it nicely respects user preset, by using
the keymap define SELECTMOUSE.
- Added missing initialize of default vector font, so text draws.
|
|
- fix crash opening submenus
- fix disappearing main menu when going into submenu
|
|
- Ported over view3d header buttons.
Most of the options don't work :) but some do!
- Fixed makefiles for new animation module
- added icon definitions in resources to match current trunk.
|
|
Two bugfixes:
- new WM_error() needed 'struct' in definition
- fixed crash rrors reading files with curves.
|
|
- CTRL+O "open recent file" is back. Need it for testing :)
- Added a simple WM_error() to replace old error()
|
|
- first the declarations, then the code! :)
|
|
Moved GPU init to the right location, it has to be called per
window you open. Now rip and add-window gives good views. :)
|
|
- removed context usage, should not be in this module
- remove G.main usage, now is passed along
- still some globals in use here, goal is to get rid of those too,
so that it's possible to load/save blendfiles without having to
think about some global state.
|
|
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.
|
|
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! :)
|
|
accessible via python)
Many descriptions are not written, grep for DOC_BROKEN if you have some spare time to write struct descriptions.
|
|
|
|
|
|
ripping areas and duplicating windows.
|
|
- WM subwindows now get freed on every ED_region_exit(). Was not
a leak, but it's cleaner this way (and saves some kilobytes!).
- fixed debug print for operators (on blender -d) to print correct
subwindow id.
|
|
Missing context.h for apple compiling.
|
|
Context API
This adds the context API as described here. The main practical change
now is that C is not longer directly accessible but has to be accessed
through accessor functions. This basically adds the implementation of
the API and adaption of existing code with some minor changes. The next
task of course is to actually use this design to cleanup of bad level
calls and global access, in blenkernel, blenloader.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context
Error, Warning and Debug Info Reporting
This adds the error reporting API as described here. It should help
clean up error() calls in non-ui code, but eventually can become used
for gathering messages for a console window, and throwing exceptions
in python scripts when an error happens executing something.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports
|
|
Added screen-set notifier. Works for arrow keys now. For those who
know the messy old code, admire the simple 2-function call method
now :) Only context setting is messy a bit, that'll be solved.
Also: removed redundant code, and move freeing window handlers up
one level; windows can keep their handlers while screen switches.
|
|
* Changed pupmenu function name and added back some standard popups.
|
|
Small commit, too much fun to not do separately:
- removed notifier restriction to go only to own window, so multiwindow
setups redraw correctly. (when other windows show other scenes we have
to handle still).
- fixed cursor type outside of window (got stuck to area-move cursor).
|
|
- Made a nice generic 'OK confirm' implementation for operators.
Just use in operator type definition this line:
ot->invoke= WM_operator_confirm;
It will autmatically use operator name for asking OK. It will
also use properties (if set before).
Note for Brecht: the test okee_operator() you coded could better not
be used in operators themselves.
In future we can also add menus that get automatically generated
based on operator properties. Like 'add constraint' showing the
constraint types.
- Added this confirm call for most of the keys you'd expect it for.
(user settings, delete marker, rip area, split region, etc).
- Cleanup: moved ed_markers.c to the util/ directory, it doesnt belong
in space_time. Also made separate function for the marker keymap
definition.
- removed ancient redraw notifier from ghost event level (every key
press gave full screen draw)
|
|
* Added support for defining properties for operator buttons, with
uiButGetOperatorPtrRNA. Needed to cleanup a hack that was there
for operator properties in RNA, now a separate OperatorProperties
type is used for storing operator properties, instead of being part
of the Operator type itself.
* Allow selecting menu items with mouse release instead of press again.
* Fix some cases with hanging tooltips in the UI.
|
|
More notifier and redraw cleanup
- notifiers are not filtered anymore, apart from window/screen notifiers,
they get to all regions.
- fixed drawing of 'action zones' in areas.
- added support for basic multilayer draw, like for action zones now,
and future other area decorations (tabs, region handlers)
check: ED_area_overdraw_flush()
ED_area_overdraw()
- bugfix in UI redraw tags, it was calling region pointer in free'd
data
- added notifier for marker-changed
- added keymap for markers to ipo window
|
|
* Only open tooltip when the mouse is still over the button.
* Remove an unnecessary redraw call, though the two mentioned
in the previous commit seem to be working OK (it's for action
buttons when you move the mouse away from the button, holding
the mouse button down).
* Fix missing alt key in key event strings.
|
|
More notifier cleanup;
- removed view2d sync notifier, its data operations are too complex
for UI hints/notes, direct calls work too :)
- updated missing gpl header in region file
Noticed weird delay on menu refreshing now... will check.
|
|
Work on getting notifiers in shape.
- Most important: local (to own region or area) redraw notifiers
have been depricated. This is not a good or correct notifier anyway.
Notifiers should be signals to other areas.
- Instead use these 2 functions:
ED_area_tag_redraw(area);
ED_region_tag_redraw(region);
It seems to me good convention to keep the area/region redraw tag
itself protected everywhere, for future improvements.
- Also added a basic WM function that checks overlapping regions,
and flushes redraws to underlying regions. This makes menus and
buttons allow to only send local region redraws.
(Brought back two "swapbuffer indicators" to test this.
- Todo: area 'action zone' redraws, and fixing other notifiers...
sending data pointers in a notifier seems to be bad idea.
|
|
which context to run the operator: WM_OP_DEFAULT, WM_OP_REGION_WIN,
WM_OP_AREA or WM_OP_SCREEN. This also replaces WM_operator_call_rwin
since it is more general.
This is useful for buttons and popup menus to run operators, and also
used by a new function to lookup the keymap item for that operator in
the right context.
|
|
make the key event button work again.
|
|
and event handling code still, how it integrates with operators and
handlers is not worked out yet. For testing, Ctrl+Q quit now shows
a confirmation popup using the following call:
okee_operator(C, "WM_OT_exit_blender", "Quit Blender");
|
|
Small improvements;
- switch spacedata now doesn't cause full screen refresh and draw
- cursor switching is not part of SCREEN_CHANGED notifier, this
makes area dragging ugly.
|
|
Added notifiers for timeline syncing. Works for Timeline window
only now.
Note that I've removed the malloc-free in a Notifier... notifier
system is still under probabtion :)
|
|
Mouse cursors now work again
- centralized screen-level cursor changes, no more operator
running for it.
- spacetypes have callback to check/set individual cursor
types. Use notifier SCREEN_CHANGED to make sure it works
on mode changes etc.
- new calls WM_cursor_modal() and WM_cursor_restore() to
make temporarily cursor types during modes.
- used above for view2d cursors.
|
|
- depricated area "headbutofs" and "headbutlen", which is now fully
replaced with view2d handling.
- needed to add header default V2D_ALIGN_NO_NEG_Y, V2D_LOCKOFS_Y seems
to not do anything atm :)
- new: running blender in debug (blender -d) will print the current
handler and operator in use (not mousemove)
|
|
which will then be set when the operator is called, example:
kmi= WM_keymap_add_item(keymap, "ED_SCR_OT_region_split", SKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "dir", 'h');
kmi= WM_keymap_add_item(keymap, "ED_SCR_OT_region_split", SKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "dir", 'v');
There is a hack I had to do here, since properties are defined
as member of wmOperator, will try to fix later, committing now
so it can be used already.
|
|
funtion WM_keymap_add_item() now returns keymap-item, so you can use it
to set default properties for operators with WM_keymap_property_set().
Brecht will fill in this function, requires rna magic!
Example: an operator ED_OB_OT_add_primitive can be configured with
keymap like this:
WM_keymap_property_set(keymapitem, "Primitivetype", "Sphere");
Similar conventions we can use later for button/menu calls.
This will make creating operators easier, allowing a developer to group
tools functionality nicely.
|
|
Small fix: in the ghost part of WM event handling, a function was
setting 'active subwindow' and registering headers to be drawn active
for this or not. It should be nicely inside the handler queue, so
it doesnt get executed on modal window-handlers.
(This solves flashing area headers while dragging area edges)
Still needed to resolve how screen handling goes... via handlers
with operators? On my list to keep track of. :)
|
|
the rna stuff but its close. Need to get it working for
blender then copy over same to game engine.
Kent
|
|
- Added rudimentary support for Ipo window
(Joshua can check on view2d issues for this? :)
- removed ED_area.h, added ED_space_api.h
|
|
TimeLine window pulldowns work sorta (for the options that were coded :)
Still trying to bring back code without recoding uiDefButs. In future these
will get directly operator stuff linked. For time being made a simple
operator call function, like:
WM_operator_call(C, "ED_MARKER_OT_add");
and for forcing operator to run in the main region-window:
WM_operator_call_rwin(C, "ED_MARKER_OT_add");
These calls also work for modal operators, like marker grab in this case.
|
|
Fix: on quit with a ghost event, windows were freed without freeing screens.
|