[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19473] branches/blender2.5/blender/source /blender/editors: 2.5:
Brecht Van Lommel
brecht at blender.org
Mon Mar 30 20:26:58 CEST 2009
Revision: 19473
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19473
Author: blendix
Date: 2009-03-30 20:26:58 +0200 (Mon, 30 Mar 2009)
Log Message:
-----------
2.5:
* Fix ANIM button, didn't work and was leaking memory.
* Transform ops: Edition -> Editing.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c
branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_scene.c
branches/blender2.5/blender/source/blender/editors/transform/transform_ops.c
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c 2009-03-30 18:21:17 UTC (rev 19472)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c 2009-03-30 18:26:58 UTC (rev 19473)
@@ -294,14 +294,22 @@
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 */
Modified: branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_scene.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_scene.c 2009-03-30 18:21:17 UTC (rev 19472)
+++ branches/blender2.5/blender/source/blender/editors/space_buttons/buttons_scene.c 2009-03-30 18:26:58 UTC (rev 19473)
@@ -277,15 +277,14 @@
{
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");
Modified: branches/blender2.5/blender/source/blender/editors/transform/transform_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/transform/transform_ops.c 2009-03-30 18:21:17 UTC (rev 19472)
+++ branches/blender2.5/blender/source/blender/editors/transform/transform_ops.c 2009-03-30 18:26:58 UTC (rev 19473)
@@ -267,7 +267,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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);
More information about the Bf-blender-cvs
mailing list