Compare commits
34 Commits
temp-sprea
...
soc-2017-s
Author | SHA1 | Date | |
---|---|---|---|
450eb4ef6c | |||
31d5262cec | |||
5a8e68c726 | |||
023e0526ea | |||
e975c43f5c | |||
3c4b7e7a5a | |||
1b960b02c0 | |||
917427ab33 | |||
d549179379 | |||
a57841c4b0 | |||
bb2b62c48f | |||
321bdff107 | |||
885f459c18 | |||
6d5886bb90 | |||
2b81ef880f | |||
1f65119fd2 | |||
379792196f | |||
d78a93a59e | |||
1132d60234 | |||
1af5ea2f88 | |||
13734ab880 | |||
3b3c42fd0a | |||
1204260c92 | |||
f1cfe3a328 | |||
7bcdcde311 | |||
312e1552b8 | |||
9c3be3335d | |||
f691de8b67 | |||
8e345fec7d | |||
41f1918b2d | |||
26a806e430 | |||
d7f98929e0 | |||
8b03dd8e9d | |||
b973068553 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -39,3 +39,4 @@ Desktop.ini
|
||||
/doc/python_api/rst/op_prop.png
|
||||
/doc/python_api/rst/run_script.png
|
||||
/doc/python_api/rst/spacebar.png
|
||||
/release/datafiles/brushicons/clip.png
|
||||
|
BIN
release/datafiles/brushicons/clip.png
Normal file
BIN
release/datafiles/brushicons/clip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
BIN
release/datafiles/brushicons/topograb.png
Normal file
BIN
release/datafiles/brushicons/topograb.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
Submodule release/datafiles/locale updated: c93ed11a47...19a637ce9f
Submodule release/scripts/addons updated: 371960484a...0926c1e7dc
Submodule release/scripts/addons_contrib updated: a8515cfdfe...a3cdd1a37c
@@ -198,7 +198,7 @@ typedef struct SculptSession {
|
||||
|
||||
/* Layer brush persistence between strokes */
|
||||
float (*layer_co)[3]; /* Copy of the mesh vertices' locations */
|
||||
|
||||
int brush_size;
|
||||
struct SculptStroke *stroke;
|
||||
struct StrokeCache *cache;
|
||||
} SculptSession;
|
||||
|
@@ -406,6 +406,11 @@ void BKE_brush_sculpt_reset(Brush *br)
|
||||
br->sub_col[0] = 0.250000;
|
||||
br->sub_col[1] = 1.000000;
|
||||
break;
|
||||
case SCULPT_TOOL_CLIP:
|
||||
br->add_col[1] = 1.000000;
|
||||
br->sub_col[0] = 0.250000;
|
||||
br->sub_col[1] = 1.000000;
|
||||
break;
|
||||
case SCULPT_TOOL_ROTATE:
|
||||
br->alpha = 1.0;
|
||||
break;
|
||||
@@ -417,6 +422,7 @@ void BKE_brush_sculpt_reset(Brush *br)
|
||||
br->add_col[2] = 0.750000;
|
||||
break;
|
||||
case SCULPT_TOOL_GRAB:
|
||||
case SCULPT_TOOL_TOPO_GRAB:
|
||||
case SCULPT_TOOL_SNAKE_HOOK:
|
||||
case SCULPT_TOOL_THUMB:
|
||||
br->size = 75;
|
||||
|
@@ -863,7 +863,7 @@ void BKE_sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob,
|
||||
ss->multires = mmd;
|
||||
ss->totvert = dm->getNumVerts(dm);
|
||||
ss->totpoly = dm->getNumPolys(dm);
|
||||
ss->mvert = NULL;
|
||||
ss->mvert = me->mvert;
|
||||
ss->mpoly = NULL;
|
||||
ss->mloop = NULL;
|
||||
}
|
||||
|
@@ -815,6 +815,11 @@ void BKE_scene_init(Scene *sce)
|
||||
gp_brush->size = 50;
|
||||
gp_brush->strength = 0.5f; // XXX?
|
||||
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
|
||||
|
||||
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_CLIP]; /*clipping*/
|
||||
gp_brush->size = 40;
|
||||
gp_brush->strength = 0.5f; // XXX?
|
||||
gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
|
||||
|
||||
gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_RANDOMIZE];
|
||||
gp_brush->size = 25;
|
||||
|
@@ -144,6 +144,11 @@ void BLO_update_defaults_startup_blend(Main *bmain)
|
||||
brush->size = 50;
|
||||
brush->strength = 0.5f; // XXX?
|
||||
brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
|
||||
|
||||
brush = &gset->brush[GP_EDITBRUSH_TYPE_CLIP]; /* clipping */
|
||||
brush->size = 40;
|
||||
brush->strength = 0.5f; // XXX?
|
||||
brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
|
||||
|
||||
brush = &gset->brush[GP_EDITBRUSH_TYPE_RANDOMIZE];
|
||||
brush->size = 25;
|
||||
@@ -269,6 +274,12 @@ void BLO_update_defaults_startup_blend(Main *bmain)
|
||||
br->flag |= BRUSH_ORIGINAL_NORMAL;
|
||||
}
|
||||
|
||||
/* use original normal for topo grab brush (otherwise flickers with normal weighting). */
|
||||
br = (Brush *)BKE_libblock_find_name_ex(bmain, ID_BR, "Topo");
|
||||
if (br) {
|
||||
br->flag |= BRUSH_ORIGINAL_NORMAL;
|
||||
}
|
||||
|
||||
/* increase strength, better for smoothing method */
|
||||
br = (Brush *)BKE_libblock_find_name_ex(bmain, ID_BR, "Blur");
|
||||
if (br) {
|
||||
|
@@ -1031,6 +1031,14 @@ void BM_log_before_all_removed(BMesh *bm, BMLog *log)
|
||||
/* Get the logged coordinates of a vertex
|
||||
*
|
||||
* Does not modify the log or the vertex */
|
||||
uint BM_log_vert_id_t(BMLog *log, BMVert *v){
|
||||
return bm_log_vert_id_get(log, v);
|
||||
}
|
||||
|
||||
BMVert *BM_log_id_vert_t(BMLog *log, uint id){
|
||||
return bm_log_vert_from_id(log, id);
|
||||
}
|
||||
|
||||
const float *BM_log_original_vert_co(BMLog *log, BMVert *v)
|
||||
{
|
||||
BMLogEntry *entry = log->current_entry;
|
||||
|
@@ -90,6 +90,10 @@ void BM_log_before_all_removed(BMesh *bm, BMLog *log);
|
||||
/* Get the logged coordinates of a vertex */
|
||||
const float *BM_log_original_vert_co(BMLog *log, BMVert *v);
|
||||
|
||||
uint BM_log_vert_id_t(BMLog *log, BMVert *v);
|
||||
|
||||
BMVert *BM_log_id_vert_t(BMLog *log, uint id);
|
||||
|
||||
/* Get the logged normal of a vertex */
|
||||
const short *BM_log_original_vert_no(BMLog *log, BMVert *v);
|
||||
|
||||
|
@@ -270,4 +270,4 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
|
||||
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
|
||||
}
|
||||
}
|
@@ -159,3 +159,11 @@ void BM_mesh_triangulate(
|
||||
BLI_edgehash_free(pf_ehash, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void BM_mesh_clip_project(
|
||||
BMesh *bm, const int quad_method, const int ngon_method, const bool tag_only,
|
||||
BMOperator *op, BMOpSlot *slot_facemap_out, BMOpSlot *slot_facemap_double_out)
|
||||
{
|
||||
BMIter iter;
|
||||
BMFace *face;
|
||||
}
|
@@ -70,6 +70,7 @@ if(WITH_BLENDER)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/blob.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/blur.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/clay.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/clip.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/claystrips.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/clone.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/crease.png SRC)
|
||||
@@ -96,6 +97,7 @@ if(WITH_BLENDER)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/texfill.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/texmask.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/thumb.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/topograb.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/twist.png SRC)
|
||||
data_to_c_simple(../../../../release/datafiles/brushicons/vertexdraw.png SRC)
|
||||
|
||||
|
@@ -105,6 +105,9 @@ extern char datatoc_flatten_png[];
|
||||
extern int datatoc_grab_png_size;
|
||||
extern char datatoc_grab_png[];
|
||||
|
||||
extern int datatoc_clip_png_size;
|
||||
extern char datatoc_clip_png[];
|
||||
|
||||
extern int datatoc_inflate_png_size;
|
||||
extern char datatoc_inflate_png[];
|
||||
|
||||
@@ -156,6 +159,9 @@ extern char datatoc_texfill_png[];
|
||||
extern int datatoc_texmask_png_size;
|
||||
extern char datatoc_texmask_png[];
|
||||
|
||||
extern int datatoc_topograb_png_size;
|
||||
extern char datatoc_topograb_png[];
|
||||
|
||||
extern int datatoc_thumb_png_size;
|
||||
extern char datatoc_thumb_png[];
|
||||
|
||||
|
@@ -950,6 +950,7 @@ DEF_ICON(BRUSH_BLOB)
|
||||
DEF_ICON(BRUSH_BLUR)
|
||||
DEF_ICON(BRUSH_CLAY)
|
||||
DEF_ICON(BRUSH_CLAY_STRIPS)
|
||||
DEF_ICON(BRUSH_CLIP)
|
||||
DEF_ICON(BRUSH_CLONE)
|
||||
DEF_ICON(BRUSH_CREASE)
|
||||
DEF_ICON(BRUSH_DARKEN)
|
||||
@@ -973,6 +974,7 @@ DEF_ICON(BRUSH_SOFTEN)
|
||||
DEF_ICON(BRUSH_SUBTRACT)
|
||||
DEF_ICON(BRUSH_TEXDRAW)
|
||||
DEF_ICON(BRUSH_TEXFILL)
|
||||
DEF_ICON(BRUSH_TOPO_GRAB)
|
||||
DEF_ICON(BRUSH_TEXMASK)
|
||||
DEF_ICON(BRUSH_THUMB)
|
||||
DEF_ICON(BRUSH_ROTATE)
|
||||
|
@@ -374,6 +374,7 @@ static void init_brush_icons(void)
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_FILL, fill);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_FLATTEN, flatten);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_GRAB, grab);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_CLIP, clip);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_INFLATE, inflate);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_LAYER, layer);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_LIGHTEN, lighten);
|
||||
@@ -390,6 +391,7 @@ static void init_brush_icons(void)
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_SUBTRACT, subtract);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_TEXDRAW, texdraw);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_TEXFILL, texfill);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_TOPO_GRAB, topograb);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_TEXMASK, texmask);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_THUMB, thumb);
|
||||
INIT_BRUSH_ICON(ICON_BRUSH_ROTATE, twist);
|
||||
|
@@ -1592,11 +1592,13 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_PINCH, PKEY, 0);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_INFLATE, IKEY, 0);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_GRAB, GKEY, 0);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_CLIP, YKEY, 0);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_LAYER, LKEY, 0);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_FLATTEN, TKEY, KM_SHIFT);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_CLAY, CKEY, 0);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_CREASE, CKEY, KM_SHIFT);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_SNAKE_HOOK, KKEY, 0);
|
||||
keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_TOPO_GRAB, OKEY, 0);
|
||||
kmi = keymap_brush_select(keymap, OB_MODE_SCULPT, SCULPT_TOOL_MASK, MKEY, 0);
|
||||
RNA_boolean_set(kmi->ptr, "toggle", 1);
|
||||
RNA_boolean_set(kmi->ptr, "create_missing", 1);
|
||||
|
@@ -196,7 +196,7 @@ static bool paint_tool_require_location(Brush *brush, PaintMode mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case ePaintSculpt:
|
||||
if (ELEM(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
|
||||
if (ELEM(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_TOPO_GRAB, SCULPT_TOOL_CLIP, SCULPT_TOOL_ROTATE,
|
||||
SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB))
|
||||
{
|
||||
return false;
|
||||
@@ -763,6 +763,8 @@ static bool sculpt_is_grab_tool(Brush *br)
|
||||
{
|
||||
return ELEM(br->sculpt_tool,
|
||||
SCULPT_TOOL_GRAB,
|
||||
SCULPT_TOOL_TOPO_GRAB,
|
||||
SCULPT_TOOL_CLIP,
|
||||
SCULPT_TOOL_THUMB,
|
||||
SCULPT_TOOL_ROTATE,
|
||||
SCULPT_TOOL_SNAKE_HOOK);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -252,7 +252,9 @@ typedef enum BrushSculptTool {
|
||||
SCULPT_TOOL_CREASE = 16,
|
||||
SCULPT_TOOL_BLOB = 17,
|
||||
SCULPT_TOOL_CLAY_STRIPS = 18,
|
||||
SCULPT_TOOL_MASK = 19
|
||||
SCULPT_TOOL_MASK = 19,
|
||||
SCULPT_TOOL_CLIP = 20,
|
||||
SCULPT_TOOL_TOPO_GRAB = 21
|
||||
} BrushSculptTool;
|
||||
|
||||
/** When #BRUSH_ACCUMULATE is used */
|
||||
@@ -270,6 +272,7 @@ typedef enum BrushSculptTool {
|
||||
|
||||
#define SCULPT_TOOL_HAS_NORMAL_WEIGHT(t) ELEM(t, \
|
||||
SCULPT_TOOL_GRAB, \
|
||||
SCULPT_TOOL_TOPO_GRAB, \
|
||||
SCULPT_TOOL_SNAKE_HOOK \
|
||||
)
|
||||
|
||||
@@ -280,6 +283,7 @@ typedef enum BrushSculptTool {
|
||||
#define SCULPT_TOOL_HAS_DYNTOPO(t) (ELEM(t, \
|
||||
/* These brushes, as currently coded, cannot support dynamic topology */ \
|
||||
SCULPT_TOOL_GRAB, \
|
||||
SCULPT_TOOL_TOPO_GRAB, \
|
||||
SCULPT_TOOL_ROTATE, \
|
||||
SCULPT_TOOL_THUMB, \
|
||||
SCULPT_TOOL_LAYER, \
|
||||
|
@@ -1191,7 +1191,7 @@ typedef enum eGP_EditBrush_Types {
|
||||
GP_EDITBRUSH_TYPE_SIMPLIFY = 8,
|
||||
GP_EDITBRUSH_TYPE_CLONE = 9,
|
||||
GP_EDITBRUSH_TYPE_STRENGTH = 10,
|
||||
|
||||
GP_EDITBRUSH_TYPE_CLIP = 11,
|
||||
/* !!! Update GP_EditBrush_Data brush[###]; below !!! */
|
||||
TOT_GP_EDITBRUSH_TYPES
|
||||
} eGP_EditBrush_Types;
|
||||
@@ -1229,7 +1229,7 @@ typedef enum eGP_EditBrush_Flag {
|
||||
|
||||
/* GPencil Stroke Sculpting Settings */
|
||||
typedef struct GP_BrushEdit_Settings {
|
||||
GP_EditBrush_Data brush[11]; /* TOT_GP_EDITBRUSH_TYPES */
|
||||
GP_EditBrush_Data brush[12]; /* TOT_GP_EDITBRUSH_TYPES */
|
||||
void *paintcursor; /* runtime */
|
||||
|
||||
int brushtype; /* eGP_EditBrush_Types */
|
||||
|
@@ -71,6 +71,7 @@ EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
|
||||
{SCULPT_TOOL_FILL, "FILL", ICON_BRUSH_FILL, "Fill", ""},
|
||||
{SCULPT_TOOL_FLATTEN, "FLATTEN", ICON_BRUSH_FLATTEN, "Flatten", ""},
|
||||
{SCULPT_TOOL_GRAB, "GRAB", ICON_BRUSH_GRAB, "Grab", ""},
|
||||
{SCULPT_TOOL_CLIP, "CLIP", ICON_BRUSH_CLIP, "Clip", ""},
|
||||
{SCULPT_TOOL_INFLATE, "INFLATE", ICON_BRUSH_INFLATE, "Inflate", ""},
|
||||
{SCULPT_TOOL_LAYER, "LAYER", ICON_BRUSH_LAYER, "Layer", ""},
|
||||
{SCULPT_TOOL_MASK, "MASK", ICON_BRUSH_MASK, "Mask", ""},
|
||||
@@ -80,6 +81,7 @@ EnumPropertyItem rna_enum_brush_sculpt_tool_items[] = {
|
||||
{SCULPT_TOOL_SCRAPE, "SCRAPE", ICON_BRUSH_SCRAPE, "Scrape", ""},
|
||||
{SCULPT_TOOL_SIMPLIFY, "SIMPLIFY", ICON_BRUSH_SUBTRACT /* icon TODO */, "Simplify", ""},
|
||||
{SCULPT_TOOL_SMOOTH, "SMOOTH", ICON_BRUSH_SMOOTH, "Smooth", ""},
|
||||
{SCULPT_TOOL_TOPO_GRAB, "TOPO_GRAB", ICON_BRUSH_TOPO_GRAB, "Topo", "" },
|
||||
{SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", ICON_BRUSH_SNAKE_HOOK, "Snake Hook", ""},
|
||||
{SCULPT_TOOL_THUMB, "THUMB", ICON_BRUSH_THUMB, "Thumb", ""},
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
@@ -144,7 +146,7 @@ static int rna_SculptToolCapabilities_has_jitter_get(PointerRNA *ptr)
|
||||
return (!(br->flag & BRUSH_ANCHORED) &&
|
||||
!(br->flag & BRUSH_DRAG_DOT) &&
|
||||
!ELEM(br->sculpt_tool,
|
||||
SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
|
||||
SCULPT_TOOL_GRAB, SCULPT_TOOL_TOPO_GRAB, SCULPT_TOOL_ROTATE,
|
||||
SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
|
||||
}
|
||||
|
||||
@@ -192,7 +194,7 @@ static int rna_SculptToolCapabilities_has_random_texture_angle_get(PointerRNA *p
|
||||
{
|
||||
Brush *br = (Brush *)ptr->data;
|
||||
return (!ELEM(br->sculpt_tool,
|
||||
SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
|
||||
SCULPT_TOOL_GRAB, SCULPT_TOOL_TOPO_GRAB, SCULPT_TOOL_ROTATE,
|
||||
SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB));
|
||||
}
|
||||
|
||||
@@ -255,7 +257,7 @@ static int rna_SculptToolCapabilities_has_space_attenuation_get(PointerRNA *ptr)
|
||||
{
|
||||
Brush *br = (Brush *)ptr->data;
|
||||
return ((br->flag & (BRUSH_SPACE | BRUSH_LINE | BRUSH_CURVE)) &&
|
||||
!ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
|
||||
!ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_TOPO_GRAB, SCULPT_TOOL_ROTATE,
|
||||
SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK));
|
||||
}
|
||||
|
||||
@@ -275,7 +277,7 @@ static int rna_BrushCapabilities_has_spacing_get(PointerRNA *ptr)
|
||||
static int rna_SculptToolCapabilities_has_strength_pressure_get(PointerRNA *ptr)
|
||||
{
|
||||
Brush *br = (Brush *)ptr->data;
|
||||
return !ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK);
|
||||
return !ELEM(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_TOPO_GRAB, SCULPT_TOOL_SNAKE_HOOK);
|
||||
}
|
||||
|
||||
static int rna_TextureCapabilities_has_texture_angle_get(PointerRNA *ptr)
|
||||
|
Submodule source/tools updated: b11375e890...4ace84b09b
Reference in New Issue
Block a user