Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-23 21:02:49 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-23 21:02:49 +0300
commita44b08a6c473c0aae9f98dc13f9d000e5ea639bc (patch)
tree6b70d6026827b5cf6eed3af1c56a38329c2497bf /release
parent0305fc30b3ba6a1b24e2c9c182ae2e76d553f341 (diff)
parent0aec2dcd3ae0ed382ffe7b3311a4e30fc88398e4 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py98
-rw-r--r--release/scripts/startup/nodeitems_builtins.py1
2 files changed, 7 insertions, 92 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 9fa6dbf6eef..91a0120f6ac 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -388,102 +388,16 @@ class QuickSmoke(Operator):
node_out = nodes.new(type='ShaderNodeOutputMaterial')
node_out.location = grid_location(6, 1)
- # Add shader 1
- node_add_shader_1 = nodes.new(type='ShaderNodeAddShader')
- node_add_shader_1.location = grid_location(5, 1)
- links.new(node_add_shader_1.outputs["Shader"],
+ # Add Principled Volume
+ node_principled = nodes.new(type='ShaderNodeVolumePrincipled')
+ node_principled.location = grid_location(4, 1)
+ links.new(node_principled.outputs["Volume"],
node_out.inputs["Volume"])
- if self.style in {'SMOKE', 'FIRE', 'BOTH'}:
- # Smoke
-
- # Add shader 2
- node_add_shader_2 = nodes.new(type='ShaderNodeAddShader')
- node_add_shader_2.location = grid_location(4, 2)
- links.new(node_add_shader_2.outputs["Shader"],
- node_add_shader_1.inputs[0])
-
- # Volume scatter
- node_scatter = nodes.new(type='ShaderNodeVolumeScatter')
- node_scatter.location = grid_location(3, 3)
- links.new(node_scatter.outputs["Volume"],
- node_add_shader_2.inputs[0])
-
- # Volume absorption
- node_absorption = nodes.new(type='ShaderNodeVolumeAbsorption')
- node_absorption.location = grid_location(3, 2)
- links.new(node_absorption.outputs["Volume"],
- node_add_shader_2.inputs[1])
-
- # Density Multiplier
- node_densmult = nodes.new(type='ShaderNodeMath')
- node_densmult.location = grid_location(2, 2)
- node_densmult.operation = 'MULTIPLY'
- node_densmult.inputs[1].default_value = 5.0
- links.new(node_densmult.outputs["Value"],
- node_scatter.inputs["Density"])
- links.new(node_densmult.outputs["Value"],
- node_absorption.inputs["Density"])
-
- # Attribute "density"
- node_attrib_density = nodes.new(type='ShaderNodeAttribute')
- node_attrib_density.attribute_name = "density"
- node_attrib_density.location = grid_location(1, 2)
- links.new(node_attrib_density.outputs["Fac"],
- node_densmult.inputs[0])
-
- # Attribute "color"
- node_attrib_color = nodes.new(type='ShaderNodeAttribute')
- node_attrib_color.attribute_name = "color"
- node_attrib_color.location = grid_location(2, 3)
- links.new(node_attrib_color.outputs["Color"],
- node_scatter.inputs["Color"])
- links.new(node_attrib_color.outputs["Color"],
- node_absorption.inputs["Color"])
+ node_principled.inputs["Density"].default_value = 5.0
if self.style in {'FIRE', 'BOTH'}:
- # Fire
-
- # Emission
- node_emission = nodes.new(type='ShaderNodeEmission')
- node_emission.inputs["Color"].default_value = (0.8, 0.1, 0.01, 1.0)
- node_emission.location = grid_location(4, 1)
- links.new(node_emission.outputs["Emission"],
- node_add_shader_1.inputs[1])
-
- # Flame strength multiplier
- node_flame_strength_mult = nodes.new(type='ShaderNodeMath')
- node_flame_strength_mult.location = grid_location(3, 1)
- node_flame_strength_mult.operation = 'MULTIPLY'
- node_flame_strength_mult.inputs[1].default_value = 2.5
- links.new(node_flame_strength_mult.outputs["Value"],
- node_emission.inputs["Strength"])
-
- # Color ramp Flame
- node_flame_ramp = nodes.new(type='ShaderNodeValToRGB')
- node_flame_ramp.location = grid_location(1, 1)
- ramp = node_flame_ramp.color_ramp
- ramp.interpolation = 'EASE'
-
- # orange
- elem = ramp.elements.new(0.5)
- elem.color = (1.0, 0.128, 0.0, 1.0)
-
- # yellow
- elem = ramp.elements.new(0.9)
- elem.color = (0.9, 0.6, 0.1, 1.0)
-
- links.new(node_flame_ramp.outputs["Color"],
- node_emission.inputs["Color"])
-
- # Attribute "flame"
- node_attrib_flame = nodes.new(type='ShaderNodeAttribute')
- node_attrib_flame.attribute_name = "flame"
- node_attrib_flame.location = grid_location(0, 1)
- links.new(node_attrib_flame.outputs["Fac"],
- node_flame_ramp.inputs["Fac"])
- links.new(node_attrib_flame.outputs["Fac"],
- node_flame_strength_mult.inputs[0])
+ node_principled.inputs["Blackbody Intensity"].default_value = 1.0
# Blender Internal
else:
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index dc8462f1af1..bb3eb1a7856 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -272,6 +272,7 @@ shader_node_categories = [
NodeItem("ShaderNodeHoldout", poll=object_cycles_shader_nodes_poll),
NodeItem("ShaderNodeVolumeAbsorption", poll=eevee_cycles_shader_nodes_poll),
NodeItem("ShaderNodeVolumeScatter", poll=eevee_cycles_shader_nodes_poll),
+ NodeItem("ShaderNodeVolumePrincipled"),
NodeItem("ShaderNodeEeveeSpecular", poll=object_eevee_shader_nodes_poll),
]),
ShaderNewNodeCategory("SH_NEW_TEXTURE", "Texture", items=[