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:
authorHans Goudey <h.goudey@me.com>2020-10-17 05:56:58 +0300
committerHans Goudey <h.goudey@me.com>2020-10-17 05:56:58 +0300
commite2c5439cb4eb423373750dae0dec8c5db3912b88 (patch)
tree44fa41d356e3b6963e7af82d7fff5241a279a9ab /source/blender/editors/screen/workspace_edit.c
parent20276e4b00a228ab2ef80e58cc0171cec811015a (diff)
Cleanup: Reduce variable scope in screen directory
Also return early and use LISTBASE_FOREACH in a few places
Diffstat (limited to 'source/blender/editors/screen/workspace_edit.c')
-rw-r--r--source/blender/editors/screen/workspace_edit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/screen/workspace_edit.c b/source/blender/editors/screen/workspace_edit.c
index aca2b48a937..cab2d32bdcf 100644
--- a/source/blender/editors/screen/workspace_edit.c
+++ b/source/blender/editors/screen/workspace_edit.c
@@ -385,7 +385,6 @@ static void workspace_append_button(uiLayout *layout,
const Main *from_main)
{
const ID *id = (ID *)workspace;
- PointerRNA opptr;
const char *filepath = from_main->name;
if (strlen(filepath) == 0) {
@@ -393,6 +392,8 @@ static void workspace_append_button(uiLayout *layout,
}
BLI_assert(STREQ(ot_append->idname, "WORKSPACE_OT_append_activate"));
+
+ PointerRNA opptr;
uiItemFullO_ptr(
layout, ot_append, workspace->id.name + 2, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0, &opptr);
RNA_string_set(&opptr, "idname", id->name + 2);