[Bf-blender-cvs] [646412004b1] blender2.8: Merge branch 'master' into blender2.8
Bastien Montagne
noreply at git.blender.org
Fri Jun 22 12:46:30 CEST 2018
Commit: 646412004b1da5d6b7b831a5a49022d1fd138e0b
Author: Bastien Montagne
Date: Fri Jun 22 12:46:16 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB646412004b1da5d6b7b831a5a49022d1fd138e0b
Merge branch 'master' into blender2.8
Conflicts:
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_space.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/generic/bpy_internal_import.h
source/blender/python/intern/bpy_rna_anim.c
source/blender/python/intern/gpu_offscreen.c
===================================================================
===================================================================
diff --cc source/blender/makesrna/intern/rna_image.c
index e71bd52593e,9549eb1de08..2570f88d09f
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@@ -93,8 -104,9 +93,9 @@@ static void rna_Image_source_set(Pointe
if (value != ima->source) {
ima->source = value;
- BKE_image_signal(G.main, ima, NULL, IMA_SIGNAL_SRC_CHANGE);
+ BLI_assert(BKE_id_is_in_gobal_main(&ima->id));
+ BKE_image_signal(G_MAIN, ima, NULL, IMA_SIGNAL_SRC_CHANGE);
- DAG_id_tag_update(&ima->id, 0);
+ DEG_id_tag_update(&ima->id, 0);
}
}
diff --cc source/blender/makesrna/intern/rna_object.c
index e44e9dc8e19,11cfdbcaa22..da799f9520b
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@@ -737,8 -715,10 +740,10 @@@ static void rna_Object_active_material_
{
Object *ob = (Object *)ptr->id.data;
- DAG_id_tag_update(value.data, 0);
+ DEG_id_tag_update(value.data, 0);
- assign_material(G.main, ob, value.data, ob->actcol, BKE_MAT_ASSIGN_EXISTING);
+ BLI_assert(BKE_id_is_in_gobal_main(&ob->id));
+ BLI_assert(BKE_id_is_in_gobal_main(value.data));
+ assign_material(G_MAIN, ob, value.data, ob->actcol, BKE_MAT_ASSIGN_EXISTING);
}
static int rna_Object_active_material_editable(PointerRNA *ptr, const char **UNUSED(r_info))
diff --cc source/blender/makesrna/intern/rna_screen.c
index e30b75b27bd,07a149009ee..e2d9b833a4d
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@@ -106,28 -99,20 +106,28 @@@ static void rna_Screen_layout_name_get(
}
}
-static void rna_Screen_redraw_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static int rna_Screen_layout_name_length(PointerRNA *ptr)
{
- bScreen *screen = (bScreen *)ptr->data;
+ const bScreen *screen = ptr->data;
+ const WorkSpaceLayout *layout = BKE_workspace_layout_find_global(G.main, screen, NULL);
- /* the settings for this are currently only available from a menu in the TimeLine, hence refresh=SPACE_TIME */
- ED_screen_animation_timer_update(screen, screen->redraws_flag, SPACE_TIME);
-}
+ if (layout) {
+ const char *name = BKE_workspace_layout_name_get(layout);
+ return strlen(name);
+ }
+ return 0;
+}
-static int rna_Screen_is_animation_playing_get(PointerRNA *UNUSED(ptr))
+static void rna_Screen_layout_name_set(PointerRNA *ptr, const char *value)
{
- /* can be NULL on file load, T42619 */
- wmWindowManager *wm = G_MAIN->wm.first;
- return wm ? (ED_screen_animation_playing(wm) != NULL) : 0;
+ bScreen *screen = ptr->data;
+ WorkSpace *workspace;
- WorkSpaceLayout *layout = BKE_workspace_layout_find_global(G.main, screen, &workspace);
++ WorkSpaceLayout *layout = BKE_workspace_layout_find_global(G_MAIN, screen, &workspace);
+
+ if (layout) {
+ BKE_workspace_layout_name_set(workspace, layout, value);
+ }
}
static int rna_Screen_fullscreen_get(PointerRNA *ptr)
diff --cc source/blender/makesrna/intern/rna_space.c
index 80bf6abc368,76938bd8971..91515a61fcf
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@@ -986,11 -837,9 +986,13 @@@ static void rna_SpaceImageEditor_image_
{
SpaceImage *sima = (SpaceImage *)(ptr->data);
bScreen *sc = (bScreen *)ptr->id.data;
+ wmWindow *win;
- Scene *scene = ED_screen_scene_find_with_window(sc, G.main->wm.first, &win);
++ Scene *scene = ED_screen_scene_find_with_window(sc, G_MAIN->wm.first, &win);
+ ViewLayer *view_layer = WM_window_get_active_view_layer(win);
+ Object *obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
- ED_space_image_set(G.main, sima, scene, obedit, (Image *)value.data);
+
+ BLI_assert(BKE_id_is_in_gobal_main(value.data));
- ED_space_image_set(G_MAIN, sima, sc->scene, sc->scene->obedit, (Image *)value.data);
++ ED_space_image_set(G_MAIN, sima, scene, obedit, (Image *)value.data);
}
static void rna_SpaceImageEditor_mask_set(PointerRNA *ptr, PointerRNA value)
diff --cc source/blender/python/bmesh/bmesh_py_types.c
index d32b8696c9c,e8474efa31f..394adb1dd3b
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@@ -37,9 -37,9 +37,10 @@@
#include "BKE_customdata.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
+ #include "BKE_library.h"
+#include "DEG_depsgraph.h"
+
#include "bmesh.h"
#include <Python.h>
@@@ -903,8 -903,12 +904,9 @@@ static PyObject *bpy_bmesh_to_mesh(BPy_
bm = self->bm;
- /* python won't ensure matching uv/mtex */
- BM_mesh_cd_validate(bm);
-
+ BLI_assert(BKE_id_is_in_gobal_main(&me->id));
BM_mesh_bm_to_me(
- G.main, /* XXX UGLY! */
+ G_MAIN, /* XXX UGLY! */
bm, me,
(&(struct BMeshToMeshParams){
.calc_object_remap = true,
diff --cc source/blender/python/intern/bpy_rna_anim.c
index 7903f92265b,73809e96560..7012e04628c
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@@ -267,13 -267,14 +268,15 @@@ PyObject *pyrna_struct_keyframe_insert(
return PyBool_FromLong(result);
}
else {
+ ID *id = self->ptr.id.data;
+ struct Depsgraph *depsgraph = CTX_data_depsgraph(BPy_GetContext());
ReportList reports;
short result;
BKE_reports_init(&reports, RPT_STORE);
- result = insert_keyframe(G.main, depsgraph, &reports, (ID *)self->ptr.id.data, NULL, group_name, path_full, index, cfra, keytype, options);
+ BLI_assert(BKE_id_is_in_gobal_main(id));
- result = insert_keyframe(G_MAIN, &reports, id, NULL, group_name, path_full, index, cfra, keytype, options);
++ result = insert_keyframe(G_MAIN, depsgraph, &reports, id, NULL, group_name, path_full, index, cfra, keytype, options);
MEM_freeN((void *)path_full);
if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1)
More information about the Bf-blender-cvs
mailing list