Merge branch 'blender-v2.81-release'

This commit is contained in:
Campbell Barton 2019-10-15 12:06:11 +11:00
commit c1db52def2
4 changed files with 21 additions and 19 deletions

View File

@ -26,35 +26,36 @@
* FILE FORMAT
* ===========
*
* IFF-style structure (but not IFF compatible!)
* IFF-style structure (but not IFF compatible!)
*
* start file:
* Start file:
* <pre>
* BLENDER_V100 12 bytes (version 1.00)
* V = big endian, v = little endian
* _ = 4 byte pointer, - = 8 byte pointer
* `BLENDER_V100` `12` bytes (version 1.00 is just an example).
* `V` = big endian, `v` = little endian.
* `_` = 4 byte pointer, `-` = 8 byte pointer.
* </pre>
*
* data-blocks: (also see struct #BHead).
* <pre>
* <bh.code> 4 chars
* <bh.len> int, len data after BHead
* <bh.old> void, old pointer
* <bh.SDNAnr> int
* <bh.nr> int, in case of array: number of structs
* data
* ...
* ...
* `bh.code` `char[4]` see `BLO_blend_defs.h` for a list of known types.
* `bh.len` `int32` length data after #BHead in bytes.
* `bh.old` `void *` old pointer (the address at the time of writing the file).
* `bh.SDNAnr` `int32` struct index of structs stored in #DNA1 data.
* `bh.nr` `int32` in case of array: number of structs.
* data
* ...
* ...
* </pre>
*
* Almost all data in Blender are structures. Each struct saved
* gets a BHead header. With BHead the struct can be linked again
* and compared with StructDNA .
* and compared with #StructDNA.
* WRITE
* =====
*
* Preferred writing order: (not really a must, but why would you do it random?)
* Any case: direct data is ALWAYS after the lib block
* Any case: direct data is ALWAYS after the lib block.
*
* (Local file data)
* - for each LibBlock

View File

@ -1359,13 +1359,14 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
if ((mode == PAINT_MODE_SCULPT) && ss && !ups->stroke_active) {
prev_active_vertex_index = ss->active_vertex_index;
is_cursor_over_mesh = sculpt_cursor_geometry_info_update(
C, &gi, mouse, !(brush->falloff_shape & BRUSH_AIRBRUSH));
C, &gi, mouse, (brush->falloff_shape == PAINT_FALLOFF_SHAPE_SPHERE));
}
/* Use special paint crosshair cursor in all paint modes*/
wmWindow *win = CTX_wm_window(C);
WM_cursor_set(win, WM_CURSOR_PAINT);
if ((mode == PAINT_MODE_SCULPT) && ss && !(brush->falloff_shape & BRUSH_AIRBRUSH)) {
if ((mode == PAINT_MODE_SCULPT) && ss &&
(brush->falloff_shape == PAINT_FALLOFF_SHAPE_SPHERE)) {
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
if (!ups->stroke_active) {

View File

@ -1248,7 +1248,7 @@ static void sculpt_automasking_end(Object *ob)
static bool sculpt_automasking_is_constrained_by_radius(Brush *br)
{
/* 2D falloff is not constrained by radius */
if (br->falloff_shape & BRUSH_AIRBRUSH) {
if (br->falloff_shape == PAINT_FALLOFF_SHAPE_TUBE) {
return false;
}

View File

@ -1959,7 +1959,7 @@ static void rna_def_brush(BlenderRNA *brna)
/* flag */
/* This is an enum but its unlikely we add other shapes, so expose as a boolean. */
prop = RNA_def_property(srna, "use_projected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "falloff_shape", BRUSH_AIRBRUSH);
RNA_def_property_boolean_sdna(prop, NULL, "falloff_shape", PAINT_FALLOFF_SHAPE_TUBE);
RNA_def_property_ui_text(
prop, "2D Falloff", "Apply brush influence in 2D circle instead of a sphere");
RNA_def_property_update(prop, 0, "rna_Brush_update");