diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-01-09 21:15:00 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-01-09 21:15:00 +0300 |
commit | bc1e26e4965877533902aa5d0e51537deeb319c4 (patch) | |
tree | 8a4426704e243638a0b74971d5297408491195fb /source | |
parent | e6f92e2b91db2c4cccf68e08af991043d3401ae6 (diff) |
Simplified the implementation of toggle buttons for folding/expanding
modifier boxes in the Parameter Editor mode UI.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/render/render_intern.h | 1 | ||||
-rw-r--r-- | source/blender/editors/render/render_ops.c | 1 | ||||
-rw-r--r-- | source/blender/editors/render/render_shading.c | 30 |
3 files changed, 0 insertions, 32 deletions
diff --git a/source/blender/editors/render/render_intern.h b/source/blender/editors/render/render_intern.h index 2924748013b..4339d07c7a9 100644 --- a/source/blender/editors/render/render_intern.h +++ b/source/blender/editors/render/render_intern.h @@ -60,7 +60,6 @@ void SCENE_OT_freestyle_linestyle_new(struct wmOperatorType *ot); void SCENE_OT_freestyle_color_modifier_add(struct wmOperatorType *ot); void SCENE_OT_freestyle_alpha_modifier_add(struct wmOperatorType *ot); void SCENE_OT_freestyle_thickness_modifier_add(struct wmOperatorType *ot); -void SCENE_OT_freestyle_modifier_toggle_fold(struct wmOperatorType *ot); void SCENE_OT_freestyle_modifier_remove(struct wmOperatorType *ot); void SCENE_OT_freestyle_modifier_move(struct wmOperatorType *ot); diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c index 42bc120eac4..8172144c8ac 100644 --- a/source/blender/editors/render/render_ops.c +++ b/source/blender/editors/render/render_ops.c @@ -67,7 +67,6 @@ void ED_operatortypes_render(void) WM_operatortype_append(SCENE_OT_freestyle_color_modifier_add); WM_operatortype_append(SCENE_OT_freestyle_alpha_modifier_add); WM_operatortype_append(SCENE_OT_freestyle_thickness_modifier_add); - WM_operatortype_append(SCENE_OT_freestyle_modifier_toggle_fold); WM_operatortype_append(SCENE_OT_freestyle_modifier_remove); WM_operatortype_append(SCENE_OT_freestyle_modifier_move); diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index bdb38557ae2..946281b02ab 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -1084,36 +1084,6 @@ void SCENE_OT_freestyle_thickness_modifier_add(wmOperatorType *ot) ot->prop= RNA_def_enum(ot->srna, "type", linestyle_thickness_modifier_type_items, 0, "Type", ""); } -static int freestyle_modifier_toggle_fold_exec(bContext *C, wmOperator *UNUSED(op)) -{ - Scene *scene= CTX_data_scene(C); - PointerRNA ptr= CTX_data_pointer_get_type(C, "modifier", &RNA_LineStyleModifier); - LineStyleModifier *modifier= ptr.data; - - if (modifier->flags & LS_MODIFIER_EXPANDED) - modifier->flags &= ~LS_MODIFIER_EXPANDED; - else - modifier->flags |= LS_MODIFIER_EXPANDED; - - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); - - return OPERATOR_FINISHED; -} - -void SCENE_OT_freestyle_modifier_toggle_fold(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "Toggle Modifier Fold"; - ot->idname= "SCENE_OT_freestyle_modifier_toggle_fold"; - ot->description="Fold/expand the modifier tab."; - - /* api callbacks */ - ot->exec= freestyle_modifier_toggle_fold_exec; - - /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; -} - static int freestyle_get_modifier_type(PointerRNA *ptr) { if (RNA_struct_is_a(ptr->type, &RNA_LineStyleColorModifier)) |