Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Fri, 6 Jul 2018 08:18:52 +0000 (10:18 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 6 Jul 2018 08:18:52 +0000 (10:18 +0200)
20 files changed:
1  2 
intern/cycles/app/io_export_cycles_xml.py
intern/cycles/blender/blender_camera.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_particles.cpp
intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/device/device.h
intern/cycles/device/device_multi.cpp
intern/cycles/render/buffers.cpp
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/light.cpp
intern/cycles/render/light.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/shader.cpp
intern/cycles/render/shader.h
intern/cycles/util/util_view.cpp

@@@ -394,9 -360,9 +394,9 @@@ Object *BlenderSync::sync_object(BL::De
  
        if(object_map.sync(&object, b_ob, b_parent, key))
                object_updated = true;
-       
        /* mesh sync */
 -      object->mesh = sync_mesh(b_ob, object_updated, hide_tris);
 +      object->mesh = sync_mesh(b_depsgraph, b_ob, b_ob_instance, object_updated, hide_tris);
  
        /* special case not tracked by object update flags */
  
@@@ -557,13 -516,21 +557,13 @@@ static bool object_render_hide(BL::Obje
        }
  }
  
 -static bool object_render_hide_duplis(BL::Object& b_ob)
 -{
 -      BL::Object parent = b_ob.parent();
 -
 -      return (parent && object_render_hide_original(b_ob.type(), parent.dupli_type()));
 -}
 -
  /* Object Loop */
  
 -void BlenderSync::sync_objects(float motion_time)
 +void BlenderSync::sync_objects(BL::Depsgraph& b_depsgraph, float motion_time)
  {
        /* layer data */
 -      uint scene_layer = render_layer.scene_layer;
        bool motion = motion_time != 0.0f;
-       
        if(!motion) {
                /* prepare for sync */
                light_map.pre_sync();
@@@ -322,11 -327,11 +322,11 @@@ static PyObject *bake_func(PyObject * /
  
  static PyObject *draw_func(PyObject * /*self*/, PyObject *args)
  {
 -      PyObject *pysession, *pyv3d, *pyrv3d;
 +      PyObject *pysession, *pygraph, *pyv3d, *pyrv3d;
  
 -      if(!PyArg_ParseTuple(args, "OOO", &pysession, &pyv3d, &pyrv3d))
 +      if(!PyArg_ParseTuple(args, "OOOO", &pysession, &pygraph, &pyv3d, &pyrv3d))
                return NULL;
-       
        BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession);
  
        if(PyLong_AsVoidPtr(pyrv3d)) {
@@@ -817,10 -869,19 +817,10 @@@ SessionParams BlenderSync::get_session_
                params.shadingsystem = SHADINGSYSTEM_SVM;
        else if(shadingsystem == 1)
                params.shadingsystem = SHADINGSYSTEM_OSL;
-       
        /* color managagement */
 -#ifdef GLEW_MX
 -      /* When using GLEW MX we need to check whether we've got an OpenGL
 -       * context for current window. This is because command line rendering
 -       * doesn't have OpenGL context actually.
 -       */
 -      if(glewGetContext() != NULL)
 -#endif
 -      {
 -              params.display_buffer_linear = GLEW_ARB_half_float_pixel &&
 -                                             b_engine.support_display_space_shader(b_scene);
 -      }
 +      params.display_buffer_linear = GLEW_ARB_half_float_pixel &&
 +                                     b_engine.support_display_space_shader(b_scene);
  
        if(b_engine.is_preview()) {
                /* For preview rendering we're using same timeout as
Simple merge
@@@ -317,12 -304,11 +317,12 @@@ public
        virtual void task_add(DeviceTask& task) = 0;
        virtual void task_wait() = 0;
        virtual void task_cancel() = 0;
-       
        /* opengl drawing */
 -      virtual void draw_pixels(device_memory& mem, int y, int w, int h,
 -              int dx, int dy, int width, int height, bool transparent,
 -              const DeviceDrawParams &draw_params);
 +      virtual void draw_pixels(device_memory& mem, int y,
 +          int w, int h, int width, int height,
 +          int dx, int dy, int dw, int dh,
 +          bool transparent, const DeviceDrawParams &draw_params);
  
  #ifdef WITH_NETWORK
        /* networking */
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -758,15 -757,12 +758,15 @@@ void LightManager::device_update_points
                        float3 axisu = light->axisu*(light->sizeu*light->size);
                        float3 axisv = light->axisv*(light->sizev*light->size);
                        float area = len(axisu)*len(axisv);
 -                      float invarea = (area > 0.0f)? 1.0f/area: 1.0f;
 +                      if(light->round) {
 +                              area *= -M_PI_4_F;
 +                      }
 +                      float invarea = (area != 0.0f)? 1.0f/area: 1.0f;
                        float3 dir = light->dir;
-                       
                        dir = safe_normalize(dir);
  
 -                      if(light->use_mis && area > 0.0f)
 +                      if(light->use_mis && area != 0.0f)
                                shader_id |= SHADER_USE_MIS;
  
                        klights[light_index].co[0] = co.x;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge