Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2021-03-17 15:01:10 +0300
committerJulian Eisel <julian@blender.org>2021-03-17 15:01:30 +0300
commit9cf25b9c447e3cd13f72894887cf08a574e5a2d6 (patch)
tree66f1cd18f73bce268f33235619a0055ed31c62db /source/blender/editors/space_outliner/outliner_tools.c
parent296984b40e038cb7c4508d7952678058adabc37e (diff)
Cleanup: Reduce variable scope
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 5e9af78d17b..052ef9a5dea 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -1820,11 +1820,6 @@ static bool outliner_id_operation_item_poll(bContext *C,
return false;
}
- Object *ob = NULL;
- if (GS(tselem->id->name) == ID_OB) {
- ob = (Object *)tselem->id;
- }
-
switch (enum_value) {
case OUTLINER_IDOP_MARK_ASSET:
case OUTLINER_IDOP_CLEAR_ASSET:
@@ -1839,11 +1834,16 @@ static bool outliner_id_operation_item_poll(bContext *C,
return true;
}
return false;
- case OUTLINER_IDOP_OVERRIDE_LIBRARY_PROXY_CONVERT:
- if (ob != NULL && ob->proxy != NULL) {
- return true;
+ case OUTLINER_IDOP_OVERRIDE_LIBRARY_PROXY_CONVERT: {
+ if (GS(tselem->id->name) == ID_OB) {
+ Object *ob = (Object *)tselem->id;
+
+ if ((ob != NULL) && (ob->proxy != NULL)) {
+ return true;
+ }
}
return false;
+ }
case OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET:
case OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET_HIERARCHY:
case OUTLINER_IDOP_OVERRIDE_LIBRARY_RESYNC_HIERARCHY: