[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49637] branches/ge_harmony: Renaming the pre-process filters to global shaders, as this better reflects their function and use.

Daniel Stokes kupomail at gmail.com
Tue Aug 7 02:09:48 CEST 2012


Revision: 49637
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49637
Author:   kupoman
Date:     2012-08-07 00:09:46 +0000 (Tue, 07 Aug 2012)
Log Message:
-----------
Renaming the pre-process filters to global shaders, as this better reflects their function and use.

Modified Paths:
--------------
    branches/ge_harmony/release/scripts/startup/bl_ui/properties_game.py
    branches/ge_harmony/source/blender/makesdna/DNA_scene_types.h
    branches/ge_harmony/source/blender/makesrna/intern/rna_scene.c

Modified: branches/ge_harmony/release/scripts/startup/bl_ui/properties_game.py
===================================================================
--- branches/ge_harmony/release/scripts/startup/bl_ui/properties_game.py	2012-08-06 20:48:08 UTC (rev 49636)
+++ branches/ge_harmony/release/scripts/startup/bl_ui/properties_game.py	2012-08-07 00:09:46 UTC (rev 49637)
@@ -359,20 +359,20 @@
 
             layout.prop(gs, "dome_text")
             
-def display_filter_settings(filter, layout):
+def display_shader_settings(shader, layout):
     col = layout.column()
     col.label("Source:")
     row = col.row()
-    row.prop(filter, "shader_location", expand=True)
-    if filter.shader_location == "INTERNAL":
-        col.prop(filter, "source_text", text="")
-    elif filter.shader_location == "EXTERNAL":
-        col.prop(filter, "source_path", text="")
+    row.prop(shader, "shader_location", expand=True)
+    if shader.shader_location == "INTERNAL":
+        col.prop(shader, "source_text", text="")
+    elif shader.shader_location == "EXTERNAL":
+        col.prop(shader, "source_path", text="")
         
-    if filter.uniforms:
+    if shader.uniforms:
         col.label("Uniforms:")
         
-    for uniform in filter.uniforms:
+    for uniform in shader.uniforms:
         col = layout.column()
         if hasattr(uniform, "value"):
             reserved = uniform.name.startswith("bgl_")
@@ -393,8 +393,8 @@
                 
             col.active = not reserved
 
-class RENDER_PT_game_pre_filters(RenderButtonsPanel, Panel):
-    bl_label = "Pre-Process Filters"
+class RENDER_PT_game_global_shaders(RenderButtonsPanel, Panel):
+    bl_label = "Global Shaders"
     COMPAT_ENGINES = {'BLENDER_GAME'}
     
     def draw(self, context):
@@ -404,12 +404,12 @@
         
         row = layout.row()
         col = row.column()
-        col.template_list(gs, "pre_filters", gs, "active_pre_filter_index", rows=2)
-        col.template_ID(gs, "active_pre_filter", new="shader.new_postfilter")
+        col.template_list(gs, "global_shaders", gs, "active_global_shader_index", rows=2)
+        col.template_ID(gs, "active_global_shader", new="shader.new_postfilter")
             
-        filter = gs.active_post_filter
-        if filter:
-            display_filter_settings(filter, layout)
+        shader = gs.active_post_filter
+        if shader:
+            display_shader_settings(shader, layout)
             
 class RENDER_PT_game_post_filters(RenderButtonsPanel, Panel):
     bl_label = "Post-Process Filters"
@@ -427,7 +427,7 @@
             
         filter = gs.active_post_filter
         if filter:
-            display_filter_settings(filter, layout)
+            display_shader_settings(filter, layout)
 
 
 class RENDER_PT_game_shading(RenderButtonsPanel, Panel):

Modified: branches/ge_harmony/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- branches/ge_harmony/source/blender/makesdna/DNA_scene_types.h	2012-08-06 20:48:08 UTC (rev 49636)
+++ branches/ge_harmony/source/blender/makesdna/DNA_scene_types.h	2012-08-07 00:09:46 UTC (rev 49637)
@@ -629,8 +629,8 @@
 
 	int actpostfilter;
 	ListBase postfilters;
-	int actprefilter, filterpad;
-	ListBase prefilters;
+	int actgshader, shaderpad;
+	ListBase gshaders;
 } GameData;
 
 #define STEREO_NOSTEREO		1

Modified: branches/ge_harmony/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/ge_harmony/source/blender/makesrna/intern/rna_scene.c	2012-08-06 20:48:08 UTC (rev 49636)
+++ branches/ge_harmony/source/blender/makesrna/intern/rna_scene.c	2012-08-07 00:09:46 UTC (rev 49637)
@@ -1345,10 +1345,10 @@
 	return rna_Shader_active_get(ptr, &gm->postfilters, gm->actpostfilter);
 }
 
-static PointerRNA rna_GameSettings_active_prefilter_get(PointerRNA *ptr)
+static PointerRNA rna_GameSettings_active_gshader_get(PointerRNA *ptr)
 {
 	GameData *gm = (GameData *)ptr->data;
-	return rna_Shader_active_get(ptr, &gm->prefilters, gm->actprefilter);
+	return rna_Shader_active_get(ptr, &gm->gshaders, gm->actgshader);
 }
 
 static void rna_GameSettings_active_postfilter_set(PointerRNA *ptr, PointerRNA value)
