remove operators PARTICLE_OT_brush_set and PARTICLE_OT_edit_type_set, rna data access...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 11 Jan 2010 13:54:00 +0000 (13:54 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 11 Jan 2010 13:54:00 +0000 (13:54 +0000)
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_intern.h
source/blender/editors/physics/physics_ops.c
source/blender/makesrna/intern/rna_sculpt_paint.c

index 8a73dc0e05000a33aa7dfc7dbd36c02d6e276ac6..c510a28b7ad5f10863a6c3af730568b5b5e9dbb0 100644 (file)
@@ -2695,79 +2695,6 @@ void PARTICLE_OT_mirror(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-/*********************** set brush operator **********************/
-
-static EnumPropertyItem brush_type_items[]= {
-       {PE_BRUSH_NONE, "NONE", 0, "None", ""},
-       {PE_BRUSH_COMB, "COMB", 0, "Comb", ""},
-       {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", ""},
-       {PE_BRUSH_ADD, "ADD", 0, "Add", ""},
-       {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", ""},
-       {PE_BRUSH_PUFF, "PUFF", 0, "Puff", ""},
-       {PE_BRUSH_CUT, "CUT", 0, "Cut", ""},
-       {0, NULL, 0, NULL, NULL}
-};
-
-static int set_brush_exec(bContext *C, wmOperator *op)
-{
-       Scene *scene= CTX_data_scene(C);
-       ParticleEditSettings *pset= PE_settings(scene);
-
-       pset->brushtype= RNA_enum_get(op->ptr, "type");
-
-       return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_brush_set(wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Set Brush";
-       ot->idname= "PARTICLE_OT_brush_set";
-       
-       /* api callbacks */
-       ot->exec= set_brush_exec;
-       ot->invoke= WM_menu_invoke;
-       ot->poll= PE_poll;
-
-       /* properties */
-       RNA_def_enum(ot->srna, "type", brush_type_items, PE_BRUSH_NONE, "Type", "Brush type to select for editing.");
-}
-
-
-/*********************** set mode operator **********************/
-
-static EnumPropertyItem edit_type_items[]= {
-       {PE_TYPE_PARTICLES, "PARTICLES", 0, "Particles", ""},
-       {PE_TYPE_SOFTBODY, "SOFTBODY", 0, "Soft body", ""},
-       {PE_TYPE_CLOTH, "CLOTH", 0, "Cloth", ""},
-       {0, NULL, 0, NULL, NULL}
-};
-
-static int set_edit_mode_exec(bContext *C, wmOperator *op)
-{
-       Scene *scene= CTX_data_scene(C);
-       ParticleEditSettings *pset= PE_settings(scene);
-
-       pset->edittype= RNA_enum_get(op->ptr, "type");
-
-       return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_edit_type_set(wmOperatorType *ot)
-{
-       /* identifiers */
-       ot->name= "Set Edit Type";
-       ot->idname= "PARTICLE_OT_edit_type_set";
-       
-       /* api callbacks */
-       ot->exec= set_edit_mode_exec;
-       ot->invoke= WM_menu_invoke;
-       ot->poll= PE_poll;
-
-       /* properties */
-       RNA_def_enum(ot->srna, "type", edit_type_items, PE_TYPE_PARTICLES, "Type", "Edit type to select for editing.");
-}
-
 /************************* brush edit callbacks ********************/
 
 static void brush_comb(PEData *data, float mat[][4], float imat[][4], int point_index, int key_index, PTCacheEditKey *key)
index e1b1a8b90a8dc3a462e7033437d858ca850cd93a..cc0a288f8be3f128f7387e720de99b932da9f8bd 100644 (file)
@@ -53,7 +53,6 @@ void PARTICLE_OT_remove_doubles(struct wmOperatorType *ot);
 void PARTICLE_OT_delete(struct wmOperatorType *ot);
 void PARTICLE_OT_mirror(struct wmOperatorType *ot);
 
-void PARTICLE_OT_brush_set(struct wmOperatorType *ot);
 void PARTICLE_OT_brush_edit(struct wmOperatorType *ot);
 void PARTICLE_OT_brush_radial_control(struct wmOperatorType *ot);
 
index 24b3881d6b8cd09e338558e9c5c78bc197ebbeca..5cb8230e463d31d397d824847d108b228bbd2706 100644 (file)
@@ -60,7 +60,6 @@ static void operatortypes_particle(void)
        WM_operatortype_append(PARTICLE_OT_delete);
        WM_operatortype_append(PARTICLE_OT_mirror);
 
-       WM_operatortype_append(PARTICLE_OT_brush_set);
        WM_operatortype_append(PARTICLE_OT_brush_edit);
        WM_operatortype_append(PARTICLE_OT_brush_radial_control);
 
index 99bee9413cda309e30c45af04bf7606b9cb0f6c8..528d61271f530cd62a02cf991483b3892f179ad5 100644 (file)
@@ -36,7 +36,7 @@
 
 #include "WM_types.h"
 
-static EnumPropertyItem particle_edit_hair_brush_items[] = {
+EnumPropertyItem particle_edit_hair_brush_items[] = {
        {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush."},
        {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs."},
        {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs."},