[Bf-blender-cvs] [722ddaa] master: Remove 'lorem ipsum' operator

Campbell Barton noreply at git.blender.org
Mon Mar 23 20:18:31 CET 2015


Commit: 722ddaaccd089457d40f4be01c891a91f707c597
Author: Campbell Barton
Date:   Tue Mar 24 06:15:52 2015 +1100
Branches: master
https://developer.blender.org/rB722ddaaccd089457d40f4be01c891a91f707c597

Remove 'lorem ipsum' operator

its a very specific function, and not hard to paste body text from elsewhere.
We can make an addon if its important to some users.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/curve/CMakeLists.txt
M	source/blender/editors/curve/curve_intern.h
M	source/blender/editors/curve/curve_ops.c
M	source/blender/editors/curve/editfont.c
D	source/blender/editors/curve/lorem.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index a5d399e..9de4017 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2568,10 +2568,6 @@ class VIEW3D_MT_edit_font(Menu):
         layout.operator("font.style_toggle", text="Toggle Underline").style = 'UNDERLINE'
         layout.operator("font.style_toggle", text="Toggle Small Caps").style = 'SMALL_CAPS'
 
-        layout.separator()
-
-        layout.operator("font.insert_lorem")
-
 
 class VIEW3D_MT_edit_text_chars(Menu):
     bl_label = "Special Characters"
diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt
index 0b449c4..1b877c0 100644
--- a/source/blender/editors/curve/CMakeLists.txt
+++ b/source/blender/editors/curve/CMakeLists.txt
@@ -38,7 +38,6 @@ set(SRC
 	editcurve.c
 	editcurve_add.c
 	editfont.c
-	lorem.c
 
 	curve_intern.h
 )
diff --git a/source/blender/editors/curve/curve_intern.h b/source/blender/editors/curve/curve_intern.h
index d54db77..579f149 100644
--- a/source/blender/editors/curve/curve_intern.h
+++ b/source/blender/editors/curve/curve_intern.h
@@ -38,9 +38,6 @@ struct EditNurb;
 struct Object;
 struct wmOperatorType;
 
-/* lorem.c */
-extern const char ED_lorem[];
-
 /* editfont.c */
 enum { DEL_ALL, DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_SELECTION, DEL_NEXT_SEL, DEL_PREV_SEL };
 enum { CASE_LOWER, CASE_UPPER };
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 0f42dc9..4bcb16d 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -54,7 +54,6 @@ void ED_operatortypes_curve(void)
 {
 	WM_operatortype_append(FONT_OT_text_insert);
 	WM_operatortype_append(FONT_OT_line_break);
-	WM_operatortype_append(FONT_OT_insert_lorem);
 
 	WM_operatortype_append(FONT_OT_case_toggle);
 	WM_operatortype_append(FONT_OT_case_set);
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 8393acc..303aa2c 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -275,57 +275,6 @@ static void text_update_edited(bContext *C, Object *obedit, int mode)
 	WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
 }
 
-/********************** insert lorem operator *********************/
-
-static int insert_lorem_exec(bContext *C, wmOperator *UNUSED(op))
-{
-	Object *obedit = CTX_data_edit_object(C);
-	const char *p, *p2;
-	int i;
-	static const char *lastlorem = NULL;
-	
-	if (lastlorem)
-		p = lastlorem;
-	else
-		p = ED_lorem;
-	
-	i = rand() / (RAND_MAX / 6) + 4;
-		
-	for (p2 = p; *p2 && i; p2++) {
-		insert_into_textbuf(obedit, *p2);
-
-		if (*p2 == '.')
-			i--;
-	}
-
-	lastlorem = p2 + 1;
-	if (strlen(lastlorem) < 5)
-		lastlorem = ED_lorem;
-	
-	insert_into_textbuf(obedit, '\n');
-	insert_into_textbuf(obedit, '\n');
-
-	DAG_id_tag_update(obedit->data, 0);
-	WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
-
-	return OPERATOR_FINISHED;
-}
-
-void FONT_OT_insert_lorem(wmOperatorType *ot)
-{
-	/* identifiers */
-	ot->name = "Insert Lorem";
-	ot->description = "Insert placeholder text";
-	ot->idname = "FONT_OT_insert_lorem";
-	
-	/* api callbacks */
-	ot->exec = insert_lorem_exec;
-	ot->poll = ED_operator_editfont;
-	
-	/* flags */
-	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
-}
-
 /* -------------------------------------------------------------------- */
 /* Generic Paste Functions */
 
