[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13761] trunk/blender/source/blender/src: pendent changes -
Campbell Barton
ideasman42 at gmail.com
Tue Feb 19 11:43:41 CET 2008
Revision: 13761
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13761
Author: campbellbarton
Date: 2008-02-19 11:43:41 +0100 (Tue, 19 Feb 2008)
Log Message:
-----------
pendent changes -
- Added a note that force fields only affect objects on same layers
- PLAY button would just play all frames and didnt respect the end frame which is very annoying at times.
Modified Paths:
--------------
trunk/blender/source/blender/src/buttons_object.c
trunk/blender/source/blender/src/buttons_scene.c
trunk/blender/source/blender/src/playanim.c
Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c 2008-02-19 09:00:39 UTC (rev 13760)
+++ trunk/blender/source/blender/src/buttons_object.c 2008-02-19 10:43:41 UTC (rev 13761)
@@ -3375,9 +3375,9 @@
sprintf(menustr, "Field Type%%t|None%%x0|Spherical%%x%d|Wind%%x%d|Vortex%%x%d|Magnetic%%x%d|Harmonic%%x%d",
PFIELD_FORCE, PFIELD_WIND, PFIELD_VORTEX, PFIELD_MAGNET, PFIELD_HARMONIC);
- if(pd->forcefield==PFIELD_FORCE) tipstr= "Particle attracts or repels particles";
- else if(pd->forcefield==PFIELD_WIND) tipstr= "Constant force applied in direction of particle Z axis";
- else if(pd->forcefield==PFIELD_VORTEX) tipstr= "Particles swirl around Z-axis of the particle";
+ if(pd->forcefield==PFIELD_FORCE) tipstr= "Particle attracts or repels particles (On shared object layers)";
+ else if(pd->forcefield==PFIELD_WIND) tipstr= "Constant force applied in direction of particle Z axis (On shared object layers)";
+ else if(pd->forcefield==PFIELD_VORTEX) tipstr= "Particles swirl around Z-axis of the particle (On shared object layers)";
}
else{
if(ob->type==OB_CURVE)
@@ -3387,10 +3387,10 @@
sprintf(menustr, "Field Type%%t|None%%x0|Spherical%%x%d|Wind%%x%d|Vortex%%x%d|Magnetic%%x%d|Harmonic%%x%d|Texture%%x%d",
PFIELD_FORCE, PFIELD_WIND, PFIELD_VORTEX, PFIELD_MAGNET, PFIELD_HARMONIC, PFIELD_TEXTURE);
- if(pd->forcefield==PFIELD_FORCE) tipstr= "Object center attracts or repels particles";
- else if(pd->forcefield==PFIELD_WIND) tipstr= "Constant force applied in direction of Object Z axis";
- else if(pd->forcefield==PFIELD_VORTEX) tipstr= "Particles swirl around Z-axis of the Object";
- else if(pd->forcefield==PFIELD_GUIDE) tipstr= "Use a Curve Path to guide particles";
+ if(pd->forcefield==PFIELD_FORCE) tipstr= "Object center attracts or repels particles (On shared object layers)";
+ else if(pd->forcefield==PFIELD_WIND) tipstr= "Constant force applied in direction of Object Z axis (On shared object layers)";
+ else if(pd->forcefield==PFIELD_VORTEX) tipstr= "Particles swirl around Z-axis of the Object (On shared object layers)";
+ else if(pd->forcefield==PFIELD_GUIDE) tipstr= "Use a Curve Path to guide particles (On shared object layers)";
}
if(ob->particlesystem.first)
Modified: trunk/blender/source/blender/src/buttons_scene.c
===================================================================
--- trunk/blender/source/blender/src/buttons_scene.c 2008-02-19 09:00:39 UTC (rev 13760)
+++ trunk/blender/source/blender/src/buttons_scene.c 2008-02-19 10:43:41 UTC (rev 13761)
@@ -1339,9 +1339,9 @@
calc_renderwin_rectangle((G.scene->r.xsch*G.scene->r.size)/100,
(G.scene->r.ysch*G.scene->r.size)/100, G.winpos, pos, size);
#ifdef WIN32
- sprintf(str, "%s -a -p %d %d -f %d %g \"%s\"", bprogname, pos[0], pos[1], G.scene->r.frs_sec, G.scene->r.frs_sec_base, file);
+ sprintf(str, "%s -a -s %d -e %d -p %d %d -f %d %g \"%s\"", bprogname, G.scene->r.sfra, G.scene->r.efra, pos[0], pos[1], G.scene->r.frs_sec, G.scene->r.frs_sec_base, file);
#else
- sprintf(str, "\"%s\" -a -p %d %d -f %d %g \"%s\"", bprogname, pos[0], pos[1], G.scene->r.frs_sec, G.scene->r.frs_sec_base, file);
+ sprintf(str, "\"%s\" -a -s %d -e %d -p %d %d -f %d %g \"%s\"", bprogname, G.scene->r.sfra, G.scene->r.efra, pos[0], pos[1], G.scene->r.frs_sec, G.scene->r.frs_sec_base, file);
#endif
system(str);
}
Modified: trunk/blender/source/blender/src/playanim.c
===================================================================
--- trunk/blender/source/blender/src/playanim.c 2008-02-19 09:00:39 UTC (rev 13760)
+++ trunk/blender/source/blender/src/playanim.c 2008-02-19 10:43:41 UTC (rev 13761)
@@ -212,7 +212,7 @@
window_swap_buffers(g_window);
}
-static void build_pict_list(char * first)
+static void build_pict_list(char * first, int totframes)
{
int size,pic,file;
char *mem, name[256];
@@ -261,7 +261,8 @@
O_DIRECT is a Silicon Graphics extension and is only supported on
local EFS and XFS file systems.
*/
- while(IMB_ispic(name)){
+
+ while(IMB_ispic(name) && totframes){
file = open(name, O_BINARY|O_RDONLY, 0);
if (file < 0) return;
picture = (struct pict*)MEM_callocN(sizeof(struct pict), "picture");
@@ -327,6 +328,7 @@
break;
}
}
+ totframes--;
}
}
return;
@@ -344,8 +346,10 @@
int sizex, sizey, ofsx, ofsy, i;
/* This was done to disambiguate the name for use under c++. */
struct anim * anim = 0;
- int start_x= 0, start_y= 0;
-
+ int start_x= 0, start_y= 0;
+ int sfra= -1;
+ int efra= -1;
+
while (argc > 1) {
if (argv[1][0] == '-'){
switch(argv[1][1]) {
@@ -362,7 +366,7 @@
printf("too few arguments for -p (need 2): skipping\n");
}
break;
- case 'f':
+ case 'f':
if (argc>3) {
double fps = atof(argv[2]);
double fps_base= atof(argv[3]);
@@ -378,6 +382,16 @@
printf("too few arguments for -f (need 2): skipping\n");
}
break;
+ case 's':
+ sfra= MIN2(MAXFRAME, MAX2(1, atoi(argv[2]) ));
+ argc--;
+ argv++;
+ break;
+ case 'e':
+ efra= MIN2(MAXFRAME, MAX2(1, atoi(argv[2]) ));
+ argc--;
+ argv++;
+ break;
default:
printf("unknown option '%c': skipping\n", argv[1][1]);
break;
@@ -462,11 +476,17 @@
window_swap_buffers(g_window);
- build_pict_list(name);
+ if (sfra == -1 || efra == -1) {
+ /* one of the frames was invalid, just use all images */
+ sfra = 1;
+ efra = MAXFRAME;
+ }
+ build_pict_list(name, (efra - sfra) + 1);
+
for (i = 2; i < argc; i++){
strcpy(name, argv[i]);
- build_pict_list(name);
+ build_pict_list(name, (efra - sfra) + 1);
}
IMB_freeImBuf(ibuf);
More information about the Bf-blender-cvs
mailing list