diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 40f2db6d4a4..6b21f886712 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -47,34 +47,6 @@ #include "WM_api.h" -static void rna_Scene_add_object(Scene *sce, ReportList *reports, Object *ob) -{ - Base *base= object_in_scene(ob, sce); - if (base) { - BKE_report(reports, RPT_ERROR, "Object is already in this scene."); - return; - } - base= scene_add_base(sce, ob); - ob->id.us++; - - /* this is similar to what object_add_type and add_object do */ - ob->lay= base->lay= sce->lay; - ob->recalc |= OB_RECALC; - - DAG_scene_sort(sce); -} - -static void rna_Scene_remove_object(Scene *sce, ReportList *reports, Object *ob) -{ - Base *base= object_in_scene(ob, sce); - if (!base) { - BKE_report(reports, RPT_ERROR, "Object is not in this scene."); - return; - } - /* as long as ED_base_object_free_and_unlink calls free_libblock_us, we don't have to decrement ob->id.us */ - ED_base_object_free_and_unlink(sce, base); -} - static void rna_Scene_set_frame(Scene *sce, bContext *C, int frame) { sce->r.cfra= frame; @@ -118,18 +90,6 @@ void RNA_api_scene(StructRNA *srna) FunctionRNA *func; PropertyRNA *parm; - func= RNA_def_function(srna, "add_object", "rna_Scene_add_object"); - RNA_def_function_ui_description(func, "Add object to scene."); - RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene."); - RNA_def_property_flag(parm, PROP_REQUIRED); - - func= RNA_def_function(srna, "remove_object", "rna_Scene_remove_object"); - RNA_def_function_ui_description(func, "Remove object from scene."); - RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene."); - RNA_def_property_flag(parm, PROP_REQUIRED); - func= RNA_def_function(srna, "set_frame", "rna_Scene_set_frame"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately."); |