Cleanup: format
This commit is contained in:
@@ -3,7 +3,11 @@
|
||||
|
||||
#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")
|
||||
Color = color(color_type, Red, Green, Blue);
|
||||
|
@@ -5,10 +5,10 @@
|
||||
#include "stdcycles.h"
|
||||
|
||||
shader node_separate_color(string color_type = "rgb",
|
||||
color Color = 0.8,
|
||||
output float Red = 0.0,
|
||||
output float Green = 0.0,
|
||||
output float Blue = 0.0)
|
||||
color Color = 0.8,
|
||||
output float Red = 0.0,
|
||||
output float Green = 0.0,
|
||||
output float Blue = 0.0)
|
||||
{
|
||||
color col;
|
||||
if (color_type == "rgb")
|
||||
|
@@ -6,14 +6,15 @@
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
ccl_device_noinline void svm_node_combine_color(KernelGlobals kg,
|
||||
ccl_private ShaderData *sd,
|
||||
ccl_private float *stack,
|
||||
uint color_type,
|
||||
uint inputs_stack_offsets,
|
||||
uint result_stack_offset)
|
||||
ccl_private ShaderData *sd,
|
||||
ccl_private float *stack,
|
||||
uint color_type,
|
||||
uint inputs_stack_offsets,
|
||||
uint result_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 g = stack_load_float(stack, green_stack_offset);
|
||||
@@ -27,11 +28,11 @@ ccl_device_noinline void svm_node_combine_color(KernelGlobals kg,
|
||||
}
|
||||
|
||||
ccl_device_noinline void svm_node_separate_color(KernelGlobals kg,
|
||||
ccl_private ShaderData *sd,
|
||||
ccl_private float *stack,
|
||||
uint color_type,
|
||||
uint input_stack_offset,
|
||||
uint results_stack_offsets)
|
||||
ccl_private ShaderData *sd,
|
||||
ccl_private float *stack,
|
||||
uint color_type,
|
||||
uint input_stack_offset,
|
||||
uint results_stack_offsets)
|
||||
{
|
||||
float3 color = stack_load_float3(stack, input_stack_offset);
|
||||
|
||||
|
@@ -162,7 +162,8 @@ ccl_device float3 rgb_to_hsl(float3 rgb)
|
||||
|
||||
if (cmax == cmin) {
|
||||
h = s = 0.0f; /* achromatic */
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
float cdelta = cmax - cmin;
|
||||
s = l > 0.5f ? cdelta / (2.0f - cmax - cmin) : cdelta / (cmax + cmin);
|
||||
if (cmax == rgb.x) {
|
||||
|
@@ -1048,6 +1048,7 @@ class VIEW3D_PT_sculpt_symmetry_for_topbar(Panel):
|
||||
|
||||
draw = VIEW3D_PT_sculpt_symmetry.draw
|
||||
|
||||
|
||||
class VIEW3D_PT_curves_sculpt_symmetry(Panel, View3DPaintPanel):
|
||||
bl_context = ".curves_sculpt" # dot on purpose (access from topbar)
|
||||
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_z", text="Z", toggle=True)
|
||||
|
||||
|
||||
class VIEW3D_PT_curves_sculpt_symmetry_for_topbar(Panel):
|
||||
bl_space_type = 'TOPBAR'
|
||||
bl_region_type = 'HEADER'
|
||||
@@ -1077,7 +1079,6 @@ class VIEW3D_PT_curves_sculpt_symmetry_for_topbar(Panel):
|
||||
draw = VIEW3D_PT_curves_sculpt_symmetry.draw
|
||||
|
||||
|
||||
|
||||
# ********** default tools for weight-paint ****************
|
||||
|
||||
|
||||
|
@@ -318,7 +318,7 @@ static ImBuf *thumb_create_ex(const char *file_path,
|
||||
char tpath[FILE_MAX];
|
||||
char tdir[FILE_MAX];
|
||||
char temp[FILE_MAX];
|
||||
char mtime[40] = "0"; /* in case we can't stat the file */
|
||||
char mtime[40] = "0"; /* in case we can't stat the file */
|
||||
short tsize = 128;
|
||||
BLI_stat_t info;
|
||||
|
||||
|
Reference in New Issue
Block a user