Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-02-04 00:24:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-02-04 00:24:48 +0300
commit9276a6f9fabcf4a3810e0bd57e15d807b41880d0 (patch)
treeecbd1b99ecd2d3fb480bc3d5971b366714c51012 /source/blender/src/editobject.c
parent33a23853e125ac586fbef8c8e86b9c7a4144c7eb (diff)
Added single user ipos option - useful when you make linked duplicates with many objects and want them a unique ipo.
Diffstat (limited to 'source/blender/src/editobject.c')
-rw-r--r--source/blender/src/editobject.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 6945573af71..62b9b4a9978 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -4337,6 +4337,29 @@ void single_obdata_users(int flag)
}
}
+void single_ipo_users(int flag)
+{
+ Object *ob;
+ Base *base;
+ Ipo *ma, *man;
+ ID *id;
+
+ base= FIRSTBASE;
+ while(base) {
+ ob= base->object;
+ if(ob->id.lib==NULL && (flag==0 || (base->flag & SELECT)) ) {
+ ob->recalc= OB_RECALC_DATA;
+
+ id= (ID *)ob->ipo;
+ if(id && id->us>1 && id->lib==NULL) {
+ ob->ipo= copy_ipo(ob->ipo);
+ id->us--;
+ ipo_idnew(ob->ipo); /* drivers */
+ }
+ }
+ base= base->next;
+ }
+}
void single_mat_users(int flag)
{
@@ -4517,7 +4540,7 @@ void single_user(void)
clear_id_newpoins();
- nr= pupmenu("Make Single User%t|Object|Object & ObData|Object & ObData & Materials+Tex|Materials+Tex");
+ nr= pupmenu("Make Single User%t|Object|Object & ObData|Object & ObData & Materials+Tex|Materials+Tex|Ipos");
if(nr>0) {
if(nr==1) single_object_users(1);
@@ -4535,6 +4558,10 @@ void single_user(void)
else if(nr==4) {
single_mat_users(1);
}
+ else if(nr==5) {
+ single_ipo_users(1);
+ }
+
clear_id_newpoins();