2009-01-24 13:45:24 +00:00
|
|
|
/*
|
2009-06-23 00:09:26 +00:00
|
|
|
* $Id$
|
2009-01-24 13:45:24 +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-24 13:45:24 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2007 by Janne Karhu.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
|
|
|
|
2011-02-21 07:25:24 +00:00
|
|
|
/** \file ED_particle.h
|
|
|
|
* \ingroup editors
|
|
|
|
*/
|
|
|
|
|
2009-02-20 20:39:27 +00:00
|
|
|
#ifndef ED_PARTICLE_H
|
|
|
|
#define ED_PARTICLE_H
|
2009-01-24 13:45:24 +00:00
|
|
|
|
2009-02-25 19:29:58 +00:00
|
|
|
struct bContext;
|
2009-01-24 13:45:24 +00:00
|
|
|
struct Object;
|
|
|
|
struct ParticleEditSettings;
|
2009-02-25 19:29:58 +00:00
|
|
|
struct ParticleSystem;
|
2009-01-24 13:45:24 +00:00
|
|
|
struct RadialControl;
|
|
|
|
struct rcti;
|
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;
|
2009-08-29 23:35:13 +00:00
|
|
|
struct PTCacheEdit;
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
struct Scene;
|
2009-01-24 13:45:24 +00:00
|
|
|
|
|
|
|
/* particle edit mode */
|
2009-08-29 15:20:36 +00:00
|
|
|
void PE_free_ptcache_edit(struct PTCacheEdit *edit);
|
|
|
|
int PE_start_edit(struct PTCacheEdit *edit);
|
2009-01-24 13:45:24 +00:00
|
|
|
|
|
|
|
/* access */
|
2009-08-29 15:20:36 +00:00
|
|
|
struct PTCacheEdit *PE_get_current(struct Scene *scene, struct Object *ob);
|
2009-10-09 13:25:54 +00:00
|
|
|
struct PTCacheEdit *PE_create_current(struct Scene *scene, struct Object *ob);
|
|
|
|
void PE_current_changed(struct Scene *scene, struct Object *ob);
|
2009-01-24 13:45:24 +00:00
|
|
|
int PE_minmax(struct Scene *scene, float *min, float *max);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
struct ParticleEditSettings *PE_settings(struct Scene *scene);
|
2009-01-24 13:45:24 +00:00
|
|
|
|
|
|
|
/* update calls */
|
2009-08-29 15:20:36 +00:00
|
|
|
void PE_hide_keys_time(struct Scene *scene, struct PTCacheEdit *edit, float cfra);
|
2009-01-24 13:45:24 +00:00
|
|
|
void PE_update_object(struct Scene *scene, struct Object *ob, int useflag);
|
|
|
|
|
|
|
|
/* selection tools */
|
2011-05-12 16:47:36 +00:00
|
|
|
int PE_mouse_particles(struct bContext *C, const int mval[2], int extend);
|
2009-11-29 22:16:29 +00:00
|
|
|
int PE_border_select(struct bContext *C, struct rcti *rect, int select, int extend);
|
2011-05-12 16:47:36 +00:00
|
|
|
int PE_circle_select(struct bContext *C, int selecting, const int mval[2], float rad);
|
|
|
|
int PE_lasso_select(struct bContext *C, int mcords[][2], short moves, short extend, short select);
|
2010-11-03 01:56:02 +00:00
|
|
|
void PE_deselect_all_visible(struct PTCacheEdit *edit);
|
2009-01-24 13:45:24 +00:00
|
|
|
|
|
|
|
/* undo */
|
2010-11-17 09:45:45 +00:00
|
|
|
void PE_undo_push(struct Scene *scene, const char *str);
|
Sorry, three commits in one, became difficult to untangle..
Editors Modules
* render/ module added in editors, moved the preview render code there and
also shading related operators.
* physics/ module made more consistent with other modules. renaming files,
making a single physics_ops.c for operators and keymaps. Also move all
particle related operators here now.
* space_buttons/ now should have only operators relevant to the buttons
specificially.
Updates & Notifiers
* Material/Texture/World/Lamp can now be passed to DAG_id_flush_update,
which will go back to a callback in editors. Eventually these should
be in the depsgraph itself, but for now this gives a unified call for
doing updates.
* GLSL materials are now refreshed on changes. There's still various
cases missing,
* Preview icons now hook into this system, solving various update cases
that were missed before.
* Also fixes issue in my last commit, where some preview would not render,
problem is avoided in the new system.
Icon Rendering
* On systems with support for non-power of two textures, an OpenGL texture
is now used instead of glDrawPixels. This avoids problems with icons get
clipped on region borders. On my Linux desktop, this gives an 1.1x speedup,
and on my Mac laptop a 2.3x speedup overall in redrawing the full window,
with the default setup. The glDrawPixels implementation on Mac seems to
have a lot of overhread.
* Preview icons are now drawn using proper premul alpha, and never faded so
you can see them clearly.
* Also tried to fix issue with texture node preview rendering, globals can't
be used with threads reliably.
2009-09-29 19:12:12 +00:00
|
|
|
void PE_undo_step(struct Scene *scene, int step);
|
|
|
|
void PE_undo(struct Scene *scene);
|
|
|
|
void PE_redo(struct Scene *scene);
|
2011-01-12 18:00:23 +00:00
|
|
|
int PE_undo_valid(struct Scene *scene);
|
Code holiday commit:
- fix: user pref, window title was reset to 'Blender' on tab usage
- Undo history menu back:
- name "Undo History"
- hotkey alt+ctrl+z (alt+apple+z for mac)
- works like 2.4x, only for global undo, editmode and particle edit.
- Menu scroll
- for small windows or screens, popup menus now allow to display
all items, using internal scrolling
- works with a timer, scrolling 10 items per second when mouse
is over the top or bottom arrow
- if menu is too big to display, it now draws to top or bottom,
based on largest available space.
- also works for hotkey driven pop up menus.
- User pref "DPI" follows widget/layout size
- widgets & headers now become bigger and smaller, to match
'dpi' font sizes. Works well to match UI to monitor size.
- note that icons can get fuzzy, we need better mipmaps for it
2011-06-04 17:03:46 +00:00
|
|
|
void PE_undo_number(struct Scene *scene, int nr);
|
|
|
|
char *PE_undo_get_name(struct Scene *scene, int nr, int *active);
|
2009-02-20 20:39:27 +00:00
|
|
|
|
|
|
|
#endif /* ED_PARTICLE_H */
|
2009-01-24 13:45:24 +00:00
|
|
|
|