From 71446eea573db3ac6bac5f297c0655acbeada67c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 30 Mar 2010 12:15:16 +0000 Subject: * Multiply for panorama cameras * Some cases of struct name being set where it shouldnt have been. * Spelling: wich --> which * Copy and initialize uv modifier scale, remove unneeded enum. * Ability to pin any object into the context. * Update uv window while transforming (useful when used with UVProject modifier) * Patch by Wahooney, so new template's are internal text and dont get saved over by mistake. * Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186 Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process /usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted by Jochen Schmitt. * [#21816] bpy.data.add_image has stopped working on Windows. moved to bpy.data.images.load(), missed this call. (commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch) --- source/blender/editors/space_text/text_ops.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender/editors/space_text') diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 0f3b54a7b4b..ce7db83d6d8 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -215,6 +215,7 @@ static int open_exec(bContext *C, wmOperator *op) PropertyPointerRNA *pprop; PointerRNA idptr; char str[FILE_MAX]; + short internal = RNA_int_get(op->ptr, "internal"); RNA_string_get(op->ptr, "path", str); @@ -244,6 +245,13 @@ static int open_exec(bContext *C, wmOperator *op) st->text= text; st->top= 0; } + + if (internal) { + if(text->name) + MEM_freeN(text->name); + + text->name = NULL; + } WM_event_add_notifier(C, NC_TEXT|NA_ADDED, text); @@ -282,6 +290,7 @@ void TEXT_OT_open(wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE); + RNA_def_boolean(ot->srna, "internal", 0, "Make internal", "Make text file internal after loading"); } /******************* reload operator *********************/ -- cgit v1.2.3