diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-13 18:42:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-13 18:42:45 +0400 |
commit | f35efbc95af7bb85adeb19c451e492daf477683d (patch) | |
tree | 2477d6301022f832b5541556580c371511602e85 /source/blender/makesrna | |
parent | ab56b4b5b9226698483e662c17241b1274898126 (diff) |
- remove WM_operatortype_exists since its almost the same as WM_operatortype_find
- hopefully fix reported problem with MSVC.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 19 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 6 |
4 files changed, 22 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 8e7a2a8cab3..050f00b6a38 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -574,7 +574,7 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier) FunctionRNA *func; StructRNA *type; for(type= ptr->type; type; type= type->base) { - func= BLI_findstring_ptr(&type->functions, identifier, offsetof(FunctionRNA, identifier)); + func= (FunctionRNA *)BLI_findstring_ptr(&type->functions, identifier, offsetof(FunctionRNA, identifier)); if(func) { return func; } diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index cdab225f09c..b6563ec067d 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -57,22 +57,29 @@ static void rna_Mesh_update_data(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - DAG_id_flush_update(id, OB_RECALC_DATA); - WM_main_add_notifier(NC_GEOM|ND_DATA, id); + /* cheating way for importers to avoid slow updates */ + if(id->us > 0) { + DAG_id_flush_update(id, OB_RECALC_DATA); + WM_main_add_notifier(NC_GEOM|ND_DATA, id); + } } static void rna_Mesh_update_select(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - - WM_main_add_notifier(NC_GEOM|ND_SELECT, id); + /* cheating way for importers to avoid slow updates */ + if(id->us > 0) { + WM_main_add_notifier(NC_GEOM|ND_SELECT, id); + } } void rna_Mesh_update_draw(Main *bmain, Scene *scene, PointerRNA *ptr) { ID *id= ptr->id.data; - - WM_main_add_notifier(NC_GEOM|ND_DATA, id); + /* cheating way for importers to avoid slow updates */ + if(id->us > 0) { + WM_main_add_notifier(NC_GEOM|ND_DATA, id); + } } static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value) diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 700b817f7ce..1ed3adb24b3 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1059,13 +1059,14 @@ static void rna_def_particle_settings(BlenderRNA *brna) }; //TODO: names, tooltips +#if 0 static EnumPropertyItem rot_from_items[] = { {PART_ROT_KEYS, "KEYS", 0, "keys", ""}, {PART_ROT_ZINCR, "ZINCR", 0, "zincr", ""}, {PART_ROT_IINCR, "IINCR", 0, "iincr", ""}, {0, NULL, 0, NULL, NULL} }; - +#endif static EnumPropertyItem integrator_type_items[] = { {PART_INT_EULER, "EULER", 0, "Euler", ""}, {PART_INT_VERLET, "VERLET", 0, "Verlet", ""}, @@ -1433,11 +1434,13 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Particle_redo"); - //TODO: is this read only/internal? + // not used anywhere, why is this in DNA??? +#if 0 prop= RNA_def_property(srna, "rotate_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "rotfrom"); RNA_def_property_enum_items(prop, rot_from_items); RNA_def_property_ui_text(prop, "Rotate From", ""); +#endif prop= RNA_def_property(srna, "integrator", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, integrator_type_items); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index eeac6813f78..7bf2db486c4 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -361,7 +361,7 @@ static PointerRNA rna_Operator_properties_get(PointerRNA *ptr) static PointerRNA rna_OperatorTypeMacro_properties_get(PointerRNA *ptr) { wmOperatorTypeMacro *otmacro= (wmOperatorTypeMacro*)ptr->data; - wmOperatorType *ot = WM_operatortype_exists(otmacro->idname); + wmOperatorType *ot = WM_operatortype_find(otmacro->idname, TRUE); return rna_pointer_inherit_refine(ptr, ot->srna, otmacro->properties); } @@ -796,7 +796,7 @@ static StructRNA *rna_Operator_register(const bContext *C, ReportList *reports, /* check if we have registered this operator type before, and remove it */ { - wmOperatorType *ot= WM_operatortype_exists(dummyot.idname); + wmOperatorType *ot= WM_operatortype_find(dummyot.idname, TRUE); if(ot && ot->ext.srna) rna_Operator_unregister(C, ot->ext.srna); } @@ -865,7 +865,7 @@ static StructRNA *rna_MacroOperator_register(const bContext *C, ReportList *repo /* check if we have registered this operator type before, and remove it */ { - wmOperatorType *ot= WM_operatortype_exists(dummyot.idname); + wmOperatorType *ot= WM_operatortype_find(dummyot.idname, TRUE); if(ot && ot->ext.srna) rna_Operator_unregister(C, ot->ext.srna); } |