svn merge -r 21508:22111 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
[blender.git] / source / blender / makesrna / intern / rna_scene.c
index 22f6bff2cc479bfa54e2094cc3d8650f7ef94859..4985d26f03977a595ced5e25ef5abce6ec2373a2 100644 (file)
@@ -927,6 +927,19 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
                {256, "OCTREE_RES_256", 0, "256", ""},
                {512, "OCTREE_RES_512", 0, "512", ""},
                {0, NULL, 0, NULL, NULL}};
+
+       static EnumPropertyItem raytrace_structure_items[] = {
+               {R_RAYSTRUCTURE_HIER_BVH_BVH, "{R_RAYSTRUCTURE_HIER_BVH_BVH", 0, "BVH of BVH's", "Create a BVH of objects (each object has it own BVH)"},
+               {R_RAYSTRUCTURE_HIER_BVH_OCTREE, "{R_RAYSTRUCTURE_HIER_BVH_OCTREE", 0, "BVH of octree", "Create a BVH of objects (each object has it own octree)"},
+               {R_RAYSTRUCTURE_SINGLE_BVH, "{R_RAYSTRUCTURE_SINGLE_BVH", 0, "Single BVH", "BVH of all primitives (no instance support)"},
+               {R_RAYSTRUCTURE_SINGLE_OCTREE, "{R_RAYSTRUCTURE_SINGLE_OCTREE", 0, "Octree", "Octree of all primitives (no instance support)"},
+               {0, NULL, 0, NULL, NULL}};
+
+       static EnumPropertyItem raytrace_tree_type_items[] = {
+               {R_RAYTRACE_TREE_BVH, "{R_RAYTRACE_TREE_BVH", 0, "BVH", "rayobject_bvh.c"},
+               {R_RAYTRACE_TREE_BLIBVH, "{R_RAYTRACE_TREE_BLIBVH", 0, "BLIbvh", "rayobject_blibvh.c"},
+               {R_RAYTRACE_TREE_BIH, "{R_RAYSTRUCTURE_SINGLE_BVH", 0, "BIH", "rayobject_bih.c"},
+               {0, NULL, 0, NULL, NULL}};
                
        static EnumPropertyItem fixed_oversample_items[] = {
                {5, "OVERSAMPLE_5", 0, "5", ""},
@@ -1338,6 +1351,18 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
        RNA_def_property_enum_items(prop, octree_resolution_items);
        RNA_def_property_ui_text(prop, "Octree Resolution", "Resolution of raytrace accelerator. Use higher resolutions for larger scenes.");
        RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+       prop= RNA_def_property(srna, "raytrace_structure", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "raystructure");
+       RNA_def_property_enum_items(prop, raytrace_structure_items);
+       RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure.");
+       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+       prop= RNA_def_property(srna, "raytrace_tree_type", PROP_ENUM, PROP_NONE);
+       RNA_def_property_enum_sdna(prop, NULL, "raytrace_tree_type");
+       RNA_def_property_enum_items(prop, raytrace_tree_type_items);
+       RNA_def_property_ui_text(prop, "Raytrace tree type", "Type of raytrace accelerator structure.");
+       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
        
        prop= RNA_def_property(srna, "antialiasing", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
@@ -1639,11 +1664,13 @@ void RNA_def_scene(BlenderRNA *brna)
        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_WORLD, NULL);
 
        prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_VECTOR);
        RNA_def_property_float_sdna(prop, NULL, "cursor");
        RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
        RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
        
        /* Bases/Objects */
        prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);