diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-30 22:26:58 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-30 22:26:58 +0400 |
commit | 54ddfe1c4857ee4c6ad62c242b48a48fb0eff559 (patch) | |
tree | f48fcec6c65f28d92ef48f2acfb21b066ba4b334 /source/blender | |
parent | dbdb5893b2e46ce035ae6811a7fa7fb8811ae2d5 (diff) |
2.5:
* Fix ANIM button, didn't work and was leaking memory.
* Transform ops: Edition -> Editing.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_scene.c | 5 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 20 |
3 files changed, 23 insertions, 16 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 5ede83fafd6..00353406283 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -294,14 +294,22 @@ static void ui_item_buts(uiBlock *block, uiItem *item, int x, int y, int w, int else if(item->type == ITEM_OPERATOR) { /* operator */ uiItemOp *opitem= (uiItemOp*)item; + uiBut *but; if(item->icon && item->name) - uiDefIconTextButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, (char*)item->name, x, y, w, h, NULL); + but= uiDefIconTextButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, (char*)item->name, x, y, w, h, NULL); else if(item->icon) - uiDefIconButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, x, y, w, h, NULL); + but= uiDefIconButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, x, y, w, h, NULL); /* text only */ else - uiDefButO(block, BUT, opitem->ot->idname, opitem->context, (char*)item->name, x, y, w, h, NULL); + but= uiDefButO(block, BUT, opitem->ot->idname, opitem->context, (char*)item->name, x, y, w, h, NULL); + + if(but && opitem->properties) { + /* assign properties */ + PointerRNA *opptr= uiButGetOperatorPtrRNA(but); + opptr->data= opitem->properties; + opitem->properties= NULL; + } } else if(item->type == ITEM_MENU) { /* menu */ diff --git a/source/blender/editors/space_buttons/buttons_scene.c b/source/blender/editors/space_buttons/buttons_scene.c index 25afaa6928c..5ae894d6660 100644 --- a/source/blender/editors/space_buttons/buttons_scene.c +++ b/source/blender/editors/space_buttons/buttons_scene.c @@ -277,15 +277,14 @@ static void render_panel_render(const bContext *C, Panel *pnl) { uiLayout *layout= pnl->layout; Scene *scene= CTX_data_scene(C); - PointerRNA sceneptr, renderptr, animptr; + PointerRNA sceneptr, renderptr; RNA_id_pointer_create(&scene->id, &sceneptr); renderptr = RNA_pointer_get(&sceneptr, "render_data"); - WM_operator_properties_create(&animptr, "SCREEN_OT_render"); uiTemplateColumn(layout); uiItemO(layout, UI_TSLOT_COLUMN_1, "RENDER", ICON_SCENE, "SCREEN_OT_render"); - uiItemR(layout, UI_TSLOT_COLUMN_2, "ANIM", 0, &animptr, "anim"); + uiItemBooleanO(layout, UI_TSLOT_COLUMN_2, "ANIM", 0, "SCREEN_OT_render", "anim", 1); uiTemplateColumn(layout); uiItemR(layout, UI_TSLOT_COLUMN_1, "Sfra", 0, &sceneptr, "start_frame"); diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index a45af971d01..f5a581fc4fd 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -267,7 +267,7 @@ static int transform_invoke(bContext *C, wmOperator *op, wmEvent *event) void Properties_Proportional(struct wmOperatorType *ot) { - RNA_def_enum(ot->srna, "proportional", proportional_mode_types, 0, "Proportional Edition", ""); + RNA_def_enum(ot->srna, "proportional", proportional_mode_types, 0, "Proportional Editing", ""); RNA_def_enum(ot->srna, "proportional_editing_falloff", prop_mode_items, 0, "Proportional Editing Falloff", "Falloff type for proportional editing mode."); RNA_def_float(ot->srna, "proportional_size", 1, 0, FLT_MAX, "Proportional Size", "", 0, 100); } @@ -309,7 +309,7 @@ void TFM_OT_translation(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); @@ -334,7 +334,7 @@ void TFM_OT_resize(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); @@ -359,7 +359,7 @@ void TFM_OT_rotation(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); @@ -384,7 +384,7 @@ void TFM_OT_tilt(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); Properties_Constraints(ot); } @@ -407,7 +407,7 @@ void TFM_OT_warp(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); // XXX Shear axis? // Properties_Constraints(ot); @@ -431,7 +431,7 @@ void TFM_OT_shear(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); // XXX Shear axis? // Properties_Constraints(ot); @@ -455,7 +455,7 @@ void TFM_OT_shrink_fatten(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); } void TFM_OT_tosphere(struct wmOperatorType *ot) @@ -476,7 +476,7 @@ void TFM_OT_tosphere(struct wmOperatorType *ot) Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); } void TFM_OT_transform(struct wmOperatorType *ot) @@ -528,7 +528,7 @@ void TFM_OT_transform(struct wmOperatorType *ot) RNA_def_float_vector(ot->srna, "value", 4, NULL, -FLT_MAX, FLT_MAX, "Values", "", -FLT_MAX, FLT_MAX); Properties_Proportional(ot); - RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Edition", ""); + RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", ""); RNA_def_int(ot->srna, "constraint_orientation", 0, 0, INT_MAX, "Constraint Orientation", "", 0, INT_MAX); |