@@ -1357,10 +1357,10 @@
 	rna_Shader_active_set(value, &gm->postfilters, gm->actpostfilter);
 }
 
-static void rna_GameSettings_active_prefilter_set(PointerRNA *ptr, PointerRNA value)
+static void rna_GameSettings_active_gshader_set(PointerRNA *ptr, PointerRNA value)
 {
 	GameData *gm = (GameData *)ptr->data;
-	rna_Shader_active_set(value, &gm->prefilters, gm->actprefilter);
+	rna_Shader_active_set(value, &gm->gshaders, gm->actgshader);
 }
 
 static int rna_GameSettings_active_postfilter_index_get(PointerRNA *ptr)
@@ -1369,10 +1369,10 @@
 	return rna_Shader_active_index_get(gm->actpostfilter);
 }
 
-static int rna_GameSettings_active_prefilter_index_get(PointerRNA *ptr)
+static int rna_GameSettings_active_gshader_index_get(PointerRNA *ptr)
 {
 	GameData *gm = (GameData*)ptr->data;
-	return rna_Shader_active_index_get(gm->actprefilter);
+	return rna_Shader_active_index_get(gm->actgshader);
 }
 
 static void rna_GameSettings_active_postfilter_index_set(PointerRNA *ptr, int value)
@@ -1381,10 +1381,10 @@
 	rna_Shader_active_index_set(value, &gm->actpostfilter);
 }
 
-static void rna_GameSettings_active_prefilter_index_set(PointerRNA *ptr, int value)
+static void rna_GameSettings_active_gshader_index_set(PointerRNA *ptr, int value)
 {
 	GameData *gm = (GameData*)ptr->data;
-	rna_Shader_active_index_set(value, &gm->actprefilter);
+	rna_Shader_active_index_set(value, &gm->actgshader);
 }
 
 static void rna_GameSettings_active_postfilter_index_range(PointerRNA *ptr, int *min, int *max)
@@ -1393,10 +1393,10 @@
 	rna_Shader_active_index_range(min, max, &gm->postfilters);
 }
 
-static void rna_GameSettings_active_prefilter_index_range(PointerRNA *ptr, int *min, int *max)
+static void rna_GameSettings_active_gshader_index_range(PointerRNA *ptr, int *min, int *max)
 {
 	GameData *gm = (GameData*)ptr->data;
-	rna_Shader_active_index_range(min, max, &gm->prefilters);
+	rna_Shader_active_index_range(min, max, &gm->gshaders);
 }
 
 static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[])
@@ -2840,22 +2840,22 @@
 	RNA_def_property_int_funcs(prop, "rna_GameSettings_active_postfilter_index_get", "rna_GameSettings_active_postfilter_index_set", "rna_GameSettings_active_postfilter_index_range");
 	RNA_def_property_ui_text(prop, "Active Post Filter Index", "");
 
-	prop = RNA_def_property(srna, "pre_filters", PROP_COLLECTION, PROP_NONE);
-	RNA_def_property_collection_sdna(prop, NULL, "prefilters", NULL);
+	prop = RNA_def_property(srna, "global_shaders", PROP_COLLECTION, PROP_NONE);
+	RNA_def_property_collection_sdna(prop, NULL, "gshaders", NULL);
 	RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 	RNA_def_property_struct_type(prop, "ShaderLink");
-	RNA_def_property_ui_text(prop, "Pre Process Filters", "Per Object filters that run during the main render pass");
+	RNA_def_property_ui_text(prop, "Global Shaders", "Shaders applied to all objects in the scene");
 
-	prop = RNA_def_property(srna, "active_pre_filter", PROP_POINTER, PROP_NONE);
+	prop = RNA_def_property(srna, "active_global_shader", PROP_POINTER, PROP_NONE);
 	RNA_def_property_struct_type(prop, "Shader");
-	RNA_def_property_pointer_funcs(prop, "rna_GameSettings_active_prefilter_get", "rna_GameSettings_active_prefilter_set", NULL, NULL);
+	RNA_def_property_pointer_funcs(prop, "rna_GameSettings_active_gshader_get", "rna_GameSettings_active_gshader_set", NULL, NULL);
 	RNA_def_property_flag(prop, PROP_EDITABLE);
 	RNA_def_property_ui_text(prop, "Active Shader", "");
 
-	prop = RNA_def_property(srna, "active_pre_filter_index", PROP_INT, PROP_NONE);
-	RNA_def_property_int_sdna(prop, NULL, "actprefilter");
-	RNA_def_property_int_funcs(prop, "rna_GameSettings_active_prefilter_index_get", "rna_GameSettings_active_prefilter_index_set", "rna_GameSettings_active_prefilter_index_range");
-	RNA_def_property_ui_text(prop, "Active Pre Filter Index", "");
+	prop = RNA_def_property(srna, "active_global_shader_index", PROP_INT, PROP_NONE);
+	RNA_def_property_int_sdna(prop, NULL, "actgshader");
+	RNA_def_property_int_funcs(prop, "rna_GameSettings_active_gshader_index_get", "rna_GameSettings_active_gshader_index_set", "rna_GameSettings_active_gshader_index_range");
+	RNA_def_property_ui_text(prop, "Active Global Shader Index", "");
 
 	/* Recast Settings */
 	prop = RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE);




More information about the Bf-blender-cvs mailing list