[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20578] branches/soc-2009-aligorith/source /blender: NLA SoC: Fixed merge errors.
Joshua Leung
aligorith at gmail.com
Tue Jun 2 11:58:06 CEST 2009
Revision: 20578
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20578
Author: aligorith
Date: 2009-06-02 11:58:06 +0200 (Tue, 02 Jun 2009)
Log Message:
-----------
NLA SoC: Fixed merge errors. Manually copied over any files from 2.5 that were modified in a commit by Brecht between the time when I had done the previous merge and the time when the commit for that finally got through.
Modified Paths:
--------------
branches/soc-2009-aligorith/source/blender/blenkernel/BKE_library.h
branches/soc-2009-aligorith/source/blender/blenkernel/intern/library.c
branches/soc-2009-aligorith/source/blender/editors/include/ED_object.h
branches/soc-2009-aligorith/source/blender/editors/include/UI_interface.h
branches/soc-2009-aligorith/source/blender/editors/interface/interface.c
branches/soc-2009-aligorith/source/blender/editors/interface/interface_api.c
branches/soc-2009-aligorith/source/blender/editors/interface/interface_handlers.c
branches/soc-2009-aligorith/source/blender/editors/interface/interface_utils.c
branches/soc-2009-aligorith/source/blender/editors/interface/interface_widgets.c
branches/soc-2009-aligorith/source/blender/editors/object/editconstraint.c
branches/soc-2009-aligorith/source/blender/editors/object/object_intern.h
branches/soc-2009-aligorith/source/blender/editors/object/object_modifier.c
branches/soc-2009-aligorith/source/blender/editors/object/object_ops.c
branches/soc-2009-aligorith/source/blender/editors/space_image/image_header.c
branches/soc-2009-aligorith/source/blender/editors/space_view3d/view3d_header.c
branches/soc-2009-aligorith/source/blender/makesrna/RNA_enum_types.h
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_constraint.c
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object.c
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_pose.c
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_sound.c
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_ui.c
branches/soc-2009-aligorith/source/blender/windowmanager/WM_types.h
Modified: branches/soc-2009-aligorith/source/blender/blenkernel/BKE_library.h
===================================================================
--- branches/soc-2009-aligorith/source/blender/blenkernel/BKE_library.h 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/blenkernel/BKE_library.h 2009-06-02 09:58:06 UTC (rev 20578)
@@ -45,6 +45,7 @@
void id_lib_extern(struct ID *id);
void id_us_plus(struct ID *id);
+void id_us_min(struct ID *id);
int check_for_dupid(struct ListBase *lb, struct ID *id, char *name);
int new_id(struct ListBase *lb, struct ID *id, const char *name);
Modified: branches/soc-2009-aligorith/source/blender/blenkernel/intern/library.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/blenkernel/intern/library.c 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/blenkernel/intern/library.c 2009-06-02 09:58:06 UTC (rev 20578)
@@ -142,6 +142,12 @@
}
}
+void id_us_min(ID *id)
+{
+ if(id)
+ id->us--;
+}
+
ListBase *wich_libbase(Main *mainlib, short type)
{
switch( type ) {
Modified: branches/soc-2009-aligorith/source/blender/editors/include/ED_object.h
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/include/ED_object.h 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/editors/include/ED_object.h 2009-06-02 09:58:06 UTC (rev 20578)
@@ -35,6 +35,7 @@
struct Base;
struct View3D;
struct bConstraint;
+struct bConstraintChannel;
struct KeyBlock;
struct Lattice;
struct Mesh;
@@ -71,9 +72,21 @@
int object_data_is_libdata(struct Object *ob);
/* constraints */
-struct bConstraint *add_new_constraint (short type);
-void add_constraint_to_object (struct bConstraint *con, struct Object *ob);
+struct bConstraint *add_new_constraint(short type);
+void add_constraint_to_object(struct bConstraint *con, struct Object *ob);
+struct ListBase *get_active_constraints(struct Object *ob);
+struct bConstraint *get_active_constraint(struct Object *ob);
+struct bConstraintChannel *get_active_constraint_channel(struct Scene *scene, struct Object *ob);
+
+void object_test_constraints(struct Object *ob);
+
+void ED_object_constraint_rename(struct Object *ob, struct bConstraint *con, char *oldname);
+void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con);
+int ED_object_constraint_delete(struct ReportList *reports, struct Object *ob, struct bConstraint *con);
+int ED_object_constraint_move_down(struct ReportList *reports, struct Object *ob, struct bConstraint *con);
+int ED_object_constraint_move_up(struct ReportList *reports, struct Object *ob, struct bConstraint *con);
+
/* editlattice.c */
void mouse_lattice(struct bContext *C, short mval[2], int extend);
void undo_push_lattice(struct bContext *C, char *name);
Modified: branches/soc-2009-aligorith/source/blender/editors/include/UI_interface.h
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/include/UI_interface.h 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/editors/include/UI_interface.h 2009-06-02 09:58:06 UTC (rev 20578)
@@ -189,6 +189,8 @@
#define FTPREVIEW (35<<9)
#define NUMABS (36<<9)
#define TOGBUT (37<<9)
+#define OPTION (38<<9)
+#define OPTIONN (39<<9)
#define BUTTYPE (63<<9)
/* Drawing
@@ -579,7 +581,8 @@
void uiTemplateHeader(uiLayout *layout, struct bContext *C);
void uiTemplateHeaderID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
char *newop, char *openop, char *unlinkop);
-uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
+uiLayout *uiTemplateModifier(uiLayout *layout, struct PointerRNA *ptr);
+uiLayout *uiTemplateConstraint(uiLayout *layout, struct PointerRNA *ptr);
void uiTemplatePreview(uiLayout *layout, struct ID *id);
/* items */
@@ -592,8 +595,8 @@
void uiItemStringO(uiLayout *layout, char *name, int icon, char *opname, char *propname, char *value);
void uiItemFullO(uiLayout *layout, char *name, int icon, char *idname, struct IDProperty *properties, int context);
-void uiItemR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int expand, int slider);
-void uiItemFullR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int expand, int slider);
+void uiItemR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int expand, int slider, int toggle);
+void uiItemFullR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int expand, int slider, int toggle);
void uiItemEnumR(uiLayout *layout, char *name, int icon, struct PointerRNA *ptr, char *propname, int value);
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, char *propname);
Modified: branches/soc-2009-aligorith/source/blender/editors/interface/interface.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/interface/interface.c 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/editors/interface/interface.c 2009-06-02 09:58:06 UTC (rev 20578)
@@ -679,7 +679,7 @@
value= ui_get_but_val(but);
- if( but->type==TOGN || but->type==ICONTOGN) true= 0;
+ if(ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) true= 0;
if( but->bit ) {
lvalue= (int)value;
@@ -700,10 +700,12 @@
case TOG3:
case BUT_TOGDUAL:
case ICONTOG:
+ case OPTION:
if(value!=but->hardmin) push= 1;
break;
case ICONTOGN:
case TOGN:
+ case OPTIONN:
if(value==0.0) push= 1;
break;
case ROW:
@@ -1509,8 +1511,13 @@
* custom collection too for bones, vertex groups, .. */
ui_rna_ID_collection(C, but, &ptr, &prop);
- if(prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr)) {
+ if(str == NULL || str[0] == '\0') {
+ memset(&rptr, 0, sizeof(rptr));
RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
+ return 11;
+ }
+ else if(prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr)) {
+ RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
return 1;
}
else
@@ -1989,7 +1996,7 @@
int ui_but_can_align(uiBut *but)
{
- return (but->type != LABEL);
+ return !ELEM3(but->type, LABEL, OPTION, OPTIONN);
}
static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr)
Modified: branches/soc-2009-aligorith/source/blender/editors/interface/interface_api.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/interface/interface_api.c 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/editors/interface/interface_api.c 2009-06-02 09:58:06 UTC (rev 20578)
@@ -89,7 +89,8 @@
parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
- RNA_def_boolean(func, "slider", 0, "", "Use slider for numeric values.");
+ RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values.");
+ RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values.");
func= RNA_def_function(srna, "items_enumR", "uiItemsEnumR");
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
@@ -198,13 +199,17 @@
RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
- parm= RNA_def_pointer(func, "context", "Context", "", "Current context.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Modifier data.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
RNA_def_function_return(func, parm);
+ func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Constraint data.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ RNA_def_function_return(func, parm);
+
func= RNA_def_function(srna, "template_preview", "uiTemplatePreview");
parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock.");
RNA_def_property_flag(parm, PROP_REQUIRED);
Modified: branches/soc-2009-aligorith/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/interface/interface_handlers.c 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/editors/interface/interface_handlers.c 2009-06-02 09:58:06 UTC (rev 20578)
@@ -364,7 +364,7 @@
if(value==0.0) push= 1;
else push= 0;
- if(but->type==TOGN || but->type==ICONTOGN) push= !push;
+ if(ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) push= !push;
ui_set_but_val(but, (double)push);
if(but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but);
}
@@ -566,6 +566,8 @@
case ICONTOGN:
case TOGN:
case BUT_TOGDUAL:
+ case OPTION:
+ case OPTIONN:
ui_apply_but_TOG(C, block, but, data);
break;
case ROW:
@@ -2672,6 +2674,8 @@
case ICONTOGN:
case TOGN:
case BUT_TOGDUAL:
+ case OPTION:
+ case OPTIONN:
retval= ui_do_but_TOG(C, but, data, event);
break;
#if 0
Modified: branches/soc-2009-aligorith/source/blender/editors/interface/interface_utils.c
===================================================================
--- branches/soc-2009-aligorith/source/blender/editors/interface/interface_utils.c 2009-06-02 09:40:24 UTC (rev 20577)
+++ branches/soc-2009-aligorith/source/blender/editors/interface/interface_utils.c 2009-06-02 09:58:06 UTC (rev 20578)
@@ -268,7 +268,7 @@
else if(icon)
but= uiDefIconTextButR(block, ICONTOG, 0, icon, name, x1, y1, x2, y2, ptr, propname, index, 0, 0, -1, -1, NULL);
else
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list