2011-02-21 07:25:24 +00:00
|
|
|
/*
|
2009-01-14 12:26:45 +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-14 12:26:45 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2009 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
2011-02-21 07:25:24 +00:00
|
|
|
|
|
|
|
/** \file ED_curve.h
|
|
|
|
* \ingroup editors
|
|
|
|
*/
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __ED_CURVE_H__
|
|
|
|
#define __ED_CURVE_H__
|
2009-01-14 12:26:45 +00:00
|
|
|
|
|
|
|
struct Base;
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
struct bContext;
|
2009-06-24 14:07:48 +00:00
|
|
|
struct Nurb;
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
struct Object;
|
|
|
|
struct Scene;
|
|
|
|
struct Text;
|
2009-01-14 12:26:45 +00:00
|
|
|
struct View3D;
|
2009-07-13 00:40:20 +00:00
|
|
|
struct wmOperator;
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
struct wmKeyConfig;
|
2010-07-25 11:57:36 +00:00
|
|
|
struct Curve;
|
|
|
|
struct EditNurb;
|
|
|
|
struct BezTriple;
|
|
|
|
struct BPoint;
|
2009-01-14 12:26:45 +00:00
|
|
|
|
2009-01-23 14:43:25 +00:00
|
|
|
/* curve_ops.c */
|
2012-05-12 20:39:39 +00:00
|
|
|
void ED_operatortypes_curve(void);
|
|
|
|
void ED_operatormacros_curve(void);
|
|
|
|
void ED_keymap_curve(struct wmKeyConfig *keyconf);
|
2009-01-23 14:43:25 +00:00
|
|
|
|
2009-01-14 12:26:45 +00:00
|
|
|
/* editcurve.c */
|
2009-11-29 22:16:29 +00:00
|
|
|
void CU_deselect_all(struct Object *obedit);
|
|
|
|
void CU_select_all(struct Object *obedit);
|
2009-11-30 12:50:22 +00:00
|
|
|
void CU_select_swap(struct Object *obedit);
|
2009-11-29 22:16:29 +00:00
|
|
|
|
|
|
|
|
2012-05-12 20:39:39 +00:00
|
|
|
void undo_push_curve(struct bContext *C, const char *name);
|
2011-09-14 00:37:27 +00:00
|
|
|
ListBase *object_editcurve_get(struct Object *ob);
|
2009-01-14 12:26:45 +00:00
|
|
|
|
2012-05-12 20:39:39 +00:00
|
|
|
void load_editNurb(struct Object *obedit);
|
|
|
|
void make_editNurb(struct Object *obedit);
|
|
|
|
void free_editNurb(struct Object *obedit);
|
2009-01-14 12:26:45 +00:00
|
|
|
|
2013-03-19 23:17:44 +00:00
|
|
|
bool mouse_nurb(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
|
2009-01-14 12:26:45 +00:00
|
|
|
|
2012-09-23 07:18:50 +00:00
|
|
|
struct Nurb *add_nurbs_primitive(struct bContext *C, struct Object *obedit, float mat[4][4], int type, int newob);
|
2009-01-26 15:23:29 +00:00
|
|
|
|
2012-05-12 20:39:39 +00:00
|
|
|
int isNurbsel(struct Nurb *nu);
|
|
|
|
void ED_nurb_set_spline_type(struct Nurb *nu, int type);
|
2009-06-24 14:07:48 +00:00
|
|
|
|
2012-05-12 20:39:39 +00:00
|
|
|
int join_curve_exec(struct bContext *C, struct wmOperator *op);
|
2009-07-13 00:40:20 +00:00
|
|
|
|
2009-01-23 14:43:25 +00:00
|
|
|
/* editfont.h */
|
2012-05-12 20:39:39 +00:00
|
|
|
void undo_push_font(struct bContext *C, const char *name);
|
|
|
|
void make_editText(struct Object *obedit);
|
|
|
|
void load_editText(struct Object *obedit);
|
|
|
|
void free_editText(struct Object *obedit);
|
2009-01-14 12:26:45 +00:00
|
|
|
|
2012-05-12 20:39:39 +00:00
|
|
|
void ED_text_to_object(struct bContext *C, struct Text *text, int split_lines);
|
2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:
* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
the text editor. It's Bitstream Vera Sans Mono. This is the
default gnome terminal font, but it doesn't fit entirely well
with the other font I think, can be changed easily of course.
* Clipboard copy/cut/paste now always uses the system clipboard,
the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
windowmanager code.
* Find panel is now a kind of second header, instead of a panel.
This needs especially a way to start editing the text field
immediately on open still.
* Operators are independent of the actual space when possible,
was a bit of puzzling but got it solved nice with notifiers,
and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.
* Operators:
* New, Open, Reload, Save, Save As, Make Internal
* Run Script, Refresh Pyconstraints
* Copy, Cut, Paste
* Convert Whitespace, Uncomment, Comment, Indent, Unindent
* Line Break, Insert
* Next Marker, Previous Marker, Clear All Markers, Mark All
* Select Line, Select All
* Jump, Move, Move Select, Delete, Toggle Overwrite
* Scroll, Scroll Bar, Set Cursor, Line Number
* Find and Replace, Find, Replace, Find Set Selected,
Replace Set Selected
* To 3D Object
* Resolve Conflict
2009-02-28 23:33:35 +00:00
|
|
|
|
2010-05-10 17:32:11 +00:00
|
|
|
int CU_select_nth(struct Object *obedit, int nth);
|
2010-07-25 11:57:36 +00:00
|
|
|
|
|
|
|
void ED_curve_beztcpy(struct EditNurb *editnurb, struct BezTriple *dst, struct BezTriple *src, int count);
|
|
|
|
void ED_curve_bpcpy(struct EditNurb *editnurb, struct BPoint *dst, struct BPoint *src, int count);
|
2010-05-10 17:32:11 +00:00
|
|
|
|
2012-04-16 08:04:12 +00:00
|
|
|
int ED_curve_updateAnimPaths(struct Curve *cu);
|
2010-12-06 17:20:22 +00:00
|
|
|
|
2011-11-15 06:37:47 +00:00
|
|
|
int ED_curve_actSelection(struct Curve *cu, float center[3]);
|
|
|
|
|
2011-02-14 17:55:27 +00:00
|
|
|
/* debug only */
|
|
|
|
void printknots(struct Object *obedit);
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __ED_CURVE_H__ */
|
2009-01-14 12:26:45 +00:00
|
|
|
|