[Bf-blender-cvs] [508e34d0bf6] blender2.8: Merge branch 'master' into blender2.8
Bastien Montagne
noreply at git.blender.org
Thu Jun 7 13:04:34 CEST 2018
Commit: 508e34d0bf68c837c3b0ece72faaab809df52506
Author: Bastien Montagne
Date: Thu Jun 7 13:04:16 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB508e34d0bf68c837c3b0ece72faaab809df52506
Merge branch 'master' into blender2.8
Conflicts:
source/blender/editors/animation/anim_deps.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/pose_edit.c
source/blender/editors/armature/pose_transform.c
source/blender/editors/gpencil/gpencil_convert.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_keyframing.h
source/blender/editors/interface/interface_anim.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/transform/transform_conversions.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_pose.c
source/blender/python/intern/bpy_rna_anim.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
===================================================================
===================================================================
diff --cc source/blender/editors/animation/anim_deps.c
index cfdbe87c8a1,c71acd714d3..adb5a10c19d
--- a/source/blender/editors/animation/anim_deps.c
+++ b/source/blender/editors/animation/anim_deps.c
@@@ -46,10 -46,11 +46,10 @@@
#include "BKE_animsys.h"
#include "BKE_action.h"
+ #include "BKE_context.h"
-#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_gpencil.h"
- #include "BKE_context.h"
- #include "BKE_global.h"
+ #include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_sequencer.h"
diff --cc source/blender/editors/animation/keyframing.c
index e6f2f087ede,6386ad09e80..6f2360767c0
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@@ -53,22 -53,20 +53,23 @@@
#include "DNA_object_types.h"
#include "DNA_rigidbody_types.h"
- #include "BKE_animsys.h"
#include "BKE_action.h"
+ #include "BKE_animsys.h"
#include "BKE_armature.h"
+ #include "BKE_context.h"
-#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
- #include "BKE_idcode.h"
- #include "BKE_nla.h"
#include "BKE_global.h"
- #include "BKE_context.h"
- #include "BKE_report.h"
+ #include "BKE_idcode.h"
#include "BKE_key.h"
+ #include "BKE_main.h"
#include "BKE_material.h"
+ #include "BKE_nla.h"
+ #include "BKE_report.h"
+#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_build.h"
+#include "DEG_depsgraph_query.h"
+
#include "ED_anim_api.h"
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
@@@ -158,11 -156,9 +159,11 @@@ bAction *verify_adt_action(Main *bmain
/* tag depsgraph to be rebuilt to include time dependency */
/* XXX: we probably should have bmain passed down, but that involves altering too many API's */
- DEG_relations_tag_update(G.main);
- DAG_relations_tag_update(bmain);
++ DEG_relations_tag_update(bmain);
}
+ DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE);
+
/* return the action */
return adt->action;
}
@@@ -1021,7 -1007,9 +1022,9 @@@ bool insert_keyframe_direct(Depsgraph *
*
* index of -1 keys all array indices
*/
- short insert_keyframe(Depsgraph *depsgraph, ReportList *reports, ID *id, bAction *act, const char group[], const char rna_path[], int array_index, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag)
+ short insert_keyframe(
- Main *bmain, ReportList *reports, ID *id, bAction *act,
++ Main *bmain, Depsgraph *depsgraph, ReportList *reports, ID *id, bAction *act,
+ const char group[], const char rna_path[], int array_index, float cfra, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag)
{
PointerRNA id_ptr, ptr;
PropertyRNA *prop = NULL;
@@@ -1772,7 -1760,7 +1775,8 @@@ void ANIM_OT_keyframe_delete_v3d(wmOper
static int insert_key_button_exec(bContext *C, wmOperator *op)
{
+ Depsgraph *depsgraph = CTX_data_depsgraph(C);
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
ToolSettings *ts = scene->toolsettings;
PointerRNA ptr = {{NULL}};
@@@ -1856,7 -1821,7 +1860,7 @@@
index = -1;
}
- success = insert_keyframe(depsgraph, op->reports, ptr.id.data, NULL, group, path, index, cfra, ts->keyframe_type, flag);
- success = insert_keyframe(bmain, op->reports, ptr.id.data, NULL, NULL, path, index, cfra, ts->keyframe_type, flag);
++ success = insert_keyframe(bmain, depsgraph, op->reports, ptr.id.data, NULL, group, path, index, cfra, ts->keyframe_type, flag);
MEM_freeN(path);
}
diff --cc source/blender/editors/animation/keyingsets.c
index a4204715678,a2a384832be..5bf23a53819
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@@ -958,7 -957,7 +958,8 @@@ static short keyingset_apply_keying_fla
*/
int ANIM_apply_keyingset(bContext *C, ListBase *dsources, bAction *act, KeyingSet *ks, short mode, float cfra)
{
+ Depsgraph *depsgraph = CTX_data_depsgraph(C);
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
ReportList *reports = CTX_wm_reports(C);
KS_Path *ksp;
@@@ -1039,7 -1038,7 +1040,7 @@@
for (; i < arraylen; i++) {
/* action to take depends on mode */
if (mode == MODIFYKEY_MODE_INSERT)
- success += insert_keyframe(depsgraph, reports, ksp->id, act, groupname, ksp->rna_path, i, cfra, keytype, kflag2);
- success += insert_keyframe(bmain, reports, ksp->id, act, groupname, ksp->rna_path, i, cfra, keytype, kflag2);
++ success += insert_keyframe(bmain, depsgraph, reports, ksp->id, act, groupname, ksp->rna_path, i, cfra, keytype, kflag2);
else if (mode == MODIFYKEY_MODE_DELETE)
success += delete_keyframe(reports, ksp->id, act, groupname, ksp->rna_path, i, cfra, kflag2);
}
diff --cc source/blender/editors/armature/armature_relations.c
index ee20c38cf69,3506b8a8a60..9282148e857
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@@ -628,10 -620,10 +628,10 @@@ static int separate_armature_exec(bCont
/* 4) fix links before depsgraph flushes */ // err... or after?
- separated_armature_fix_links(oldob, newob);
+ separated_armature_fix_links(bmain, oldob, newob);
- DAG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
- DAG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
+ DEG_id_tag_update(&oldob->id, OB_RECALC_DATA); /* this is the original one */
+ DEG_id_tag_update(&newob->id, OB_RECALC_DATA); /* this is the separated one */
/* 5) restore original conditions */
diff --cc source/blender/editors/armature/pose_edit.c
index fa9927419a0,8f0812e6034..ffe64cc24b0
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@@ -46,11 -43,10 +46,12 @@@
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_deform.h"
-#include "BKE_depsgraph.h"
+ #include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
+#include "BKE_layer.h"
+
+#include "DEG_depsgraph.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@@ -622,31 -605,35 +623,32 @@@ static void pose_copy_menu(Scene *scene
static int pose_flip_names_exec(bContext *C, wmOperator *op)
{
+ Main *bmain = CTX_data_main(C);
- Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
- bArmature *arm;
-
- /* paranoia checks */
- if (ELEM(NULL, ob, ob->pose))
- return OPERATOR_CANCELLED;
-
+ ViewLayer *view_layer = CTX_data_view_layer(C);
const bool do_strip_numbers = RNA_boolean_get(op->ptr, "do_strip_numbers");
- arm = ob->data;
-
- ListBase bones_names = {NULL};
-
- CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
+ FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, OB_MODE_POSE, ob)
{
- BLI_addtail(&bones_names, BLI_genericNodeN(pchan->name));
- }
- CTX_DATA_END;
+ bArmature *arm = ob->data;
+ ListBase bones_names = {NULL};
- ED_armature_bones_flip_names(bmain, arm, &bones_names, do_strip_numbers);
+ FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN (ob, pchan)
+ {
+ BLI_addtail(&bones_names, BLI_genericNodeN(pchan->name));
+ }
+ FOREACH_PCHAN_SELECTED_IN_OBJECT_END;
- ED_armature_bones_flip_names(arm, &bones_names, do_strip_numbers);
- BLI_freelistN(&bones_names);
++ ED_armature_bones_flip_names(bmain, arm, &bones_names, do_strip_numbers);
- /* since we renamed stuff... */
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ BLI_freelistN(&bones_names);
- /* note, notifier might evolve */
- WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
+ /* since we renamed stuff... */
+ DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+
+ /* note, notifier might evolve */
+ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
+ }
+ FOREACH_OBJECT_IN_MODE_END;
return OPERATOR_FINISHED;
}
diff --cc source/blender/editors/armature/pose_lib.c
index 02a1e22dbba,62c37e5d3fa..b9c4584ff15
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@@ -46,8 -46,10 +46,9 @@@
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_armature.h"
-#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
+ #include "BKE_main.h"
#include "BKE_library.h"
#include "BKE_object.h"
diff --cc source/blender/editors/gpencil/gpencil_convert.c
index 72331d9e588,67d3272a90d..dfaa1420d68
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@@ -64,8 -61,9 +64,9 @@@
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_gpencil.h"
+#include "BKE_layer.h"
#include "BKE_library.h"
+ #include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
@@@ -455,7 -451,7 +456,8 @@@ static void gp_stroke_path_animation_ad
static void gp_stroke_path_animation(bContext *C, ReportList *reports, Curve *cu, tGpTimingData *gtd)
{
+ Depsgraph *depsgraph = CTX_data_depsgraph(C);
+ Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
bAction *act;
FCurve *fcu;
diff --cc source/blender/editors/include/ED_anim_api.h
index 045d4281585,258ead4c1d2..943191c8892
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@@ -81,9 -82,8 +82,10 @@@ typedef struct bAnimContext
struct bDopeSheet *ads; /* dopesheet data for editor (or which is being used) */
+ struct Depsgraph *depsgraph; /* active dependency graph */
+ struct Main *bmain; /* Current Main */
struct Scene *scene; /* active scene */
+ struct ViewLayer *view_layer; /* active scene layer */
struct Object *obact; /* active object */
ListBase *markers; /* active set of markers */
diff --cc source/blender/editors/include/ED_keyframing.h
index 9c33f835b74,b73c997060a..5882c44a9b3
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@@ -117,7 -115,9 +117,9 @@@ bool insert_keyframe_direct(struct Deps
* Use this to create any necessary animation data, and then insert a keyframe
* using the current value being keyframed, in the relevant place. Returns success.
*/
- short inse
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list