diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-03 08:22:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-03 08:22:26 +0300 |
commit | eb7286bfd2f8dc21cbd019b9085489652c392eba (patch) | |
tree | fa929d7d232ffb68f15f8d8af51a36c7d5b71620 /source/blender/editors/interface | |
parent | 8c15d612a5cdfe39233c7f2b7556742091c82558 (diff) |
Python: Print file:line when editing UI source
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index cd7d2e27d9a..9a4ea41141a 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -730,11 +730,14 @@ void UI_editsource_active_but_test(uiBut *but) static int editsource_text_edit( bContext *C, wmOperator *op, - char filepath[FILE_MAX], int line) + const char filepath[FILE_MAX], const int line) { struct Main *bmain = CTX_data_main(C); Text *text; + /* Developers may wish to copy-paste to an external editor. */ + printf("%s:%d\n", filepath, line); + for (text = bmain->text.first; text; text = text->id.next) { if (text->name && BLI_path_cmp(text->name, filepath) == 0) { break; |