Cleanup: format

This commit is contained in:
Campbell Barton
2022-05-05 17:32:57 +10:00
parent 6513ce258f
commit eb837ba17e
6 changed files with 26 additions and 19 deletions

View File

@@ -3,7 +3,11 @@
#include "stdcycles.h" #include "stdcycles.h"
shader node_combine_color(string color_type = "rgb", float Red = 0.0, float Green = 0.0, float Blue = 0.0, output color Color = 0.8) shader node_combine_color(string color_type = "rgb",
float Red = 0.0,
float Green = 0.0,
float Blue = 0.0,
output color Color = 0.8)
{ {
if (color_type == "rgb" || color_type == "hsv" || color_type == "hsl") if (color_type == "rgb" || color_type == "hsv" || color_type == "hsl")
Color = color(color_type, Red, Green, Blue); Color = color(color_type, Red, Green, Blue);

View File

@@ -13,7 +13,8 @@ ccl_device_noinline void svm_node_combine_color(KernelGlobals kg,
uint result_stack_offset) uint result_stack_offset)
{ {
uint red_stack_offset, green_stack_offset, blue_stack_offset; uint red_stack_offset, green_stack_offset, blue_stack_offset;
svm_unpack_node_uchar3(inputs_stack_offsets, &red_stack_offset, &green_stack_offset, &blue_stack_offset); svm_unpack_node_uchar3(
inputs_stack_offsets, &red_stack_offset, &green_stack_offset, &blue_stack_offset);
float r = stack_load_float(stack, red_stack_offset); float r = stack_load_float(stack, red_stack_offset);
float g = stack_load_float(stack, green_stack_offset); float g = stack_load_float(stack, green_stack_offset);

View File

@@ -162,7 +162,8 @@ ccl_device float3 rgb_to_hsl(float3 rgb)
if (cmax == cmin) { if (cmax == cmin) {
h = s = 0.0f; /* achromatic */ h = s = 0.0f; /* achromatic */
} else { }
else {
float cdelta = cmax - cmin; float cdelta = cmax - cmin;
s = l > 0.5f ? cdelta / (2.0f - cmax - cmin) : cdelta / (cmax + cmin); s = l > 0.5f ? cdelta / (2.0f - cmax - cmin) : cdelta / (cmax + cmin);
if (cmax == rgb.x) { if (cmax == rgb.x) {

View File

@@ -1048,6 +1048,7 @@ class VIEW3D_PT_sculpt_symmetry_for_topbar(Panel):
draw = VIEW3D_PT_sculpt_symmetry.draw draw = VIEW3D_PT_sculpt_symmetry.draw
class VIEW3D_PT_curves_sculpt_symmetry(Panel, View3DPaintPanel): class VIEW3D_PT_curves_sculpt_symmetry(Panel, View3DPaintPanel):
bl_context = ".curves_sculpt" # dot on purpose (access from topbar) bl_context = ".curves_sculpt" # dot on purpose (access from topbar)
bl_label = "Symmetry" bl_label = "Symmetry"
@@ -1069,6 +1070,7 @@ class VIEW3D_PT_curves_sculpt_symmetry(Panel, View3DPaintPanel):
row.prop(curves, "use_mirror_y", text="Y", toggle=True) row.prop(curves, "use_mirror_y", text="Y", toggle=True)
row.prop(curves, "use_mirror_z", text="Z", toggle=True) row.prop(curves, "use_mirror_z", text="Z", toggle=True)
class VIEW3D_PT_curves_sculpt_symmetry_for_topbar(Panel): class VIEW3D_PT_curves_sculpt_symmetry_for_topbar(Panel):
bl_space_type = 'TOPBAR' bl_space_type = 'TOPBAR'
bl_region_type = 'HEADER' bl_region_type = 'HEADER'
@@ -1077,7 +1079,6 @@ class VIEW3D_PT_curves_sculpt_symmetry_for_topbar(Panel):
draw = VIEW3D_PT_curves_sculpt_symmetry.draw draw = VIEW3D_PT_curves_sculpt_symmetry.draw
# ********** default tools for weight-paint **************** # ********** default tools for weight-paint ****************