[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43604] trunk/blender: Fix #29935: missing cycles update/crash when removing world datablock form scene.
Brecht Van Lommel
brechtvanlommel at pandora.be
Sun Jan 22 14:56:50 CET 2012
Revision: 43604
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43604
Author: blendix
Date: 2012-01-22 13:56:39 +0000 (Sun, 22 Jan 2012)
Log Message:
-----------
Fix #29935: missing cycles update/crash when removing world datablock form scene.
Modified Paths:
--------------
trunk/blender/intern/cycles/blender/blender_object.cpp
trunk/blender/source/blender/makesrna/intern/rna_scene.c
trunk/blender/source/blender/quicktime/quicktime_export.h
Modified: trunk/blender/intern/cycles/blender/blender_object.cpp
===================================================================
--- trunk/blender/intern/cycles/blender/blender_object.cpp 2012-01-22 13:26:59 UTC (rev 43603)
+++ trunk/blender/intern/cycles/blender/blender_object.cpp 2012-01-22 13:56:39 UTC (rev 43604)
@@ -159,24 +159,26 @@
{
BL::World b_world = b_scene.world();
- PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles");
- bool sample_as_light = get_boolean(cworld, "sample_as_light");
+ if(b_world) {
+ PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles");
+ bool sample_as_light = get_boolean(cworld, "sample_as_light");
- if(sample_as_light) {
- /* test if we need to sync */
- Light *light;
- ObjectKey key(b_world, 0, b_world);
+ if(sample_as_light) {
+ /* test if we need to sync */
+ Light *light;
+ ObjectKey key(b_world, 0, b_world);
- if(light_map.sync(&light, b_world, b_world, key) ||
- world_recalc ||
- b_world.ptr.data != world_map)
- {
- light->type = LIGHT_BACKGROUND;
- light->map_resolution = get_int(cworld, "sample_map_resolution");
- light->shader = scene->default_background;
+ if(light_map.sync(&light, b_world, b_world, key) ||
+ world_recalc ||
+ b_world.ptr.data != world_map)
+ {
+ light->type = LIGHT_BACKGROUND;
+ light->map_resolution = get_int(cworld, "sample_map_resolution");
+ light->shader = scene->default_background;
- light->tag_update(scene);
- light_map.set_recalc(b_world);
+ light->tag_update(scene);
+ light_map.set_recalc(b_world);
+ }
}
}
Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c 2012-01-22 13:26:59 UTC (rev 43603)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c 2012-01-22 13:56:39 UTC (rev 43604)
@@ -3957,7 +3957,7 @@
prop= RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
- RNA_def_property_update(prop, NC_SCENE|ND_WORLD, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_WORLD, "rna_Scene_glsl_update");
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "cursor");
Modified: trunk/blender/source/blender/quicktime/quicktime_export.h
===================================================================
--- trunk/blender/source/blender/quicktime/quicktime_export.h 2012-01-22 13:26:59 UTC (rev 43603)
+++ trunk/blender/source/blender/quicktime/quicktime_export.h 2012-01-22 13:56:39 UTC (rev 43604)
@@ -50,10 +50,11 @@
} QuicktimeCodecTypeDesc ;
// quicktime movie output functions
+struct ImageFormatData;
struct RenderData;
+struct ReportList;
struct Scene;
struct wmOperatorType;
-struct ReportList;
int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports); //for movie handle (BKE writeavi.c now)
int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, struct ReportList *reports);
More information about the Bf-blender-cvs
mailing list