[Bf-blender-cvs] [85bfd5ef008] soc-2018-hair-shader: Cleanup: spurious formatting

L. E. Segovia noreply at git.blender.org
Thu Jun 28 00:02:33 CEST 2018


Commit: 85bfd5ef008229a00ffc3c007cc58cb539ef6589
Author: L. E. Segovia
Date:   Wed Jun 27 20:28:41 2018 +0000
Branches: soc-2018-hair-shader
https://developer.blender.org/rB85bfd5ef008229a00ffc3c007cc58cb539ef6589

Cleanup: spurious formatting

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

M	intern/cycles/blender/blender_shader.cpp
M	intern/cycles/kernel/closure/bsdf.h
M	intern/cycles/kernel/osl/osl_closures.cpp
M	intern/cycles/kernel/svm/svm_types.h
M	intern/cycles/render/nodes.cpp
M	release/scripts/addons
M	source/blender/editors/space_node/drawnode.c
M	source/tools

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

diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index eb301ad788a..542e383c253 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -41,8 +41,8 @@ typedef map<string, ConvertNode*> ProxyMap;
 /* Find */
 
 void BlenderSync::find_shader(BL::ID& id,
-							  vector<Shader*>& used_shaders,
-							  Shader *default_shader)
+                              vector<Shader*>& used_shaders,
+                              Shader *default_shader)
 {
 	Shader *shader = (id)? shader_map.find(id): default_shader;
 
@@ -55,25 +55,25 @@ void BlenderSync::find_shader(BL::ID& id,
 static VolumeSampling get_volume_sampling(PointerRNA& ptr)
 {
 	return (VolumeSampling)get_enum(ptr,
-									"volume_sampling",
-									VOLUME_NUM_SAMPLING,
-									VOLUME_SAMPLING_DISTANCE);
+	                                "volume_sampling",
+	                                VOLUME_NUM_SAMPLING,
+	                                VOLUME_SAMPLING_DISTANCE);
 }
 
 static VolumeInterpolation get_volume_interpolation(PointerRNA& ptr)
 {
 	return (VolumeInterpolation)get_enum(ptr,
-										 "volume_interpolation",
-										 VOLUME_NUM_INTERPOLATION,
-										 VOLUME_INTERPOLATION_LINEAR);
+	                                     "volume_interpolation",
+	                                     VOLUME_NUM_INTERPOLATION,
+	                                     VOLUME_INTERPOLATION_LINEAR);
 }
 
 static DisplacementMethod get_displacement_method(PointerRNA& ptr)
 {
 	return (DisplacementMethod)get_enum(ptr,
-										"displacement_method",
-										DISPLACE_NUM_METHODS,
-										DISPLACE_BUMP);
+	                                    "displacement_method",
+	                                    DISPLACE_NUM_METHODS,
+	                                    DISPLACE_BUMP);
 }
 
 static int validate_enum_value(int value, int num_values, int default_value)
@@ -89,8 +89,8 @@ static InterpolationType get_image_interpolation(NodeType& b_node)
 {
 	int value = b_node.interpolation();
 	return (InterpolationType)validate_enum_value(value,
-												  INTERPOLATION_NUM_TYPES,
-												  INTERPOLATION_LINEAR);
+	                                              INTERPOLATION_NUM_TYPES,
+	                                              INTERPOLATION_LINEAR);
 }
 
 template<typename NodeType>
@@ -98,8 +98,8 @@ static ExtensionType get_image_extension(NodeType& b_node)
 {
 	int value = b_node.extension();
 	return (ExtensionType)validate_enum_value(value,
-											  EXTENSION_NUM_TYPES,
-											  EXTENSION_REPEAT);
+	                                          EXTENSION_NUM_TYPES,
+	                                          EXTENSION_REPEAT);
 }
 
 /* Graph */
