Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c8
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h18
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c18
-rw-r--r--source/blender/editors/transform/transform_snap_object.c4
6 files changed, 29 insertions, 25 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 27fe93b049a..20feaa714eb 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -398,7 +398,7 @@ void EDBM_mesh_load(Object *ob)
* of freed data on scene update, especially in cases when there are dependency
* cycles.
*/
- /*
+#if 0
for (Object *other_object = G.main->object.first;
other_object != NULL;
other_object = other_object->id.next)
@@ -407,7 +407,7 @@ void EDBM_mesh_load(Object *ob)
BKE_object_free_derived_caches(other_object);
}
}
- */
+#endif
}
/**
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 40210d63566..73cb31bb1bd 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -68,10 +68,13 @@ static int brush_add_exec(bContext *C, wmOperator *UNUSED(op))
Main *bmain = CTX_data_main(C);
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
- if (br)
+ if (br) {
br = BKE_brush_copy(bmain, br);
- else
+ }
+ else {
br = BKE_brush_add(bmain, "Brush", BKE_paint_object_mode_from_paint_mode(mode));
+ id_us_min(&br->id); /* fake user only */
+ }
BKE_paint_brush_set(paint, br);
@@ -376,6 +379,7 @@ static int brush_generic_tool_set(Main *bmain, Paint *paint, const int tool,
if (!brush && brush_tool(brush_orig, tool_offset) != tool && create_missing) {
brush = BKE_brush_add(bmain, tool_name, ob_mode);
+ id_us_min(&brush->id); /* fake user only */
brush_tool_set(brush, tool_offset, tool);
brush->toggle_brush = brush_orig;
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index f6c486551d8..8c25f3573ea 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1195,7 +1195,7 @@ static void vwpaint_update_cache_invariants(
cache->invert = mode == BRUSH_STROKE_INVERT;
cache->alt_smooth = mode == BRUSH_STROKE_SMOOTH;
/* not very nice, but with current events system implementation
- * we can't handle brush appearance inversion hotkey separately (sergey) */
+ * we can't handle brush appearance inversion hotkey separately (sergey) */
if (cache->invert) ups->draw_inverted = true;
else ups->draw_inverted = false;
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index aaea13ce5d0..5fb9eee805f 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -119,7 +119,7 @@ typedef struct SculptUndoNode {
} SculptUndoNode;
/* Factor of brush to have rake point following behind
-* (could be configurable but this is reasonable default). */
+ * (could be configurable but this is reasonable default). */
#define SCULPT_RAKE_BRUSH_FACTOR 0.25f
struct SculptRakeData {
@@ -148,7 +148,7 @@ typedef struct SculptThreadedTaskData {
/* Data specific to some callbacks. */
/* Note: even if only one or two of those are used at a time, keeping them separated, names help figuring out
- * what it is, and memory overhead is ridiculous anyway... */
+ * what it is, and memory overhead is ridiculous anyway... */
float flippedbstrength;
float angle;
float strength;
@@ -239,10 +239,10 @@ void sculpt_pbvh_calc_area_normal(
float r_area_no[3]);
/* Cache stroke properties. Used because
-* RNA property lookup isn't particularly fast.
-*
-* For descriptions of these settings, check the operator properties.
-*/
+ * RNA property lookup isn't particularly fast.
+ *
+ * For descriptions of these settings, check the operator properties.
+ */
typedef struct StrokeCache {
/* Invariants */
@@ -296,13 +296,13 @@ typedef struct StrokeCache {
float view_normal[3];
/* sculpt_normal gets calculated by calc_sculpt_normal(), then the
- * sculpt_normal_symm gets updated quickly with the usual symmetry
- * transforms */
+ * sculpt_normal_symm gets updated quickly with the usual symmetry
+ * transforms */
float sculpt_normal[3];
float sculpt_normal_symm[3];
/* Used for area texture mode, local_mat gets calculated by
- * calc_brush_local_mat() and used in tex_strength(). */
+ * calc_brush_local_mat() and used in tex_strength(). */
float brush_local_mat[4][4];
float plane_offset[3]; /* used to shift the plane around when doing tiled strokes */
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index 66355a50478..9fa85b55362 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -77,15 +77,15 @@ void draw_motion_paths_init(View3D *v3d, ARegion *ar)
}
/* set color
-* - more intense for active/selected bones, less intense for unselected bones
-* - black for before current frame, green for current frame, blue for after current frame
-* - intensity decreases as distance from current frame increases
-*
-* If the user select custom color, the color is replaced for the color selected in UI panel
-* - 75% Darker color is used for previous frames
-* - 50% Darker color for current frame
-* - User selected color for next frames
-*/
+ * - more intense for active/selected bones, less intense for unselected bones
+ * - black for before current frame, green for current frame, blue for after current frame
+ * - intensity decreases as distance from current frame increases
+ *
+ * If the user select custom color, the color is replaced for the color selected in UI panel
+ * - 75% Darker color is used for previous frames
+ * - 50% Darker color for current frame
+ * - User selected color for next frames
+ */
static void set_motion_path_color(Scene *scene, bMotionPath *mpath, int i, short sel, int sfra, int efra,
float prev_color[3], float frame_color[3], float next_color[3], unsigned color)
{
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index ce8de2ef4d3..bd774129a6c 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -141,7 +141,7 @@ struct SnapObjectContext {
/* -------------------------------------------------------------------- */
/** Common utilities
-* \{ */
+ * \{ */
typedef void(*IterSnapObjsCallback)(SnapObjectContext *sctx, bool is_obedit, Object *ob, float obmat[4][4], void *data);
@@ -264,7 +264,7 @@ static int dm_looptri_to_poly_index(DerivedMesh *dm, const MLoopTri *lt);
/* -------------------------------------------------------------------- */
/** \name Ray Cast Funcs
-* \{ */
+ * \{ */
/* Store all ray-hits
* Support for storing all depths, not just the first (raycast 'all') */