[Bf-blender-cvs] [1a79c6d3608] blender2.8: Merge branch 'master' into blender2.8
Bastien Montagne
noreply at git.blender.org
Wed Jun 13 11:03:01 CEST 2018
Commit: 1a79c6d36081268a0f0b9f7650471b09372df121
Author: Bastien Montagne
Date: Wed Jun 13 11:02:48 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB1a79c6d36081268a0f0b9f7650471b09372df121
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenkernel/intern/blendfile.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/particle.c
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_particle.h
index 734eb8cfa09,cba92eabb0b..0a5bac267ac
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@@ -328,12 -323,13 +328,13 @@@ void copy_particle_key(struct ParticleK
CustomDataMask psys_emitter_customdata_mask(struct ParticleSystem *psys);
void psys_particle_on_emitter(struct ParticleSystemModifierData *psmd, int distr, int index, int index_dmcache,
float fuv[4], float foffset, float vec[3], float nor[3],
- float utan[3], float vtan[3], float orco[3], float ornor[3]);
+ float utan[3], float vtan[3], float orco[3]);
struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct ParticleSystem *psys);
- struct ModifierData *object_add_particle_system(struct Scene *scene, struct Object *ob, const char *name);
- void object_remove_particle_system(struct Scene *scene, struct Object *ob);
- struct ParticleSettings *BKE_particlesettings_add(struct Main *main, const char *name);
+ struct ModifierData *object_add_particle_system(
+ struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name);
+ void object_remove_particle_system(struct Main *bmain, struct Scene *scene, struct Object *ob);
+ struct ParticleSettings *BKE_particlesettings_add(struct Main *bmain, const char *name);
void BKE_particlesettings_copy_data(
struct Main *bmain, struct ParticleSettings *part_dst, const struct ParticleSettings *part_src,
const int flag);
diff --cc source/blender/blenkernel/BKE_pointcache.h
index 89f1aa5eadd,cb2438ec1f2..501c9964aa3
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@@ -185,10 -184,8 +185,10 @@@ typedef struct PTCacheID
} PTCacheID;
typedef struct PTCacheBaker {
- struct Main *main;
+ struct Main *bmain;
struct Scene *scene;
+ struct ViewLayer *view_layer;
+ struct Depsgraph *depsgraph;
int bake;
int render;
int anim_init;
diff --cc source/blender/blenkernel/intern/blendfile.c
index 597c69408b5,aa5530704c6..27b5089b092
--- a/source/blender/blenkernel/intern/blendfile.c
+++ b/source/blender/blenkernel/intern/blendfile.c
@@@ -202,35 -190,32 +202,35 @@@ static void setup_app_data
/* keep the old (free'd) scene, let 'blo_lib_link_screen_restore'
* replace it with 'curscene' if its needed */
}
- else {
- /* and we enforce curscene to be in current screen */
- if (curscreen) {
- /* can run in bgmode */
- curscreen->scene = curscene;
- }
+ /* and we enforce curscene to be in current screen */
+ else if (win) { /* can run in bgmode */
+ win->scene = curscene;
}
- /* BKE_blender_globals_clear will free G.main, here we can still restore pointers */
+ /* BKE_blender_globals_clear will free G_MAIN, here we can still restore pointers */
- blo_lib_link_screen_restore(bfd->main, curscreen, curscene);
- /* curscreen might not be set when loading without ui (see T44217) so only re-assign if available */
- if (curscreen) {
- curscene = curscreen->scene;
+ blo_lib_link_restore(bfd->main, CTX_wm_manager(C), curscene, cur_view_layer);
+ if (win) {
+ curscene = win->scene;
}
if (track_undo_scene) {
wmWindowManager *wm = bfd->main->wm.first;
if (wm_scene_is_visible(wm, bfd->curscene) == false) {
curscene = bfd->curscene;
- curscreen->scene = curscene;
- BKE_screen_view3d_scene_sync(curscreen);
+ win->scene = curscene;
+ BKE_screen_view3d_scene_sync(curscreen, curscene);
}
}
+
+ /* We need to tag this here because events may be handled immediately after.
+ * only the current screen is important because we wont have to handle
+ * events from multiple screens at once.*/
+ {
+ BKE_screen_manipulator_tag_refresh(curscreen);
+ }
}
- /* free G.main Main database */
+ /* free G_MAIN Main database */
// CTX_wm_manager_set(C, NULL);
BKE_blender_globals_clear();
diff --cc source/blender/blenkernel/intern/ipo.c
index 82178096b46,611c1e3bafb..f3f690b92da
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@@ -1750,9 -1765,26 +1750,9 @@@ void do_versions_ipos_to_animato(Main *
/* IPO second... */
if (ob->ipo) {
- ipo_to_animdata(id, ob->ipo, NULL, NULL, NULL);
+ ipo_to_animdata(bmain, id, ob->ipo, NULL, NULL, NULL);
id_us_min(&ob->ipo->id);
ob->ipo = NULL;
-
- {
- /* If we have any empty action actuators, assume they were
- * converted IPO Actuators using the object IPO */
- bActuator *act;
- bActionActuator *aa;
-
- for (act = ob->actuators.first; act; act = act->next) {
- /* Any actuators set to ACT_IPO at this point are actually Action Actuators that
- * need this converted IPO to finish converting the actuator. */
- if (act->type == ACT_IPO) {
- aa = (bActionActuator *)act->data;
- aa->act = ob->adt->action;
- act->type = ACT_ACTION;
- }
- }
- }
}
}
diff --cc source/blender/blenkernel/intern/particle.c
index 2bba32ff592,c064f2e5f71..127ef840027
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@@ -3015,8 -3186,8 +3015,8 @@@ ModifierData *object_add_particle_syste
psys->flag = PSYS_CURRENT;
psys->cfra = BKE_scene_frame_get_from_ctime(scene, CFRA + 1);
- DEG_relations_tag_update(G.main);
- DAG_relations_tag_update(bmain);
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
++ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
return md;
}
@@@ -3061,11 -3232,8 +3061,11 @@@ void object_remove_particle_system(Mai
else
ob->mode &= ~OB_MODE_PARTICLE_EDIT;
- DEG_relations_tag_update(G.main);
- DAG_relations_tag_update(bmain);
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
++ DEG_relations_tag_update(bmain);
+ DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
+
+ /* Flush object mode. */
+ DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
}
static void default_particle_settings(ParticleSettings *part)
diff --cc source/blender/blenkernel/intern/pointcache.c
index 8d55a1d2690,8d550e09b25..10050e5e083
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@@ -3536,9 -3516,8 +3536,9 @@@ void BKE_ptcache_quick_cache_all(Main *
PTCacheBaker baker;
memset(&baker, 0, sizeof(baker));
- baker.main = bmain;
+ baker.bmain = bmain;
baker.scene = scene;
+ baker.view_layer = view_layer;
baker.bake = 0;
baker.render = 0;
baker.anim_init = 0;
@@@ -3562,10 -3541,8 +3562,10 @@@ static void ptcache_dt_to_str(char *str
/* if bake is not given run simulations to current frame */
void BKE_ptcache_bake(PTCacheBaker *baker)
{
- Main *bmain = baker->main;
+ Main *bmain = baker->bmain;
Scene *scene = baker->scene;
+ ViewLayer *view_layer = baker->view_layer;
+ struct Depsgraph *depsgraph = baker->depsgraph;
Scene *sce_iter; /* SETLOOPER macro only */
Base *base;
ListBase pidlist;
diff --cc source/blender/editors/physics/particle_object.c
index fbccdcfcdba,66c62d47340..8a9eb369e66
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@@ -113,9 -109,9 +114,10 @@@ void OBJECT_OT_particle_system_add(wmOp
static int particle_system_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
+ Main *bmain = CTX_data_main(C);
Object *ob = ED_object_context(C);
Scene *scene = CTX_data_scene(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
int mode_orig;
if (!scene || !ob)
diff --cc source/blender/editors/physics/physics_pointcache.c
index 45172774d55,fc2f7e40645..a66dbfc789d
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@@ -164,10 -163,8 +164,10 @@@ static PTCacheBaker *ptcache_baker_crea
{
PTCacheBaker *baker = MEM_callocN(sizeof(PTCacheBaker), "PTCacheBaker");
- baker->main = CTX_data_main(C);
+ baker->bmain = CTX_data_main(C);
baker->scene = CTX_data_scene(C);
+ baker->view_layer = CTX_data_view_layer(C);
+ baker->depsgraph = CTX_data_depsgraph(C);
baker->bake = RNA_boolean_get(op->ptr, "bake");
baker->render = 0;
baker->anim_init = 0;
diff --cc source/blender/editors/space_view3d/view3d_manipulator_ruler.c
index cd918695f60,00000000000..8178c2f5be9
mode 100644,000000..100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_ruler.c
@@@ -1,1099 -1,0 +1,1100 @@@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/editors/space_view3d/view3d_manipulator_ruler.c
+ * \ingroup spview3d
+ */
+
+#include "BLI_listbase.h"
+#include "BLI_string.h"
+#include "BLI_rect.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
+#include "BLT_translation.h"
+
+#include "BKE_context.h"
+#include "BKE_gpencil.h"
+#include "BKE_main.h"
+
+#include "BKE_object.h"
+#include "BKE_unit.h"
+
+#include "DNA_object_types.h"
+#include "DNA_gpencil_types.h"
+#include "DNA_view3d_types.h"
+
+#include "BIF_gl.h"
+
+#include "ED_screen.h"
+#include "ED_transform_snap_object_context.h"
+#include "ED_view3d.h"
+
+#include "UI
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list