[Bf-blender-cvs] [9b4e56c091f] blender2.8: Merge branch 'master' into blender2.8
Bastien Montagne
noreply at git.blender.org
Thu May 31 12:57:47 CEST 2018
Commit: 9b4e56c091f0df255cc09607061d130847a5f438
Author: Bastien Montagne
Date: Thu May 31 12:57:24 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB9b4e56c091f0df255cc09607061d130847a5f438
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenkernel/BKE_camera.h
source/blender/blenkernel/BKE_dynamicpaint.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/smoke.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/modifiers/intern/MOD_dynamicpaint.c
source/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/object.c
index 986812faebf,02578a704b3..d2d68ce02ce
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@@ -552,73 -529,7 +552,73 @@@ bool BKE_object_is_in_wpaint_select_ver
return false;
}
+bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode)
+{
+ if (object_mode & OB_MODE_EDIT) {
+ if (BKE_object_is_in_editmode(ob)) {
+ return true;
+ }
+ }
+ else if (object_mode & OB_MODE_VERTEX_PAINT) {
+ if (ob->sculpt && (ob->sculpt->mode_type == OB_MODE_VERTEX_PAINT)) {
+ return true;
+ }
+ }
+ else if (object_mode & OB_MODE_WEIGHT_PAINT) {
+ if (ob->sculpt && (ob->sculpt->mode_type == OB_MODE_WEIGHT_PAINT)) {
+ return true;
+ }
+ }
+ else if (object_mode & OB_MODE_SCULPT) {
+ if (ob->sculpt && (ob->sculpt->mode_type == OB_MODE_SCULPT)) {
+ return true;
+ }
+ }
+ else if (object_mode & OB_MODE_POSE) {
+ if (ob->pose != NULL) {
+ return true;
+ }
+ }
+ return false;
+}
+
+bool BKE_object_is_mode_compat(const struct Object *ob, eObjectMode object_mode)
+{
+ return ((ob->mode == object_mode) ||
+ (ob->mode & object_mode) != 0);
+}
+
+/**
+ * Return if the object is visible, as evaluated by depsgraph
+ */
+bool BKE_object_is_visible(Object *ob, const eObjectVisibilityCheck mode)
+{
+ if ((ob->base_flag & BASE_VISIBLED) == 0) {
+ return false;
+ }
+
+ if (mode == OB_VISIBILITY_CHECK_UNKNOWN_RENDER_MODE) {
+ return true;
+ }
+
+ if (((ob->transflag & OB_DUPLI) == 0) &&
+ (ob->particlesystem.first == NULL))
+ {
+ return true;
+ }
+
+ switch (mode) {
+ case OB_VISIBILITY_CHECK_FOR_VIEWPORT:
+ return ((ob->duplicator_visibility_flag & OB_DUPLI_FLAG_VIEWPORT) != 0);
+ case OB_VISIBILITY_CHECK_FOR_RENDER:
+ return ((ob->duplicator_visibility_flag & OB_DUPLI_FLAG_RENDER) != 0);
+ default:
+ BLI_assert(!"Object visible test mode not supported.");
+ return false;
+ }
+}
+
- bool BKE_object_exists_check(const Object *obtest)
+ bool BKE_object_exists_check(Main *bmain, const Object *obtest)
{
Object *ob;
diff --cc source/blender/blenkernel/intern/smoke.c
index 272af8341de,41ee8a4c7e8..922f82a5e2e
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@@ -71,8 -71,10 +71,9 @@@
#include "BKE_constraint.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
-#include "BKE_depsgraph.h"
#include "BKE_DerivedMesh.h"
#include "BKE_effect.h"
+ #include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
diff --cc source/blender/editors/object/object_constraint.c
index 28ff1ffab1c,1ec47cde029..6c4a79ec4b4
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@@ -1202,12 -1195,12 +1204,12 @@@ void ED_object_constraint_update(Main *
{
if (ob->pose) BKE_pose_update_constraint_flags(ob->pose);
- object_test_constraints(ob);
+ object_test_constraints(bmain, ob);
if (ob->type == OB_ARMATURE)
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
else
- DAG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, OB_RECALC_OB);
}
static void object_pose_tag_update(Main *bmain, Object *ob)
@@@ -1230,26 -1223,21 +1232,26 @@@ void ED_object_constraint_dependency_up
if (ob->pose) {
object_pose_tag_update(bmain, ob);
}
- DAG_relations_tag_update(bmain);
+ DEG_relations_tag_update(bmain);
}
- void ED_object_constraint_tag_update(Object *ob, bConstraint *con)
+ void ED_object_constraint_tag_update(Main *bmain, Object *ob, bConstraint *con)
{
if (ob->pose) {
BKE_pose_tag_update_constraint_flags(ob->pose);
}
- object_test_constraint(ob, con);
+ object_test_constraint(bmain, ob, con);
if (ob->type == OB_ARMATURE)
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
else
- DAG_id_tag_update(&ob->id, OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, OB_RECALC_OB);
+
+ /* Do Copy-on-Write tag here too, otherwise constraint
+ * influence/mute buttons in UI have no effect
+ */
+ DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
}
void ED_object_constraint_dependency_tag_update(Main *bmain, Object *ob, bConstraint *con)
@@@ -1280,10 -1269,10 +1283,10 @@@ static int constraint_delete_exec(bCont
if (BKE_constraint_remove_ex(lb, ob, con, true)) {
/* there's no active constraint now, so make sure this is the case */
BKE_constraints_active_set(&ob->constraints, NULL);
- ED_object_constraint_update(ob); /* needed to set the flags on posebones correctly */
+ ED_object_constraint_update(bmain, ob); /* needed to set the flags on posebones correctly */
/* relatiols */
- DAG_relations_tag_update(CTX_data_main(C));
+ DEG_relations_tag_update(CTX_data_main(C));
/* notifiers */
WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob);
diff --cc source/blender/editors/space_view3d/view3d_edit.c
index 2ac2bf683e0,b175ee09f5c..f37f446ad3e
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@@ -49,11 -48,10 +49,12 @@@
#include "BLI_utildefines.h"
#include "BKE_armature.h"
+#include "BKE_camera.h"
#include "BKE_context.h"
#include "BKE_font.h"
+#include "BKE_layer.h"
#include "BKE_library.h"
+ #include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_report.h"
diff --cc source/blender/makesrna/intern/rna_pose.c
index 014ac426b54,d8911705daa..c25601a25fe
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@@ -242,9 -237,9 +242,9 @@@ static void rna_Pose_ik_solver_update(M
BKE_pose_update_constraint_flags(pose);
- object_test_constraints(ob);
+ object_test_constraints(bmain, ob);
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
+ DEG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB);
}
/* rotation - axis-angle */
More information about the Bf-blender-cvs
mailing list