2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2009-01-23 14:43:25 +00:00
|
|
|
* ***** 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-01-23 14:43:25 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2011-02-27 20:29:51 +00:00
|
|
|
/** \file blender/editors/curve/curve_intern.h
|
|
|
|
|
* \ingroup edcurve
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __CURVE_INTERN_H__
|
|
|
|
|
#define __CURVE_INTERN_H__
|
2009-01-23 14:43:25 +00:00
|
|
|
|
|
|
|
|
/* internal exports only */
|
2013-09-16 00:03:33 +00:00
|
|
|
struct ListBase;
|
|
|
|
|
struct EditNurb;
|
|
|
|
|
struct Object;
|
2009-01-23 14:43:25 +00:00
|
|
|
struct wmOperatorType;
|
|
|
|
|
|
|
|
|
|
/* lorem.c */
|
2010-12-03 01:52:28 +00:00
|
|
|
extern const char ED_lorem[];
|
2009-01-23 14:43:25 +00:00
|
|
|
|
|
|
|
|
/* editfont.c */
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
enum { DEL_ALL, DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_SELECTION, DEL_NEXT_SEL, DEL_PREV_SEL };
|
|
|
|
|
enum { CASE_LOWER, CASE_UPPER };
|
|
|
|
|
enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD,
|
2011-11-11 13:09:14 +00:00
|
|
|
PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE };
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
|
2009-04-12 22:43:07 +00:00
|
|
|
void FONT_OT_text_insert(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
void FONT_OT_line_break(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_insert_lorem(struct wmOperatorType *ot);
|
|
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
void FONT_OT_case_toggle(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_case_set(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_style_toggle(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_style_set(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
|
2009-04-12 22:43:07 +00:00
|
|
|
void FONT_OT_text_copy(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_text_cut(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_text_paste(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_file_paste(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
|
|
|
|
|
void FONT_OT_move(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_move_select(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_delete(struct wmOperatorType *ot);
|
|
|
|
|
|
|
|
|
|
void FONT_OT_change_character(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_change_spacing(struct wmOperatorType *ot);
|
2009-01-23 14:43:25 +00:00
|
|
|
|
2010-01-11 05:10:57 +00:00
|
|
|
void FONT_OT_open(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_unlink(struct wmOperatorType *ot);
|
|
|
|
|
|
2010-06-21 23:20:44 +00:00
|
|
|
void FONT_OT_textbox_add(struct wmOperatorType *ot);
|
|
|
|
|
void FONT_OT_textbox_remove(struct wmOperatorType *ot);
|
|
|
|
|
|
2013-09-16 00:03:33 +00:00
|
|
|
|
2009-02-11 23:02:21 +00:00
|
|
|
/* editcurve.c */
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
void CURVE_OT_hide(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_reveal(struct wmOperatorType *ot);
|
|
|
|
|
|
2009-02-11 23:02:21 +00:00
|
|
|
void CURVE_OT_separate(struct wmOperatorType *ot);
|
2013-08-29 02:32:51 +00:00
|
|
|
void CURVE_OT_split(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
void CURVE_OT_duplicate(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_delete(struct wmOperatorType *ot);
|
|
|
|
|
|
2009-03-29 02:15:13 +00:00
|
|
|
void CURVE_OT_spline_type_set(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_radius_set(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_spline_weight_set(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_handle_type_set(struct wmOperatorType *ot);
|
2009-07-21 00:36:07 +00:00
|
|
|
void CURVE_OT_shade_smooth(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_shade_flat(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void CURVE_OT_tilt_clear(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
|
2009-02-11 23:02:21 +00:00
|
|
|
void CURVE_OT_smooth(struct wmOperatorType *ot);
|
2013-07-24 14:30:45 +00:00
|
|
|
void CURVE_OT_smooth_weight(struct wmOperatorType *ot);
|
2.5: Most curve/surface editmode operators back:
* Hide, Reveal
* Separate, Duplicate, Delete
* Set Weight, Set Radius, Set Spline Type, Set Handle Type, Set Smooth
* Tilt, Clear Tilt
* Smooth, Smooth Radius
* De(select) First, De(select) Last, De(select) All, Select Inverse,
Select Linked, Select Control Point Row, Select Next, Select Previous,
Select More, Select Less, Select Random, Select Every Nth
* Switch Direction, Subdivide, Make Segment, Spin, Extrude, Toggle Cyclic
* Specials Menu
Not working correct yet:
* Add Vertex (ctrl click)
* Add Menu
2009-02-12 22:12:21 +00:00
|
|
|
void CURVE_OT_smooth_radius(struct wmOperatorType *ot);
|
2013-07-24 14:30:45 +00:00
|
|
|
void CURVE_OT_smooth_tilt(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
|
2009-02-11 23:02:21 +00:00
|
|
|
void CURVE_OT_de_select_first(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_de_select_last(struct wmOperatorType *ot);
|
2009-11-29 22:16:29 +00:00
|
|
|
void CURVE_OT_select_all(struct wmOperatorType *ot);
|
2009-02-11 23:02:21 +00:00
|
|
|
void CURVE_OT_select_linked(struct wmOperatorType *ot);
|
2010-11-21 18:50:53 +00:00
|
|
|
void CURVE_OT_select_linked_pick(struct wmOperatorType *ot);
|
2009-02-11 23:02:21 +00:00
|
|
|
void CURVE_OT_select_row(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_select_next(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_select_previous(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_select_more(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_select_less(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_select_random(struct wmOperatorType *ot);
|
2010-05-10 17:32:11 +00:00
|
|
|
void CURVE_OT_select_nth(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
|
|
|
|
|
void CURVE_OT_switch_direction(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_subdivide(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_make_segment(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_spin(struct wmOperatorType *ot);
|
2009-04-12 22:43:07 +00:00
|
|
|
void CURVE_OT_vertex_add(struct wmOperatorType *ot);
|
2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..
* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character
Notes
* Text (datablock) to Object doesn't work yet, will need to
implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
ctrl+x, ctrl+left/right. That override goes top down which works
well for some cases, but here we need to override in the other
direction.
* There's no unicode support in RNA, or the user interface code
for that matter, but text strings can contain these characters.
At the moment it stores a UTF-8 string in char arrays, which is
supposed to be nicely compatible with ascii. Seems reasonable to
add support for UTF-8 in the interface code, python bindings, ..
eventually?
2009-02-17 19:55:20 +00:00
|
|
|
void CURVE_OT_extrude(struct wmOperatorType *ot);
|
2009-03-29 02:15:13 +00:00
|
|
|
void CURVE_OT_cyclic_toggle(struct wmOperatorType *ot);
|
2.5: Most curve/surface editmode operators back:
* Hide, Reveal
* Separate, Duplicate, Delete
* Set Weight, Set Radius, Set Spline Type, Set Handle Type, Set Smooth
* Tilt, Clear Tilt
* Smooth, Smooth Radius
* De(select) First, De(select) Last, De(select) All, Select Inverse,
Select Linked, Select Control Point Row, Select Next, Select Previous,
Select More, Select Less, Select Random, Select Every Nth
* Switch Direction, Subdivide, Make Segment, Spin, Extrude, Toggle Cyclic
* Specials Menu
Not working correct yet:
* Add Vertex (ctrl click)
* Add Menu
2009-02-12 22:12:21 +00:00
|
|
|
|
2013-09-16 00:03:33 +00:00
|
|
|
/* helper functions */
|
|
|
|
|
void ed_editnurb_translate_flag(struct ListBase *editnurb, short flag, const float vec[3]);
|
|
|
|
|
bool ed_editnurb_extrude_flag(struct EditNurb *editnurb, short flag);
|
|
|
|
|
bool ed_editnurb_spin(float viewmat[4][4], struct Object *obedit, const float axis[3], const float cent[3]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* editcurve_add.c */
|
|
|
|
|
void CURVE_OT_primitive_bezier_curve_add(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_primitive_bezier_circle_add(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_primitive_nurbs_curve_add(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_primitive_nurbs_circle_add(struct wmOperatorType *ot);
|
|
|
|
|
void CURVE_OT_primitive_nurbs_path_add(struct wmOperatorType *ot);
|
|
|
|
|
|
|
|
|
|
void SURFACE_OT_primitive_nurbs_surface_curve_add(struct wmOperatorType *ot);
|
|
|
|
|
void SURFACE_OT_primitive_nurbs_surface_circle_add(struct wmOperatorType *ot);
|
|
|
|
|
void SURFACE_OT_primitive_nurbs_surface_surface_add(struct wmOperatorType *ot);
|
|
|
|
|
void SURFACE_OT_primitive_nurbs_surface_cylinder_add(struct wmOperatorType *ot);
|
|
|
|
|
void SURFACE_OT_primitive_nurbs_surface_sphere_add(struct wmOperatorType *ot);
|
|
|
|
|
void SURFACE_OT_primitive_nurbs_surface_torus_add(struct wmOperatorType *ot);
|
2009-01-23 14:43:25 +00:00
|
|
|
|
2013-09-16 00:03:33 +00:00
|
|
|
#endif /* __CURVE_INTERN_H__ */
|