diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 16:13:13 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 16:13:13 +0400 |
commit | 385c72f5f26ae9c86bf40c127c44216ceea0e6c1 (patch) | |
tree | 6c0432578abee5437adc94e96b5a91c593b866b4 /source/blender/makesrna/intern/rna_object_api.c | |
parent | 5841d1c8145ba50addeb17fa0231705d949d8b3d (diff) | |
parent | b5ce1b1a23a3befbcc4cd3c67a5ec6a76d77aa5a (diff) |
Merged changes in the trunk up to revision 55546.
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript
Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 2b7df1ca317..7715dfa64de 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -76,6 +76,8 @@ static EnumPropertyItem space_items[] = { #include "BKE_object.h" #include "BKE_report.h" +#include "ED_object.h" + #include "DNA_curve_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -393,6 +395,13 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result) } #endif /* NDEBUG */ +static int rna_Object_update_from_editmode(Object *ob) +{ + if (ob->mode & OB_MODE_EDIT) { + return ED_object_editmode_load(ob); + } + return false; +} #else /* RNA_RUNTIME */ void RNA_api_object(StructRNA *srna) @@ -567,6 +576,11 @@ void RNA_api_object(StructRNA *srna) RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */ RNA_def_function_output(func, parm); #endif /* NDEBUG */ + + func = RNA_def_function(srna, "update_from_editmode", "rna_Object_update_from_editmode"); + RNA_def_function_ui_description(func, "Load the objects edit-mode data intp the object data"); + parm = RNA_def_boolean(func, "result", 0, "", "Success"); + RNA_def_function_return(func, parm); } |