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
path: root/intern
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-01-25 16:31:54 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-01-25 16:31:54 +0300
commit748adb37e5a0c4de136fae64e9b1aa41defee3cf (patch)
tree7748703338475df01bd4bf08e59acbaaf4e1ea89 /intern
parente057d7b9eb3f7641008e2cd77be9691d84433e5d (diff)
parentda4c3f30d984b361d7c00b103ec329d5263779ff (diff)
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/blender/addon/properties.py8
-rw-r--r--intern/cycles/blender/addon/ui.py35
-rw-r--r--intern/cycles/blender/addon/version_update.py6
3 files changed, 36 insertions, 13 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 91119c5c71c..fb7530f8663 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -42,9 +42,9 @@ enum_feature_set = (
)
enum_displacement_methods = (
- ('BUMP', "Bump", "Bump mapping to simulate the appearance of displacement"),
- ('TRUE', "True", "Use true displacement only, requires fine subdivision"),
- ('BOTH', "Both", "Combination of displacement and bump mapping"),
+ ('BUMP', "Bump Only", "Bump mapping to simulate the appearance of displacement"),
+ ('DISPLACEMENT', "Displacement Only", "Use true displacement of surface only, requires fine subdivision"),
+ ('BOTH', "Displacement and Bump", "Combination of true displacement and bump mapping for finer detail"),
)
enum_bvh_layouts = (
@@ -872,7 +872,7 @@ class CyclesMaterialSettings(bpy.types.PropertyGroup):
name="Displacement Method",
description="Method to use for the displacement",
items=enum_displacement_methods,
- default='BUMP',
+ default='DISPLACEMENT',
)
@classmethod
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 7e650cfef22..77e5cc8cf86 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1250,7 +1250,6 @@ class CYCLES_MATERIAL_PT_displacement(CyclesButtonsPanel, Panel):
class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
bl_label = "Settings"
bl_context = "material"
- bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
@@ -1270,8 +1269,11 @@ class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
if context.scene.cycles.feature_set == 'EXPERIMENTAL':
col.separator()
- col.label(text="Displacement:")
+ col.label(text="Geometry:")
col.prop(cmat, "displacement_method", text="")
+ else:
+ col.separator()
+ col.prop(mat, "pass_index")
col = split.column()
col.label(text="Volume:")
@@ -1281,26 +1283,40 @@ class CYCLES_MATERIAL_PT_settings(CyclesButtonsPanel, Panel):
col.prop(cmat, "volume_interpolation", text="")
col.prop(cmat, "homogeneous_volume", text="Homogeneous")
- layout.separator()
+ if context.scene.cycles.feature_set == 'EXPERIMENTAL':
+ col.separator()
+ col.prop(mat, "pass_index")
+
+
+class CYCLES_MATERIAL_PT_viewport(CyclesButtonsPanel, Panel):
+ bl_label = "Viewport"
+ bl_context = "material"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.material and CyclesButtonsPanel.poll(context)
+
+ def draw(self, context):
+ mat = context.material
+
+ layout = self.layout
split = layout.split()
col = split.column(align=True)
- col.label("Viewport Color:")
+ col.label("Color:")
col.prop(mat, "diffuse_color", text="")
col.prop(mat, "alpha")
col.separator()
- col.label("Viewport Alpha:")
+ col.label("Alpha:")
col.prop(mat.game_settings, "alpha_blend", text="")
col = split.column(align=True)
- col.label("Viewport Specular:")
+ col.label("Specular:")
col.prop(mat, "specular_color", text="")
col.prop(mat, "specular_hardness", text="Hardness")
- col.separator()
- col.prop(mat, "pass_index")
-
class CYCLES_TEXTURE_PT_context(CyclesButtonsPanel, Panel):
bl_label = ""
@@ -1803,6 +1819,7 @@ classes = (
CYCLES_MATERIAL_PT_volume,
CYCLES_MATERIAL_PT_displacement,
CYCLES_MATERIAL_PT_settings,
+ CYCLES_MATERIAL_PT_viewport,
CYCLES_TEXTURE_PT_context,
CYCLES_TEXTURE_PT_node,
CYCLES_TEXTURE_PT_mapping,
diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py
index c105fe9036a..ec334c71555 100644
--- a/intern/cycles/blender/addon/version_update.py
+++ b/intern/cycles/blender/addon/version_update.py
@@ -360,3 +360,9 @@ def do_versions(self):
if bpy.data.version <= (2, 79, 1) or \
(bpy.data.version >= (2, 80, 0) and bpy.data.version <= (2, 80, 3)):
displacement_nodes_insert()
+
+ if bpy.data.version <= (2, 79, 2):
+ for mat in bpy.data.materials:
+ cmat = mat.cycles
+ if not cmat.is_property_set("displacement_method"):
+ cmat.displacement_method = 'BUMP'