Cycles: OSL Camera: Use title case for parameters in the UI
This is an alternate solution to !146889 to improve labels in the camera UI, while being much less invasive. It doesn't take custom labels into account, but it simply uses the parameter names with title case. Pull Request: https://projects.blender.org/blender/blender/pulls/148141
This commit is contained in:
committed by
Lukas Stockner
parent
b597c0f1ed
commit
0a0d3678a6
@@ -1210,7 +1210,7 @@ class CYCLES_CAMERA_PT_lens_custom_parameters(CyclesButtonsPanel, Panel):
|
|||||||
|
|
||||||
col = layout.column()
|
col = layout.column()
|
||||||
for key in ccam.keys():
|
for key in ccam.keys():
|
||||||
col.prop(ccam, f'["{key}"]')
|
col.prop(ccam, f'["{key}"]', text=bpy.path.display_name(key))
|
||||||
|
|
||||||
|
|
||||||
class CYCLES_PT_context_material(CyclesButtonsPanel, Panel):
|
class CYCLES_PT_context_material(CyclesButtonsPanel, Panel):
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ shader camera(float focal_length = 50.0 [[ float min = 0.0, float sensitivity =
|
|||||||
float distortion_k3 = 0.0,
|
float distortion_k3 = 0.0,
|
||||||
float swirl_scale = 100.0,
|
float swirl_scale = 100.0,
|
||||||
float swirl_amplitude = 0.01,
|
float swirl_amplitude = 0.01,
|
||||||
float swirl_W = 0.0 [[ float sensitivity = 1]],
|
float swirl_w = 0.0 [[ float sensitivity = 1]],
|
||||||
output point position = 0.0,
|
output point position = 0.0,
|
||||||
output vector direction = 0.0,
|
output vector direction = 0.0,
|
||||||
output color throughput = 1.0)
|
output color throughput = 1.0)
|
||||||
@@ -59,7 +59,7 @@ shader camera(float focal_length = 50.0 [[ float min = 0.0, float sensitivity =
|
|||||||
Pcam = Pcam * sensor_size / focal_length;
|
Pcam = Pcam * sensor_size / focal_length;
|
||||||
|
|
||||||
if (do_swirl) {
|
if (do_swirl) {
|
||||||
Pcam += swirl_amplitude * noise("perlin", Pcam * swirl_scale, swirl_W);
|
Pcam += swirl_amplitude * noise("perlin", Pcam * swirl_scale, swirl_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
direction = normalize(vector(Pcam.x, Pcam.y, 1.0));
|
direction = normalize(vector(Pcam.x, Pcam.y, 1.0));
|
||||||
|
|||||||
Reference in New Issue
Block a user