Age | Commit message (Collapse) | Author |
|
This means you can for example, uv unwrap in quad-view and change settings in the toolbar without defaulting back to the first quad-view region available.
This may be displayed to the user later, for now this is set on executing registrable operators.
|
|
Otherwise it'll be nasty crashes when, say, adding and removing
screens with lists visible on the screen.
Thanks Ton for assisting looking into this issue :)
|
|
|
|
|
|
replace do prefix with do_ for bool vars.
|
|
|
|
|
|
|
|
cleanup some defines/includes for windows.
|
|
else if's
|
|
also remove large, duplicate comments from sunsky.h
|
|
- correct error in own last commit for BKE_screen_find_big_area()
|
|
was being done with static functions that were copied about.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
instead get all colors at the start and index them when drawing curves in editmode.
also remove redundant NULL check.
|
|
|
|
isn't inlined all over.
|
|
When rendering, during processing scene data, drawing in 3d window
is now locked. Can get extended to more areas in UI easily.
At least this solves all crashes with conflicting memory access in
render && 3d drawing. Deleting objects via operators or delete
modifiers isn't locked yet.
Also fixed: crash on quitting a renderwindow when it was rendering.
|
|
|
|
python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
|
|
- remove MEM_guardedalloc.h from header files (include directly)
|
|
scene/view functions from view3d_view.c into BKE_screen since they need to be accessed when changing cameras from outside the view.
|
|
|
|
warning, uses bad level call, will need to resolve very very soon!
|
|
|
|
This commit adds a few more execution contexts for operators, given the increasing tendency for some special regiontypes to exist within areas that must have their own set of special operators.
Examples of these include the "channel" operators in the Animation Editors (i.e. those in the 'Channels' menu), and the "Fit to Preview Window" operator for the Sequencer.
Previously, operators such as these would not function when clicked on from the menus, and they would not show the hotkeys they were mapped to.
Also, fixed a few operator definitions in the Animation Editors which were missing ot->prop defines. This meant that some hotkeys (mainly selection) were shown incorrectly in the menus.
|
|
from screen.
|
|
|
|
3D add menu can be shared.
|
|
This calls a registered menu as a popup so we can reuse header menus , currently used for Node editor and Sequencer add menu (Shift+A), can be used for toolbox too.
|
|
* Move function to compute visible screen layers to BKE.
* Use this now in the depsgraph, was still using this all layers
to flush. Still missing a way to get the current scene in
background mode..
* Also two more function to not require a scene pointer anymore:
* DAG_object_update_flags is now DAG_id_update_flags.
* DAG_ids_flush_update is now available next to DAG_scene_flush_update.
|
|
* When resizing the window, the top position is now preserved,
instead of the center position.
* Fix zoom level not being preserved in various cases, when
changing both with and height. This replaces some earlier code
which did this at screen level but wasn't very reliable.
* Different tabs now each preserve their own scroll.
* When switching between tabs, it now scrolls to show as many
buttons as possible, instead of possibly showing empty space.
There is a trade-off here between doing that keeping the
buttons in the same place, no ideal solution exists I think.
* Change zooming in/out to be symmetric, for example doing
numpad + then - did not give the original zoom level back.
* Added some calls to avoid hanging tooltips when manipulating
the view.
Internals:
* Added V2D_KEEPOFS_X and V2D_KEEPOFS_Y to keep the top/bottom
rather than the center.
* Renamed V2D_KEEPZOOM to V2D_LIMITZOOM (seems more appropriate),
and make V2D_KEEPZOOM preserve the zoom level.
|
|
- running a script from a file now uses the PyRun_File(FILE *, ...) rather then PyRun_String("exec(open(r'/somepath.py').read())"...), aparently FILE struct on windows could not ensured to be the same between blender and python, since we use our own python on windows now it should be ok.
- generating docs works again (operator update for py style syntax broke them)
- python operator doc strings was being overwritten
- added rna property attribute "default" to get the default value of a property, not working on arrays currently because variable length arrays are not supported.
|
|
they were not working and we have plans for better script integration in 2.5
|
|
* ID blocks can now get RNA properties defined from python, e.g.:
bpy.types.Scene.BoolProperty(..)
* RNA structs/functions/properties can now get pointers duplicated
(mostly strings), since we can't point to some static string then.
* Added ExtensionRNA struct to add into *Type structs for subclassing,
is a bit more compact than defining the 4 variables each time.
Only disadvantage is it requires including RNA in more places.
|
|
More toolbar functionality for workflow review.
- Split the region in two parts, bottom has the Tool Properties, the
top part shows 2 panels, one for python defined tools, other for a
"tool shelf" which (later) will get saved in files.
- Added a full context driven framework for this toolbar, showing
the tools depending on 3D window 'mode'. Both python defined tools
as the shelf respect this. So - for example - you will see different
tools in editmode mesh, as in vertex paint mode, etc.
- First template for the python tools will be committed after this commit;
it has placeholder tools to just show/test functioning.
NOTE: if you had saved a layout that shows tools region, open/close it
once to get the new region created for properties.
TODO:
- Moving paint properties to tool settings
- Test a layout with horizontal toolbar (without properties)
- Bring back floating panels, and put tool-properties here. (as option)
|
|
* Headers and menus can now be created in python.
* Replaced the uiMenuItem functions to create menus with equivalent
uiItem functions using a layout, removing duplicated code.
* More uiItem functions are now exposed to python.
* The text editor header, panels and one of its menus are now created
in space_text.py.
* Buttons window data context icon new changes depending on active
object.
Issues
* Icons are not wrapped yet, hardcoded ints at the moment.
* The ID browse template is unfinished.
|
|
The Python API to define Panels and Operators is based on subclassing,
this makes that system more generic, and based on RNA. Hopefully that
will make it easy to make various parts of Blender more extensible.
* The system simply uses RNA properties and functions and marks them
with REGISTER to make them part of the type registration process.
Additionally, the struct must provide a register/unregister callback
to create/free the PanelType or similar.
* From the python side there were some small changes, mainly that
registration now goes trough bpy.types.register instead of
bpy.ui.addPanel.
* Only Panels have been wrapped this way now. Check rna_ui.c to see
how this code works. There's still some rough edges and possibilities
to make it cleaner, though it works without any manual python code.
* Started some docs here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNATypeRegistration
* Also changed some RNA_property and RNA_struct functions to not
require a PointerRNA anymore, where they were not required (which
is actually the cause of most changed files).
|
|
- Register python panels
- Added a generic class checking function BPY_class_validate() for panels/operators.
- No button drawing yet
Brecht, Added RNA_enum_value_from_id() and RNA_enum_id_from_value() to rna_access.c to do lookups between identifiers and values of EnumPropertyItem's, Not sure if these should go here.
|
|
* Added a PanelType and HeaderType for registering panels
and headers in regions. When the region draws, it will
then automatically draw the ones that were registerd with
poll and draw callbacks.
Used for text header, properties and object buttons now.
|
|
|
|
* Add Area Swap: hold alt and drag with LMB from either actionzone. Release LMB on area you want to swap with. I added a matching cute cursor for this (and to make it a politically delicate issue, it's white on black).
Note, there are still some error totblocks that I haven't been able to track down properly yet, so that's still a bit WIP.
|
|
Simple toolbox-style menu system. Brecht will review it
though, and/or check on way to use it for menus.
I tried to avoid uiBlock and rna stuff all over. :)
Quick image test:
http://www.blender.org/bf/rt.jpg
Examples you can read in:
- editors/screen/screen_ops.c:testing123() (press F5)
- editors/object/object_edit.c:object_add_primitive_invoke()
(press SHIFT+A)
Concept is simple:
uiMenuBegin(): returns a handle.
uiMenuEnd(): puts it all to work.
In between you can add items like:
uiMenuItemVal(): a name, icon, retval (use uiMenuFunc())
uiMenuItemO(): an operator + icon
uiMenuItemEnumO(): an operator, property name, value
Sublevels go easy too:
uiMenuLevel(): creates item for sublevel, with function pointer.
Inside that function you can use all menu calls again.
Levels can go as deep you want.
uiMenuLevelEnumO(): creates operator sublevel for an enum
|
|
- wm draw method is now initialized correct when reading older
files, but the SDNA bug causing the problem is still unsolved.
is due to // char pad[8]; not being recognized as commented.
- triple buffer proxy texture test follows spec better now,
was disabling triple buffer unnecessarily on some drivers.
- some cmake compile fixes related to sequencer pthread usage
and removed bad level calls lib for player.
- show outliner header buttons in oops mode as well until that
can be switched in the UI.
- fix region data free issue for tooltips
- warning fixes
|
|
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.
|
|
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:
- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes
Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).
To see it work; also added new feature for region split,
press SHIFT+ALT+CTRL+S for four-split.
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.
Note about the code:
- currently view3d still stores some depricated settings, to
convert from older files. Not all settings are copied over
though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
for it should keep track of that.
Bugfix in transform: quat initialize in operator-invoke missed
one zero.
Als brought back GE to compile for missing Ipos and channels.
|
|
New: Custom region draw callbacks.
For Martin: an example is now in space_view3d/view3d_edit.c
On middlemouse rotate view, it draws a small square in center.
It works likes this:
#include "ED_space_api.h"
handle= ED_region_draw_cb_activate(region->type, drawfunc, type)
and to stop it:
ED_region_draw_cb_exit(region->type, handle)
drawfunc is of type (const bContext *C, ARegion *ar)
currently it gets called only as type REGION_DRAW_POST, later we
can add more (PRE, POST_XRAY, POST_2D, etc).
For correct usage, these calls should return leaving view transform
unaltered.
|
|
* API and usage is basically the same still.
* Panels were moved to region level. I first thought of keeping them at area
level, but having them at region level it's simpler to handle events and do
drawing, and also to integrate with view2d. They can still become area level
overlapping regions, if we make a floating (or docked) region that can
contain panels.
* Added back a few panels from the scene buttons for testing.
Issues still:
* The view2d handling and alignment refresh of panels is not correct yet in the
buttons window.
* I did not yet bring back the block handlers system. It was basically a system
that stored which panel was open and where the events for that panel would go.
Just a few functions, but not sure how it fits in 2.5.
* There was a case where dragging panels would not properly remove the window
level handler, but could not redo anymore even though I don't think I fixed
it.
* Some text in the panels goes past the end of the button, that is due to the
checkmark button drawing, not related to this commit.
Other UI code changes:
* Renamed interface.h to interface_intern.h for consistency.
* Fixed some issues with freeing of blocks when they changed due to context.
* uiDrawBlock now takes a context pointer (mostly for block drawextra).
|
|
Fix for crash on joining (previously splitted) areas.
Reason was the stored regions in pushed 'spaces' not being copied.
next: free running handlers on area join/split.
|
|
Second attempt at fixing crashing when merging spaces after splitting them.
|