Merge branch 'master' into blender2.8
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 10 Mar 2018 05:55:39 +0000 (06:55 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 10 Mar 2018 05:55:39 +0000 (06:55 +0100)
1  2 
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_curves.cpp
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/blender/blender_util.h
release/scripts/startup/bl_ui/space_userpref.py
source/blender/editors/armature/pose_lib.c
source/blender/gpu/shaders/gpu_shader_material.glsl
tests/python/CMakeLists.txt

Simple merge
index 02ede74224aa7058de502fd4236bc3cebb322457,7d6ca18b074980b53bb61979fb488a0c2535c167..afcfe3d434e5b95f3998fc4f989f05c8c8594f18
@@@ -1416,7 -1385,7 +1390,7 @@@ void BlenderSync::sync_mesh_motion(BL::
  
        /* hair motion */
        if(numkeys)
-               sync_curves(b_depsgraph, mesh, b_mesh, b_ob, true, time_index);
 -              sync_curves(mesh, b_mesh, b_ob, true, motion_step);
++              sync_curves(b_depsgraph, mesh, b_mesh, b_ob, true, motion_step);
  
        /* free derived mesh */
        b_data.meshes.remove(b_mesh, false, true, false);
index 9e8d494f83b542aa9c54afd617d0867e0324b8e0,1e7b0b32518e518d04fb9be3591a50389c1294dc..2ea86ba11332eed310a2f2072d19c66475277d08
@@@ -125,9 -118,11 +125,9 @@@ private
                         BL::Mesh& b_mesh,
                         BL::Object& b_ob,
                         bool motion,
-                        int time_index = 0);
+                        int motion_step = 0);
 -      Object *sync_object(BL::Object& b_parent,
 -                          int persistent_id[OBJECT_PERSISTENT_ID_SIZE],
 -                          BL::DupliObject& b_dupli_ob,
 -                          Transform& tfm,
 +      Object *sync_object(BL::Depsgraph& b_depsgraph,
 +                          BL::Depsgraph::duplis_iterator& b_dupli_iter,
                            uint layer_flag,
                            float motion_time,
                            bool hide_tris,
Simple merge
index 02bfc70080a68a6ba3dcf9148bd1e482506c0e3c,1f5ffbdcc7e25df60f0e3147bd85b02876dc04c5..bf0e3ca4d96c0bf39b9c45bbc5cfd8d2c1dce082
@@@ -3207,62 -2866,6 +3207,62 @@@ void node_gamma(vec4 col, float gamma, 
  
  /* geometry */
  
-       if (value.a > 0.0)
 +void node_attribute_volume_density(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf)
 +{
 +#if defined(EEVEE_ENGINE) && defined(MESH_SHADER) && defined(VOLUMETRICS)
 +      vec3 cos = volumeObjectLocalCoord;
 +#else
 +      vec3 cos = vec3(0.0);
 +#endif
 +      outvec = texture(tex, cos).aaa;
 +      outcol = vec4(outvec, 1.0);
 +      outf = dot(vec3(1.0 / 3.0), outvec);
 +}
 +
 +void node_attribute_volume_color(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf)
 +{
 +#if defined(EEVEE_ENGINE) && defined(MESH_SHADER) && defined(VOLUMETRICS)
 +      vec3 cos = volumeObjectLocalCoord;
 +#else
 +      vec3 cos = vec3(0.0);
 +#endif
 +
 +      vec4 value = texture(tex, cos).rgba;
 +      /* Density is premultiplied for interpolation, divide it out here. */
++      if (value.a > 1e-8)
 +              value.rgb /= value.a;
 +
 +      outvec = value.rgb;
 +      outcol = vec4(outvec, 1.0);
 +      outf = dot(vec3(1.0 / 3.0), outvec);
 +}
 +
 +void node_attribute_volume_flame(sampler3D tex, out vec4 outcol, out vec3 outvec, out float outf)
 +{
 +#if defined(EEVEE_ENGINE) && defined(MESH_SHADER) && defined(VOLUMETRICS)
 +      vec3 cos = volumeObjectLocalCoord;
 +#else
 +      vec3 cos = vec3(0.0);
 +#endif
 +      outf = texture(tex, cos).r;
 +      outvec = vec3(outf, outf, outf);
 +      outcol = vec4(outf, outf, outf, 1.0);
 +}
 +
 +void node_attribute_volume_temperature(sampler3D tex, vec2 temperature, out vec4 outcol, out vec3 outvec, out float outf)
 +{
 +#if defined(EEVEE_ENGINE) && defined(MESH_SHADER) && defined(VOLUMETRICS)
 +      vec3 cos = volumeObjectLocalCoord;
 +#else
 +      vec3 cos = vec3(0.0);
 +#endif
 +      float flame = texture(tex, cos).r;
 +
 +      outf = (flame > 0.01) ? temperature.x + flame * (temperature.y - temperature.x): 0.0;
 +      outvec = vec3(outf, outf, outf);
 +      outcol = vec4(outf, outf, outf, 1.0);
 +}
 +
  void node_attribute(vec3 attr, out vec4 outcol, out vec3 outvec, out float outf)
  {
        outcol = vec4(attr, 1.0);
index 20b65889c2bf83f7c1f161c753a4f04a9edc60ae,6976124900208e7b448224dbcace5f2f66578b92..568f66eb27006666e8533cf0d843508dd2562ba4
@@@ -617,5 -618,13 +618,14 @@@ if(WITH_ALEMBIC
        )
  endif()
  
- add_subdirectory(view_layer)
+ if(WITH_CODEC_FFMPEG)
+       add_python_test(
+               ffmpeg_tests
+               ${CMAKE_CURRENT_LIST_DIR}/ffmpeg_tests.py
+               --blender "$<TARGET_FILE:blender>"
+               --testdir "${TEST_DATA_SRC_DIR}/ffmpeg"
+       )
+ endif()
  add_subdirectory(collada)
++add_subdirectory(view_layer)