[Bf-blender-cvs] [30512d7] master: Blender Internal: * Remove Stars feature. This was a quite minimalistic feature and there are better alternatives with more control (particles for example).

Thomas Dinges noreply at git.blender.org
Wed Nov 20 19:14:01 CET 2013


Commit: 30512d7c5586189d02e2b2e71d0d5257b0713a16
Author: Thomas Dinges
Date:   Wed Nov 20 19:09:24 2013 +0100
http://developer.blender.org/rB30512d7c5586189d02e2b2e71d0d5257b0713a16

Blender Internal:
* Remove Stars feature. This was a quite minimalistic feature and there are
better alternatives with more control (particles for example).

Removal discussed during BCon13 developer meeting and already years before, time to do it..

Reviewed By: brecht
Differential Revision: http://developer.blender.org/D17

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

M	release/scripts/startup/bl_ui/properties_world.py
M	source/blender/blenkernel/intern/ipo.c
M	source/blender/blenkernel/intern/world.c
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/makesdna/DNA_ipo_types.h
M	source/blender/makesdna/DNA_world_types.h
M	source/blender/makesrna/intern/rna_world.c
M	source/blender/render/extern/include/RE_pipeline.h
M	source/blender/render/intern/source/convertblender.c

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

diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index 0b8d8a4..0b6ce41 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -244,34 +244,6 @@ class WORLD_PT_mist(WorldButtonsPanel, Panel):
         layout.prop(world.mist_settings, "falloff")
 
 
-class WORLD_PT_stars(WorldButtonsPanel, Panel):
-    bl_label = "Stars"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
-
-    def draw_header(self, context):
-        world = context.world
-
-        self.layout.prop(world.star_settings, "use_stars", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        world = context.world
-
-        layout.active = world.star_settings.use_stars
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(world.star_settings, "size")
-        col.prop(world.star_settings, "color_random", text="Colors")
-
-        col = split.column()
-        col.prop(world.star_settings, "distance_min", text="Min. Dist")
-        col.prop(world.star_settings, "average_separation", text="Separation")
-
-
 class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "world"
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index ecc4a03..8ef3b7e 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -712,17 +712,6 @@ static const char *world_adrcodes_to_paths(int adrcode, int *array_index)
 			return "mist.start";
 		case WO_MISTHI:
 			return "mist.height";
-
-		case WO_STAR_R:
-		case WO_STAR_G:
-		case WO_STAR_B:
-			printf("WARNING: WO_STAR_R/G/B deprecated\n");
-			return NULL;
-		
-		case WO_STARDIST:
-			return "stars.min_distance";
-		case WO_STARSIZE:
-			return "stars.size";
 		
 		default: /* for now, we assume that the others were MTex channels */
 			return mtex_adrcodes_to_paths(adrcode, array_index);
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c
index 206f829..c5a932e 100644
--- a/source/blender/blenkernel/intern/world.c
+++ b/source/blender/blenkernel/intern/world.c
@@ -92,8 +92,6 @@ World *add_world(Main *bmain, const char *name)
 	wrld->zeng = 0.01f;
 	wrld->zenb = 0.01f;
 	wrld->skytype = 0;
-	wrld->stardist = 15.0f;
-	wrld->starsize = 2.0f;
 
 	wrld->exp = 0.0f;
 	wrld->exposure = wrld->range = 1.0f;
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 1bf137e..abdf017 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -64,7 +64,6 @@
 #include "BKE_movieclip.h"
 
 #include "RE_engine.h"
-#include "RE_pipeline.h"  /* make_stars */
 
 #include "IMB_imbuf_types.h"
 #include "IMB_imbuf.h"
@@ -3279,14 +3278,6 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
 		if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
 			drawfloor(scene, v3d, grid_unit);
 		}
