Age | Commit message (Collapse) | Author |
|
|
|
had to //XXX comment some funcs.
|
|
* Added icon to property and enum property items. The latter is
responsible for the large number of files changed.
* For RNA functions, added PROP_RNAPTR flag to ask for a PointerRNA
as argument instead of a C pointer, instead of doing it implicitly
with the AnyType type.
* Material: properly wrap diffuse/specular param variables, and
rename some things for consistency.
* MaterialTextureSlot: added "enabled" property (ma->septex).
* Image: make animated property editable.
* Image Editor: make some things editable, notifiers, respect state.
* Context: fix issue with screen not being set as ID.
|
|
- allocate transform and crop on "use"
- bring back the scopes drawing (histogram, vectorscope, luma)
- tweak properties layout (need more)
|
|
|
|
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD
Notes:
* Game and sequencer RNA, and sequencer header are now out of date
a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
not needed anymore.
* Fix "duplicate strip" always increase the user count for ipo.
* IPO pinning on sequencer strips was lost during Undo.
|
|
- Move buttons into the sequencer Nkey region
- Made the header and menu items use the python api, still need to get more buttons working.
- Fixed some minor problems
|
|
Forget 'svn add'...
|
|
Sequencer: added Nkey + UI region, with two empty panels to fill!
|
|
operators can use.
This allows the sequencers Add-Image strip to work like it does in 2.4x.
- as well as setting the "filename" operator property, operators can have collections called "files" and "dirs" which are set when available.
- RNA_OperatorFileListElement as new collection type, its a bit redundant since each item only has a "name" property but its needed since we don't have a string array type.
- the file selector now prints operators it runs.
Tested with python, adding a list of images works to the sequencer works.
bpy.ops.SEQUENCER_OT_image_strip_add(name="MyImages", start_frame=54, channel=2, filename="/somedir/", replace_sel=True, files=[{"name":"test1.png"}, {"name":"test2.png"}])
|
|
- Fix: text draw in fonts was slightly too low; it didn't calculate offset
correctly. Now it is aligned to have number characters in center.
- Fix: text clip was too wide, giving errors on extreme zoom in.
- Added boundbox-clipped default text drawing for view2d:
void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, char *str)
(Note; also for previous commit, this cache immediately projects, so if
you change view2d while drawing, text is still on correct positions)
|
|
Added support for cached text drawing in View2D. Cache is needed to
prevent the viewmatrix being set/restored on each text drawing.
Adding a string:
void UI_view2d_text_cache_add(View2D *v2d, float x, float y, char *str)
Drawing:
void UI_view2d_text_cache_draw(ARegion *ar)
Nothing else needed; just make sure cache-draw is always called at end
of a view2d drawing function, to clear cache memory.
On todo for next: a version with a rectf boundary to clip text within.
|
|
* Added some properties of uiLayout that can be set. I've added
some API code for more than the two I've implementeds, so
ignore those for now.
* layout.active = False will gray out buttons inside a layout.
* layout.enabled = False will gray out and completely disable
the buttons inside a layout.
* Also some function renames.
|
|
Was missing includes for blenfont module in a few places.
|
|
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
the old BMF api.
I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.
MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
Always have to link/include the freetype2 library
Remove any reference to libbmfont
Remove any reference to libftfont
Remove any reference to libbftgl (or libbFTGL)
|
|
* Made separator item work horizontal & vertical.
* Add colon (:) automatic for int/float/enum/string.
* Added space variables to uiStyle and use them in the
layout engine.
* Added initial World buttons by Thomas Dinges, thanks!
* Added some code for modifiers in the Object Data context.
This will become a template though.
* Use a common poll() callback in the scripts to reduce code.
|
|
* 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.
|
|
- Fun for testers: Added "Redo Operator" Panel in view3d 'nkey' region.
It's going to be part of tools UI I know, but this will give good
tests of what goes on with operators. I had to add small fixes in
Transform for it already. :)
One important issue to note is that it lists every operator, also from
non-3D-window ops. Needs checked or classified somehow.
- Fix: removed bad 2.4x hack from how pulldown menus were defined. Made
widget code cleaner, and will show menus like SHIFT+A correct now.
|
|
More cleanup!
- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
(was only in use for radiosity buttons)
And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:
- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
a several calls using different args.
Further just added the missing includes, and removed unused vars.
|
|
|
|
- use select as a suffix eg UV_OT_loop_select -> UV_OT_select_loop
- Each select all operator was using slightly different wording...
select_all, deselect_all, de_select_all, select_de_select_all -> select_all_toggle
- selection -> select
- POSE_OT_select_connected -> POSE_OT_select_linked to match other operators
- NODE_OT_delete_selection -> NODE_OT_delete since its not used in other operators
- ANIM_OT_previewrange_define -> ANIM_OT_previewrange_set to match other operators
- NODE_OT_fit_all -> NODE_OT_view_all to match other operators
- View2D_OT_* -> VIEW2D_OT_* to match VIEW3D
- View2D_OT_view_downscroll -> VIEW2D_OT_scroll_down more logical
- removed MARKER_OT_mouseselect_extend and made extend a boolean property of MARKER_OT_mouseselect
- MARKER_OT_mouseselect -> MARKER_OT_select
- GROUP_OT_group_remove -> GROUP_OT_objects_remove more logical since its removing objects from groups
- MESH_OT_removedoublesflag -> MESH_OT_remove_doubles
- redundant words MESH_OT_split_mesh -> MESH_OT_split, OBJECT_OT_object_delete -> OBJECT_OT_delete
renamed selection operator properties
extend_select -> extend
column_select -> column
select_children_only -> children_only
... Since these are all in the context of selection operators there is no need for the extra 'select' in the property name.
Updated docs
http://www.graphicall.org/ftp/ideasman42/html/bpyoperator-module.html
|
|
failsafe.
|
|
-r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
2.5 got merged, but no new files were added. Calls to these files
are commented out with "XXX etch-a-ton". editarmature.c and
transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
(player still fails to link).
|
|
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.
|
|
|
|
|
|
ot->idname when defining ops.
* User interface uses this as a tooltip when NULL or "" is given.
* Python doc generation includes this description
* Python defined ops take the description as an argument.
* NULL check to image_ops.c, was crashing on exit when there was an image open.
|
|
Changed some of the sequencer menus to use uiMenuItem's
|
|
* Removed Sequencer's own 'border zoom' tool. There is a generic one in View2D that should be used instead.
* Changed the hotkey for View2D's version of borderzoom to Shift-B
* Fixed a few hotkey mentions entries in old menus
* Added set start/end frame operators for TimeLine. (SKEY and EKEY)
* Fixed various issues in Graph Editor
- channels area is now drawn wide enough to show the 'protect' toggles without needing to scroll
- new Graph Editors have 'auto-snap' enabled by default
|
|
Sanitized the 'tweak' event.
Original idea was to have WM event system generating it
automatically. However, I first tested it via a handler
and operator, to check what kind of configurations would
be useful. It appeared to not work nice, also because
that inserting a tweak operator in a keymap is confusing.
Now 'tweaks' are generated automatically, and can be
catched by keymaps as any event. The current definition
of tweak is:
- if Left/Middle/Rightmouse pressed
if event wasn't handled by window queue (modal handlers)
start checking mousepositions
- while mousepositions are checked
- escape on any event other than mouse
- on mouse events:
- add tweak event if mousemove > 10 pixels
- stop checking for tweak if mousebutton released
- Tweak events have a define indicating mousebutton used
EVT_TWEAK_L, EVT_TWEAK_M, EVT_TWEAK_R
- In keymap definitions you can use _S or _A to map to
action or select mouse userdef.
- Event value in keymap should be KM_ANY for all tweaks,
or use one of the eight directions:
EVT_GESTURE_E, _SE, _S, _SW, _W, _NW, _N, _NE
- And of course you can add modifier checks in keymaps for it.
- Because tweaks are a result of mouse events, the handlers get
both to evaluate. That means that RMB-select + tweak will work
correctly.
In case you don't want both to be handled, for example the
CTRL+LMB 'extrude' and CTRL+LMB-tweak 'lasso select', you will
need to set the first acting on a EVT_RELEASE, this event only
gets passed on when tweak fails.
The current system allows all options, configurable, we had in 2.48,
and many more! A diagram of what's possible is on the todo. :)
Also in this commit: lasso select editmesh failed with 'zbuffer
occluded select'. Also circle-select failed.
|
|
Big commit, but mainly adminstration.
- Enabled ot->flag OPTYPE_UNDO to work.
- Removed all redundant ED_undo_pushes, but I'd
recommend everyone to check it while testing. :)
- Added view manipulations as OPTYPE_REGISTER,
although this will flood the redo stack a bit...
Nevertheless; for a "redo last action" panel we
can simply check if both flags are set for redo.
- Bugfix in editmode undo: selectmode was cleared,
so you couldn't select after undo
- Bugfix in mixing tweaks and keymaps... solution
works but is weak, need to think over a while.
|
|
- sequencer border zoom (Shift+B) or from the header.
- added includes for blender.c and outliner.c
- editfont.c got rid of warning
|
|
- 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!
|
|
* Cleaned up UI_interface.h a bit, and added some comments to
organize things a bit and indicate what should be used when.
* uiMenu* functions can now be used to create menus for headers
too, this is done with a uiDefMenuBut, which takes a pointer
to a uiMenuCreateFunc, that will then call uiMenu* functions.
* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
specific to making popup menus. Will convert the other
conformation popup menu functions to use this too so we can
remove some code.
* Extended uiMenu functions, now there is is also:
BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.
* Converted image window headers to use uiMenu functions, simplifies
menu code further here. Did not remove the uiDefMenu functions as
they are used in sequencer/view3d in some places now (will fix).
* Also tried to simplify and fix bounds computation a bit better
for popup menus. It tried to find out in advance what the size
of the menu was but this is difficult with keymap strings in
there, now uiPopupBoundsBlock can figure this out afterwards and
ensure the popup is within the window bounds. Will convert some
other functions to use this too.
|
|
sequencer for the first time.
* Added WM_OT_tweak_gesture operator for select, drag
* Sequencer select operator now returns OPERATOR_FINISHED|OPERATOR_PASS_THROUGH
|
|
also fixed a call that had wrong number of args.
Kent
|
|
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.
|
|
view_selected.
* sequencer transform now does overlap checks.
* removed old transform functions from sequencer_edit.c
* shuffle_seq moved to kernel, now moves strips to the end of the last sequence of itschannel (if all channels are used). 2.4x would remove the strip.
* most of the 'Strip' menu items now call their operators in the header menu, some for view and select too.
|
|
|
|
|
|
too.
|
|
* transform support for metastrips
* active strip is set to NULL if its freed again.
|
|
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
|
|
header.
SEQUENCER_OT_add_duplicate(mode=1)
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)
Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
|
|
|
|
|
|
can transform the strips or move their handles
Still todo, click-drag transform, metastrips support, snapping, markers overlap checks and constrain to valid channels.
|
|
but no menu to access them yet, for now can access them with R and Tkey
|
|
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
|
|
* 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.
|