mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
osl style cleanup and update man-page.
This commit is contained in:
parent
eeece25d82
commit
c0078a9879
6 changed files with 32 additions and 22 deletions
|
|
@ -1,4 +1,4 @@
|
|||
.TH "BLENDER" "1" "October 04, 2012" "Blender Blender 2\&.64 (sub 0)"
|
||||
.TH "BLENDER" "1" "December 04, 2012" "Blender Blender 2\&.65"
|
||||
|
||||
.SH NAME
|
||||
blender \- a 3D modelling and rendering package
|
||||
|
|
@ -15,7 +15,7 @@ Use Blender to create TV commercials, to make technical visualizations, business
|
|||
http://www.blender.org
|
||||
.SH OPTIONS
|
||||
|
||||
Blender 2.64 (sub 0)
|
||||
Blender 2.65
|
||||
Usage: blender [args ...] [file] [args ...]
|
||||
.br
|
||||
.SS "Render Options:"
|
||||
|
|
@ -145,6 +145,10 @@ Playback <file(s)>, only operates this way when not running in background.
|
|||
.br
|
||||
\-j <frame> Set frame step to <frame>
|
||||
.br
|
||||
\-s <frame> Play from <frame>
|
||||
.br
|
||||
\-e <frame> Play until <frame>
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
|
|
@ -344,6 +348,12 @@ Enable debug messages for python
|
|||
Enable debug messages for the event system
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-handlers
|
||||
.br
|
||||
Enable debug messages for event handling
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-wm
|
||||
.br
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ shader node_convert_from_color(
|
|||
output normal Normal = normal(0.0, 0.0, 0.0))
|
||||
{
|
||||
Val = Color[0] * 0.2126 + Color[1] * 0.7152 + Color[2] * 0.0722;
|
||||
ValInt = (int)(Color[0]*0.2126 + Color[1]*0.7152 + Color[2]*0.0722);
|
||||
ValInt = (int)(Color[0] * 0.2126 + Color[1] * 0.7152 + Color[2] * 0.0722);
|
||||
Vector = vector(Color[0], Color[1], Color[2]);
|
||||
Point = point(Color[0], Color[1], Color[2]);
|
||||
Normal = normal(Color[0], Color[1], Color[2]);
|
||||
|
|
|
|||
|
|
@ -35,8 +35,8 @@ vector environment_texture_direction_to_mirrorball(vector dir)
|
|||
if (div > 0.0)
|
||||
dir /= div;
|
||||
|
||||
float u = 0.5*(dir[0] + 1.0);
|
||||
float v = 0.5*(dir[2] + 1.0);
|
||||
float u = 0.5 * (dir[0] + 1.0);
|
||||
float v = 0.5 * (dir[2] + 1.0);
|
||||
|
||||
return vector(u, v, 0.0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,26 +68,26 @@ shader node_image_texture(
|
|||
|
||||
vector weight = vector(0.0, 0.0, 0.0);
|
||||
float blend = projection_blend;
|
||||
float limit = 0.5*(1.0 + blend);
|
||||
float limit = 0.5 * (1.0 + blend);
|
||||
|
||||
/* first test for corners with single texture */
|
||||
if (Nob[0] > limit*(Nob[0] + Nob[1]) && Nob[0] > limit*(Nob[0] + Nob[2])) {
|
||||
if (Nob[0] > limit * (Nob[0] + Nob[1]) && Nob[0] > limit * (Nob[0] + Nob[2])) {
|
||||
weight[0] = 1.0;
|
||||
}
|
||||
else if (Nob[1] > limit*(Nob[0] + Nob[1]) && Nob[1] > limit*(Nob[1] + Nob[2])) {
|
||||
else if (Nob[1] > limit * (Nob[0] + Nob[1]) && Nob[1] > limit * (Nob[1] + Nob[2])) {
|
||||
weight[1] = 1.0;
|
||||
}
|
||||
else if (Nob[2] > limit*(Nob[0] + Nob[2]) && Nob[2] > limit*(Nob[1] + Nob[2])) {
|
||||
else if (Nob[2] > limit * (Nob[0] + Nob[2]) && Nob[2] > limit * (Nob[1] + Nob[2])) {
|
||||
weight[2] = 1.0;
|
||||
}
|
||||
else if (blend > 0.0) {
|
||||
/* in case of blending, test for mixes between two textures */
|
||||
if (Nob[2] < (1.0 - limit)*(Nob[1] + Nob[0])) {
|
||||
if (Nob[2] < (1.0 - limit) * (Nob[1] + Nob[0])) {
|
||||
weight[0] = Nob[0] / (Nob[0] + Nob[1]);
|
||||
weight[0] = clamp((weight[0] - 0.5 * (1.0 - blend)) / blend, 0.0, 1.0);
|
||||
weight[1] = 1.0 - weight[0];
|
||||
}
|
||||
else if (Nob[0] < (1.0 - limit)*(Nob[1] + Nob[2])) {
|
||||
else if (Nob[0] < (1.0 - limit) * (Nob[1] + Nob[2])) {
|
||||
weight[1] = Nob[1] / (Nob[1] + Nob[2]);
|
||||
weight[1] = clamp((weight[1] - 0.5 * (1.0 - blend)) / blend, 0.0, 1.0);
|
||||
weight[2] = 1.0 - weight[1];
|
||||
|
|
@ -111,16 +111,16 @@ shader node_image_texture(
|
|||
float tmp_alpha;
|
||||
|
||||
if (weight[0] > 0.0) {
|
||||
Color += weight[0]*image_texture_lookup(filename, color_space, p[1], p[2], tmp_alpha);
|
||||
Alpha += weight[0]*tmp_alpha;
|
||||
Color += weight[0] * image_texture_lookup(filename, color_space, p[1], p[2], tmp_alpha);
|
||||
Alpha += weight[0] * tmp_alpha;
|
||||
}
|
||||
if (weight[1] > 0.0) {
|
||||
Color += weight[1]*image_texture_lookup(filename, color_space, p[0], p[2], tmp_alpha);
|
||||
Alpha += weight[1]*tmp_alpha;
|
||||
Color += weight[1] * image_texture_lookup(filename, color_space, p[0], p[2], tmp_alpha);
|
||||
Alpha += weight[1] * tmp_alpha;
|
||||
}
|
||||
if (weight[2] > 0.0) {
|
||||
Color += weight[2]*image_texture_lookup(filename, color_space, p[1], p[0], tmp_alpha);
|
||||
Alpha += weight[2]*tmp_alpha;
|
||||
Color += weight[2] * image_texture_lookup(filename, color_space, p[1], p[0], tmp_alpha);
|
||||
Alpha += weight[2] * tmp_alpha;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ shader node_light_falloff(
|
|||
getattribute("path:ray_length", ray_length);
|
||||
|
||||
if (Smooth > 0.0) {
|
||||
float squared = ray_length*ray_length;
|
||||
float squared = ray_length * ray_length;
|
||||
strength *= squared / (Smooth + squared);
|
||||
}
|
||||
|
||||
|
|
@ -38,9 +38,9 @@ shader node_light_falloff(
|
|||
Quadratic = strength;
|
||||
|
||||
/* Linear */
|
||||
Linear = (strength*ray_length);
|
||||
Linear = (strength * ray_length);
|
||||
|
||||
/* Constant */
|
||||
Constant = (strength*ray_length*ray_length);
|
||||
Constant = (strength * ray_length * ray_length);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ shader node_normal_map(
|
|||
string attr_sign_name = "geom:tangent_sign",
|
||||
output normal Normal = NormalIn)
|
||||
{
|
||||
color mcolor = 2.0*color(Color[0] - 0.5, Color[1] - 0.5, Color[2] - 0.5);
|
||||
color mcolor = 2.0 * color(Color[0] - 0.5, Color[1] - 0.5, Color[2] - 0.5);
|
||||
|
||||
if (space == "Tangent") {
|
||||
vector tangent;
|
||||
|
|
@ -47,6 +47,6 @@ shader node_normal_map(
|
|||
Normal = normalize(vector(mcolor));
|
||||
|
||||
if (Strength != 1.0)
|
||||
Normal = normalize(NormalIn + (Normal - NormalIn)*max(Strength, 0.0));
|
||||
Normal = normalize(NormalIn + (Normal - NormalIn) * max(Strength, 0.0));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue