Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1527)

Issue 13244048: Fix for #36226, Select Linked works not in touch with Prefs. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by lukas.toenne1
Modified:
10 years, 7 months ago
Reviewers:
ideasman42, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

3 parts: 1) To allow distinguishing uninitialized (not set) properties in the keymap items, a few changes to the RNA struct comparison function are needed: Instead of allowing only strict/non-strict comparison of 2 properties A and B in a struct, this now has 3 modes: * STRICT: compare only the actual property values (same as 'strict' before) * UNSET_MATCH_ANY: if either A or B is unset, consider them a match (same as non-strict before) * UNSET_MATCH_NONE: if one property is set and the other not, consider them a mismatch. The new UNSET_MATCH_NONE mode is useful for keymaps, because it allows keeping user-defined property values in the keymap even if they match the default property value (see wm_keymap_diff function in wm_keymap.c) 2) Fix for the RNA_property_is_idprop function: This was checking the "magic" flag, which is really only useful internally in RNA. Use the PROP_IDPROPERTY flag instead to identify id properties which can be unset (i.e. delete the underlying id property storage). The function is not used anywhere sofar, so no risk of functionality breaking. 3) A new operator is added for unsetting ID properties in the RMB context menu, next to the "Reset" operator. This only works on ID properties and deletes the ID property storage, so that the default value is used. In the user preferences for keymaps the properties are shown in an inactive layout to indicate that the default value is used (which some operators such as the "select linked" op from the report use to trigger automatic behavior). When the user sets a property it gets set and stays that way until explicitly "unset" using the new operator.

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fixed some issues pointed out by ideasman42 #

Patch Set 3 : Minor compiler error fix #

Patch Set 4 : UI improvements #

Patch Set 5 : Removed a few unused commented lines #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -40 lines) Patch
source/blender/editors/include/UI_interface.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
source/blender/editors/interface/interface_handlers.c View 1 2 chunks +10 lines, -1 line 0 comments Download
source/blender/editors/interface/interface_layout.c View 1 2 3 4 chunks +8 lines, -1 line 0 comments Download
source/blender/editors/interface/interface_ops.c View 1 2 3 5 chunks +63 lines, -25 lines 0 comments Download
source/blender/editors/interface/interface_regions.c View 1 2 3 1 chunk +8 lines, -2 lines 0 comments Download
source/blender/editors/interface/interface_templates.c View 1 2 3 2 chunks +4 lines, -1 line 0 comments Download
source/blender/editors/interface/interface_widgets.c View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
source/blender/makesrna/RNA_access.h View 1 1 chunk +8 lines, -2 lines 0 comments Download
source/blender/makesrna/intern/rna_access.c View 1 4 chunks +13 lines, -7 lines 0 comments Download
source/blender/windowmanager/intern/wm_keymap.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7
lukas.toenne1
10 years, 7 months ago (2013-09-12 13:28:58 UTC) #1
ideasman42
Found one issue I'm hesitant about changing and some minor issues, otherwise LGTM code-wise. On ...
10 years, 7 months ago (2013-09-19 09:15:37 UTC) #2
lukas.toenne1
https://codereview.appspot.com/13244048/diff/1/source/blender/editors/interface/interface_ops.c File source/blender/editors/interface/interface_ops.c (right): https://codereview.appspot.com/13244048/diff/1/source/blender/editors/interface/interface_ops.c#newcode508 source/blender/editors/interface/interface_ops.c:508: static int unset_property_button_poll(bContext *C) On 2013/09/19 09:15:37, ideasman42 wrote: ...
10 years, 7 months ago (2013-09-19 10:26:31 UTC) #3
lukas.toenne1
Fixed some issues pointed out by ideasman42
10 years, 7 months ago (2013-09-19 10:27:47 UTC) #4
lukas.toenne1
Minor compiler error fix
10 years, 7 months ago (2013-09-19 10:30:51 UTC) #5
lukas.toenne1
UI improvements
10 years, 7 months ago (2013-09-19 14:21:02 UTC) #6
lukas.toenne1
10 years, 7 months ago (2013-09-19 14:24:13 UTC) #7
Made some UI improvements:
* Buttons get a new flag for drawing unset properties. This can be activated by
passing an according flag to uiItem functions. It is only used in the keymap
user prefs, no need to show this info in other places so far.

* Tooltips get an additional *UNSET* string attached for unset properties. This
also happens only in the keymap user prefs.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b