Merge remote-tracking branch 'origin/master' into blender2.8
authorDalai Felinto <dfelinto@gmail.com>
Wed, 16 Nov 2016 16:01:19 +0000 (17:01 +0100)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 16 Nov 2016 16:04:21 +0000 (17:04 +0100)
30 files changed:
1  2 
build_files/build_environment/install_deps.sh
intern/cycles/blender/blender_sync.cpp
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/library_remap.c
source/blender/blenloader/intern/versioning_270.c
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/draw/CMakeLists.txt
source/blender/draw/DRW_defines.h
source/blender/draw/DRW_engines.h
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/resources.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/util/undo.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_space.c
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_event_system.c

index 83549ae687965fc712e1015480846dccef946fee,3411eae22e1c6184f1eeb5f0f2a4384bf68bec8f..1c630624ec82e5774f9d30c4552cf48f9e10c7a7
@@@ -1197,40 -1216,41 +1200,41 @@@ void BKE_main_free(Main *mainvar
                        /* errors freeing ID's can be hard to track down,
                         * enable this so valgrind will give the line number in its error log */
                        switch (a) {
 -                              case   0: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   1: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   2: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   3: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   4: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   5: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   6: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   7: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   8: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case   9: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  10: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  11: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  12: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  13: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  14: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  15: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  16: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  17: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  18: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  19: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  20: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  21: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  22: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  23: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  24: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  25: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  26: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  27: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  28: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  29: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  30: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  31: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  32: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  33: BKE_libblock_free_ex(mainvar, id, false, false); break;
 -                              case  34: BKE_libblock_free_ex(mainvar, id, false, false); break;
 +                              case   0: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   1: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   2: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   3: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   4: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   5: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   6: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   7: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   8: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case   9: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  10: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  11: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  12: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  13: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  14: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  15: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  16: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  17: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  18: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  19: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  20: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  21: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  22: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  23: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  24: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  25: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  26: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  27: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  28: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  29: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  30: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  31: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  32: BKE_libblock_free_ex(mainvar, id, false); break;
 +                              case  33: BKE_libblock_free_ex(mainvar, id, false); break;
++                              case  34: BKE_libblock_free_ex(mainvar, id, false); break;
                                default:
                                        BLI_assert(0);
                                        break;
index 529233c0dac31f49e88428b252edf567d44c3268,8133d0496faadb718d92c1d0823bc079cc4a50e3..577c278e0e4f7c11c20b232d8223020d36f73c9e
@@@ -1339,41 -1427,43 +1339,54 @@@ void blo_do_versions_270(FileData *fd, 
                }
        }
  
 -              for (Scene *scene = main->scene.first; scene != NULL; scene = scene->id.next) {
 -                      if (scene->toolsettings != NULL) {
 -                              ToolSettings *ts = scene->toolsettings;
 -                              ParticleEditSettings *pset = &ts->particle;
 -                              for (int a = 0; a < PE_TOT_BRUSH; a++) {
 -                                      if (pset->brush[a].count == 0) {
 -                                              pset->brush[a].count = 10;
 -                                      }
 -                              }
 -                      }
 -              }
 -
+       if (!MAIN_VERSION_ATLEAST(main, 278, 3)) {
-               if (!DNA_struct_elem_find(fd->filesdna, "RigidBodyCon", "float", "spring_stiffness_ang_x")) {
-                       Object *ob;
-                       for (ob = main->object.first; ob; ob = ob->id.next) {
-                               RigidBodyCon *rbc = ob->rigidbody_constraint;
-                               if (rbc) {
-                                       rbc->spring_stiffness_ang_x = 10.0;
-                                       rbc->spring_stiffness_ang_y = 10.0;
-                                       rbc->spring_stiffness_ang_z = 10.0;
-                                       rbc->spring_damping_ang_x = 0.5;
-                                       rbc->spring_damping_ang_y = 0.5;
-                                       rbc->spring_damping_ang_z = 0.5;
-                               }
-                       }
-               }
+               if (!DNA_struct_elem_find(fd->filesdna, "RigidBodyCon", "float", "spring_stiffness_ang_x")) {
+                       Object *ob;
+                       for (ob = main->object.first; ob; ob = ob->id.next) {
+                               RigidBodyCon *rbc = ob->rigidbody_constraint;
+                               if (rbc) {
+                                       rbc->spring_stiffness_ang_x = 10.0;
+                                       rbc->spring_stiffness_ang_y = 10.0;
+                                       rbc->spring_stiffness_ang_z = 10.0;
+                                       rbc->spring_damping_ang_x = 0.5;
+                                       rbc->spring_damping_ang_y = 0.5;
+                                       rbc->spring_damping_ang_z = 0.5;
+                               }
+                       }
+               }
+               /* constant detail for sculpting is now a resolution value instead of
+                * a percentage, we reuse old DNA struct member but convert it */
+               for (Scene *scene = main->scene.first; scene != NULL; scene = scene->id.next) {
+                       if (scene->toolsettings != NULL) {
+                               ToolSettings *ts = scene->toolsettings;
+                               if (ts->sculpt && ts->sculpt->constant_detail != 0.0f) {
+                                       ts->sculpt->constant_detail = 100.0f / ts->sculpt->constant_detail;
+                               }
+                       }
+               }
+       }
++
 +      {
 +              if (!DNA_struct_elem_find(fd->filesdna, "View3DDebug", "char", "background")) {
 +                      bScreen *screen;
 +
 +                      for (screen = main->screen.first; screen; screen = screen->id.next) {
 +                              ScrArea *sa;
 +                              for (sa = screen->areabase.first; sa; sa = sa->next) {
 +                                      SpaceLink *sl;
 +
 +                                      for (sl = sa->spacedata.first; sl; sl = sl->next) {
 +                                              switch (sl->spacetype) {
 +                                                      case SPACE_VIEW3D:
 +                                                      {
 +                                                              View3D *v3d = (View3D *)sl;
 +                                                              v3d->debug.background = V3D_DEBUG_BACKGROUND_NONE;
 +                                                      }
 +                                              }
 +                                      }
 +                              }
 +                      }
 +              }
 +      }
  }