diff --git a/source/blender/editors/curve/lorem.c b/source/blender/editors/curve/lorem.c
deleted file mode 100644
index 59bf3f5..0000000
--- a/source/blender/editors/curve/lorem.c
+++ /dev/null
@@ -1,658 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/editors/curve/lorem.c
- *  \ingroup edcurve
- */
-
-
-#include "BLI_sys_types.h"
-#include "curve_intern.h"
-
-const char ED_lorem[] = {
-76, 111, 114, 101, 109,  32, 105, 112, 115, 117, 109,  32, 100, 111, 108, 111, 114,  32, 115, 105, 116,  32,  97, 109, 101, 116,  44,  32,  99,
-111, 110, 115, 101,  99, 116, 101, 116, 117, 101, 114,  32,  97, 100, 105, 112, 105, 115,  99, 105, 110, 103,  32, 101, 108, 105, 116,  46,  32,  65, 108, 105,
-113, 117,  97, 109,  32, 116, 114, 105, 115, 116, 105, 113, 117, 101,  32, 105, 110, 116, 101, 114, 100, 117, 109,  32, 115, 101, 109,  46,  32,  78, 117, 108,
-108,  97, 109,  32, 112, 114, 101, 116, 105, 117, 109,  44,  32, 116, 111, 114, 116, 111, 114,  32, 110, 111, 110,  32, 101, 117, 105, 115, 109, 111, 100,  32,
-118,  97, 114, 105, 117, 115,  44,  32, 110, 117, 108, 108,  97,  32, 111, 100, 105, 111,  32, 115, 111, 100,  97, 108, 101, 115,  32, 110, 117, 108, 108,  97,
-44,  32,  97, 116,  32,  98, 105,  98, 101, 110, 100, 117, 109,  32, 108, 111, 114, 101, 109,  32, 109, 101, 116, 117, 115,  32, 115, 101, 100,  32, 110, 117,
-108, 108,  97,  46,  32,  86, 101, 115, 116, 105,  98, 117, 108, 117, 109,  32, 105, 110,  32, 108, 101,  99, 116, 117, 115,  32,  97, 116,  32, 112, 101, 100,
-101,  32,  98, 108,  97, 110, 100, 105, 116,  32, 118, 105, 118, 101, 114, 114,  97,  46,  32,  70, 117, 115,  99, 101,  32, 115,  99, 101, 108, 101, 114, 105,
-115, 113, 117, 101,  32, 105, 112, 115, 117, 109,  32, 110, 101,  99,  32, 101, 110, 105, 109,  46,  32,  70, 117, 115,  99, 101,  32, 101, 117, 105, 115, 109,
-111, 100,  32, 110, 117, 110,  99,  32, 105, 100,  32, 101, 110, 105, 109,  46,  32,  73, 110,  32, 118, 101, 110, 101, 110,  97, 116, 105, 115,  32,  99, 117,
-114, 115, 117, 115,  32,  97, 114,  99, 117,  46,  32,  65, 101, 110, 101,  97, 110,  32, 113, 117, 105, 115,  32, 100, 117, 105,  46,  32,  77,  97, 101,  99,
-101, 110,  97, 115,  32, 108,  97, 111, 114, 101, 101, 116,  46,  32,  78, 117, 108, 108,  97,  32, 116, 101, 109, 112, 111, 114,  44,  32,  97, 114,  99, 117,
-32, 112, 117, 108, 118, 105, 110,  97, 114,  32, 112, 114, 101, 116, 105, 117, 109,  32, 115, 117, 115,  99, 105, 112, 105, 116,  44,  32, 116, 111, 114, 116,
-111, 114,  32, 119, 105, 115, 105,  32, 100,  97, 112, 105,  98, 117, 115,  32, 108, 105,  98, 101, 114, 111,  44,  32, 105, 100,  32, 111, 114, 110,  97, 114,
-101,  32, 102, 101, 108, 105, 115,  32, 105, 112, 115, 117, 109,  32, 115, 117, 115,  99, 105, 112, 105, 116,  32, 112, 117, 114, 117, 115,  46,  32,  77,  97,
-101,  99, 101, 110,  97, 115,  32, 105, 112, 115, 117, 109,  46,  32,  77, 111, 114,  98, 105,  32,  99, 117, 114, 115, 117, 115,  46,  32,  86, 101, 115, 116,
-105,  98, 117, 108, 117, 109,  32, 100, 105,  97, 109,  32, 112, 117, 114, 117, 115,  44,  32,  99, 111, 109, 109, 111, 100, 111,  32, 101, 116,  44,  32,  99,
-111, 110, 118,  97, 108, 108, 105, 115,  32, 101, 117,  44,  32, 112, 111, 115, 117, 101, 114, 101,  32,  97, 116,  44,  32, 108, 105, 103, 117, 108,  97,  46,
-32,  78, 117, 108, 108,  97,  32,  97, 108, 105, 113, 117,  97, 109,  32,  97, 108, 105, 113, 117, 101, 116,  32, 108, 111, 114, 101, 109,  46,  32,  78, 117,
-110,  99,  32, 101, 116,  32, 109,  97, 117, 114, 105, 115,  32, 104, 101, 110, 100, 114, 101, 114, 105, 116,  32, 101, 115, 116,  32,  98, 105,  98, 101, 110,
-100, 117, 109,  32, 115, 117, 115,  99, 105, 112, 105, 116,  46,  32,  68, 111, 110, 101,  99,  32, 112, 101, 108, 108, 101, 110, 116, 101, 115, 113, 117, 101,
-32, 108, 105,  98, 101, 114, 111,  32, 101, 117,  32, 110, 105, 115, 108,  46,  32,  80, 101, 108, 108, 101, 110, 116, 101, 115, 113, 117, 101,  32, 101, 103,
-101, 116,  32, 108, 105,  98, 101, 114, 111,  46,  32,  68, 111, 110, 101,  99,  32, 116, 101, 109, 112, 117, 115,  32, 105, 112, 115, 117, 109,  32, 115, 101,
-100,  32, 113, 117,  97, 109,  46,  32,  83, 101, 100,  32,  98, 108,  97, 110, 100, 105, 116,  32, 110, 117, 110,  99,  32, 113, 117, 105, 115,  32, 101, 110,
-105, 109,  46,  32,  81, 117, 105, 115, 113, 117, 101,  32, 108, 101,  99, 116, 117, 115,  32, 100, 105,  97, 109,  44,  32,  97, 100, 105, 112, 105, 115,  99,
-105, 110, 103,  32, 104, 101, 110, 100, 114, 101, 114, 105, 116,  44,  32, 112, 108,  97,  99, 101, 114,  97, 116,  32, 110, 111, 110,  44,  32, 112, 117, 108,
-118, 105, 110,  97, 114,  32, 105, 100,  44,  32, 102, 101, 108, 105, 115,  46,  32,  73, 110,  32,  99, 111, 110, 103, 117, 101,  32, 109,  97, 103, 110,  97,
-32, 115, 105, 116,  32,  97, 109, 101, 116,  32, 117, 114, 110,  97,  46,  32,  78, 117, 110,  99,  32, 110, 111, 110,  32,  97, 117, 103, 117, 101,  32, 115,
-101, 100,  32, 110, 105, 115, 108,  32, 100, 105,  99, 116, 117, 109,  32, 108,  97, 111, 114, 101, 101, 116,  46,  32,  67, 117, 109,  32, 115, 111,  99, 105,
-105, 115,  32, 110,  97, 116, 111, 113, 117, 101,  32, 112, 101, 110,  97, 116, 105,  98, 117, 115,  32, 101, 116,  32, 109,  97, 103, 110, 105, 115,  32, 100,
-105, 115,  32, 112,  97, 114, 116, 117, 114, 105, 101, 110, 116,  32, 109, 111, 110, 116, 101, 115,  44,  32, 110,  97, 115,  99, 101, 116, 117, 114,  32, 114,
-105, 100, 105,  99, 117, 108, 117, 115,  32, 109, 117, 115,  46,  32,  73, 110,  32, 118, 101, 110, 101, 110,  97, 116, 105, 115,  32, 100,  97, 112, 105,  98,
-117, 115,  32, 109,  97, 115, 115,  97,  46,  32,  78, 117, 108, 108,  97,  32, 104, 101, 110, 100, 114, 101, 114, 105, 116,  32, 115,  97, 112, 105, 101, 110,
-32, 101, 116,  32, 113, 117,  97, 109,  46,  32,  78, 117, 110,  99,  32,  97,  99,  32, 109,  97, 103, 110,  97,  32, 108, 111,  98, 111, 114, 116, 105, 115,
-32, 116, 101, 108, 108

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list