[Bf-blender-cvs] [cf6eb9a7f29] cycles_texture_cache: Merge 'master' into 'cycles_texture_cache'

Stefan Werner noreply at git.blender.org
Thu Apr 18 14:41:53 CEST 2019


Commit: cf6eb9a7f299b5c3eb04c6c99c9d1565dba7974d
Author: Stefan Werner
Date:   Thu Apr 18 14:14:34 2019 +0200
Branches: cycles_texture_cache
https://developer.blender.org/rBcf6eb9a7f299b5c3eb04c6c99c9d1565dba7974d

Merge 'master' into 'cycles_texture_cache'

===================================================================



===================================================================

diff --cc intern/cycles/blender/blender_mesh.cpp
index 8a375b2ec53,de594f4fb6c..ac7976e608d
--- a/intern/cycles/blender/blender_mesh.cpp
+++ b/intern/cycles/blender/blender_mesh.cpp
@@@ -284,56 -277,50 +277,51 @@@ static void mikk_compute_tangents
  
  /* Create Volume Attribute */
  
- static void create_mesh_volume_attribute(BL::Object& b_ob,
-                                          Mesh *mesh,
-                                          ImageManager *image_manager,
-                                          AttributeStandard std,
-                                          float frame)
+ static void create_mesh_volume_attribute(
+     BL::Object &b_ob, Mesh *mesh, ImageManager *image_manager, AttributeStandard std, float frame)
  {
- 	BL::SmokeDomainSettings b_domain = object_smoke_domain_find(b_ob);
- 
- 	if(!b_domain)
- 		return;
- 
- 	mesh->volume_isovalue = b_domain.clipping();
- 
- 	Attribute *attr = mesh->attributes.add(std);
- 	VoxelAttribute *volume_data = attr->data_voxel();
- 	ImageMetaData metadata;
- 	bool animated = false;
- 	bool use_alpha = true;
- 
- 	volume_data->manager = image_manager;
- 	volume_data->slot = image_manager->add_image(
- 	        Attribute::standard_name(std),
- 	        b_ob.ptr.data,
- 	        animated,
- 	        frame,
- 	        INTERPOLATION_LINEAR,
- 	        EXTENSION_CLIP,
- 	        use_alpha,
- 	        metadata,
-             false);
+   BL::SmokeDomainSettings b_domain = object_smoke_domain_find(b_ob);
+ 
+   if (!b_domain)
+     return;
+ 
+   mesh->volume_isovalue = b_domain.clipping();
+ 
+   Attribute *attr = mesh->attributes.add(std);
+   VoxelAttribute *volume_data = attr->data_voxel();
+   ImageMetaData metadata;
+   bool animated = false;
+   bool use_alpha = true;
+ 
+   volume_data->manager = image_manager;
+   volume_data->slot = image_manager->add_image(Attribute::standard_name(std),
+                                                b_ob.ptr.data,
+                                                animated,
+                                                frame,
+                                                INTERPOLATION_LINEAR,
+                                                EXTENSION_CLIP,
+                                                use_alpha,
 -                                               metadata);
++                                               metadata,
++                                               false);
  }
  
