Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 12 Jan 2017 11:59:45 +0000 (12:59 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 12 Jan 2017 11:59:45 +0000 (12:59 +0100)
1  2 
intern/cycles/blender/addon/ui.py
source/blender/blenkernel/intern/dynamicpaint.c

index acca64148525a2ccdcc3a910a024580af755191d,925f923dd41ac9aa99c925917b3d50805294a211..a573fa1ce22db0668f36fb9291852c4fd0b8508c
@@@ -226,6 -226,7 +226,7 @@@ class CyclesRender_PT_geometery(CyclesB
  
          scene = context.scene
          cscene = scene.cycles
+         ccscene = scene.cycles_curves
  
          if cscene.feature_set == 'EXPERIMENTAL':
              split = layout.split()
              row.prop(cscene, "volume_step_size")
              row.prop(cscene, "volume_max_steps")
  
+         layout.prop(ccscene, "use_curves", text="Use Hair")
+         col = layout.column()
+         col.active = ccscene.use_curves
+         col.prop(ccscene, "primitive", text="Primitive")
+         col.prop(ccscene, "shape", text="Shape")
+         if not (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS'):
+             col.prop(ccscene, "cull_backfacing", text="Cull back-faces")
+         if ccscene.primitive == 'TRIANGLES' and ccscene.shape == 'THICK':
+             col.prop(ccscene, "resolution", text="Resolution")
+         elif ccscene.primitive == 'CURVE_SEGMENTS':
+             col.prop(ccscene, "subdivisions", text="Curve subdivisions")
+         row = col.row()
+         row.prop(ccscene, "minimum_width", text="Min Pixels")
+         row.prop(ccscene, "maximum_width", text="Max Ext.")
  
  class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
      bl_label = "Light Paths"
@@@ -1391,43 -1411,6 +1411,6 @@@ class CyclesParticle_PT_textures(Cycles
              layout.template_ID(slot, "texture", new="texture.new")
  
  
- class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
-     bl_label = "Cycles Hair Rendering"
-     bl_context = "particle"
-     @classmethod
-     def poll(cls, context):
-         psys = context.particle_system
-         return CyclesButtonsPanel.poll(context) and psys and psys.settings.type == 'HAIR'
-     def draw_header(self, context):
-         ccscene = context.scene.cycles_curves
-         self.layout.prop(ccscene, "use_curves", text="")
-     def draw(self, context):
-         layout = self.layout
-         scene = context.scene
-         ccscene = scene.cycles_curves
-         layout.active = ccscene.use_curves
-         layout.prop(ccscene, "primitive", text="Primitive")
-         layout.prop(ccscene, "shape", text="Shape")
-         if not (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS'):
-             layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
-         if ccscene.primitive == 'TRIANGLES' and ccscene.shape == 'THICK':
-             layout.prop(ccscene, "resolution", text="Resolution")
-         elif ccscene.primitive == 'CURVE_SEGMENTS':
-             layout.prop(ccscene, "subdivisions", text="Curve subdivisions")
-         row = layout.row()
-         row.prop(ccscene, "minimum_width", text="Min Pixels")
-         row.prop(ccscene, "maximum_width", text="Max Ext.")
  class CyclesRender_PT_bake(CyclesButtonsPanel, Panel):
      bl_label = "Bake"
      bl_context = "render"
@@@ -1594,7 -1577,6 +1577,7 @@@ class CyclesScene_PT_simplify(CyclesBut
          row.prop(rd, "simplify_subdivision", text="Viewport")
          row.prop(rd, "simplify_subdivision_render", text="Render")
  
 +
          col = layout.column(align=True)
          col.label(text="Child Particles")
          row = col.row(align=True)
index fce4620294d09aca9bf55f9df501fe8bab2d525f,1d198e36e058d9d2439bcb34272d4bc48a178818..1e8d0f0d767a56b3b17aa1cec8047e68f77f436b
@@@ -3739,7 -3739,7 +3739,7 @@@ static void dynamic_paint_paint_mesh_ce
  
                /* velocity brush, only do on main sample */
                if (brush->flags & MOD_DPAINT_USES_VELOCITY && ss == 0 && brushVelocity) {
-                       float weights[4];
+                       float weights[3];
                        float brushPointVelocity[3];
                        float velocity[3];
  
                        const int v3 = mloop[mlooptri[hitTri].tri[2]].v;
  
                        /* calculate barycentric weights for hit point */
-                       interp_weights_face_v3(weights, mvert[v1].co, mvert[v2].co, mvert[v3].co, NULL, hitCoord);
+                       interp_weights_tri_v3(weights, mvert[v1].co, mvert[v2].co, mvert[v3].co, hitCoord);
  
                        /* simple check based on brush surface velocity,
                         *  todo: perhaps implement something that handles volume movement as well */
@@@ -5562,6 -5562,8 +5562,6 @@@ static int dynamicPaint_doStep(Scene *s
                                                dynamicPaint_updateBrushMaterials(brushObj, brush->mat, scene, &bMats);
  
                                        /* Apply brush on the surface depending on it's collision type */
 -                                      /* Particle brush: */
 -                                      if (brush->collision == MOD_DPAINT_COL_PSYS) {
                                                if (brush->psys && brush->psys->part &&
                                                    ELEM(brush->psys->part->type, PART_EMITTER, PART_FLUID) &&
                                                    psys_check_enabled(brushObj, brush->psys, G.is_rendering))
                                                                                      BKE_scene_frame_get(scene), ADT_RECALC_ANIM);
                                                        dynamicPaint_paintParticles(surface, brush->psys, brush, timescale);
                                                }
 -                                      }
                                        /* Object center distance: */
 -                                      else if (brush->collision == MOD_DPAINT_COL_POINT && brushObj != ob) {
 +                                      if (brush->collision == MOD_DPAINT_COL_POINT && brushObj != ob) {
                                                dynamicPaint_paintSinglePoint(surface, brushObj->loc, brush, brushObj, &bMats, scene, timescale);
                                        }
                                        /* Mesh volume/proximity: */