Commit Graph

564 Commits

Author SHA1 Message Date
7eb5cf8699 Fix #36001: crashing copying long strings in text buttons. 2013-07-04 14:37:38 +00:00
42f6136da8 Fix #35991: show warning message to when trying to edit driven values in number buttons. 2013-07-03 20:37:07 +00:00
063be8fdc0 Fix [#35750] list items in properties editor (text colors not following list item theme).
Issue goes back since we stopped using LISTROW button to draw item's name (i.e. since we have custom buttons in list items!).

This commit:
* Adds a new flag to uiBlock, UI_BLOCK_LIST_ITEM, to mark blocks used for each list item.
* Adds a new button type, LISTLABEL, which basically behaves exactly as LABEL, but uses wcol_list_item color set.
* When uiItemL is called, it checks whether current block has UI_BLOCK_LIST_ITEM set, and if so, switch produced button to LISTLABEL type.
* Adds a new helper func, ui_layout_list_set_labels_active, called after the active list item has been "drawn", to set all LISTLABEL buttons as UI_SELECT.

Note custom widget_state_label() was removed, in interface_widgets.c, as it did nothing more than default widget_state().

Thanks to Brecht for the review and advices.
2013-06-26 07:28:55 +00:00
9d4cc7885d fix for filesel autocomplete, it had the annoying behavior if you entered in a non-existing name, of executing it and then asking to add the dir. 2013-06-19 11:53:48 +00:00
3c54d1b87a alternate fix for r57562. check if the mouse is over the parent menu. 2013-06-19 06:31:37 +00:00
93134c26f9 fix [#35792] Submenus not opening properly on mouse move
caused by own fix for [#35346], now only apply wiggle room for toplevel menus.
2013-06-19 06:01:38 +00:00
815a87a652 fix [#35346] Python: still UI issue with popup and dropdown list 2013-06-13 09:12:53 +00:00
8b4bca6cf0 fix [#35713] Set Origin not waiting for user input.
Only activate search-box items on mouse-release,
Otherwise this gives odd behavior when using the operator-search popup since some tools expect the mouse buttons not to be held when activating which includes operators that have their own popup menus.
2013-06-13 01:39:07 +00:00
860fce4eb9 Code cleanup: removed some unused UI button types
* CHARTAB: not needed anymore with improved copy/paste support and text input.
* IDPOIN: replaced by SEARCH_MENU.
* ICONROW/ICONTEXTROW: replaced by RNA enums.
* NUMABS: can use min/max limits instead.
* BUT_TOGDUAL, TOG3, TOGR, SLI: not used in 2.5 interface.
2013-06-09 18:05:50 +00:00
c24be7ec6e Usablity:
Textbuttons: double click now selects entire words (like on file path segements)
Triple click was requested too, but that's not a WM event type yet.
2013-06-07 15:42:26 +00:00
b537bc011b fix for missing undo push for drag-toggle. 2013-06-03 19:52:53 +00:00
0c004723fe fix [#35434] Segmentation fault switching screen layout from python
(take 2), only free popup handlers.
2013-06-02 20:59:00 +00:00
ebda20150d fix for crash with toggle-drag on a popup (when the popup is closed while dragging). 2013-05-17 13:54:44 +00:00
2e478ca76d change to drag-lock behavior, only use with outliner (this way layers can be changed all at once) 2013-05-13 06:51:13 +00:00
b0e2b63200 fix for toggle drag not working in popups (move layers for eg) 2013-05-13 06:23:50 +00:00
c656174578 fix for mistake in own recent commit, broke operator search (r56465). 2013-05-03 22:43:02 +00:00
fe208a895a fix for mistake in own commit r56399, it broke click-dragging to open and select a menu item. 2013-05-02 19:51:32 +00:00
d5b36bf027 fix [#35178] Autoselect-in-list for Vertex Group selection doesn't work.
disallow assigning values that don't exist into a text field with a search-box.
2013-05-02 04:59:52 +00:00
e2e1b0d20d interface: clear red-alert flag when editing a button, confuses and makes it seem the edited value is also wrong. 2013-05-02 04:30:05 +00:00
bb89b523e7 Fix compilation in release mode with strict flags 2013-04-30 12:18:09 +00:00
cba25a6d90 fix for an issue raised in [#35154],
the cross icon to clear a field wasn't working within popups.
2013-04-30 02:45:57 +00:00
844a59afc2 fix [#35154] Python: UI issues with invoke_props_dialog()
- highlighed buttons that were never pressed could be activated by accident when canceling search popup. 
- canceling a search popup on a popup would close both.
2013-04-30 01:08:55 +00:00
f46e3f0f92 convert macro PASS_EVENT_TO_PARENT_IF_NONACTIVE into a static function. (having flow control in a macro is bad practice), own doing. 2013-04-29 21:44:28 +00:00
8069d1ad1a "Bug" & usability fix, own collection.
Color Pickers in Blender support precision editing with holding Shift key.
Unfortunately, on first click the picker cursor moves to the mouse position,
making the precision dragging quite useless.

Now, if you hold Shift, the picker editing will only apply the delta motion
of your mouse drags, making it much nicer for fine tuning of color grades
in Sequencer or Compositor.
2013-04-27 12:54:45 +00:00
e5a968276e fix [#35055] Crash in Edit Source feature for multilevel menus
dont show the option when operating on a menu since its not supported.
2013-04-23 15:22:22 +00:00
03d6319862 Fix: when using a search menu with an operator's enum prop, the operator was previously always executed with default options (appart from the search-set enum, of course). Now we store the op's properties in search button, so that you can specify non-default options (as it was already possible with e.g. pop-up menu from an operator's enum prop).
To achieve this, some code (callbacks and search button creation) was moved from wm_operators.c to interface/interface.c, and a new UI function was added, uiDefSearchButO_ptr.

Note: This new code uses the fact that uiButHandleFunc callbacks get executed before operator when one of its arg is the button itself!

Many thanks to Campbell who helped me a lot with this patch!

Cleanup: also removed two unused pointers from uiBut struct.
2013-04-15 15:01:12 +00:00
a305452275 Paint refactoring commit, non-disruptive (in theory :p)
* Fix precision overflow issue with overlay previews,
* Expose alpha mask mapping to UI (still not functional but coming soon).
* More overlay refactoring:

Overlay now does minimal checking for texture refresh.
Instead, we now have invalidation flags to set an aspect of the brush
overlay as invalid. This is necessary because this way we will be able to
separate and preview different brush attributes on the overlays, using
different textures:

These attributes/aspects are:

Primary texture (main texture for sculpt, vertex, imapaint)
Secondary texture (mask/alpha texture for imapaint)
Cursor texture (cursor texture. It involves brush strength and curves)

Modified the relevant RNA property update functions and C update callback
functions to call the relevant cursor invalidation functions instead
of checking every frame for multiple properties.

Properties that affect this are:

Image changes, if image is used by current brush,
Texture slot changes, similarly
Curve changes,
Object mode change invalidates the cursor
Paint tool change invalidates the cursor.

These changes give slightly more invalidation cases than simply
comparing the relevant properties each frame, but these do not occur in
performance critical moments and it's a much more elegant system than
adding more variables to check per frame each time we add something on
the system.
2013-04-12 17:21:31 +00:00
acac5b8402 fix for crash in own recent commit. searchbox's need their own keynav state since they won't always be in a uiPopupBlockHandle. 2013-04-11 08:33:19 +00:00
075a655cc6 fix [#34936] Unable to select items using only the arrow keys
ignore small mouse motions for menu/search-box after using the keyboard to navigate.
2013-04-11 02:28:34 +00:00
129f401228 ctrl+a select all in button field 2013-04-06 08:22:39 +00:00
677172fd65 code cleanup: use bools in interface handlers, dont show translation menu when right clicking on splash, use less confusing args for copy/paste function. 2013-04-04 15:16:29 +00:00
7bbaf4853a code cleanup: use bools in UI and WM code, quiet some shadow warnings, remove unused function uiEmboss() 2013-04-04 02:05:11 +00:00
8f8613df90 fix for missing redraw in own commit r55554 (Ctrl+F text editor find).
since an event wasn't added to the queue no redraws we're done when the panel was already open, instead use a notifier.
2013-03-25 21:31:24 +00:00
8bf206ce4b edit to 55549, replace fake click event with call to uiButActiveOnly().
also make it more clear args are for rna buttons.
2013-03-24 19:08:24 +00:00
d74cf43575 UI small fixes:
- Theme color for the brush popup was not correctly coded. Now it follows menu item
  style correctly, which also allows all the themes we have to give readable text.

- RMB cancel also added for slider buttons and the color picker.
2013-03-24 18:59:15 +00:00
82ffa62e90 Small feature:
While using number sliders, you can now press RMB to cancel (like ESC)
2013-03-24 16:43:40 +00:00
1165236f69 Usablity:
In text editor, the CTRL+F find now opens property region (or keeps it) and
activates the search button for input.

That's already nice! But next step should be to do a search on exit of 
the button (or while typing). That's stuff I need Campbell to help with though.

Notes:
- Probably Py api for property buttons could get an "operator=" arg?
- The warning menu "not found" should go away
- I also suggest to make "wrap" search default for new editors
2013-03-24 13:43:40 +00:00
5a87e4d255 code cleanup: remove unused button type HSVSLI 2013-03-23 16:03:13 +00:00
Lukas Toenne
4638e5f99a Merge of the PyNodes branch (aka "custom nodes") into trunk.
PyNodes opens up the node system in Blender to scripters and adds a number of UI-level improvements.

=== Dynamic node type registration ===
Node types can now be added at runtime, using the RNA registration mechanism from python. This enables addons such as render engines to create a complete user interface with nodes.

Examples of how such nodes can be defined can be found in my personal wiki docs atm [1] and as a script template in release/scripts/templates_py/custom_nodes.py [2].

=== Node group improvements ===
Each node editor now has a tree history of edited node groups, which allows opening and editing nested node groups. The node editor also supports pinning now, so that different spaces can be used to edit different node groups simultaneously. For more ramblings and rationale see (really old) blog post on code.blender.org [3].

The interface of node groups has been overhauled. Sockets of a node group are no longer displayed in columns on either side, but instead special input/output nodes are used to mirror group sockets inside a node tree. This solves the problem of long node lines in groups and allows more adaptable node layout. Internal sockets can be exposed from a group by either connecting to the extension sockets in input/output nodes (shown as empty circle) or by adding sockets from the node property bar in the "Interface" panel. Further details such as the socket name can also be changed there.

[1] http://wiki.blender.org/index.php/User:Phonybone/Python_Nodes
[2] http://projects.blender.org/scm/viewvc.php/trunk/blender/release/scripts/templates_py/custom_nodes.py?view=markup&root=bf-blender
[3] http://code.blender.org/index.php/2012/01/improving-node-group-interface-editing/
2013-03-18 16:34:57 +00:00
ee692508d9 Bug fix, irc:
Curves widget error: after deleting a point, and click to add a new point, on dragging
it the point flipped up 20 pixels. Was caused by changed layout and region view matrix.

Solved by storing actual mousecoords instead of mapped ones.
2013-03-18 13:57:47 +00:00
0d0291f6e1 code cleanup: incorrect sized array args, remove some redundant code. 2013-03-17 10:26:23 +00:00
d9c9209608 code cleanup: quiet some -Wshadow warnings, mix of obvious mistakes and harmless global/local naming conflict. 2013-03-15 22:55:10 +00:00
511b181317 fix for error pasting into a color button (tried to read its rna index of -1) 2013-03-15 20:16:20 +00:00
4e86946c2b Fix wrong use of enum in UI code to reactive button on mouse over, this worked
only by accident.
2013-03-13 14:19:53 +00:00
dfa8540cdf use bool for rna funcs. 2013-03-07 02:44:55 +00:00
24da4a6032 fix [#34490] Copy and paste floating point number fields losses precision
- copy now gets up to 6 decimal places
- copy and UI float button editing now strip zeros: 1.000 -> 1.0
2013-03-04 04:21:51 +00:00
a02c8c4177 move toggle drag into a UI handler (was modal operator) 2013-03-03 03:29:57 +00:00
2de8dfd784 fix for drag-toggle, bit-buttons weren't handled which made drag toggle fail for buttons in the graph editor for eg. 2013-03-01 00:35:01 +00:00
2398e074d3 fix [#33466] alt + mouse wheel
Alt+Mouse Wheel events depended on the button under the mouse being active, else it would change the current frame.
Button re-activation wasn't 100% reliable since it depends on fake mousemove events.

Now keep button active when its executed if the mouse stays over it.
2013-02-28 11:39:13 +00:00
d4d45711dc fix for error with drag toggle which showed up with overlapping regions. 2013-02-27 11:26:51 +00:00