Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-20 13:00:54 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-20 13:00:54 +0300
commit3119eaf2844e2e5f2be6da74ddd06f0fa0626f9e (patch)
treecb5aa6ee6ff8e44e6e0b68511967e236cf3a247f /source/blender/makesrna/intern/rna_scene_api.c
parente7413bf791cfe1ede2bfbe5147e7b72b041c4ce8 (diff)
- dir() now works for collection functions
- group.objects.link/unlink use exceptions rather then return values - scene.add_object/remove_object --> scene.objects.link/unlink
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c40
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.");