- static void create_mesh_volume_attributes(Scene *scene,
-                                           BL::Object& b_ob,
-                                           Mesh *mesh,
-                                           float frame)
+ static void create_mesh_volume_attributes(Scene *scene, BL::Object &b_ob, Mesh *mesh, float frame)
  {
- 	/* for smoke volume rendering */
- 	if(mesh->need_attribute(scene, ATTR_STD_VOLUME_DENSITY))
- 		create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_DENSITY, frame);
- 	if(mesh->need_attribute(scene, ATTR_STD_VOLUME_COLOR))
- 		create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_COLOR, frame);
- 	if(mesh->need_attribute(scene, ATTR_STD_VOLUME_FLAME))
- 		create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_FLAME, frame);
- 	if(mesh->need_attribute(scene, ATTR_STD_VOLUME_HEAT))
- 		create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_HEAT, frame);
- 	if(mesh->need_attribute(scene, ATTR_STD_VOLUME_TEMPERATURE))
- 		create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_TEMPERATURE, frame);
- 	if(mesh->need_attribute(scene, ATTR_STD_VOLUME_VELOCITY))
- 		create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_VELOCITY, frame);
+   /* for smoke volume rendering */
+   if (mesh->need_attribute(scene, ATTR_STD_VOLUME_DENSITY))
+     create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_DENSITY, frame);
+   if (mesh->need_attribute(scene, ATTR_STD_VOLUME_COLOR))
+     create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_COLOR, frame);
+   if (mesh->need_attribute(scene, ATTR_STD_VOLUME_FLAME))
+     create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_FLAME, frame);
+   if (mesh->need_attribute(scene, ATTR_STD_VOLUME_HEAT))
+     create_mesh_volume_attribute(b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_HEAT, frame);
+   if (mesh->need_attribute(scene, ATTR_STD_VOLUME_TEMPERATURE))
+     create_mesh_volume_attribute(
+         b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_TEMPERATURE, frame);
+   if (mesh->need_attribute(scene, ATTR_STD_VOLUME_VELOCITY))
+     create_mesh_volume_attribute(
+         b_ob, mesh, scene->image_manager, ATTR_STD_VOLUME_VELOCITY, frame);
  }
  
  /* Create vertex color attributes. */
diff --cc intern/cycles/blender/blender_python.cpp
index 2ed16f2c500,ffd1c70a4e4..c35780e55a4
--- a/intern/cycles/blender/blender_python.cpp
+++ b/intern/cycles/blender/blender_python.cpp
@@@ -603,26 -631,10 +631,26 @@@ static PyObject *osl_compile_func(PyObj
  }
  #endif
  
 +static PyObject *oiio_make_tx(PyObject * /*self*/, PyObject *args)
 +{
- 	const char *inputfile = NULL, *outputfile = NULL;
- 	int srgb = 1;
- 	int extension = EXTENSION_CLIP;
- 
- 	if(!PyArg_ParseTuple(args, "sspi", &inputfile, &outputfile, &srgb, &extension))
- 		return NULL;
- 	
- 	/* return */
- 	if(!ImageManager::make_tx(inputfile, outputfile, srgb, (ExtensionType)extension))
- 		Py_RETURN_FALSE;
- 
- 	Py_RETURN_TRUE;
++  const char *inputfile = NULL, *outputfile = NULL;
++  int srgb = 1;
++  int extension = EXTENSION_CLIP;
++
++  if (!PyArg_ParseTuple(args, "sspi", &inputfile, &outputfile, &srgb, &extension))
++    return NULL;
++
++  /* return */
++  if (!ImageManager::make_tx(inputfile, outputfile, srgb, (ExtensionType)extension))
++    Py_RETURN_FALSE;
++
++  Py_RETURN_TRUE;
 +}
 +
  static PyObject *system_info_func(PyObject * /*self*/, PyObject * /*value*/)
  {
- 	string system_info = Device::device_capabilities();
- 	return PyUnicode_FromString(system_info.c_str());
+   string system_info = Device::device_capabilities();
+   return PyUnicode_FromString(system_info.c_str());
  }
  
  #ifdef WITH_OPENCL
