Commit Graph

498 Commits

Author SHA1 Message Date
8f038c2410 enable continuous grab for sliders, initially this was disabled because we didnt support un-grabbing at the new slider location. 2013-01-29 23:33:58 +00:00
Dalai Felinto
27eeb89bd9 real fix for Logic Bricks UI smart controller (#33746)
previous commit (54102) actually reintroduces an old bug where Blender sigfaults when
the sensor and controllers are not from the active object.

The real fix for report #33746 is to clear the "object" property after the operator ran.
I'm not sure why when I call the operator from command line the property is cleared, but not
when I called it from C. Either way all should be working now.
2013-01-26 03:30:21 +00:00
Dalai Felinto
a8644deeef bugfix for 33746 Unable to add Controller to objects correctly
(live from the global game jam Vancouver ;)
2013-01-26 02:46:07 +00:00
833104e647 fix for own regression since 2.4x, non-linear number button range was too insensitive for int buttons. 2013-01-23 04:55:34 +00:00
8a0ad8f8b5 fix for text selection glitch, moving the mouse to the left would sometimes not entirely select the start of the text. 2013-01-17 19:12:11 +00:00
2b80a7d5da use define for text offset & seletion.
and no need to calloc memory for string selection.
2013-01-17 18:59:19 +00:00
0193c88083 Bug fix #33887
Ancient issue: on much zoomed in UIs, text selecting or cursor placement
in Text-input buttons was off.
2013-01-17 11:35:33 +00:00
350a776a52 fix for arrow keys being reversed in the snap menu (Ctrl+Shift+Tab)
also - when expanding rna enums into existing menus - don't nest inside a row/column.
2013-01-17 01:03:56 +00:00
9a4a5fa2b4 Usability fix:
Blender's data link button (typically with menu and searching options)
now has a X icon to clear its contents. 

Before you had to click, delete text, enter.

For example:
- Object Parent
- Modifier objects or vertexgroups

This fix saves each user 100 clicks per day, with 100k users
that's 3 billion clicks per year!
2013-01-09 15:58:34 +00:00
682df047a0 style cleanup 2013-01-08 02:06:16 +00:00
bbd95fafef Three fixes:
- Old issue: on scrolling button views, tooltips could open or stayed open.

- New fix: alt+swipe now changes button values again

- Removed test print, from WIP code project.
2013-01-06 18:28:39 +00:00
4fa340c716 Fixes - post 2.65a
- Trackpad swipes now behave same as scrollwheel for listview scrolls
  (disabling 2d view scroll when mouse over)

- Added back 2.4 debug print for glGetError()
  Only useful for developers - to check what goes on when ogl messes up.

- Made more clear print for read factory default. It's not error :)
2013-01-04 14:51:02 +00:00
be519ad7ff Further trackpad work:
When trackpad swipes don't convert to ScrollWheel steps anymore, several hardcoded
wheel events need to support swipe too.

This adds swipe support to:
- Menu item scroll
- Search item scroll
- ALT + number/slider/swatch values

The amount of old style scroll "clicks" is calculated based on how trackad is
being mapped to move a mouse pointer. Move it one widget unit = 1 click.

The swatch option applies trackpad swipe motion in analog way.
2013-01-01 16:42:35 +00:00
8c00c57187 style cleanup: var naming for ui list 2012-12-28 10:32:49 +00:00
7504cf34b4 This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!

This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!

To make all this work, other changes were also necessary:

* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.

* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.

* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.

* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
  Note: not sure whether we should add that one to all UILayout's prop funcs?

Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
fa28e50ac2 Region scrollbar fix!
Now scrollbars correctly hide and show, making space for the actual contents
in a region. It solves several old hacks, and puts view2d code a bit more
back in control as well. 

Implementation notes:

- The view2d mask feature is working again
- The #define V2D_SCROLL_HORIZONTAL_HIDE means: "turn on hiding".
- Code for UI_view2d_region_reinit() is enforcing better standard view settings

But... two hack/patches needed to be added:

- Region panel drawing: if after generating the button panels it appears
  a scroller hides or reveils, it calls all the generating code again.
  (a simple scale doesn't work due to rounding differences in layout code)

- View2d code that maps 'tot' and 'cur' rects: if this code detects that
  the mask changes, it calcs the map code again.

Also a bugfix (issue in 2.65)

- The left/bottom area split widget was drawing 1 pixel too large sometimes, 
  leaving bad trails on moving area dividers.
2012-12-26 13:05:39 +00:00
97bdec1811 fix for use of uninitialized variable with ui_handler_region_menu. 2012-12-23 16:08:02 +00:00
c5de14ae1e Bugfix, irc collection:
Copy/Paste from and to color swatches now includes alpha.
Buttons without alpha have this value on '1' on copy.
2012-12-20 18:18:09 +00:00
5fcb12d754 changing RNA properties now prints python script in the info view.
next will add context so bpy.data.xxx[id] are not used for all references.
2012-12-18 15:22:06 +00:00
81d240c8c8 avoid using strlen() for comparisons in for loops. for expanding whitespace in the text editor and ui paste. 2012-12-15 07:57:16 +00:00
69ba2d3edb Crash, IRC report.
Moving panels in a buttons-region around was calling menu code, reading NULL pointer.
Seems to be an existing issue, not caused by my previous commit :)
2012-12-12 19:56:24 +00:00
12b642062c Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

Short list of main changes:

- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
  Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
  This allows keeping UI and data without actual saves, until you actually save.
  When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). 
  Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. 
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
  Old option is called "Save Startup File" the new one "Save User Settings".
  To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
  This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