-		if (rv3d->persp == RV3D_CAMOB) {
-			if (scene->world) {
-				if (scene->world->mode & WO_STARS) {
-					RE_make_stars(NULL, scene, star_stuff_init_func, star_stuff_vertex_func,
-					              star_stuff_term_func);
-				}
-			}
-		}
 	}
 	else {
 		if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h
index 2699c6e..b4088cc 100644
--- a/source/blender/makesdna/DNA_ipo_types.h
+++ b/source/blender/makesdna/DNA_ipo_types.h
@@ -308,6 +308,7 @@ typedef struct Ipo {
 #define WO_MISTSTA	10
 #define WO_MISTHI	11
 
+/* Stars are deprecated */
 #define WO_STAR_R	12
 #define WO_STAR_G	13
 #define WO_STAR_B	14
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index a0863b1..44f7813 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -96,8 +96,9 @@ typedef struct World {
 	float misi, miststa, mistdist, misthi;
 	
 	float starr  DNA_DEPRECATED, starg  DNA_DEPRECATED, starb  DNA_DEPRECATED, stark  DNA_DEPRECATED; /* Deprecated */
-	float starsize, starmindist;
-	float stardist, starcolnoise;
+	
+	float starsize DNA_DEPRECATED, starmindist DNA_DEPRECATED;
+	float stardist DNA_DEPRECATED, starcolnoise DNA_DEPRECATED;
 	
 	/* unused now: DOF */
 	short dofsta, dofend, dofmin, dofmax;
@@ -142,7 +143,7 @@ typedef struct World {
 
 /* mode */
 #define WO_MIST	               1
-#define WO_STARS               2
+#define WO_STARS               2 /* deprecated */
 /*#define WO_DOF                 4*/
 #define WO_ACTIVITY_CULLING	   8
 #define WO_ENV_LIGHT   		  16
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index b689a82..c7997be 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -56,10 +56,6 @@ static PointerRNA rna_World_lighting_get(PointerRNA *ptr)
 	return rna_pointer_inherit_refine(ptr, &RNA_WorldLighting, ptr->id.data);
 }
 
-static PointerRNA rna_World_stars_get(PointerRNA *ptr)
-{
-	return rna_pointer_inherit_refine(ptr, &RNA_WorldStarsSettings, ptr->id.data);
-}
 
 static PointerRNA rna_World_mist_get(PointerRNA *ptr)
 {
@@ -114,14 +110,6 @@ static void rna_World_draw_mist_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
 	WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
 }
 
-static void rna_World_stars_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
-{
-	World *wo = ptr->id.data;
-
-	DAG_id_tag_update(&wo->id, 0);
-	WM_main_add_notifier(NC_WORLD | ND_WORLD_STARS, wo);
-}
-
 static void rna_World_use_nodes_update(bContext *C, PointerRNA *ptr)
 {
 	World *wrld = (World *)ptr->data;
@@ -450,46 +438,6 @@ static void rna_def_world_mist(BlenderRNA *brna)
 	RNA_def_property_update(prop, 0, "rna_World_update");
 }
 
-static void rna_def_world_stars(BlenderRNA *brna)
-{
-	StructRNA *srna;
-	PropertyRNA *prop;
-
-	srna = RNA_def_struct(brna, "WorldStarsSettings", NULL);
-	RNA_def_struct_sdna(srna, "World");
-	RNA_def_struct_nested(brna, srna, "World");
-	RNA_def_struct_ui_text(srna, "World Stars", "Stars settings for a World data-block");
-
-	prop = RNA_def_property(srna, "use_stars", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
-	RNA_def_property_ui_text(prop, "Use Stars", "Enable starfield generation");
-	RNA_def_property_update(prop, 0, "rna_World_stars_update");
-
-	prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
-	RNA_def_property_float_sdna(prop, NULL, "starsize");
-	RNA_def_property_range(prop, 0, 10);
-	RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars");
-	RNA_def_property_update(prop, 0, "rna_World_draw_update"); /* use normal update since this isn't visualized */
-
-	prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE);
-	RNA_def_property_float_sdna(prop, NULL, "starmindist");
-	RNA_def_property_range(prop, 0, 1000);
-	RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars");
-	RNA_def_property_update(prop, 0, "rna_World_stars_update");
-
-	prop = RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
-	RNA_def_property_float_sdna(prop, NULL, "stardist");
-	RNA_def_property_range(prop, 2, 1000);
-	RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars");
-	RNA_def_property_update(prop, 0, "rna_World_stars_update");
-
-	prop = RNA_def_property(srna, "color_random", PROP_FLOAT, PROP_NONE);
-	RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
-	RNA_def_property_range(prop, 0, 1);
-	RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors");
-	RNA_def_property_update(prop, 0, "rna_World_stars_update");
-}
-
 void RNA_def_world(BlenderRNA *brna)
 {
 	StructRNA *srna;
@@ -568,12 +516,6 @@ void RNA_def_world(BlenderRNA *brna)
 	RNA_def_property_pointer_funcs(prop, "rna_World_mist_get", NULL, NULL, NULL);
 	RNA_def_property_ui_text(prop, "Mist", "World mist settings");
 
-	prop = RNA_def_property(srna, "star_settings", PROP_POINTER, PROP_NONE);
-	RNA_def_property_flag(prop, PROP_NEVER_NULL);
-	RNA_def_property_struct_type(prop, "WorldStarsSettings");
-	RNA_def_property_pointer_funcs(prop, "rna_World_stars_get", NULL, NULL, NULL);
-	RNA_def_property_ui_text(prop, "Stars", "World stars settings");
-
 	/* nodes */
 	prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
 	RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
@@ -588,7 +530,6 @@ void RNA_def_world(BlenderRNA *brna)
 
 	rna_def_lighting(brna);
 	rna_def_world_mist(brna);
-	rna_def_world_stars(brna);
 	rna_def_world_mtex(brna);
 }
 
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index 79826a6..109524c 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -247,10 +247,6 @@ int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct
 /* do a full sample buffer compo */
 void RE_MergeFullSample(struct Render *re, struct Main *bmain, struct Scene *sce, struct bNodeTree *ntree);
 
-/* ancient stars function... go away! */
-void RE_make_stars(struct Render *re, struct Scene *scenev3d, void (*initfunc)(void),
-                   void (*vertexfunc)(const float *),  void (*termfunc)(void));
-
 /* display and event callbacks */
 void RE_display_init_cb	(struct Render *re, void *handle, void (*f)(void *handle, RenderResult *rr));
 void RE_display_clear_cb(struct Render *re, void *handle, void (*f)(void *handle, RenderResult *rr));
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index b4873e7..c5c804e 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -160,175 +160,6 @@ static HaloRen *initstar(Render *re, ObjectRen *obr, const f

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list