diff options
author | Diego Borghetti <bdiego@gmail.com> | 2008-06-24 21:38:03 +0400 |
---|---|---|
committer | Diego Borghetti <bdiego@gmail.com> | 2008-06-24 21:38:03 +0400 |
commit | ba3be905d36dba4d2ae1438edd5b41211c1273a6 (patch) | |
tree | d4d594fc196f63c39ea24730fa1a8cc5393c95e2 | |
parent | 2bb628ba4b7e4924cbe2c75c815e29f76c42b913 (diff) |
branches/blender-2.47
Merge from trunk:
Revision: 15302
Revision: 15310
Revision: 15315
Revision: 15325
Revision: 15331
Revision: 15334
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 1 | ||||
-rw-r--r-- | source/blender/include/transform.h | 6 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 6 | ||||
-rw-r--r-- | source/blender/src/editobject.c | 2 | ||||
-rw-r--r-- | source/blender/src/transform.c | 8 | ||||
-rw-r--r-- | source/blender/src/transform_constraints.c | 19 | ||||
-rw-r--r-- | source/blender/src/transform_generics.c | 9 | ||||
-rw-r--r-- | source/blender/src/transform_snap.c | 2 | ||||
-rw-r--r-- | source/creator/creator.c | 4 |
10 files changed, 37 insertions, 22 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 5fb3d6f869a..45399b05ae3 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -344,7 +344,7 @@ static void copy_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *chan pchan->flag= chan->flag; con= chan->constraints.first; - for(pcon= pchan->constraints.first; pcon; pcon= pcon->next) { + for(pcon= pchan->constraints.first; pcon; pcon= pcon->next, con= con->next) { pcon->enforce= con->enforce; pcon->headtail= con->headtail; } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 5112fb08fe6..ae17732ed06 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2596,6 +2596,7 @@ static void precalc_effectors(Object *ob, ParticleSystem *psys, ParticleSystemMo for(ec= lb->first; ec; ec= ec->next) { PartDeflect *pd= ec->ob->pd; + co = NULL; if(ec->type==PSYS_EC_EFFECTOR && pd->forcefield==PFIELD_GUIDE && ec->ob->type==OB_CURVE && part->phystype!=PART_PHYS_BOIDS) { diff --git a/source/blender/include/transform.h b/source/blender/include/transform.h index 982a2f25df7..350a3443c50 100644 --- a/source/blender/include/transform.h +++ b/source/blender/include/transform.h @@ -100,9 +100,9 @@ typedef struct TransCon { /* Apply function pointer for linear vectorial transformation */ /* The last three parameters are pointers to the in/out/printable vectors */ void (*applySize)(struct TransInfo *, struct TransData *, float [3][3]); - /* Apply function pointer for rotation transformation (prototype will change */ - void (*applyRot)(struct TransInfo *, struct TransData *, float [3]); - /* Apply function pointer for rotation transformation (prototype will change */ + /* Apply function pointer for size transformation */ + void (*applyRot)(struct TransInfo *, struct TransData *, float [3], float *); + /* Apply function pointer for rotation transformation */ } TransCon; typedef struct TransDataIpokey { diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index ebb52c49132..6a0af82b4d7 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -2675,9 +2675,9 @@ void RE_set_max_threads(int threads) void RE_init_threadcount(Render *re) { - if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */ + if(commandline_threads >= 1) { /* only set as an arg in background mode */ + re->r.threads= MIN2(commandline_threads, BLENDER_MAX_THREADS); + } else if ((re->r.mode & R_FIXED_THREADS)==0 || commandline_threads == 0) { /* Automatic threads */ re->r.threads = BLI_system_thread_count(); - } else if(commandline_threads >= 1 && commandline_threads<=BLENDER_MAX_THREADS) { - re->r.threads= commandline_threads; } } diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 4029e031b63..a9578c454c1 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -5939,7 +5939,7 @@ void hide_objects(int select) Base *base; short changed = 0, changed_act = 0; for(base = FIRSTBASE; base; base=base->next){ - if(TESTBASELIB(base)==select){ + if ((base->lay & G.vd->lay) && (TESTBASELIB(base)==select)) { base->flag &= ~SELECT; base->object->flag = base->flag; base->object->restrictflag |= OB_RESTRICT_VIEW; diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 4f6c33b0a64..ab1762fb302 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -2620,7 +2620,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3]) } if (t->con.applyRot) { - t->con.applyRot(t, td, axis); + t->con.applyRot(t, td, axis, NULL); VecRotToMat3(axis, angle * td->factor, mat); } else if (t->flag & T_PROP_EDIT) { @@ -2658,7 +2658,7 @@ int Rotation(TransInfo *t, short mval[2]) snapGrid(t, &final); if (t->con.applyRot) { - t->con.applyRot(t, NULL, axis); + t->con.applyRot(t, NULL, axis, &final); } applySnapping(t, &final); @@ -3305,7 +3305,7 @@ int PushPull(TransInfo *t, short mval[2]) } if (t->con.applyRot && t->con.mode & CON_APPLY) { - t->con.applyRot(t, NULL, axis); + t->con.applyRot(t, NULL, axis, NULL); } for(i = 0 ; i < t->total; i++, td++) { @@ -3317,7 +3317,7 @@ int PushPull(TransInfo *t, short mval[2]) VecSubf(vec, t->center, td->center); if (t->con.applyRot && t->con.mode & CON_APPLY) { - t->con.applyRot(t, td, axis); + t->con.applyRot(t, td, axis, NULL); if (isLockConstraint(t)) { float dvec[3]; Projf(dvec, vec, axis); diff --git a/source/blender/src/transform_constraints.c b/source/blender/src/transform_constraints.c index 2d01c2303fc..796b013cb88 100644 --- a/source/blender/src/transform_constraints.c +++ b/source/blender/src/transform_constraints.c @@ -393,7 +393,7 @@ static void applyObjectConstraintSize(TransInfo *t, TransData *td, float smat[3] * (ie: not doing counterclockwise rotations when the mouse moves clockwise). */ -static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) +static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle) { if (!td && t->con.mode & CON_APPLY) { int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2); @@ -413,9 +413,9 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) break; } /* don't flip axis if asked to or if num input */ - if (!(mode & CON_NOFLIP) && hasNumInput(&t->num) == 0) { + if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) { if (Inpf(vec, t->viewinv[2]) > 0.0f) { - VecMulf(vec, -1.0f); + *angle = -(*angle); } } } @@ -435,10 +435,15 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3]) * (ie: not doing counterclockwise rotations when the mouse moves clockwise). */ -static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3]) +static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3], float *angle) { - if (td && t->con.mode & CON_APPLY) { + if (t->con.mode & CON_APPLY) { int mode = t->con.mode & (CON_AXIS0|CON_AXIS1|CON_AXIS2); + + /* on setup call, use first object */ + if (td == NULL) { + td= t->data; + } switch(mode) { case CON_AXIS0: @@ -454,9 +459,9 @@ static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3]) VECCOPY(vec, td->axismtx[2]); break; } - if (!(mode & CON_NOFLIP)) { + if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) { if (Inpf(vec, t->viewinv[2]) > 0.0f) { - VecMulf(vec, -1.0f); + *angle = -(*angle); } } } diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 8154929eb17..35c60c2fdd5 100644 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -326,7 +326,7 @@ void recalcData(TransInfo *t) else { for (base=G.scene->base.first; base; base=base->next) { /* recalculate scale of selected nla-strips */ - if (base->object->nlastrips.first) { + if (base->object && base->object->nlastrips.first) { Object *bob= base->object; bActionStrip *strip; @@ -399,8 +399,15 @@ void recalcData(TransInfo *t) } } else if(G.sipo->blocktype==ID_OB) { + Object *ob= OBACT; Base *base= FIRSTBASE; + /* only if this if active object has this ipo in an action (assumes that current ipo is in action) */ + if ((ob) && (ob->ipoflag & OB_ACTION_OB) && (G.sipo->pin==0)) { + ob->ctime= -1234567.0f; + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB); + } + while(base) { if(base->object->ipo==G.sipo->ipo) { do_ob_ipo(base->object); diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 0e69e823d92..2fce746b2a7 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -370,7 +370,7 @@ float RotationBetween(TransInfo *t, float p1[3], float p2[3]) if (t->con.applyRot != NULL && (t->con.mode & CON_APPLY)) { float axis[3], tmp[3]; - t->con.applyRot(t, NULL, axis); + t->con.applyRot(t, NULL, axis, NULL); Projf(tmp, end, axis); VecSubf(end, end, tmp); diff --git a/source/creator/creator.c b/source/creator/creator.c index 2e6b5d7353e..9589f1e3e94 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -195,7 +195,7 @@ static void print_help(void) printf (" (formats that can be compiled into blender, not available on all systems)\n"); printf (" \tHDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS\n"); printf (" -x <bool>\tSet option to add the file extension to the end of the file.\n"); - printf (" -t <threads>\tUse amount of <threads> for rendering.\n"); + printf (" -t <threads>\tUse amount of <threads> for rendering (background mode only).\n"); printf (" [1-8], 0 for systems processor count.\n"); printf ("\nAnimation playback options:\n"); printf (" -a <file(s)>\tPlayback <file(s)>, only operates this way when -b is not used.\n"); @@ -723,6 +723,8 @@ int main(int argc, char **argv) a++; if(G.background) { RE_set_max_threads(atoi(argv[a])); + } else { + printf("Warning: threads can only be set in background mode\n"); } break; case 'x': /* extension */ |