[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36513] branches/particles-2010: Removed an older version of paged particles that was still sitting in there quietly .
Lukas Toenne
lukas.toenne at googlemail.com
Fri May 6 13:03:10 CEST 2011
Revision: 36513
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36513
Author: lukastoenne
Date: 2011-05-06 11:03:09 +0000 (Fri, 06 May 2011)
Log Message:
-----------
Removed an older version of paged particles that was still sitting in there quietly.
Removed several unwanted changes accumulated over time (mostly whitespace diffs).
Modified Paths:
--------------
branches/particles-2010/build_files/cmake/example_scripts/make_quicky.py
branches/particles-2010/source/blender/blenkernel/BKE_main.h
branches/particles-2010/source/blender/blenkernel/BKE_particle.h
branches/particles-2010/source/blender/blenkernel/intern/library.c
branches/particles-2010/source/blender/blenkernel/intern/particle.c
branches/particles-2010/source/blender/blenkernel/intern/particle_system.c
branches/particles-2010/source/blender/blenloader/intern/readfile.c
branches/particles-2010/source/blender/blenloader/intern/writefile.c
branches/particles-2010/source/blender/editors/space_view3d/drawobject.c
branches/particles-2010/source/blender/makesdna/DNA_object_types.h
branches/particles-2010/source/blender/makesdna/DNA_particle_types.h
branches/particles-2010/source/blender/makesrna/RNA_access.h
branches/particles-2010/source/blender/makesrna/intern/rna_modifier.c
branches/particles-2010/source/blender/makesrna/intern/rna_particle.c
branches/particles-2010/source/creator/creator.c
Removed Paths:
-------------
branches/particles-2010/source/blender/editors/include/ED_particleset.h
Modified: branches/particles-2010/build_files/cmake/example_scripts/make_quicky.py
===================================================================
--- branches/particles-2010/build_files/cmake/example_scripts/make_quicky.py 2011-05-06 09:43:01 UTC (rev 36512)
+++ branches/particles-2010/build_files/cmake/example_scripts/make_quicky.py 2011-05-06 11:03:09 UTC (rev 36513)
@@ -20,6 +20,7 @@
# <pep8 compliant>
+
def print_help(targets):
print("CMake quicky wrapper, no valid targets given.")
print(" * targets can contain a subset of the full target name.")
@@ -36,11 +37,11 @@
for t in targets:
print(" %s" % t)
print("...exiting")
-
+
def main():
targets = set()
-
+
# collect targets
makefile = open("Makefile", "r")
for line in makefile:
@@ -54,13 +55,12 @@
line = line.split(":", 1)[0]
- if "/" in line: # cmake terget options, dont need these
+ if "/" in line: # cmake terget options, dont need these
continue
targets.add(line)
makefile.close()
-
# remove cmake targets
bad = set([
"help",
@@ -75,10 +75,9 @@
"depend",
"cmake_check_build_system",
])
-
+
targets -= set(bad)
-
# parse args
targets = list(targets)
targets.sort()
@@ -106,7 +105,7 @@
print(" %s" % t)
print("...aborting.")
return
-
+
# execute
cmd = "make %s %s blender/fast" % (" ".join(args), " ".join(targets_new))
print("cmake building with targets: %s" % " ".join(targets_new))
Modified: branches/particles-2010/source/blender/blenkernel/BKE_main.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_main.h 2011-05-06 09:43:01 UTC (rev 36512)
+++ branches/particles-2010/source/blender/blenkernel/BKE_main.h 2011-05-06 11:03:09 UTC (rev 36513)
@@ -86,7 +86,6 @@
ListBase particle;
ListBase wm;
ListBase gpencil;
- ListBase particleset;
char id_tag_update[256];
} Main;
Modified: branches/particles-2010/source/blender/blenkernel/BKE_particle.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_particle.h 2011-05-06 09:43:01 UTC (rev 36512)
+++ branches/particles-2010/source/blender/blenkernel/BKE_particle.h 2011-05-06 11:03:09 UTC (rev 36513)
@@ -300,48 +300,6 @@
void psys_check_boid_data(struct ParticleSystem *psys);
-/**** particles-2010 ****/
-/* particle property management */
-struct ParticleProperty *psys_find_particle_property(struct ParticleSystem *psys, const char *name);
-
-struct ParticleProperty *psys_property_add(struct ParticleSystem *psys, const char *name, ParticlePropertyType type, int flags);
-int psys_property_remove(struct ParticleSystem *psys, int index);
-int psys_property_moveup(struct ParticleSystem *psys, int index);
-int psys_property_movedown(struct ParticleSystem *psys, int index);
-
-/* buffer management */
-void psys_create_particles(struct ParticleSystem *psys, float cfra, int emit);
-void psys_kill_particle(struct ParticleSystem *psys, int index);
-void psys_kill_all_particles(struct ParticleSystem *psys);
-void free_page(struct ParticleSystem *psys, struct ParticlePage *page);
-void psys_free_dead_pages(struct ParticleSystem *psys);
-void psys_free_new_particles(struct ParticleSystem *psys);
-//void psys_reset(struct ParticleSystem *psys);
-void psys_set_page_size(struct ParticleSystem *psys, int new_page_size);
-
-/* particle access */
-struct ParticleData* psys_get_particle(struct ParticleSystem *psys, int index);
-
-struct ParticleIterator;
-typedef int (*ParticleIteratorSkipFunction)(struct ParticleIterator*);
-typedef struct ParticleIterator
-{
- struct ParticleSystem *psys;
- ParticleData *pa;
- int index;
- struct ParticlePage *page;
-
- ParticleIteratorSkipFunction skip;
-} ParticleIterator;
-
-void pit_init_skip(struct ParticleIterator *it, struct ParticleSystem *psys, ParticleIteratorSkipFunction skip);
-void pit_init(struct ParticleIterator *it, struct ParticleSystem *psys);
-void pit_next(struct ParticleIterator *it);
-void pit_goto(struct ParticleIterator *it, int index);
-
-void *psys_parprop(struct ParticleData *pa, struct ParticleProperty *prop);
-/************************/
-
void particle_system_update(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
/* ----------- functions needed only inside particlesystem ------------ */
Modified: branches/particles-2010/source/blender/blenkernel/intern/library.c
===================================================================
--- branches/particles-2010/source/blender/blenkernel/intern/library.c 2011-05-06 09:43:01 UTC (rev 36512)
+++ branches/particles-2010/source/blender/blenkernel/intern/library.c 2011-05-06 11:03:09 UTC (rev 36513)
@@ -500,7 +500,6 @@
lb[a++]= &(main->brush);
lb[a++]= &(main->script);
lb[a++]= &(main->particle);
- lb[a++]= &(main->particleset);
lb[a++]= &(main->world);
lb[a++]= &(main->screen);
Modified: branches/particles-2010/source/blender/blenkernel/intern/particle.c
===================================================================
--- branches/particles-2010/source/blender/blenkernel/intern/particle.c 2011-05-06 09:43:01 UTC (rev 36512)
+++ branches/particles-2010/source/blender/blenkernel/intern/particle.c 2011-05-06 11:03:09 UTC (rev 36513)
@@ -493,8 +493,6 @@
psys->particles= NULL;
psys->totpart= 0;
}
-
- psys_free_new_particles(psys);
}
void psys_free_pdd(ParticleSystem *psys)
{
@@ -3420,9 +3418,6 @@
else
strcpy(psys->name, "ParticleSystem");
- /* XXX page size default, where can this be done nicely? */
- psys->page_size = 1024;
-
md= modifier_new(eModifierType_ParticleSystem);
if(name) BLI_strncpy(md->name, name, sizeof(md->name));
Modified: branches/particles-2010/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/particles-2010/source/blender/blenkernel/intern/particle_system.c 2011-05-06 09:43:01 UTC (rev 36512)
+++ branches/particles-2010/source/blender/blenkernel/intern/particle_system.c 2011-05-06 11:03:09 UTC (rev 36513)
@@ -92,7 +92,6 @@
#include "BKE_modifier.h"
#include "BKE_scene.h"
#include "BKE_bvhutils.h"
-#include "BKE_node.h"
#include "PIL_time.h"
@@ -4139,565 +4138,6 @@
}
}
-/**** particles-2010 ****/
-static size_t get_proptype_size(int type)
-{
- static const size_t parpropsize[NUM_PARPROP_TYPES] = {
- /* PARPROP_FLOAT */ sizeof(float),
- /* PARPROP_INT */ sizeof(int),
- /* PARPROP_BOOL */ sizeof(char),
- /* PARPROP_VECTOR */ 3*sizeof(float),
- /* PARPROP_RGBA */ 4*sizeof(float),
- /* PARPROP_QUAT */ 4*sizeof(float),
- /* PARPROP_MATRIX */ 16*sizeof(float)
- };
- return parpropsize[type];
-}
-
-ParticleProperty *psys_find_particle_property(struct ParticleSystem *psys, const char *name)
-{
- ParticleProperty *prop;
- int i;
- for (i=0, prop=psys->properties; i < psys->totprop; ++i, ++prop) {
- if (strcmp(prop->name, name) == 0)
- return prop;
- }
- return NULL;
-}
-
-static void update_particle_size(ParticleSystem *psys)
-{
- ParticleProperty *prop;
- int i, offset;
-
- offset = sizeof(ParticleData);
-
- for (i=0, prop=psys->properties; i < psys->totprop; ++i, ++prop) {
- prop->size = get_proptype_size(prop->type);
- prop->mapoffset = prop->offset; /* store old offset for restoring the buffer */
- prop->offset = offset;
-
- offset += prop->size;
- }
-
- psys->particle_size = offset;
-}
-
-static void restore_particle_properties(ParticleSystem *psys, ParticleData *src, ParticleData *dest)
-{
- ParticleProperty *prop;
- int i;
-
- memcpy(dest, src, sizeof(ParticleData));
-
- for (i=0, prop=psys->properties; i < psys->totprop; ++i, ++prop) {
- if (prop->mapoffset < 0) {
-// if (prop->set_default)
-// prop->set_default((char*)dest + prop->offset);
- }
- else {
- memcpy((char*)dest + prop->offset, (char*)src + prop->mapoffset, prop->size);
- }
- }
-
-}
-static void restore_properties(ParticleSystem *psys)
-{
- int p, k;
- ParticlePage *page;
- ParticleData *pa, *old_pa, *old_particles;
-
- for (p=0, page=psys->pages; p < psys->totpages; ++p, ++page) {
- if (page->particles) {
- old_particles = page->particles;
- page->particles = MEM_callocN(psys->page_size * psys->particle_size, "ParticlePage");
- for (k=0, pa=page->particles, old_pa=old_particles; k < psys->page_size; ++k, ++pa, ++old_pa)
- restore_particle_properties(psys, old_pa, pa);
- MEM_freeN(old_particles);
- }
- }
-}
-
-ParticleProperty *psys_property_add(ParticleSystem *psys, const char *name, ParticlePropertyType type, int flags)
-{
- ParticleProperty *prop, *nproperties;
-
- prop = psys_find_particle_property(psys, name);
- if (prop)
- return prop;
-
- /* construct new property array */
- nproperties = MEM_callocN((psys->totprop + 1) * sizeof(ParticleProperty), "ParticleProperty");
- if (psys->totprop > 0)
- memcpy(nproperties, psys->properties, psys->totprop * sizeof(ParticleProperty));
- strcpy(nproperties[psys->totprop].name, name);
- nproperties[psys->totprop].type = type;
- nproperties[psys->totprop].flag = flags;
- nproperties[psys->totprop].offset = -1; /* must be intitialised to -1 to indicate new property! */
-
- if (psys->properties)
- MEM_freeN(psys->properties);
- psys->properties = nproperties;
- ++psys->totprop;
-
- update_particle_size(psys);
-
- /* restore the particle buffer */
- restore_properties(psys);
-
- psys->flag |= PSYS_RECALC_PROP;
-
- return (nproperties + psys->totprop-1);
-}
-
-int psys_property_remove(struct ParticleSystem *psys, int index)
-{
- ParticleProperty *prop, *nproperties;
-
- if (index < 0 || index >= psys->totprop)
- return 0;
- prop = psys->properties + index;
-
- if (psys->totprop > 1) {
- /* construct new property array */
- nproperties = MEM_callocN((psys->totprop - 1) * sizeof(ParticleProperty), "ParticleProperty");
-
- if (index > 0)
- memcpy(nproperties, psys->properties, index * sizeof(ParticleProperty));
- if (index < psys->totprop-1)
- memcpy(nproperties + index, psys->properties + index+1, (psys->totprop-1 - index) * sizeof(ParticleProperty));
- }
- else {
- nproperties = NULL;
- }
-
- MEM_freeN(psys->properties);
- psys->properties = nproperties;
- --psys->totprop;
-
- update_particle_size(psys);
-
- /* restore the particle buffer */
- restore_properties(psys);
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list