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>2007-09-18 10:41:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-09-18 10:41:29 +0400
commit0a2b8b13089ef479d4a2d135b567410c8a5e6ab5 (patch)
tree3377b2bd39b6e7c2e3ce302a3bb01d7b2ddfbe25 /source/blender/python/api2_2x
parentd86a03113d24904dd4b6227f16431eb6735aa5d7 (diff)
A user submitted a BVH file that took a long time to import (I didnt end up finishing since it was so slow)
this is mainly because adding pose keyframes recalculates every handle so importing became increasingly slow. added a 'fast' argument to insertkey that python api's insertPoseKey can make use of since it alredy accepts a 'fast' option. The ~4450 frame, 31 bone BVH imports in ~108sec now Seperated editmode switch statement in space.c's event handling, if editmode is disabled, or the images is a render or composite, UV editing operations are ignored. In previous releases it has given an annoying warning if selecting or scaling is attempted when out of UV/Face mode.
Diffstat (limited to 'source/blender/python/api2_2x')
-rw-r--r--source/blender/python/api2_2x/Camera.c6
-rw-r--r--source/blender/python/api2_2x/Constraint.c4
-rw-r--r--source/blender/python/api2_2x/Ipo.c2
-rw-r--r--source/blender/python/api2_2x/Ipocurve.c4
-rw-r--r--source/blender/python/api2_2x/Lamp.c22
-rw-r--r--source/blender/python/api2_2x/Material.c72
-rw-r--r--source/blender/python/api2_2x/Object.c70
-rw-r--r--source/blender/python/api2_2x/Pose.c30
-rw-r--r--source/blender/python/api2_2x/World.c42
9 files changed, 128 insertions, 124 deletions
diff --git a/source/blender/python/api2_2x/Camera.c b/source/blender/python/api2_2x/Camera.c
index 23e6880bbfe..f6b443e5d06 100644
--- a/source/blender/python/api2_2x/Camera.c
+++ b/source/blender/python/api2_2x/Camera.c
@@ -1040,11 +1040,11 @@ static PyObject *Camera_insertIpoKey( BPy_Camera * self, PyObject * args )
"expected int argument" ) );
if (key == IPOKEY_LENS){
- insertkey((ID *)self->camera, ID_CA, NULL, NULL, CAM_LENS);
+ insertkey((ID *)self->camera, ID_CA, NULL, NULL, CAM_LENS, 0);
}
else if (key == IPOKEY_CLIPPING){
- insertkey((ID *)self->camera, ID_CA, NULL, NULL, CAM_STA);
- insertkey((ID *)self->camera, ID_CA, NULL, NULL, CAM_END);
+ insertkey((ID *)self->camera, ID_CA, NULL, NULL, CAM_STA, 0);
+ insertkey((ID *)self->camera, ID_CA, NULL, NULL, CAM_END, 0);
}
allspace(REMAKEIPO, 0);
diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c
index 1bd303a5126..0e235082c61 100644
--- a/source/blender/python/api2_2x/Constraint.c
+++ b/source/blender/python/api2_2x/Constraint.c
@@ -431,9 +431,9 @@ static PyObject *Constraint_insertKey( BPy_Constraint * self, PyObject * value )
"cannot get a curve from this IPO, may be using libdata" );
if( ob->action )
- insert_vert_icu( icu, get_action_frame(ob, cfra), con->enforce);
+ insert_vert_icu( icu, get_action_frame(ob, cfra), con->enforce, 0);
else
- insert_vert_icu( icu, cfra, con->enforce);
+ insert_vert_icu( icu, cfra, con->enforce, 0);
Py_RETURN_NONE;
}
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c
index e3bef1468dc..9b2fd082bee 100644
--- a/source/blender/python/api2_2x/Ipo.c
+++ b/source/blender/python/api2_2x/Ipo.c
@@ -1483,7 +1483,7 @@ static int Ipo_setIpoCurveByName( BPy_Ipo * self, PyObject * key,
icu->flag |= IPO_VISIBLE|IPO_AUTO_HORIZ;
set_icu_vars( icu );
BLI_addtail( &(ipo->curve), icu);
- insert_vert_icu( icu, time, curval );
+ insert_vert_icu( icu, time, curval, 0);
allspace( REMAKEIPO, 0 );
EXPP_allqueue( REDRAWIPO, 0 );
diff --git a/source/blender/python/api2_2x/Ipocurve.c b/source/blender/python/api2_2x/Ipocurve.c
index 383826d8938..b8f3c3f6dd0 100644
--- a/source/blender/python/api2_2x/Ipocurve.c
+++ b/source/blender/python/api2_2x/Ipocurve.c
@@ -531,7 +531,7 @@ static PyObject *IpoCurve_append( C_IpoCurve * self, PyObject * value )
Py_DECREF( xobj );
y = (float)PyFloat_AsDouble( yobj );
Py_DECREF( yobj );
- insert_vert_icu( icu, x, y);
+ insert_vert_icu( icu, x, y, 0);
}
Py_RETURN_NONE;
@@ -745,7 +745,7 @@ static int IpoCurve_setCurval( C_IpoCurve * self, PyObject * key,
/* insert a key at the specified time */
- insert_vert_icu( self->ipocurve, time, curval );
+ insert_vert_icu( self->ipocurve, time, curval, 0);
allspace(REMAKEIPO, 0);
return 0;
}
diff --git a/source/blender/python/api2_2x/Lamp.c b/source/blender/python/api2_2x/Lamp.c
index fc8a7809de1..d40cc5a2cfc 100644
--- a/source/blender/python/api2_2x/Lamp.c
+++ b/source/blender/python/api2_2x/Lamp.c
@@ -1287,25 +1287,25 @@ static PyObject *Lamp_insertIpoKey( BPy_Lamp * self, PyObject * args )
map = texchannel_to_adrcode(self->lamp->texact);
if (key == IPOKEY_RGB ) {
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL, LA_COL_R);
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_COL_G);
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_COL_B);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL, LA_COL_R, 0);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_COL_G, 0);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_COL_B, 0);
}
if (key == IPOKEY_ENERGY ) {
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_ENERGY);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_ENERGY, 0);
}
if (key == IPOKEY_SPOTSIZE ) {
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_SPOTSI);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL,LA_SPOTSI, 0);
}
if (key == IPOKEY_OFFSET ) {
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_OFS_X);
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_OFS_Y);
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_OFS_Z);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_OFS_X, 0);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_OFS_Y, 0);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_OFS_Z, 0);
}
if (key == IPOKEY_SIZE ) {
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_SIZE_X);
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_SIZE_Y);
- insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_SIZE_Z);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_SIZE_X, 0);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_SIZE_Y, 0);
+ insertkey((ID *)self->lamp, ID_LA, NULL, NULL, map+MAP_SIZE_Z, 0);
}
allspace(REMAKEIPO, 0);
diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c
index 8eb716b1aee..851a46d51e5 100644
--- a/source/blender/python/api2_2x/Material.c
+++ b/source/blender/python/api2_2x/Material.c
@@ -1691,58 +1691,58 @@ static PyObject *Material_insertIpoKey( BPy_Material * self, PyObject * args )
map = texchannel_to_adrcode(self->material->texact);
if(key==IPOKEY_RGB || key==IPOKEY_ALLCOLOR) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_COL_R);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_COL_G);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_COL_B);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_COL_R, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_COL_G, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_COL_B, 0);
}
if(key==IPOKEY_ALPHA || key==IPOKEY_ALLCOLOR) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_ALPHA);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_ALPHA, 0);
}
if(key==IPOKEY_HALOSIZE || key==IPOKEY_ALLCOLOR) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_HASIZE);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_HASIZE, 0);
}
if(key==IPOKEY_MODE || key==IPOKEY_ALLCOLOR) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_MODE);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_MODE, 0);
}
if(key==IPOKEY_ALLCOLOR) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC_R);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC_G);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC_B);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_REF);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_EMIT);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_AMB);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_HARD);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_MODE);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_TRANSLU);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_ADD);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC_R, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC_G, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC_B, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_REF, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_EMIT, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_AMB, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_SPEC, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_HARD, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_MODE, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_TRANSLU, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_ADD, 0);
}
if(key==IPOKEY_ALLMIRROR) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_RAYM);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESMIR);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESMIRI);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESTRA);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESTRAI);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_RAYM, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESMIR, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESMIRI, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESTRA, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, MA_FRESTRAI, 0);
}
if(key==IPOKEY_OFS || key==IPOKEY_ALLMAPPING) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_OFS_X);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_OFS_Y);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_OFS_Z);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_OFS_X, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_OFS_Y, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_OFS_Z, 0);
}
if(key==IPOKEY_SIZE || key==IPOKEY_ALLMAPPING) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_SIZE_X);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_SIZE_Y);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_SIZE_Z);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_SIZE_X, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_SIZE_Y, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_SIZE_Z, 0);
}
if(key==IPOKEY_ALLMAPPING) {
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_R);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_G);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_B);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_DVAR);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_COLF);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_NORF);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_VARF);
- insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_DISP);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_R, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_G, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_B, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_DVAR, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_COLF, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_NORF, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_VARF, 0);
+ insertkey((ID *)self->material, ID_MA, NULL, NULL, map+MAP_DISP, 0);
}
allspace(REMAKEIPO, 0);
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index 730ae6c0726..e62f685cdf5 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -2358,31 +2358,31 @@ static PyObject *Object_insertIpoKey( BPy_Object * self, PyObject * args )
actname= "Object";
if (key == IPOKEY_LOC || key == IPOKEY_LOCROT || key == IPOKEY_LOCROTSIZE){
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_LOC_X);
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_LOC_Y);
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_LOC_Z);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_LOC_X, 0);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_LOC_Y, 0);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_LOC_Z, 0);
}
if (key == IPOKEY_ROT || key == IPOKEY_LOCROT || key == IPOKEY_LOCROTSIZE){
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_ROT_X);
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_ROT_Y);
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_ROT_Z);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_ROT_X, 0);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_ROT_Y, 0);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_ROT_Z, 0);
}
if (key == IPOKEY_SIZE || key == IPOKEY_LOCROTSIZE ){
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_SIZE_X);
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_SIZE_Y);
- insertkey((ID *)ob, ID_OB, actname, NULL,OB_SIZE_Z);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_SIZE_X, 0);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_SIZE_Y, 0);
+ insertkey((ID *)ob, ID_OB, actname, NULL,OB_SIZE_Z, 0);
}
if (key == IPOKEY_PI_STRENGTH ){
- insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_FSTR);
+ insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_FSTR, 0);
} else if (key == IPOKEY_PI_FALLOFF ){
- insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_FFALL);
+ insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_FFALL, 0);
} else if (key == IPOKEY_PI_SURFACEDAMP ){
- insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_SDAMP);
+ insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_SDAMP, 0);
} else if (key == IPOKEY_PI_RANDOMDAMP ){
- insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_RDAMP);
+ insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_RDAMP, 0);
} else if (key == IPOKEY_PI_PERM ){
- insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_PERM);
+ insertkey((ID *)ob, ID_OB, actname, NULL, OB_PD_PERM, 0);
}
allspace(REMAKEIPO, 0);
@@ -2425,16 +2425,16 @@ static PyObject *Object_insertPoseKey( BPy_Object * self, PyObject * args )
/* XXX: must check chanName actually exists, otherwise segfaults! */
//achan = get_action_channel(sourceact->action, chanName);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_X);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Y);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Z);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_X);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Y);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Z);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_W);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_X);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Y);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Z);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_X, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Y, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Z, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_X, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Y, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Z, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_W, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_X, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Y, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Z, 0);
G.scene->r.cfra = oldframe;
@@ -2471,16 +2471,16 @@ static PyObject *Object_insertCurrentPoseKey( BPy_Object * self, PyObject * args
/* XXX: must check chanName actually exists, otherwise segfaults! */
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_X);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Y);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Z);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_X);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Y);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Z);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_W);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_X);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Y);
- insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Z);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_X, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Y, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_LOC_Z, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_X, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Y, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_Z, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_QUAT_W, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_X, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Y, 0);
+ insertkey(&ob->id, ID_PO, chanName, NULL, AC_SIZE_Z, 0);
G.scene->r.cfra = oldframe;
@@ -2517,7 +2517,7 @@ static PyObject *Object_setConstraintInfluenceForBone( BPy_Object * self,
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
"cannot get a curve from this IPO, may be using libdata" );
- insert_vert_icu(icu, (float)CFRA, influence);
+ insert_vert_icu(icu, (float)CFRA, influence, 0);
self->object->recalc |= OB_RECALC_OB;
Py_RETURN_NONE;
diff --git a/source/blender/python/api2_2x/Pose.c b/source/blender/python/api2_2x/Pose.c
index 47ae96b2286..34807c4a85c 100644
--- a/source/blender/python/api2_2x/Pose.c
+++ b/source/blender/python/api2_2x/Pose.c
@@ -422,7 +422,11 @@ static PyObject *PoseBone_insertKey(BPy_PoseBone *self, PyObject *args)
if (!PyArg_ParseTuple(args, "O!i|Oi", &Object_Type, &parent_object, &frame, &constants, &no_ipo_update ))
goto AttributeError;
-
+
+ /* incase we ever have a value other then 1 for fast */
+ if (no_ipo_update)
+ no_ipo_update = 1;
+
//verify that this pchannel is part of the object->pose
for (pchan = ((BPy_Object*)parent_object)->object->pose->chanbase.first;
pchan; pchan = pchan->next){
@@ -487,40 +491,40 @@ static PyObject *PoseBone_insertKey(BPy_PoseBone *self, PyObject *args)
//add the action channel if it's not there
verify_action_channel(((BPy_Object*)parent_object)->object->action,
self->posechannel->name);
-
+
//insert the pose keys
if (self->posechannel->flag & POSE_ROT){
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_QUAT_X);
+ ID_PO, self->posechannel->name, NULL, AC_QUAT_X, no_ipo_update);
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_QUAT_Y);
+ ID_PO, self->posechannel->name, NULL, AC_QUAT_Y, no_ipo_update);
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_QUAT_Z);
+ ID_PO, self->posechannel->name, NULL, AC_QUAT_Z, no_ipo_update);
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_QUAT_W);
+ ID_PO, self->posechannel->name, NULL, AC_QUAT_W, no_ipo_update);
}
if (self->posechannel->flag & POSE_LOC){
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_LOC_X);
+ ID_PO, self->posechannel->name, NULL, AC_LOC_X, no_ipo_update);
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_LOC_Y);
+ ID_PO, self->posechannel->name, NULL, AC_LOC_Y, no_ipo_update);
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_LOC_Z);
+ ID_PO, self->posechannel->name, NULL, AC_LOC_Z, no_ipo_update);
}
if (self->posechannel->flag & POSE_SIZE){
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_SIZE_X);
+ ID_PO, self->posechannel->name, NULL, AC_SIZE_X, no_ipo_update);
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_SIZE_Y);
+ ID_PO, self->posechannel->name, NULL, AC_SIZE_Y, no_ipo_update);
insertkey(&((BPy_Object*)parent_object)->object->id,
- ID_PO, self->posechannel->name, NULL, AC_SIZE_Z);
+ ID_PO, self->posechannel->name, NULL, AC_SIZE_Z, no_ipo_update);
}
//flip the frame back
G.scene->r.cfra = oldframe;
//update the IPOs
- if (!no_ipo_update)
+ if (no_ipo_update==0)
remake_action_ipos (((BPy_Object*)parent_object)->object->action);
Py_RETURN_NONE;
diff --git a/source/blender/python/api2_2x/World.c b/source/blender/python/api2_2x/World.c
index 6d5b20b46d9..7804a443639 100644
--- a/source/blender/python/api2_2x/World.c
+++ b/source/blender/python/api2_2x/World.c
@@ -991,37 +991,37 @@ static PyObject *World_insertIpoKey( BPy_World * self, PyObject * args )
map = texchannel_to_adrcode(self->world->texact);
if(key == IPOKEY_ZENITH) {
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_ZEN_R);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_ZEN_G);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_ZEN_B);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_ZEN_R, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_ZEN_G, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_ZEN_B, 0);
}
if(key == IPOKEY_HORIZON) {
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_HOR_R);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_HOR_G);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_HOR_B);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_HOR_R, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_HOR_G, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_HOR_B, 0);
}
if(key == IPOKEY_MIST) {
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISI);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISTDI);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISTSTA);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISTHI);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISI, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISTDI, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISTSTA, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_MISTHI, 0);
}
if(key == IPOKEY_STARS) {
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STAR_R);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STAR_G);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STAR_B);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STARDIST);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STARSIZE);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STAR_R, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STAR_G, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STAR_B, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STARDIST, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, WO_STARSIZE, 0);
}
if(key == IPOKEY_OFFSET) {
- insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_OFS_X);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_OFS_Y);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_OFS_Z);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_OFS_X, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_OFS_Y, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_OFS_Z, 0);
}
if(key == IPOKEY_SIZE) {
- insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_SIZE_X);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_SIZE_Y);
- insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_SIZE_Z);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_SIZE_X, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_SIZE_Y, 0);
+ insertkey((ID *)self->world, ID_WO, NULL, NULL, map+MAP_SIZE_Z, 0);
}
allspace(REMAKEIPO, 0);