index e139ff1f2bcf9a98a2f4f123a2fadc47f3f8897c,9952f7141458a58e9be77c14cedec0a7d3379ccd..171cd4529bea1a50cacf264863c6bf9314eb3114
@@@ -342,18 -350,39 +350,30 @@@ void DEG_add_collision_relations(DepsNo
                MEM_freeN(collobjs);
  }
  
- void DEG_add_forcefield_relations(DepsNodeHandle *handle, Scene *scene, Object *ob, EffectorWeights *effector_weights, bool add_absorption, int skip_forcefield, const char *name)
+ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
+                                   Scene *scene,
+                                   Object *ob,
+                                   EffectorWeights *effector_weights,
+                                   bool add_absorption,
+                                   int skip_forcefield,
+                                   const char *name)
  {
 -      ListBase *effectors = pdInitEffectors(scene, ob, NULL, effector_weights, false);
 +      ListBase *effectors = pdInitEffectors(scene, ob, effector_weights, false);
  
        if (effectors) {
                for (EffectorCache *eff = (EffectorCache*)effectors->first; eff; eff = eff->next) {
                        if (eff->ob != ob && eff->pd->forcefield != skip_forcefield) {
                                DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_TRANSFORM, name);
  
 -                              if (eff->psys) {
 -                                      DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_EVAL_PARTICLES, name);
 -
 -                                      /* TODO: remove this when/if EVAL_PARTICLES is sufficient
 -                                       * for up to date particles.
 -                                       */
 -                                      DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_GEOMETRY, name);
 -                              }
 -
                                if (eff->pd->forcefield == PFIELD_SMOKEFLOW && eff->pd->f_source) {
-                                       DEG_add_object_relation(handle, eff->pd->f_source, DEG_OB_COMP_TRANSFORM, "Smoke Force Domain");
-                                       DEG_add_object_relation(handle, eff->pd->f_source, DEG_OB_COMP_GEOMETRY, "Smoke Force Domain");
+                                       DEG_add_object_relation(handle,
+                                                               eff->pd->f_source,
+                                                               DEG_OB_COMP_TRANSFORM,
+                                                               "Smoke Force Domain");
+                                       DEG_add_object_relation(handle,
+                                                               eff->pd->f_source,
+                                                               DEG_OB_COMP_GEOMETRY,
+                                                               "Smoke Force Domain");
                                }
  
                                if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..60449ebc6008ed003cab741a47b740ad3a43b8e5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,62 @@@
++# ***** 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.
++#
++# The Original Code is Copyright (C) 2016, Blender Foundation
++# All rights reserved.
++#
++# The Original Code is: all of this file.
++#
++# Contributor(s): Blender Institute
++#
++# ***** END GPL LICENSE BLOCK *****
++
++set(INC
++      .
++      intern
++      nodes
++      operations
++      ../blenkernel
++      ../blenlib
++      ../blentranslation
++      ../imbuf
++      ../makesdna
++      ../makesrna
++      ../windowmanager
++      ../nodes
++      ../nodes/composite
++      ../nodes/intern
++      ../render/extern/include
++      ../render/intern/include
++      ../../../extern/clew/include
++      ../../../intern/guardedalloc
++      ../../../intern/atomic
++)
++
++set(INC_SYS
++
++)
++
++set(SRC
++      DRW_defines.h
++
++)
++
++list(APPEND INC
++)
++
++endif()
++
++blender_add_lib(bf_draw "${SRC}" "${INC}" "${INC_SYS}")
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..212c39e203b5cc9f7fe34900f85bcfb9957dcfe5
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,25 @@@
++/*
++ * Copyright 2016, Blender Foundation.
++ *
++ * 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.
++ *
++ * Contributor(s): Blender Institute
++ *
++ */
++
++#ifndef __DRW_DEFINES_H__
++#define __DRW_DEFINES_H__
++
++#endif  /* __DRW_DEFINES_H__ */
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
new file mode 100644 (file)
--- /dev/null
--- /dev/null
Simple merge
index e5cea63db1f371f49b99fe23e84dee4a855f4fe9,594c1752328d1f73d095e6198819d48b07d7ca8e..30a0825267db9f460b4ed7a9388560c3d8f14f0a
@@@ -1468,6 -1478,42 +1468,7 @@@ void RNA_def_main_actions(BlenderRNA *b
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_boolean_funcs(prop, "rna_Main_actions_is_updated_get", NULL);
  }
 -void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
 -{
 -      StructRNA *srna;
 -      FunctionRNA *func;
 -      PropertyRNA *parm;
 -      PropertyRNA *prop;
 -
 -      RNA_def_property_srna(cprop, "BlendDataParticles");
 -      srna = RNA_def_struct(brna, "BlendDataParticles", NULL);
 -      RNA_def_struct_sdna(srna, "Main");
 -      RNA_def_struct_ui_text(srna, "Main Particle Settings", "Collection of particle settings");
 -      func = RNA_def_function(srna, "new", "rna_Main_particles_new");
 -      RNA_def_function_ui_description(func, "Add a new particle settings instance to the main database");
 -      parm = RNA_def_string(func, "name", "ParticleSettings", 0, "", "New name for the data-block");
 -      RNA_def_property_flag(parm, PROP_REQUIRED);
 -      /* return type */
 -      parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "New particle settings data-block");
 -      RNA_def_function_return(func, parm);
 -
 -      func = RNA_def_function(srna, "remove", "rna_Main_ID_remove");
 -      RNA_def_function_flag(func, FUNC_USE_REPORTS);
 -      RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile");
 -      parm = RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove");
 -      RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
 -      RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
 -      RNA_def_boolean(func, "do_unlink", true, "", "Unlink all usages of those particle settings before deleting them");
 -
 -      func = RNA_def_function(srna, "tag", "rna_Main_particles_tag");
 -      parm = RNA_def_boolean(func, "value", 0, "Value", "");
 -      RNA_def_property_flag(parm, PROP_REQUIRED);
 -
 -      prop = RNA_def_property(srna, "is_updated", PROP_BOOLEAN, PROP_NONE);
 -      RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 -      RNA_def_property_boolean_funcs(prop, "rna_Main_particles_is_updated_get", NULL);
 -}
  void RNA_def_main_palettes(BlenderRNA *brna, PropertyRNA *cprop)
  {
        StructRNA *srna;