2008-12-01 06:52:18 +00:00
|
|
|
|
/**
|
|
|
|
|
* $Id$
|
|
|
|
|
*
|
|
|
|
|
* ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
*
|
2009-09-18 11:25:52 +00:00
|
|
|
|
* Contributor(s): Blender Foundation (2008), Juho Veps<EFBFBD>l<EFBFBD>inen
|
2008-12-01 06:52:18 +00:00
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
#include "RNA_define.h"
|
|
|
|
|
#include "RNA_types.h"
|
|
|
|
|
|
|
|
|
|
#include "rna_internal.h"
|
|
|
|
|
|
|
|
|
|
#include "DNA_brush_types.h"
|
2009-01-10 22:57:33 +00:00
|
|
|
|
#include "DNA_texture_types.h"
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2009-08-21 06:23:38 +00:00
|
|
|
|
#include "IMB_imbuf.h"
|
|
|
|
|
|
2009-08-16 19:50:00 +00:00
|
|
|
|
EnumPropertyItem brush_sculpt_tool_items[] = {
|
|
|
|
|
{SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
|
|
|
|
|
{SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
|
|
|
|
|
{SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""},
|
|
|
|
|
{SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""},
|
|
|
|
|
{SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""},
|
|
|
|
|
{SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""},
|
|
|
|
|
{SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""},
|
|
|
|
|
{SCULPT_TOOL_CLAY, "CLAY", 0, "Clay", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2008-12-01 06:52:18 +00:00
|
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
|
|
2009-07-15 19:20:59 +00:00
|
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
|
|
|
|
#include "BKE_texture.h"
|
|
|
|
|
|
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
|
|
|
|
#include "WM_api.h"
|
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
2009-01-10 22:57:33 +00:00
|
|
|
|
static void rna_Brush_mtex_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Brush *brush= (Brush*)ptr->data;
|
2009-07-13 19:33:59 +00:00
|
|
|
|
rna_iterator_array_begin(iter, (void*)brush->mtex, sizeof(MTex*), MAX_MTEX, 0, NULL);
|
2009-01-10 22:57:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
2009-02-02 19:57:57 +00:00
|
|
|
|
static PointerRNA rna_Brush_active_texture_get(PointerRNA *ptr)
|
2009-01-10 22:57:33 +00:00
|
|
|
|
{
|
2009-07-28 18:54:02 +00:00
|
|
|
|
Brush *br= (Brush*)ptr->data;
|
|
|
|
|
Tex *tex;
|
|
|
|
|
|
|
|
|
|
tex= (br->mtex[(int)br->texact])? br->mtex[(int)br->texact]->tex: NULL;
|
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_Texture, tex);
|
2009-01-10 22:57:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
2009-07-28 18:54:02 +00:00
|
|
|
|
static void rna_Brush_active_texture_set(PointerRNA *ptr, PointerRNA value)
|
2009-07-15 19:20:59 +00:00
|
|
|
|
{
|
2009-07-28 18:54:02 +00:00
|
|
|
|
Brush *br= (Brush*)ptr->data;
|
|
|
|
|
int act= br->texact;
|
|
|
|
|
|
|
|
|
|
if(br->mtex[act] && br->mtex[act]->tex)
|
|
|
|
|
id_us_min(&br->mtex[act]->tex->id);
|
|
|
|
|
|
|
|
|
|
if(value.data) {
|
|
|
|
|
if(!br->mtex[act])
|
|
|
|
|
br->mtex[act]= add_mtex();
|
|
|
|
|
|
|
|
|
|
br->mtex[act]->tex= value.data;
|
|
|
|
|
id_us_plus(&br->mtex[act]->tex->id);
|
|
|
|
|
}
|
|
|
|
|
else if(br->mtex[act]) {
|
|
|
|
|
MEM_freeN(br->mtex[act]);
|
|
|
|
|
br->mtex[act]= NULL;
|
2009-07-15 19:20:59 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
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
|
|
|
|
static void rna_Brush_update(bContext *C, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Brush *br= (Brush*)ptr->data;
|
|
|
|
|
WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, br);
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-01 06:52:18 +00:00
|
|
|
|
#else
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
|
static void rna_def_brush(BlenderRNA *brna)
|
2008-12-01 06:52:18 +00:00
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2009-08-07 19:16:59 +00:00
|
|
|
|
|
2008-12-01 06:52:18 +00:00
|
|
|
|
static EnumPropertyItem prop_blend_items[] = {
|
2009-08-21 06:23:38 +00:00
|
|
|
|
{IMB_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting."},
|
|
|
|
|
{IMB_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting."},
|
|
|
|
|
{IMB_BLEND_SUB, "SUB", 0, "Subtract", "Use subtract blending mode while painting."},
|
|
|
|
|
{IMB_BLEND_MUL, "MUL", 0, "Multiply", "Use multiply blending mode while painting."},
|
|
|
|
|
{IMB_BLEND_LIGHTEN, "LIGHTEN", 0, "Lighten", "Use lighten blending mode while painting."},
|
|
|
|
|
{IMB_BLEND_DARKEN, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
|
|
|
|
|
{IMB_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting."},
|
|
|
|
|
{IMB_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting."},
|
2009-06-16 00:52:21 +00:00
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-09-13 19:37:51 +00:00
|
|
|
|
|
|
|
|
|
static const EnumPropertyItem prop_flip_direction_items[]= {
|
|
|
|
|
{0, "ADD", 0, "Add", "Add effect of brush"},
|
|
|
|
|
{BRUSH_DIR_IN, "SUBTRACT", 0, "Subtract", "Subtract effect of brush"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}};
|
2009-08-07 19:16:59 +00:00
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
|
srna= RNA_def_struct(brna, "Brush", "ID");
|
2009-01-10 22:57:33 +00:00
|
|
|
|
RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting.");
|
2009-06-03 23:16:51 +00:00
|
|
|
|
RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2008-12-02 23:45:11 +00:00
|
|
|
|
/* enums */
|
2008-12-01 06:52:18 +00:00
|
|
|
|
prop= RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_blend_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Blending mode", "Brush blending mode.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-01-14 15:29:29 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE);
|
2009-08-16 19:50:00 +00:00
|
|
|
|
RNA_def_property_enum_items(prop, brush_sculpt_tool_items);
|
2009-01-14 15:29:29 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Sculpt Tool", "");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-09-13 19:37:51 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
|
|
|
|
|
RNA_def_property_enum_items(prop, prop_flip_direction_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Direction", "Mapping type to use for this image in the game engine.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2008-12-02 23:45:11 +00:00
|
|
|
|
/* number values */
|
|
|
|
|
prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_range(prop, 1, 200);
|
2008-12-02 23:45:11 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Size", "Diameter of the brush.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "jitter");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2009-09-18 11:25:52 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-09-18 11:25:52 +00:00
|
|
|
|
|
2008-12-01 06:52:18 +00:00
|
|
|
|
prop= RNA_def_property(srna, "spacing", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "spacing");
|
|
|
|
|
RNA_def_property_range(prop, 1.0f, 100.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush stamps.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-08-18 01:19:00 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 10, 200);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Smooth Stroke Radius", "Minimum distance from last point before stroke continues.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-08-18 01:19:00 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "smooth_stroke_factor", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_range(prop, 0.5, 0.99);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Smooth Stroke Factor", "Higher values give a smoother stroke.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rate");
|
|
|
|
|
RNA_def_property_range(prop, 0.010f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Rate", "Number of paints per second for Airbrush.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rgb");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color", "");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2009-01-06 01:37:12 +00:00
|
|
|
|
prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "alpha");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2009-01-06 01:37:12 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Strength", "The amount of pressure on the brush.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-01-24 22:58:22 +00:00
|
|
|
|
|
2008-12-01 06:52:18 +00:00
|
|
|
|
/* flag */
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_airbrush", PROP_BOOLEAN, PROP_NONE);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH);
|
2008-12-02 23:45:11 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Airbrush", "Keep applying paint effect while holding mouse (spray).");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_wrap", PROP_BOOLEAN, PROP_NONE);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_TORUS);
|
2008-12-02 23:45:11 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Wrap", "Enable torus wrapping while painting.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
|
2009-09-07 09:43:04 +00:00
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
|
2009-08-07 19:16:59 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_size_pressure", PROP_BOOLEAN, PROP_NONE);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
|
2009-09-07 09:43:04 +00:00
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
|
2008-12-02 23:45:11 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_JITTER_PRESSURE);
|
2009-09-07 09:43:04 +00:00
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
|
2009-09-18 11:25:52 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Jitter Pressure", "Enable tablet pressure sensitivity for jitter.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-09-18 11:25:52 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "use_spacing_pressure", PROP_BOOLEAN, PROP_NONE);
|
2008-12-01 06:52:18 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACING_PRESSURE);
|
2009-09-07 09:43:04 +00:00
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
|
2008-12-02 23:45:11 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Spacing Pressure", "Enable tablet pressure sensitivity for spacing.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-01-14 18:48:16 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_rake", PROP_BOOLEAN, PROP_NONE);
|
2009-01-14 18:48:16 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RAKE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Rake", "Rotate the brush texture to match the stroke direction.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-01-14 18:48:16 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_anchor", PROP_BOOLEAN, PROP_NONE);
|
2009-01-15 05:09:33 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ANCHORED);
|
2009-01-14 18:48:16 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-01-14 18:48:16 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_space", PROP_BOOLEAN, PROP_NONE);
|
2009-01-21 22:40:28 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Space", "Limit brush application to the distance specified by spacing.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2.5/Sculpt:
== Re-added smooth stroke ==
UI: toggle is just in the sculpt menu for now. Also changes the sculpt paint cursor slightly, draws a line between previous and current locations.
It's a different implementation than in 2.4, works like this:
The stroke interpolates between the last mouse location and the current location, weighted towards the previous location. If the stroke gets within a certain radius of the current mouse location, the stroke stops. This radius allows for sharp turns in the stroke.
Todo: there are two hard-coded parameters that should become user settable, that's the weighting between previous and current locations, and most important, the no-update radius.
Note also that this option was added as a per-brush flag, worth discussing whether that's the correct place, or whether it should be a sculpt setting like symmetry?
== Improved stroke spacing ==
The previous implementation of stroke spacing simply guaranteed that stroke dots would not occur any closer than the space setting. It now forces stroke dots to always be the specified distance apart.
Todo: Performance gets pretty awful with a small spacing setting, this needs optimization.
2009-06-30 23:06:50 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
|
2.5/Sculpt:
== Re-added smooth stroke ==
UI: toggle is just in the sculpt menu for now. Also changes the sculpt paint cursor slightly, draws a line between previous and current locations.
It's a different implementation than in 2.4, works like this:
The stroke interpolates between the last mouse location and the current location, weighted towards the previous location. If the stroke gets within a certain radius of the current mouse location, the stroke stops. This radius allows for sharp turns in the stroke.
Todo: there are two hard-coded parameters that should become user settable, that's the weighting between previous and current locations, and most important, the no-update radius.
Note also that this option was added as a per-brush flag, worth discussing whether that's the correct place, or whether it should be a sculpt setting like symmetry?
== Improved stroke spacing ==
The previous implementation of stroke spacing simply guaranteed that stroke dots would not occur any closer than the space setting. It now forces stroke dots to always be the specified distance apart.
Todo: Performance gets pretty awful with a small spacing setting, this needs optimization.
2009-06-30 23:06:50 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SMOOTH_STROKE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-08-09 17:21:40 +00:00
|
|
|
|
|
2009-09-18 11:25:52 +00:00
|
|
|
|
prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
|
2009-08-09 17:21:40 +00:00
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
|
2008-12-02 23:45:11 +00:00
|
|
|
|
/* not exposed in the interface yet
|
2008-12-01 06:52:18 +00:00
|
|
|
|
prop= RNA_def_property(srna, "fixed_tex", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_FIXED_TEX);
|
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
|
|
|
|
RNA_def_property_ui_text(prop, "Fixed Texture", "Keep texture origin in fixed position.");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update"); */
|
2008-12-02 23:45:11 +00:00
|
|
|
|
|
2009-09-16 18:04:01 +00:00
|
|
|
|
prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-01-14 18:48:16 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2009-01-14 18:48:16 +00:00
|
|
|
|
|
2008-12-02 23:45:11 +00:00
|
|
|
|
/* texture */
|
2009-07-28 18:54:02 +00:00
|
|
|
|
rna_def_mtex_common(srna, "rna_Brush_mtex_begin", "rna_Brush_active_texture_get",
|
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
|
|
|
|
"rna_Brush_active_texture_set", "TextureSlot", "rna_Brush_update");
|
2008-12-02 23:45:11 +00:00
|
|
|
|
|
|
|
|
|
/* clone tool */
|
|
|
|
|
prop= RNA_def_property(srna, "clone_image", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "clone.image");
|
2009-05-28 23:23:47 +00:00
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
UI: don't use operators anymore for handling user interface events, but rather
a special UI handler which makes the code clearer. This UI handler is attached
to the region along with other handlers, and also gets a callback when all
handlers for the region are removed to ensure things are properly cleaned up.
This should fix XXX's in the UI code related to events and context switching.
Most of the changes are in interface_handlers.c, which was renamed from
interface_ops.c, to convert operators to the UI handler. UI code notes:
* uiBeginBlock/uiEndBlock/uiFreeBlocks now takes a context argument, this is
required to properly cancel things like timers or tooltips when the region
gets removed.
* UI_add_region_handlers will add the region level UI handlers, to be used
when adding keymap handlers etc. This replaces the UI keymap.
* When the UI code starts a modal interaction (number sliding, text editing,
opening a menu, ..), it will add an UI handler at the window level which
will block events.
Windowmanager changes:
* Added an UI handler next to the existing keymap and operator modal handlers.
It has an event handling and remove callback, and like operator modal handlers
will remember the area and region if it is registered at the window level.
* Removed the MESSAGE event.
* Operator cancel and UI handler remove callbacks now get the
window/area/region restored in the context, like the operator modal and UI
handler event callbacks.
* Regions now receive MOUSEMOVE events for the mouse going outside of the
region. This was already happening for areas, but UI buttons are at the region
level so we need it there.
Issues:
* Tooltips and menus stay open when switching to another window, and button
highlight doesn't work without moving the mouse first when Blender starts up.
I tried using some events like Q_FIRSTTIME, WINTHAW, but those don't seem to
arrive..
* Timeline header buttons seem to be moving one pixel or so sometimes when
interacting with them.
* Seems not due to this commit, but UI and keymap handlers are leaking. It
seems that handlers are being added to regions in all screens, also in regions
of areas that are not visible, but these handlers are not removed. Probably
there should only be handlers in visible regions?
2008-12-10 04:36:33 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Clone Image", "Image for clone tool.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-02 23:45:11 +00:00
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "clone_opacity", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clone.alpha");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Clone Opacity", "Opacity of clone image display.");
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-02 23:45:11 +00:00
|
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
|
prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
|
2008-12-02 23:45:11 +00:00
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "clone.offset");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Clone Offset", "");
|
2008-12-26 02:02:06 +00:00
|
|
|
|
RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3);
|
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
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Brush_update");
|
2008-12-01 06:52:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
2009-01-13 20:50:07 +00:00
|
|
|
|
|
|
|
|
|
/* A brush stroke is a list of changes to the brush that
|
|
|
|
|
* can occur during a stroke
|
|
|
|
|
*
|
2009-01-15 05:09:33 +00:00
|
|
|
|
* o 3D location of the brush
|
|
|
|
|
* o 2D mouse location
|
2009-01-13 20:50:07 +00:00
|
|
|
|
* o Tablet pressure
|
|
|
|
|
* o Direction flip
|
|
|
|
|
* o Tool switch
|
|
|
|
|
* o Time
|
|
|
|
|
*/
|
|
|
|
|
static void rna_def_operator_stroke_element(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna= RNA_def_struct(brna, "OperatorStrokeElement", "IDPropertyGroup");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Operator Stroke Element", "");
|
|
|
|
|
|
RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
mass, rotation, time, velocity, acceleration). These are not used
yet anywhere.
* Centralized code that decides the name of array items based on
subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
later together with another change.
2009-08-10 21:31:05 +00:00
|
|
|
|
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
|
2009-01-13 20:50:07 +00:00
|
|
|
|
RNA_def_property_flag(prop, PROP_IDPROPERTY);
|
|
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Location", "");
|
|
|
|
|
|
2009-08-18 01:19:00 +00:00
|
|
|
|
prop= RNA_def_property(srna, "mouse", PROP_FLOAT, PROP_XYZ);
|
2009-01-15 05:09:33 +00:00
|
|
|
|
RNA_def_property_flag(prop, PROP_IDPROPERTY);
|
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mouse", "");
|
|
|
|
|
|
2009-02-19 23:53:40 +00:00
|
|
|
|
prop= RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
|
2009-01-13 20:50:07 +00:00
|
|
|
|
RNA_def_property_flag(prop, PROP_IDPROPERTY);
|
2009-02-19 23:53:40 +00:00
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Pressure", "Tablet pressure.");
|
|
|
|
|
|
|
|
|
|
prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_IDPROPERTY);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Time", "");
|
2009-01-13 20:50:07 +00:00
|
|
|
|
|
2009-01-14 03:02:44 +00:00
|
|
|
|
prop= RNA_def_property(srna, "flip", PROP_BOOLEAN, PROP_NONE);
|
2009-01-13 20:50:07 +00:00
|
|
|
|
RNA_def_property_flag(prop, PROP_IDPROPERTY);
|
2009-01-14 03:02:44 +00:00
|
|
|
|
RNA_def_property_ui_text(prop, "Flip", "");
|
2009-01-13 20:50:07 +00:00
|
|
|
|
|
|
|
|
|
/* XXX: Tool (this will be for pressing a modifier key for a different brush,
|
|
|
|
|
e.g. switching to a Smooth brush in the middle of the stroke */
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-01 19:02:27 +00:00
|
|
|
|
void RNA_def_brush(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
rna_def_brush(brna);
|
2009-01-13 20:50:07 +00:00
|
|
|
|
rna_def_operator_stroke_element(brna);
|
2008-12-01 19:02:27 +00:00
|
|
|
|
}
|
|
|
|
|
|
2008-12-01 06:52:18 +00:00
|
|
|
|
#endif
|