[Bf-blender-cvs] [cc007b15277] temp-greasepencil-vfx: Changes in UI and Descriptions

Antonio Vazquez noreply at git.blender.org
Tue Jun 26 15:36:43 CEST 2018


Commit: cc007b152776fc79d29aa5b002b1b8dc54217fb9
Author: Antonio Vazquez
Date:   Tue Jun 26 15:36:30 2018 +0200
Branches: temp-greasepencil-vfx
https://developer.blender.org/rBcc007b152776fc79d29aa5b002b1b8dc54217fb9

Changes in UI and Descriptions

===================================================================

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/editors/object/object_shader_fx.c
M	source/blender/makesrna/intern/rna_shader_fx.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 60f3ba1e069..9ab4ef7dc37 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1997,6 +1997,7 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
 
     def draw(self, context):
         layout = self.layout
+        layout.use_property_split = True
 
         ob = context.object
 
@@ -2006,85 +2007,56 @@ class DATA_PT_shader_fx(ShaderFxButtonsPanel, Panel):
             box = layout.template_shaderfx(fx)
             if box:
                 # match enum type to our functions, avoids a lookup table.
-                getattr(self, fx.type)(box, ob, fx)
+                getattr(self, fx.type)(box, fx)
 
     # the mt.type enum is (ab)used for a lookup on function names
     # ...to avoid lengthy if statements
     # so each type must have a function here.
 
-    def FX_BLUR(self, layout, ob, fx):
-        split = layout.split()
+    def FX_BLUR(self, layout, fx):
 
-        col = split.column()
-        col.label(text="Factor:")
-        col.prop(fx, "factor", text="")
-        col.separator()
-        col.prop(fx, "samples", text="Samples")
+        layout.prop(fx, "factor", text="Factor")
+        layout.prop(fx, "samples", text="Samples")
 
-        col.separator()
-        col.prop(fx, "use_dof_mode")
+        layout.separator()
+        layout.prop(fx, "use_dof_mode")
         if fx.use_dof_mode:
-            col.prop(fx, "coc")
-
-    def FX_WAVE(self, layout, ob, fx):
-        row = layout.row(align=True)
-        row.prop(fx, "orientation", expand=True)
+            layout.prop(fx, "coc")
 
-        split = layout.split()
-        col = split.column()
-        col.separator()
-        col.label(text="Wave:")
-        col.prop(fx, "amplitude")
-        col.prop(fx, "period")
-        col.prop(fx, "phase")
+    def FX_WAVE(self, layout,fx):
+        layout.prop(fx, "orientation", expand=True)
 
-    def FX_PIXEL(self, layout, ob, fx):
-        split = layout.split()
+        layout.separator()
+        layout.prop(fx, "amplitude")
+        layout.prop(fx, "period")
+        layout.prop(fx, "phase")
 
-        col = split.column()
-        col.label(text="Size:")
-        col.prop(fx, "size", text="")
+    def FX_PIXEL(self, layout, fx):
+        layout.prop(fx, "size", text="Size")
 
-        col.separator()
-        col.prop(fx, "use_lines")
+        layout.prop(fx, "use_lines", text="Display Lines")
 
-        row = col.row()
-        col = row.column()
+        col = layout.column()
         col.enabled = fx.use_lines
         col.prop(fx, "color")
 
-    def FX_SWIRL(self, layout, ob, fx):
-        split = layout.split()
-
-        col = split.column()
-        col.label(text="Object:")
-        col.prop(fx, "object", text="")
-
-        col.separator()
-        col.prop(fx, "radius")
-        col.prop(fx, "angle")
-
-        col.separator()
-        col.prop(fx, "transparent")
+    def FX_SWIRL(self, layout, fx):
+        layout.prop(fx, "object", text="Object")
 
-    def FX_FLIP(self, layout, ob, fx):
-        split = layout.split()
+        layout.prop(fx, "radius")
+        layout.prop(fx, "angle")
 
-        col = split.column()
-        col.prop(fx, "flip_horizontal")
-        col.prop(fx, "flip_vertical")
+        layout.prop(fx, "transparent")
 
-    def FX_LIGHT(self, layout, ob, fx):
-        split = layout.split()
+    def FX_FLIP(self, layout, fx):
+        layout.prop(fx, "flip_horizontal")
+        layout.prop(fx, "flip_vertical")
 
-        col = split.column()
-        col.label(text="Object:")
-        col.prop(fx, "object", text="")
+    def FX_LIGHT(self, layout, fx):
+        layout.prop(fx, "object", text="Object")
 
-        col = split.column(align=True)
-        col.label("Settings:")
-        col.prop(fx, "energy")
-        col.prop(fx, "ambient")
+        layout.prop(fx, "energy")
+        layout.prop(fx, "ambient")
 
 
 classes = (
diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c
index 556529a0219..9d834453beb 100644
--- a/source/blender/editors/object/object_shader_fx.c
+++ b/source/blender/editors/object/object_shader_fx.c
@@ -264,7 +264,7 @@ void OBJECT_OT_shaderfx_add(wmOperatorType *ot)
 	PropertyRNA *prop;
 
 	/* identifiers */
-	ot->name = "Add Shader FX";
+	ot->name = "Add Effect";
 	ot->description = "Add a visual effect to the active object";
 	ot->idname = "OBJECT_OT_shaderfx_add";
 
diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c
index b45be57a7d6..c0bab1a1569 100644
--- a/source/blender/makesrna/intern/rna_shader_fx.c
+++ b/source/blender/makesrna/intern/rna_shader_fx.c
@@ -60,7 +60,7 @@
 #include "WM_types.h"
 
 const EnumPropertyItem rna_enum_object_shaderfx_type_items[] = {
-	{ 0, "", 0, N_("Visual Effects"), "" },
+//	{ 0, "", 0, N_("Visual Effects"), "" },
 	{eShaderFxType_Blur, "FX_BLUR", ICON_SOLO_ON, "Gaussian Blur", "Apply Gaussian Blur to object" },
 	{eShaderFxType_Flip, "FX_FLIP", ICON_SOLO_ON, "Flip", "Flip image"},
 	{eShaderFxType_Pixel, "FX_PIXEL", ICON_SOLO_ON, "Pixelate", "Pixelate image"},



More information about the Bf-blender-cvs mailing list