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>2019-04-05 13:47:34 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-04-05 13:50:12 +0300
commitb3b335c398de4c792abccdcb506cfe2a5f8580c2 (patch)
tree06a5712173629dff9bd6c43a76159a01706ca7b2 /release
parenta6efbe95cf768d420b87f25fc9d6a3f85f5d6520 (diff)
Fix T60390: add Cycles texture node mapping settings to node editor sidebar
These were missing from the UI previously.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py45
-rw-r--r--release/scripts/startup/bl_ui/space_node.py38
2 files changed, 38 insertions, 45 deletions
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 58ba9ddb9b8..313e0668b92 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -168,50 +168,6 @@ class TEXTURE_PT_node(TextureButtonsPanel, Panel):
layout.template_node_view(ntree, node, None)
-class TEXTURE_PT_node_mapping(TextureButtonsPanel, Panel):
- bl_label = "Mapping"
- bl_context = "texture"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
-
- @classmethod
- def poll(cls, context):
- node = context.texture_node
- # TODO(sergey): perform a faster/nicer check?
- return node and hasattr(node, "texture_mapping") and (context.engine in cls.COMPAT_ENGINES)
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False # No animation.
-
- flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
-
- node = context.texture_node
-
- mapping = node.texture_mapping
-
- col = flow.column()
- col.prop(mapping, "vector_type")
-
- col.separator()
-
- col = col.column(align=True)
- col.prop(mapping, "mapping_x", text="Projection X")
- col.prop(mapping, "mapping_y", text="Y")
- col.prop(mapping, "mapping_z", text="Z")
-
- col.separator()
-
- col = flow.column()
- col.column().prop(mapping, "translation")
-
- col = flow.column()
- col.column().prop(mapping, "rotation")
-
- col = flow.column()
- col.column().prop(mapping, "scale")
-
-
class TextureTypePanel(TextureButtonsPanel):
@classmethod
@@ -918,7 +874,6 @@ classes = (
TEXTURE_PT_preview,
TEXTURE_PT_context,
TEXTURE_PT_node,
- TEXTURE_PT_node_mapping,
TEXTURE_PT_clouds,
TEXTURE_PT_wood,
TEXTURE_PT_marble,
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 764a05844ad..12c51da3e29 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -508,6 +508,43 @@ class NODE_PT_active_node_properties(Panel):
socket.draw(context, row, node, iface_(socket.name, socket.bl_rna.translation_context))
+class NODE_PT_texture_mapping(Panel):
+ bl_space_type = 'NODE_EDITOR'
+ bl_region_type = 'UI'
+ bl_category = "Node"
+ bl_label = "Texture Mapping"
+ bl_options = {'DEFAULT_CLOSED'}
+ COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
+
+ @classmethod
+ def poll(cls, context):
+ node = context.active_node
+ return node and hasattr(node, "texture_mapping") and (context.engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ node = context.active_node
+ mapping = node.texture_mapping
+
+ layout.prop(mapping, "vector_type")
+
+ layout.separator()
+
+ col = layout.column(align=True)
+ col.prop(mapping, "mapping_x", text="Projection X")
+ col.prop(mapping, "mapping_y", text="Y")
+ col.prop(mapping, "mapping_z", text="Z")
+
+ layout.separator()
+
+ layout.prop(mapping, "translation")
+ layout.prop(mapping, "rotation")
+ layout.prop(mapping, "scale")
+
+
# Node Backdrop options
class NODE_PT_backdrop(Panel):
bl_space_type = 'NODE_EDITOR'
@@ -655,6 +692,7 @@ classes = (
NODE_PT_active_node_generic,
NODE_PT_active_node_color,
NODE_PT_active_node_properties,
+ NODE_PT_texture_mapping,
NODE_PT_backdrop,
NODE_PT_quality,
NODE_PT_grease_pencil,