@@ -161,9 +161,9 @@ static SocketType::Type convert_socket_type(BL::NodeSocket& b_socket)
 }
 
 static void set_default_value(ShaderInput *input,
-							  BL::NodeSocket& b_sock,
-							  BL::BlendData& b_data,
-							  BL::ID& b_id)
+                              BL::NodeSocket& b_sock,
+                              BL::BlendData& b_data,
+                              BL::ID& b_id)
 {
 	Node *node = input->parent;
 	const SocketType& socket = input->socket_type;
@@ -213,7 +213,7 @@ static void get_tex_mapping(TextureMapping *mapping, BL::TexMapping& b_mapping)
 }
 
 static void get_tex_mapping(TextureMapping *mapping,
-							BL::ShaderNodeMapping& b_mapping)
+                            BL::ShaderNodeMapping& b_mapping)
 {
 	if(!b_mapping)
 		return;
@@ -234,18 +234,18 @@ static void get_tex_mapping(TextureMapping *mapping,
 static bool is_output_node(BL::Node& b_node)
 {
 	return (b_node.is_a(&RNA_ShaderNodeOutputMaterial)
-			|| b_node.is_a(&RNA_ShaderNodeOutputWorld)
-			|| b_node.is_a(&RNA_ShaderNodeOutputLamp));
+		    || b_node.is_a(&RNA_ShaderNodeOutputWorld)
+		    || b_node.is_a(&RNA_ShaderNodeOutputLamp));
 }
 
 static ShaderNode *add_node(Scene *scene,
-							BL::RenderEngine& b_engine,
-							BL::BlendData& b_data,
-							BL::Scene& b_scene,
-							const bool background,
-							ShaderGraph *graph,
-							BL::ShaderNodeTree& b_ntree,
-							BL::ShaderNode& b_node)
+                            BL::RenderEngine& b_engine,
+                            BL::BlendData& b_data,
+                            BL::Scene& b_scene,
+                            const bool background,
+                            ShaderGraph *graph,
+                            BL::ShaderNodeTree& b_ntree,
+                            BL::ShaderNode& b_node)
 {
 	ShaderNode *node = NULL;
 
@@ -255,9 +255,9 @@ static ShaderNode *add_node(Scene *scene,
 		BL::CurveMapping mapping(b_curve_node.mapping());
 		RGBCurvesNode *curves = new RGBCurvesNode();
 		curvemapping_color_to_array(mapping,
-									curves->curves,
-									RAMP_TABLE_SIZE,
-									true);
+		                            curves->curves,
+		                            RAMP_TABLE_SIZE,
+		                            true);
 		curvemapping_minmax(mapping, true, &curves->min_x, &curves->max_x);
 		node = curves;
 	}
@@ -266,9 +266,9 @@ static ShaderNode *add_node(Scene *scene,
 		BL::CurveMapping mapping(b_curve_node.mapping());
 		VectorCurvesNode *curves = new VectorCurvesNode();
 		curvemapping_color_to_array(mapping,
-									curves->curves,
-									RAMP_TABLE_SIZE,
-									false);
+		                            curves->curves,
+		                            RAMP_TABLE_SIZE,
+		                            false);
 		curvemapping_minmax(mapping, false, &curves->min_x, &curves->max_x);
 		node = curves;
 	}
@@ -649,10 +649,10 @@ static ShaderNode *add_node(Scene *scene,
 			 * they could only be loaded correct from blender side
 			 */
 			bool is_builtin = b_image.packed_file() ||
-							  b_image.source() == BL::Image::source_GENERATED ||
-							  b_image.source() == BL::Image::source_MOVIE ||
-							  (b_engine.is_preview() &&
-							   b_image.source() != BL::Image::source_SEQUENCE);
+			                  b_image.source() == BL::Image::source_GENERATED ||
+			                  b_image.source() == BL::Image::source_MOVIE ||
+			                  (b_engine.is_preview() &&
+			                   b_image.source() != BL::Image::source_SEQUENCE);
 
 			if(is_builtin) {
 				/* for builtin images we're using image datablock name to find an image to
@@ -663,14 +663,14 @@ static ShaderNode *add_node(Scene *scene,
 				 */
 				int scene_frame = b_scene.frame_current();
 				int image_frame = image_user_frame_number(b_image_user,
-														  scene_frame);
+				                                          scene_frame);
 				image->filename = b_image.name() + "@" + string_printf("%d", image_frame);
 				image->builtin_data = b_image.ptr.data;
 			}
 			else {
 				image->filename = image_user_file_path(b_image_user,
-													   b_image,
-													   b_scene.frame_current());
+				                                       b_image,
+				                                       b_scene.frame_current());
 				image->builtin_data = NULL;
 			}
 
