[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21488] branches/blender2.5/blender/source /blender: 2.5:
Brecht Van Lommel
brecht at blender.org
Fri Jul 10 15:56:29 CEST 2009
Revision: 21488
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21488
Author: blendix
Date: 2009-07-10 15:56:29 +0200 (Fri, 10 Jul 2009)
Log Message:
-----------
2.5:
* 3D view Object menu works again, many operators missing still
because they are not yet implemented.
* Constraint types now have separator, and fix too much spacing
in the constraints header.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/interface/interface.c
branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c
branches/blender2.5/blender/source/blender/editors/interface/interface_templates.c
branches/blender2.5/blender/source/blender/editors/object/editgroup.c
branches/blender2.5/blender/source/blender/editors/object/object_edit.c
branches/blender2.5/blender/source/blender/editors/object/object_intern.h
branches/blender2.5/blender/source/blender/editors/object/object_ops.c
branches/blender2.5/blender/source/blender/editors/space_view3d/view3d_header.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_constraint.c
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface.c 2009-07-10 12:42:17 UTC (rev 21487)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface.c 2009-07-10 13:56:29 UTC (rev 21488)
@@ -2124,7 +2124,7 @@
BLI_dynstr_appendf(dynstr, "%s%%t", RNA_property_ui_name(prop));
for(i=0; i<totitem; i++) {
if(!item[i].identifier[0])
- BLI_dynstr_appendf(dynstr, "|%l");
+ BLI_dynstr_append(dynstr, "|%l");
else if(item[i].icon)
BLI_dynstr_appendf(dynstr, "|%s %%i%d %%x%d", item[i].name, item[i].icon, item[i].value);
else
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c 2009-07-10 12:42:17 UTC (rev 21487)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_layout.c 2009-07-10 13:56:29 UTC (rev 21488)
@@ -559,12 +559,12 @@
if(prop) {
const EnumPropertyItem *item;
- int totitem, i;
- char *name;
+ int totitem;
+ const char *name;
RNA_property_enum_items(&ptr, prop, &item, &totitem);
if(RNA_enum_name(item, retval, &name))
- return name;
+ return (char*)name;
}
return "";
Modified: branches/blender2.5/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/interface/interface_templates.c 2009-07-10 12:42:17 UTC (rev 21487)
+++ branches/blender2.5/blender/source/blender/editors/interface/interface_templates.c 2009-07-10 13:56:29 UTC (rev 21488)
@@ -757,7 +757,7 @@
box= uiLayoutBox(col);
row= uiLayoutRow(box, 0);
- block= uiLayoutFreeBlock(box);
+ block= uiLayoutGetBlock(box);
subrow= uiLayoutRow(row, 0);
uiLayoutSetAlignment(subrow, UI_LAYOUT_ALIGN_LEFT);
@@ -772,27 +772,19 @@
uiDefIconButBitS(block, ICONTOG, CONSTRAINT_EXPAND, B_CONSTRAINT_TEST, ICON_TRIA_RIGHT, xco-10, yco, 20, 20, &con->flag, 0.0, 0.0, 0.0, 0.0, "Collapse/Expand Constraint");
/* name */
- if ((con->flag & CONSTRAINT_EXPAND) && (proxy_protected==0)) {
- /* XXX if (con->flag & CONSTRAINT_DISABLE)
- uiBlockSetCol(block, TH_REDALERT);*/
-
- uiBlockSetEmboss(block, UI_EMBOSS);
-
- uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
-
+ uiBlockSetEmboss(block, UI_EMBOSS);
+
+ /* XXX if (con->flag & CONSTRAINT_DISABLE)
+ uiBlockSetCol(block, TH_REDALERT);*/
+
+ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
+
+ if(proxy_protected == 0) {
but = uiDefBut(block, TEX, B_CONSTRAINT_TEST, "", xco+120, yco, 85, 18, con->name, 0.0, 29.0, 0.0, 0.0, "Constraint name");
uiButSetFunc(but, verify_constraint_name_func, con, NULL);
- }
- else {
- uiBlockSetEmboss(block, UI_EMBOSSN);
-
- /* XXX if (con->flag & CONSTRAINT_DISABLE)
- uiBlockSetCol(block, TH_REDALERT);*/
-
- uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
-
- uiDefBut(block, LABEL, B_CONSTRAINT_TEST, con->name, xco+120, yco-1, 135, 19, NULL, 0.0, 0.0, 0.0, 0.0, "");
}
+ else
+ uiDefBut(block, LABEL, B_CONSTRAINT_TEST, con->name, xco+120, yco-1, 135, 19, NULL, 0.0, 0.0, 0.0, 0.0, "");
// XXX uiBlockSetCol(block, TH_AUTO);
Modified: branches/blender2.5/blender/source/blender/editors/object/editgroup.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/object/editgroup.c 2009-07-10 12:42:17 UTC (rev 21487)
+++ branches/blender2.5/blender/source/blender/editors/object/editgroup.c 2009-07-10 13:56:29 UTC (rev 21488)
@@ -161,7 +161,7 @@
{
/* identifiers */
- ot->name= "Remove Selected From active group";
+ ot->name= "Remove Selected From Active Group";
ot->description = "Remove the object from an object group that contains the active object.";
ot->idname= "GROUP_OT_objects_remove_active";
Modified: branches/blender2.5/blender/source/blender/editors/object/object_edit.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/object/object_edit.c 2009-07-10 12:42:17 UTC (rev 21487)
+++ branches/blender2.5/blender/source/blender/editors/object/object_edit.c 2009-07-10 13:56:29 UTC (rev 21488)
@@ -704,8 +704,8 @@
{
/* identifiers */
- ot->name= "Delete Objects";
- ot->description = "Delete the object.";
+ ot->name= "Delete";
+ ot->description = "Delete selected objects.";
ot->idname= "OBJECT_OT_delete";
/* api callbacks */
@@ -1407,7 +1407,7 @@
void OBJECT_OT_parent_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear parent";
+ ot->name= "Clear Parent";
ot->description = "Clear the object's parenting.";
ot->idname= "OBJECT_OT_parent_clear";
@@ -1895,7 +1895,7 @@
{
/* identifiers */
- ot->name= "Clear Object Location";
+ ot->name= "Clear Location";
ot->description = "Clear the object's location.";
ot->idname= "OBJECT_OT_location_clear";
@@ -1939,7 +1939,7 @@
{
/* identifiers */
- ot->name= "Clear Object Rotation";
+ ot->name= "Clear Rotation";
ot->description = "Clear the object's rotation.";
ot->idname= "OBJECT_OT_rotation_clear";
@@ -1987,7 +1987,7 @@
{
/* identifiers */
- ot->name= "Clear Object Scale";
+ ot->name= "Clear Scale";
ot->description = "Clear the object's scale.";
ot->idname= "OBJECT_OT_scale_clear";
@@ -2033,7 +2033,7 @@
{
/* identifiers */
- ot->name= "Clear Object Origin";
+ ot->name= "Clear Origin";
ot->description = "Clear the object's origin.";
ot->idname= "OBJECT_OT_origin_clear";
@@ -2076,12 +2076,11 @@
{
/* identifiers */
- ot->name= "Clear restrict view";
+ ot->name= "Clear Restrict View";
ot->description = "Reveal the object by setting the restrictview flag.";
ot->idname= "OBJECT_OT_restrictview_clear";
/* api callbacks */
- ot->invoke= WM_operator_confirm;
ot->exec= object_restrictview_clear_exec;
ot->poll= ED_operator_view3d_active;
@@ -2089,19 +2088,14 @@
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static EnumPropertyItem prop_set_restrictview_types[] = {
- {0, "SELECTED", 0, "Selected", ""},
- {1, "UNSELECTED", 0, "Unselected ", ""},
- {0, NULL, 0, NULL, NULL}
-};
-
static int object_restrictview_set_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
short changed = 0;
+ int unselected= RNA_boolean_get(op->ptr, "unselected");
CTX_DATA_BEGIN(C, Base*, base, visible_bases) {
- if(RNA_enum_is_equal(op->ptr, "type", "SELECTED")){
+ if(!unselected) {
if (base->flag & SELECT){
base->flag &= ~SELECT;
base->object->flag = base->flag;
@@ -2112,7 +2106,7 @@
}
}
}
- else if (RNA_enum_is_equal(op->ptr, "type", "UNSELECTED")){
+ else {
if (!(base->flag & SELECT)){
base->object->restrictflag |= OB_RESTRICT_VIEW;
changed = 1;
@@ -2134,19 +2128,18 @@
void OBJECT_OT_restrictview_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Set restrict view";
+ ot->name= "Set Restrict View";
ot->description = "Hide the object by setting the restrictview flag.";
ot->idname= "OBJECT_OT_restrictview_set";
/* api callbacks */
- ot->invoke= WM_menu_invoke;
ot->exec= object_restrictview_set_exec;
ot->poll= ED_operator_view3d_active;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", prop_set_restrictview_types, 0, "Type", "");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects.");
}
/* ************* Slow Parent ******************* */
@@ -2643,7 +2636,7 @@
void OBJECT_OT_parent_set(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make parent";
+ ot->name= "Make Parent";
ot->description = "Set the object's parenting.";
ot->idname= "OBJECT_OT_parent_set";
@@ -2797,7 +2790,7 @@
}
-static int object_dupli_set_real_exec(bContext *C, wmOperator *op)
+static int object_duplicates_make_real_exec(bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
ScrArea *sa= CTX_wm_area(C);
@@ -2817,17 +2810,17 @@
return OPERATOR_FINISHED;
}
-void OBJECT_OT_dupli_set_real(wmOperatorType *ot)
+void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Dupli Real";
+ ot->name= "Make Duplicates Real";
ot->description = "Make dupli objects attached to this object real.";
- ot->idname= "OBJECT_OT_dupli_set_real";
+ ot->idname= "OBJECT_OT_duplicates_make_real";
/* api callbacks */
ot->invoke= WM_operator_confirm;
- ot->exec= object_dupli_set_real_exec;
+ ot->exec= object_duplicates_make_real_exec;
ot->poll= ED_operator_scene_editable;
@@ -5966,7 +5959,8 @@
{
Scene *scene= CTX_data_scene(C);
View3D *v3d= CTX_wm_view3d(C);
- int dupflag= U.dupflag;
+ int linked= RNA_boolean_get(op->ptr, "linked");
+ int dupflag= (linked)? 0: U.dupflag;
clear_id_newpoins();
clear_sca_new_poins(); /* sensor/contr/act */
@@ -6008,8 +6002,8 @@
{
/* identifiers */
- ot->name= "Duplicate Objects";
- ot->description = "Duplicate the objects.";
+ ot->name= "Duplicate";
+ ot->description = "Duplicate selected objects.";
ot->idname= "OBJECT_OT_duplicate";
/* api callbacks */
@@ -6022,6 +6016,7 @@
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* to give to transform */
+ RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data.");
RNA_def_int(ot->srna, "mode", TFM_TRANSLATION, 0, INT_MAX, "Mode", "", 0, INT_MAX);
}
Modified: branches/blender2.5/blender/source/blender/editors/object/object_intern.h
===================================================================
--- branches/blender2.5/blender/source/blender/editors/object/object_intern.h 2009-07-10 12:42:17 UTC (rev 21487)
+++ branches/blender2.5/blender/source/blender/editors/object/object_intern.h 2009-07-10 13:56:29 UTC (rev 21488)
@@ -59,7 +59,7 @@
void OBJECT_OT_slowparent_set(struct wmOperatorType *ot);
void OBJECT_OT_slowparent_clear(struct wmOperatorType *ot);
void OBJECT_OT_center_set(struct wmOperatorType *ot);
-void OBJECT_OT_dupli_set_real(struct wmOperatorType *ot);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list