2.5:
* Fix ANIM button, didn't work and was leaking memory. * Transform ops: Edition -> Editing.
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user