@@@ -950,46 -958,45 +974,46 @@@ static PyObject *get_device_types_func(
  }
  
  static PyMethodDef methods[] = {
- 	{"init", init_func, METH_VARARGS, ""},
- 	{"exit", exit_func, METH_VARARGS, ""},
- 	{"create", create_func, METH_VARARGS, ""},
- 	{"free", free_func, METH_O, ""},
- 	{"render", render_func, METH_VARARGS, ""},
- 	{"bake", bake_func, METH_VARARGS, ""},
- 	{"draw", draw_func, METH_VARARGS, ""},
- 	{"sync", sync_func, METH_VARARGS, ""},
- 	{"reset", reset_func, METH_VARARGS, ""},
+     {"init", init_func, METH_VARARGS, ""},
+     {"exit", exit_func, METH_VARARGS, ""},
+     {"create", create_func, METH_VARARGS, ""},
+     {"free", free_func, METH_O, ""},
+     {"render", render_func, METH_VARARGS, ""},
+     {"bake", bake_func, METH_VARARGS, ""},
+     {"draw", draw_func, METH_VARARGS, ""},
+     {"sync", sync_func, METH_VARARGS, ""},
+     {"reset", reset_func, METH_VARARGS, ""},
  #ifdef WITH_OSL
- 	{"osl_update_node", osl_update_node_func, METH_VARARGS, ""},
- 	{"osl_compile", osl_compile_func, METH_VARARGS, ""},
+     {"osl_update_node", osl_update_node_func, METH_VARARGS, ""},
+     {"osl_compile", osl_compile_func, METH_VARARGS, ""},
  #endif
- 	{"oiio_make_tx", oiio_make_tx, METH_VARARGS, ""},
- 	{"available_devices", available_devices_func, METH_VARARGS, ""},
- 	{"system_info", system_info_func, METH_NOARGS, ""},
++    {"oiio_make_tx", oiio_make_tx, METH_VARARGS, ""},
+     {"available_devices", available_devices_func, METH_VARARGS, ""},
+     {"system_info", system_info_func, METH_NOARGS, ""},
  #ifdef WITH_OPENCL
- 	{"opencl_disable", opencl_disable_func, METH_NOARGS, ""},
-  	{"opencl_compile", opencl_compile_func, METH_VARARGS, ""},
+     {"opencl_disable", opencl_disable_func, METH_NOARGS, ""},
+     {"opencl_compile", opencl_compile_func, METH_VARARGS, ""},
  #endif
  
- 	/* Standalone denoising */
- 	{"denoise", (PyCFunction)denoise_func, METH_VARARGS|METH_KEYWORDS, ""},
- 	{"merge", (PyCFunction)merge_func, METH_VARARGS|METH_KEYWORDS, ""},
+     /* Standalone denoising */
+     {"denoise", (PyCFunction)denoise_func, METH_VARARGS | METH_KEYWORDS, ""},
+     {"merge", (PyCFunction)merge_func, METH_VARARGS | METH_KEYWORDS, ""},
  
- 	/* Debugging routines */
- 	{"debug_flags_update", debug_flags_update_func, METH_VARARGS, ""},
- 	{"debug_flags_reset", debug_flags_reset_func, METH_NOARGS, ""},
+     /* Debugging routines */
+     {"debug_flags_update", debug_flags_update_func, METH_VARARGS, ""},
+     {"debug_flags_reset", debug_flags_reset_func, METH_NOARGS, ""},
  
- 	/* Statistics. */
- 	{"enable_print_stats", enable_print_stats_func, METH_NOARGS, ""},
+     /* Statistics. */
+     {"enable_print_stats", enable_print_stats_func, METH_NOARGS, ""},
  
- 	/* Resumable render */
- 	{"set_resumable_chunk", set_resumable_chunk_func, METH_VARARGS, ""},
- 	{"set_resumable_chunk_range", set_resumable_chunk_range_func, METH_VARARGS, ""},
+     /* Resumable render */
+     {"set_resumable_chunk", set_resumable_chunk_func, METH_VARARGS, ""},
+     {"set_resumable_chunk_range", set_resumable_chunk_range_func, METH_VARARGS, ""},
  
- 	/* Compute Device selection */
- 	{"get_device_types", get_device_types_func, METH_VARARGS, ""},
+     /* Compute Device selection */
+     {"get_device_types", get_device_types_func, METH_VARARGS, ""},
  
- 	{NULL, NULL, 0, NULL},
+     {NULL, NULL, 0, NULL},
  };
  
  static struct PyModuleDef module = {
diff --cc intern/cycles/blender/blender_sync.cpp
index c424e81a15a,0ab6d88487e..269e7c94773
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@@ -656,83 -644,61 +644,83 @@@ void BlenderSync::free_data_after_sync(
  
  /* Scene Parameters */
  
- SceneParams BlenderSync::get_scene_params(BL::Scene& b_scene,
-                                           bool background)
+ SceneParams BlenderSync::get_scene_params(BL::Scene &b_scene, bool background)
  {
- 	BL::RenderSettings r = b_scene.render();
- 	SceneParams params;
- 	Poi

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list