@@ -680,11 +680,11 @@ static ShaderNode *add_node(Scene *scene,
 			/* TODO(sergey): Does not work properly when we change builtin type. */
 			if(b_image.is_updated()) {
 				scene->image_manager->tag_reload_image(
-						image->filename.string(),
-						image->builtin_data,
-						get_image_interpolation(b_image_node),
-						get_image_extension(b_image_node),
-						image->use_alpha);
+				        image->filename.string(),
+				        image->builtin_data,
+				        get_image_interpolation(b_image_node),
+				        get_image_extension(b_image_node),
+				        image->use_alpha);
 			}
 		}
 		image->color_space = (NodeImageColorSpace)b_image_node.color_space();
@@ -703,22 +703,22 @@ static ShaderNode *add_node(Scene *scene,
 		EnvironmentTextureNode *env = new EnvironmentTextureNode();
 		if(b_image) {
 			bool is_builtin = b_image.packed_file() ||
-							  b_image.source() == BL::Image::source_GENERATED ||
-							  b_image.source() == BL::Image::source_MOVIE ||
-							  (b_engine.is_preview() &&
-							   b_image.source() != BL::Image::source_SEQUENCE);
+			                  b_image.source() == BL::Image::source_GENERATED ||
+			                  b_image.source() == BL::Image::source_MOVIE ||
+			                  (b_engine.is_preview() &&
+			                   b_image.source() != BL::Image::source_SEQUENCE);
 
 			if(is_builtin) {
 				int scene_frame = b_scene.frame_current();
 				int image_frame = image_user_frame_number(b_image_user,
-														  scene_frame);
+				                                          scene_frame);
 				env->filename = b_image.name() + "@" + string_printf("%d", image_frame);
 				env->builtin_data = b_image.ptr.data;
 			}
 			else {
 				env->filename = image_user_file_path(b_image_user,
-													 b_image,
-													 b_scene.frame_current());
+				                                     b_image,
+				                                     b_scene.frame_current());
 				env->builtin_data = NULL;
 			}
 
@@ -728,11 +728,11 @@ static ShaderNode *add_node(Scene *scene,
 			/* TODO(sergey): Does not work properly when we change builtin type. */
 			if(b_image.is_updated()) {
 				scene->image_manager->tag_reload_image(
-						env->filename.string(),
-						env->builtin_data,
-						get_image_interpolation(b_env_node),
-						EXTENSION_REPEAT,
-						env->use_alpha);
+				        env->filename.string(),
+				        env->builtin_data,
+				        get_image_interpolation(b_env_node),
+				        EXTENSION_REPEAT,
+				        env->use_alpha);
 			}
 		}
 		env->color_space = (NodeImageColorSpace)b_env_node.color_space();
@@ -882,11 +882,11 @@ static ShaderNode *add_node(Scene *scene,
 		if(true) {
 			b_point_density_node.cache_point_density(b_scene, settings);
 			scene->image_manager->tag_reload_image(
-					point_density->filename.string(),
-					point_density->builtin_data,
-					point_density->interpolation,
-					EXTENSION_CLIP,
-					true);
+			        point_density->filename.string(),
+			        point_density->builtin_data,
+			        point_density->interpolation,
+			        EXTENSION_CLIP,
+			        true);
 		}
 		node = point_density;
 
@@ -899,13 +899,13 @@ static ShaderNode *

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list