Merge remote-tracking branch 'origin/master' into blender2.8
authorLukas Stockner <lukas.stockner@freenet.de>
Thu, 14 Jun 2018 20:54:42 +0000 (22:54 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Thu, 14 Jun 2018 20:54:42 +0000 (22:54 +0200)
14 files changed:
1  2 
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/addon/version_update.py
intern/cycles/blender/blender_curves.cpp
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/kernel/kernel_light.h
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/light.cpp
intern/cycles/render/nodes.cpp
intern/cycles/render/shader.cpp
intern/cycles/render/shader.h

@@@ -1348,32 -1209,20 +1348,34 @@@ class CYCLES_WORLD_PT_settings(CyclesBu
          cworld = world.cycles
          # cscene = context.scene.cycles
  
 -        split = layout.split()
 +        col = layout.column()
  
 -        col = split.column()
 +class CYCLES_WORLD_PT_settings_surface(CyclesButtonsPanel, Panel):
 +    bl_label = "Surface"
 +    bl_parent_id = "CYCLES_WORLD_PT_settings"
 +    bl_context = "world"
  
 -        col.label(text="Surface:")
 +    @classmethod
 +    def poll(cls, context):
 +        return context.world and CyclesButtonsPanel.poll(context)
 +
 +    def draw(self, context):
 +        layout = self.layout
 +        layout.use_property_split = True
 +
 +        world = context.world
 +        cworld = world.cycles
 +
 +        col = layout.column()
-         col.prop(cworld, "sample_as_light", text="Multiple Importance")
+         col.prop(cworld, "sampling_method", text="Sampling")
  
 -        sub = col.column(align=True)
 +        sub = col.column()
-         sub.active = cworld.sample_as_light
-         sub.prop(cworld, "sample_map_resolution")
+         sub.active = cworld.sampling_method != 'NONE'
+         subsub = sub.row(align=True)
+         subsub.active = cworld.sampling_method == 'MANUAL'
+         subsub.prop(cworld, "sample_map_resolution")
          if use_branched_path(context):
 -            subsub = sub.row(align=True)
 +            subsub = sub.column(align=True)
              subsub.active = use_sample_all_lights(context)
              subsub.prop(cworld, "samples")
          sub.prop(cworld, "max_bounces")
@@@ -434,13 -428,11 +430,22 @@@ def do_versions(self)
          # Switch to squared roughness convention
          square_roughness_nodes_insert()
  
 +    if bpy.data.version <= (2, 80, 15):
 +        # Copy cycles hair settings to internal settings
 +        for part in bpy.data.particles:
 +            cpart = part.get("cycles", None)
 +            if cpart:
 +                part.shape = cpart.get("shape", 0.0)
 +                part.root_radius = cpart.get("root_width", 1.0)
 +                part.tip_radius = cpart.get("tip_width", 0.0)
 +                part.radius_scale = cpart.get("radius_scale", 0.01)
 +                part.use_close_tip = cpart.get("use_closetip", True)
++
+     for world in bpy.data.worlds:
+         cworld = world.cycles
+         # World MIS
+         if not cworld.is_property_set("sampling_method"):
+             if cworld.get("sample_as_light", False):
+                 cworld.sampling_method = 'MANUAL'
+             else:
+                 cworld.sampling_method = 'NONE'
@@@ -141,14 -139,12 +141,18 @@@ void BlenderSession::create_session(
        scene->image_manager->builtin_image_pixels_cb = function_bind(&BlenderSession::builtin_image_pixels, this, _1, _2, _3, _4, _5);
        scene->image_manager->builtin_image_float_pixels_cb = function_bind(&BlenderSession::builtin_image_float_pixels, this, _1, _2, _3, _4, _5);
  
+ #ifdef WITH_OCIO
+       scene->film->set_color_config(OCIO_getCurrentConfig());
+ #endif
        session->scene = scene;
  
 +      /* There is no single depsgraph to use for the entire render.
 +       * So we need to handle this differently.
 +       *
 +       * We could loop over the final render result render layers in pipeline and keep Cycles unaware of multiple layers,
 +       * or perhaps move syncing further down in the pipeline.
 +       */
        /* create sync */
        sync = new BlenderSync(b_engine, b_data, b_scene, scene, !background, session->progress);
        BL::Object b_camera_override(b_engine.camera_override());
Simple merge
Simple merge
Simple merge
@@@ -119,9 -118,8 +118,9 @@@ NODE_DEFINE(Light
        SOCKET_FLOAT(sizeu, "Size U", 1.0f);
        SOCKET_VECTOR(axisv, "Axis V", make_float3(0.0f, 0.0f, 0.0f));
        SOCKET_FLOAT(sizev, "Size V", 1.0f);
 +      SOCKET_BOOLEAN(round, "Round", false);
  
-       SOCKET_INT(map_resolution, "Map Resolution", 512);
+       SOCKET_INT(map_resolution, "Map Resolution", 0);
  
        SOCKET_FLOAT(spot_angle, "Spot Angle", M_PI_4_F);
        SOCKET_FLOAT(spot_smooth, "Spot Smooth", 0.0f);
Simple merge
Simple merge
Simple merge