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:
authorJulian Eisel <eiseljulian@gmail.com>2017-01-05 02:31:15 +0300
committerJulian Eisel <eiseljulian@gmail.com>2017-01-05 02:31:15 +0300
commite42e1769b36fddf9b0c161bcb2f7c7f2aeb613eb (patch)
tree526fbf9de0eeeb48d057816ad85e04901e952b3f /source/blender/editors
parent329879239e6fa358e22bf92180e3d5ff9cee9ba1 (diff)
parent82b9e1e3126a5c9de36d57d2d04edd11f00de9a5 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/editors/gpencil/drawgpencil.c
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c14
-rw-r--r--source/blender/editors/object/object_add.c8
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c10
-rw-r--r--source/blender/editors/space_text/text_ops.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c23
5 files changed, 30 insertions, 26 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index d09d441d71b..8a4ba6687cd 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1487,9 +1487,17 @@ static void gp_draw_data_layers(
GP_DRAWFLAG_APPLY((gpl->flag & GP_LAYER_HQ_FILL), GP_DRAWDATA_HQ_FILL);
#undef GP_DRAWFLAG_APPLY
-
- /* draw 'onionskins' (frame left + right) */
- if ((gpl->flag & GP_LAYER_ONIONSKIN) && !(dflag & GP_DRAWDATA_NO_ONIONS)) {
+
+ /* Draw 'onionskins' (frame left + right)
+ * - It is only possible to show these if the option is enabled
+ * - The "no onions" flag prevents ghosts from appearing during animation playback/scrubbing
+ * and in renders
+ * - The per-layer "always show" flag however overrides the playback/render restriction,
+ * allowing artists to selectively turn onionskins on/off during playback
+ */
+ if ((gpl->flag & GP_LAYER_ONIONSKIN) &&
+ ((dflag & GP_DRAWDATA_NO_ONIONS) == 0 || (gpl->flag & GP_LAYER_GHOST_ALWAYS)))
+ {
/* Drawing method - only immediately surrounding (gstep = 0),
* or within a frame range on either side (gstep > 0)
*/
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index f42dafd094c..02b2d8492b4 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1111,7 +1111,9 @@ static void object_delete_check_glsl_update(Object *ob)
/* note: now unlinks constraints as well */
void ED_base_object_free_and_unlink(Main *bmain, Scene *scene, Base *base)
{
- if (BKE_library_ID_is_indirectly_used(bmain, base->object) && ID_REAL_USERS(base->object) <= 1) {
+ if (BKE_library_ID_is_indirectly_used(bmain, base->object) &&
+ ID_REAL_USERS(base->object) <= 1 && ID_EXTRA_USERS(base->object) == 0)
+ {
/* We cannot delete indirectly used object... */
printf("WARNING, undeletable object '%s', should have been catched before reaching this function!",
base->object->id.name + 2);
@@ -1145,7 +1147,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
BKE_reportf(op->reports, RPT_WARNING, "Cannot delete indirectly linked object '%s'", base->object->id.name + 2);
continue;
}
- else if (is_indirectly_used && ID_REAL_USERS(base->object) <= 1) {
+ else if (is_indirectly_used && ID_REAL_USERS(base->object) <= 1 && ID_EXTRA_USERS(base->object) == 0) {
BKE_reportf(op->reports, RPT_WARNING,
"Cannot delete object '%s' from scene '%s', indirectly used objects need at least one user",
base->object->id.name + 2, scene->id.name + 2);
@@ -1179,7 +1181,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
if (scene_iter != scene && !ID_IS_LINKED_DATABLOCK(scene_iter)) {
base_other = BKE_scene_base_find(scene_iter, base->object);
if (base_other) {
- if (is_indirectly_used && ID_REAL_USERS(base->object) <= 1) {
+ if (is_indirectly_used && ID_REAL_USERS(base->object) <= 1 && ID_EXTRA_USERS(base->object) == 0) {
BKE_reportf(op->reports, RPT_WARNING,
"Cannot delete object '%s' from scene '%s', indirectly used objects need at least one user",
base->object->id.name + 2, scene_iter->id.name + 2);
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index d6300b74aea..4560b7cd6e7 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -411,7 +411,9 @@ static void object_delete_cb(
BKE_reportf(reports, RPT_WARNING, "Cannot delete indirectly linked object '%s'", base->object->id.name + 2);
return;
}
- else if (BKE_library_ID_is_indirectly_used(bmain, base->object) && ID_REAL_USERS(base->object) <= 1) {
+ else if (BKE_library_ID_is_indirectly_used(bmain, base->object) &&
+ ID_REAL_USERS(base->object) <= 1 && ID_EXTRA_USERS(base->object) == 0)
+ {
BKE_reportf(reports, RPT_WARNING,
"Cannot delete object '%s' from scene '%s', indirectly used objects need at least one user",
base->object->id.name + 2, scene->id.name + 2);
@@ -525,7 +527,7 @@ static void group_linkobs2scene_cb(
if (!base) {
/* link to scene */
base = BKE_scene_base_add(scene, gob->ob);
- id_lib_extern((ID *)gob->ob); /* in case these are from a linked group */
+ id_us_plus(&gob->ob->id);
}
base->object->flag |= SELECT;
base->flag |= SELECT;
@@ -842,7 +844,9 @@ static Base *outline_delete_hierarchy(bContext *C, ReportList *reports, Scene *s
BKE_reportf(reports, RPT_WARNING, "Cannot delete indirectly linked object '%s'", base->object->id.name + 2);
return base_next;
}
- else if (BKE_library_ID_is_indirectly_used(bmain, base->object) && ID_REAL_USERS(base->object) <= 1) {
+ else if (BKE_library_ID_is_indirectly_used(bmain, base->object) &&
+ ID_REAL_USERS(base->object) <= 1 && ID_EXTRA_USERS(base->object) == 0)
+ {
BKE_reportf(reports, RPT_WARNING,
"Cannot delete object '%s' from scene '%s', indirectly used objects need at least one user",
base->object->id.name + 2, scene->id.name + 2);
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 83012eac39e..df3620843ad 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -254,6 +254,7 @@ static int text_open_exec(bContext *C, wmOperator *op)
}
else if (st) {
st->text = text;
+ id_us_ensure_real(&text->id);
st->left = 0;
st->top = 0;
st->scroll_accum[0] = 0.0f;
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index ab0cae6822b..67e258669d6 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -339,13 +339,13 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
- if (obedit == NULL && is_paint) {
- if (ob->mode & OB_MODE_ALL_PAINT) {
- /* Only for Weight Paint. makes no sense in other paint modes. */
- row = uiLayoutRow(layout, true);
- uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
- }
+ row = uiLayoutRow(layout, true);
+ uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ if (!ob || ELEM(ob->mode, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_WEIGHT_PAINT)) {
+ uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ }
+ if (obedit == NULL && is_paint) {
/* Manipulators aren't used in paint modes */
if (!ELEM(ob->mode, OB_MODE_SCULPT, OB_MODE_PARTICLE_EDIT)) {
/* masks aren't used for sculpt and particle painting */
@@ -363,17 +363,6 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
}
}
else {
- row = uiLayoutRow(layout, true);
- uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
-
- /* pose/object only however we want to allow in weight paint mode too
- * so don't be totally strict and just check not-editmode for now
- * XXX We never get here when we are in Weight Paint mode
- */
- if (obedit == NULL) {
- uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
- }
-
/* Transform widget / manipulators */
row = uiLayoutRow(layout, true);
uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);