[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23220] trunk/blender: *Changed texture blend property Flip XY to a proper enum.
William Reynish
william at reynish.com
Mon Sep 14 15:31:58 CEST 2009
Revision: 23220
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23220
Author: billrey
Date: 2009-09-14 15:31:58 +0200 (Mon, 14 Sep 2009)
Log Message:
-----------
*Changed texture blend property Flip XY to a proper enum.
*Minor adjustments to lamp UI
*Fixed issue #19319 (missing notifier)
Modified Paths:
--------------
trunk/blender/release/ui/buttons_data_lamp.py
trunk/blender/release/ui/buttons_texture.py
trunk/blender/source/blender/makesrna/intern/rna_lamp.c
trunk/blender/source/blender/makesrna/intern/rna_texture.c
trunk/blender/source/blender/makesrna/intern/rna_world.c
Modified: trunk/blender/release/ui/buttons_data_lamp.py
===================================================================
--- trunk/blender/release/ui/buttons_data_lamp.py 2009-09-14 12:30:49 UTC (rev 23219)
+++ trunk/blender/release/ui/buttons_data_lamp.py 2009-09-14 13:31:58 UTC (rev 23220)
@@ -75,7 +75,7 @@
col.itemR(lamp, "diffuse")
class DATA_PT_sunsky(DataButtonsPanel):
- __label__ = "Sun/Sky"
+ __label__ = "Sky & Atmosphere"
def poll(self, context):
lamp = context.lamp
@@ -86,10 +86,9 @@
lamp = context.lamp.sky
- row = layout.row()
- row.itemR(lamp, "sky")
- row.itemR(lamp, "atmosphere")
+ layout.itemR(lamp, "sky")
+
row = layout.row()
row.active = lamp.sky or lamp.atmosphere
row.itemR(lamp, "atmosphere_turbidity", text="Turbidity")
@@ -98,38 +97,39 @@
col = split.column()
col.active = lamp.sky
- col.itemL(text="Blend Mode:")
- sub = col.column(align=True)
+ col.itemL(text="Blending:")
+ sub = col.column()
sub.itemR(lamp, "sky_blend_type", text="")
sub.itemR(lamp, "sky_blend", text="Factor")
col.itemL(text="Color Space:")
- sub = col.column(align=True)
- sub.itemR(lamp, "sky_color_space", text="")
+ sub = col.column()
+ sub.row().itemR(lamp, "sky_color_space", expand=True)
sub.itemR(lamp, "sky_exposure", text="Exposure")
col = split.column()
col.active = lamp.sky
col.itemL(text="Horizon:")
- sub = col.column(align=True)
+ sub = col.column()
sub.itemR(lamp, "horizon_brightness", text="Brightness")
sub.itemR(lamp, "spread", text="Spread")
col.itemL(text="Sun:")
- sub = col.column(align=True)
+ sub = col.column()
sub.itemR(lamp, "sun_brightness", text="Brightness")
sub.itemR(lamp, "sun_size", text="Size")
sub.itemR(lamp, "backscattered_light", slider=True,text="Back Light")
layout.itemS()
+ layout.itemR(lamp, "atmosphere")
+
split = layout.split()
col = split.column()
col.active = lamp.atmosphere
- col.itemL(text="Sun:")
- col.itemR(lamp, "sun_intensity", text="Intensity")
- col.itemL(text="Scale Distance:")
+ col.itemL(text="Intensity:")
+ col.itemR(lamp, "sun_intensity", text="Sun")
col.itemR(lamp, "atmosphere_distance_factor", text="Distance")
col = split.column()
Modified: trunk/blender/release/ui/buttons_texture.py
===================================================================
--- trunk/blender/release/ui/buttons_texture.py 2009-09-14 12:30:49 UTC (rev 23219)
+++ trunk/blender/release/ui/buttons_texture.py 2009-09-14 13:31:58 UTC (rev 23220)
@@ -381,7 +381,10 @@
tex = context.texture
layout.itemR(tex, "progression")
- layout.itemR(tex, "flip_axis")
+ sub = layout.row()
+
+ sub.active = (tex.progression in ('LINEAR', 'QUADRATIC', 'EASING', 'RADIAL'))
+ sub.itemR(tex, "flip_axis", expand=True)
class TEXTURE_PT_stucci(TextureTypePanel):
__label__ = "Stucci"
Modified: trunk/blender/source/blender/makesrna/intern/rna_lamp.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_lamp.c 2009-09-14 12:30:49 UTC (rev 23219)
+++ trunk/blender/source/blender/makesrna/intern/rna_lamp.c 2009-09-14 13:31:58 UTC (rev 23220)
@@ -431,7 +431,7 @@
prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows casted by the lamp.");
+ RNA_def_property_ui_text(prop, "Shadow Color", "Color of shadows cast by the lamp.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
prop= RNA_def_property(srna, "only_shadow", PROP_BOOLEAN, PROP_NONE);
Modified: trunk/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_texture.c 2009-09-14 12:30:49 UTC (rev 23219)
+++ trunk/blender/source/blender/makesrna/intern/rna_texture.c 2009-09-14 13:31:58 UTC (rev 23220)
@@ -835,6 +835,11 @@
{TEX_RAD, "RADIAL", 0, "Radial", "Creates a radial progression"},
{0, NULL, 0, NULL, NULL}};
+ static const EnumPropertyItem prop_flip_axis_items[]= {
+ {0, "HORIZONTAL", 0, "Horizontal", "Flips the texture's X and Y axis"},
+ {TEX_FLIPBLEND, "VERTICAL", 0, "Vertical", "Flips the texture's X and Y axis"},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "BlendTexture", "Texture");
RNA_def_struct_ui_text(srna, "Blend Texture", "Procedural color blending texture.");
RNA_def_struct_sdna(srna, "Tex");
@@ -845,10 +850,12 @@
RNA_def_property_ui_text(prop, "Progression", "Sets the style of the color blending");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "flip_axis", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", TEX_FLIPBLEND);
+ prop= RNA_def_property(srna, "flip_axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, prop_flip_axis_items);
RNA_def_property_ui_text(prop, "Flip Axis", "Flips the texture's X and Y axis");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
}
static void rna_def_texture_stucci(BlenderRNA *brna)
Modified: trunk/blender/source/blender/makesrna/intern/rna_world.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_world.c 2009-09-14 12:30:49 UTC (rev 23219)
+++ trunk/blender/source/blender/makesrna/intern/rna_world.c 2009-09-14 13:31:58 UTC (rev 23220)
@@ -431,6 +431,7 @@
RNA_def_property_float_sdna(prop, NULL, "ambr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Ambient Color", "");
+ RNA_def_property_update(prop, NC_WORLD, NULL);
/* exp, range */
prop= RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
More information about the Bf-blender-cvs
mailing list