[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32402] branches/soc-2008-mxcurioni: Fix for missing toggle switches to enable/disable linesets.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Mon Oct 11 01:34:27 CEST 2010
Revision: 32402
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32402
Author: kjym3
Date: 2010-10-11 01:34:27 +0200 (Mon, 11 Oct 2010)
Log Message:
-----------
Fix for missing toggle switches to enable/disable linesets. Also gave
uniform property name "use" to all toggle switches in Freestyle-related
options, according to recent RNA renaming.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_templates.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
Modified: branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py 2010-10-10 23:11:34 UTC (rev 32401)
+++ branches/soc-2008-mxcurioni/release/scripts/freestyle/style_modules/parameter_editor.py 2010-10-10 23:34:27 UTC (rev 32402)
@@ -479,7 +479,7 @@
ConstantThicknessShader(linestyle.thickness),
ConstantColorShader(color.r, color.g, color.b, linestyle.alpha)]
for m in linestyle.color_modifiers:
- if not m.enabled:
+ if not m.use:
continue
if m.type == "ALONG_STROKE":
shaders_list.append(ColorAlongStrokeShader(
@@ -493,7 +493,7 @@
m.blend, m.influence, m.color_ramp, m.target,
m.range_min, m.range_max))
for m in linestyle.alpha_modifiers:
- if not m.enabled:
+ if not m.use:
continue
if m.type == "ALONG_STROKE":
shaders_list.append(AlphaAlongStrokeShader(
@@ -507,7 +507,7 @@
m.blend, m.influence, m.mapping, m.invert, m.curve, m.target,
m.range_min, m.range_max))
for m in linestyle.thickness_modifiers:
- if not m.enabled:
+ if not m.use:
continue
if m.type == "ALONG_STROKE":
shaders_list.append(ThicknessAlongStrokeShader(
Modified: branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py 2010-10-10 23:11:34 UTC (rev 32401)
+++ branches/soc-2008-mxcurioni/release/scripts/ui/properties_render.py 2010-10-10 23:34:27 UTC (rev 32402)
@@ -266,7 +266,7 @@
box = layout.box()
box.context_pointer_set("freestyle_module", module)
row = box.row(align=True)
- row.prop(module, "is_displayed", text="")
+ row.prop(module, "use", text="")
row.prop(module, "module_path", text="")
row.operator("scene.freestyle_module_remove", icon='X', text="")
row.operator("scene.freestyle_module_move", icon='TRIA_UP', text="").direction = 'UP'
@@ -296,7 +296,7 @@
row.operator("scene.freestyle_modifier_toggle_fold", icon=icon, text="", emboss=False)
row.label(text=modifier.rna_type.name)
row.prop(modifier, "name", text="")
- row.prop(modifier, "enabled", text="")
+ row.prop(modifier, "use", text="")
sub = row.row(align=True)
sub.operator("scene.freestyle_modifier_move", icon='TRIA_UP', text="").direction = 'UP'
sub.operator("scene.freestyle_modifier_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
Modified: branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_templates.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_templates.c 2010-10-10 23:11:34 UTC (rev 32401)
+++ branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_templates.c 2010-10-10 23:34:27 UTC (rev 32402)
@@ -1991,7 +1991,7 @@
uiBlockSetEmboss(block, UI_EMBOSS);
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, ptr, "use_textures", i, 0, 0, 0, 0, NULL);
}
- else if(RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer)) {
+ else if(RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer) || RNA_struct_is_a(itemptr->type, &RNA_FreestyleLineSet)) {
uiItemL(sub, name, icon);
uiBlockSetEmboss(block, UI_EMBOSS);
uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "use", 0, 0, 0, 0, 0, NULL);
Modified: branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c 2010-10-10 23:11:34 UTC (rev 32401)
+++ branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c 2010-10-10 23:34:27 UTC (rev 32402)
@@ -145,9 +145,9 @@
RNA_def_property_ui_text(prop, "Influence", "Influence factor by which the modifier changes the property.");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "modifier.flags", LS_MODIFIER_ENABLED);
- RNA_def_property_ui_text(prop, "Enabled", "True if the modifier is enabled.");
+ RNA_def_property_ui_text(prop, "Use", "Enable or disable this modifier during stroke rendering.");
prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "modifier.flags", LS_MODIFIER_EXPANDED);
Modified: branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c 2010-10-10 23:11:34 UTC (rev 32401)
+++ branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c 2010-10-10 23:34:27 UTC (rev 32402)
@@ -1667,9 +1667,9 @@
RNA_def_property_update(prop, NC_SCENE, NULL);
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_LINESET_ENABLED);
- RNA_def_property_ui_text(prop, "Enabled", "Enable or disable the line set.");
+ RNA_def_property_ui_text(prop, "Use", "Enable or disable this line set during stroke rendering.");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE);
@@ -1773,9 +1773,9 @@
RNA_def_property_ui_text(prop, "Module Path", "Path to a style module file.");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "is_displayed", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1);
- RNA_def_property_ui_text(prop, "Is Displayed", "Enable this style module during the rendering.");
+ RNA_def_property_ui_text(prop, "Use", "Enable or disable this style module during stroke rendering.");
RNA_def_property_update(prop, NC_SCENE, NULL);
/* FreestyleSettings */
More information about the Bf-blender-cvs
mailing list