868cb64d6c Bug fix [#33492] Right click on 'confirm reload' crashes
Context check could result in NULL - added provision for it and made
sure the check is local only (for 1 new option)
2012-12-12 12:18:29 +00:00
04c27843ea UI: revert the previous fix for middle click on button, conflicts with panning. 2012-12-02 05:27:03 +00:00
f7f4148b40 change uiButGetStrInfo() to use a trailing NULL arg rather then passing the number of args as an arg. 2012-12-02 04:51:15 +00:00
807fd448a5 UI: allow middlemouse in addition to leftmouse for clicking on various buttons,
means that if you have emulate 3 button mouse enabled and still have alt pressed
when clicking, it works.
2012-12-01 19:14:55 +00:00
079a0a30e4 Usability:
Made SHIFT+drag mouse in Curve and ColorPicker widgets move with more precision.
This was only working with UserPref "continuous grab".
2012-11-09 13:33:23 +00:00
360528d667 Bugfix #29072 (Color pickers don't close properly when moving the mouse away)
This rewinds the fix for revision 50483. 

- the removed code there (as comment said) closes menus on hoovering over another
  button in panels. Is unfinished feature to allow quick inspecting menus
  by mouse-hold going over menu popup buttons. 

- It added yet another check for closing menus - should be done with ->saferct

- The actual bug was simple; the block flag with UI_BLOCK_MOVEMOUSE_QUIT was
  accidentally cleared for colorpickers.
2012-11-08 16:50:31 +00:00
96cb05f028 add comments for uiBut a1 and a2 values. 2012-11-06 04:56:30 +00:00
f213ae0b19 style cleanup 2012-11-01 09:54:00 +00:00
54c0ba84d4 Fix #31482: menu with scrollers when window is too small, didn't auto scroll
when using the arrow keys or mouse wheel to activate the next item.
2012-10-31 12:56:04 +00:00
3406586d88 UI: fix for menu scrolling when window is too small. It was not working well
with arbitrary button layouts like multi column menus, because it was making
assumptions about position of previous/next buttons which doesn't work in
general.
2012-10-31 11:31:30 +00:00
520e1b2090 Bugfix #24016
Removed dubious code for checking CTRL+C CTRL+V on buttons.
This made copy/paste fail if you keep the modifier key holding.
2012-10-28 12:20:38 +00:00
4959c8767e Bugfix:
Menu accellerator now accepts fast clicking again. (ctrl-q + q)
2012-10-27 14:10:25 +00:00
aeba4950c3 style cleanup 2012-10-27 10:42:28 +00:00
d6d8de015c change BLI_strlen_range_utf8 to the more conventional BLI_strnlen_utf8 2012-10-27 02:47:39 +00:00
e903701450 style cleanup 2012-10-27 01:46:47 +00:00
2821f822c5 * New string property subtype: PASSWORD
When this new subtypes is used, then string of property is hidden using
asterisks, e.g.: mysecretpassword -> ****************

This code was reviewed and modified by Brecht. Thanks very much:
 - https://codereview.appspot.com/6713044/

This new subtype of string property is intended mostly for Add-on developers
writing Add-on which communicates with some server (http, sql, ftp, verse,
etc.). When this server requires user authentication and user has to type
username and password, then current API didn't allow to type 'hidden' password,
e.g. when you want to demonstrate this script, then everybody can see this
security password. Some examples of Add-on which could use this new subtype:
 - On-line database of textures
 - Integration of render farm
 - Integration of Verse

Security Notes:
 - You can copy paste hiddent string of property from text input using (Ctrl-C, Ctrl-V),
but you can do this in other GUI toolkits too (this behavior it is widely used).
 - Text of string property is stored in plain text, but it is widely used in other
GUI toolkits (Qt, Gtk, etc.).

Simple examples:
 - https://dl.dropbox.com/u/369894/draw_op_passwd.py
 - https://dl.dropbox.com/u/369894/blender-password.png
2012-10-26 12:58:54 +00:00
b4d9037dfb Fix #30940: layout.prop_search() item not drawing correct inside menus. 2012-10-24 21:57:07 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
1767b65846 style cleanup: also rename bmesh_decimate.c --> bmesh_decimate_collapse.c 2012-10-23 03:38:26 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
27564ed24a fix for own mistake using freed memory with menus. 2012-10-15 06:12:05 +00:00
8e01b8959e style cleanup 2012-10-14 13:08:19 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
79b4c0e600 UI: buttons that open menus now align to the menu rather than looking disconnected.
Also fixed some cases where the menu was offset 1 or 2 pixels wrong, though not
quite all of them, still off by 1 pixel sometimes.

http://www.pasteall.org/pic/show.php?id=38478
2012-10-04 20:12:05 +00:00
ed1cda9a6c style cleanup 2012-09-30 06:12:47 +00:00
dbeddcdbce style cleanup: also correct incorrect doxy heading 2012-09-26 20:26:31 +00:00
34114b3b75 code cleanup: remove/comment unused defines 2012-09-22 13:40:31 +00:00
1541ee20c8 Improvement to own commit r50810.
Add an optional ghost argument to set the new mouse location when un-grabbing. - without this the mouse would flicker at the old location before moving to the new location - when using the color picker for eg.
2012-09-22 13:23:12 +00:00