[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29680] branches/particles-2010/source/ blender: Particle link slots and assignments moved to particle settings and system file respectively .
Lukas Tönne
lukas.toenne at hotmail.com
Fri Jun 25 12:28:08 CEST 2010
Revision: 29680
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29680
Author: lukastoenne
Date: 2010-06-25 12:28:07 +0200 (Fri, 25 Jun 2010)
Log Message:
-----------
Particle link slots and assignments moved to particle settings and system file respectively. Also removed the unused PModifier beginnings, this is not a helpful concept.
Modified Paths:
--------------
branches/particles-2010/source/blender/blenkernel/BKE_particle_settings.h
branches/particles-2010/source/blender/blenkernel/BKE_particle_system.h
branches/particles-2010/source/blender/blenkernel/intern/object.c
branches/particles-2010/source/blender/blenkernel/intern/particle_emitter.c
branches/particles-2010/source/blender/blenkernel/intern/particle_settings.c
branches/particles-2010/source/blender/blenkernel/intern/particle_system.c
branches/particles-2010/source/blender/blenloader/intern/writefile.c
branches/particles-2010/source/blender/makesdna/DNA_particle_types.h
branches/particles-2010/source/blender/makesrna/intern/makesrna.c
branches/particles-2010/source/blender/makesrna/intern/rna_particle.c
branches/particles-2010/source/blender/modifiers/intern/MOD_explode.c
branches/particles-2010/source/blender/render/intern/source/convertblender.c
Removed Paths:
-------------
branches/particles-2010/source/blender/blenkernel/BKE_particle_link.h
branches/particles-2010/source/blender/blenkernel/intern/particle_link.c
branches/particles-2010/source/blender/makesrna/intern/rna_particle_link.c
Deleted: branches/particles-2010/source/blender/blenkernel/BKE_particle_link.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_particle_link.h 2010-06-25 00:09:50 UTC (rev 29679)
+++ branches/particles-2010/source/blender/blenkernel/BKE_particle_link.h 2010-06-25 10:28:07 UTC (rev 29680)
@@ -1,114 +0,0 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2007 by Janne Karhu.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef BKE_PARTICLE_LINK_H
-#define BKE_PARTICLE_LINK_H
-
-#include "DNA_particle_types.h"
-#include "DNA_particle_link_types.h"
-
-typedef struct ParticleLinkTypeInfo {
- char name[32];
- char assignment_struct_name[32];
- int assignment_struct_size;
- int type;
- void (*init_assignment)(struct Object *ob, struct ParticleSystem *psys, struct ParticleLinkAssignment *as, void *target);
- void (*free_assignment)(struct Object *ob, struct ParticleSystem *psys, struct ParticleLinkAssignment *as);
-} ParticleLinkTypeInfo;
-
-
-ParticleLinkTypeInfo *particle_link_type_get_info (ParticleLinkType type);
-
-/* Sync the link assignment list of a PSys with its settings' slot list.
- * Slots are stored as a linked list in ParticleSettings.
- * Assignments are stored as array in ParticleSystem for fast access and need to be sync'ed when the slot list changes.
- */
-void psys_update_link_assignments(struct Object *ob, struct ParticleSystem *psys);
-
-struct ParticleLinkAssignment* psys_assign_link(struct Object *ob, struct ParticleSystem *psys, int slot_id, void *target);
-void psys_clear_link(struct Object *ob, struct ParticleSystem *psys, int slot_id);
-void psys_clear_all_links(struct Object *ob, struct ParticleSystem *psys);
-struct ParticleLinkAssignment* psys_find_link_assignment(struct ParticleSystem *psys, int slot_id);
-
-#endif
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2007 by Janne Karhu.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef BKE_PARTICLE_LINK_H
-#define BKE_PARTICLE_LINK_H
-
-#include "DNA_particle_types.h"
-#include "DNA_particle_link_types.h"
-
-typedef struct ParticleLinkTypeInfo {
- char name[32];
- char assignment_struct_name[32];
- int assignment_struct_size;
- int type;
- void (*init_assignment)(struct Object *ob, struct ParticleSystem *psys, struct ParticleLinkAssignment *as, void *target);
- void (*free_assignment)(struct Object *ob, struct ParticleSystem *psys, struct ParticleLinkAssignment *as);
-} ParticleLinkTypeInfo;
-
-
-ParticleLinkTypeInfo *particle_link_type_get_info (ParticleLinkType type);
-
-/* Sync the link assignment list of a PSys with its settings' slot list.
- * Slots are stored as a linked list in ParticleSettings.
- * Assignments are stored as array in ParticleSystem for fast access and need to be sync'ed when the slot list changes.
- */
-void psys_update_link_assignments(struct Object *ob, struct ParticleSystem *psys);
-
-struct ParticleLinkAssignment* psys_assign_link(struct Object *ob, struct ParticleSystem *psys, int slot_id, void *target);
-void psys_clear_link(struct Object *ob, struct ParticleSystem *psys, int slot_id);
-void psys_clear_all_links(struct Object *ob, struct ParticleSystem *psys);
-struct ParticleLinkAssignment* psys_find_link_assignment(struct ParticleSystem *psys, int slot_id);
-
-#endif
Modified: branches/particles-2010/source/blender/blenkernel/BKE_particle_settings.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_particle_settings.h 2010-06-25 00:09:50 UTC (rev 29679)
+++ branches/particles-2010/source/blender/blenkernel/BKE_particle_settings.h 2010-06-25 10:28:07 UTC (rev 29680)
@@ -32,9 +32,12 @@
#ifndef BKE_PARTICLE_SETTINGS_H
#define BKE_PARTICLE_SETTINGS_H
+#include "DNA_particle_types.h"
+
struct Main;
struct ParticleEmitter;
struct ParticleLinkSlot;
+struct ParticleLinkAssignment;
struct ParticleSettings;
typedef struct ParticleSeam{
@@ -43,65 +46,17 @@
float length2;
} ParticleSeam;
-struct ParticleSettings *psys_new_settings(char *name, struct Main *main);
-struct ParticleSettings *psys_copy_settings(struct ParticleSettings *part);
-void make_local_particlesettings(struct ParticleSettings *part);
-void psys_free_settings(struct ParticleSettings *part);
+typedef struct ParticleLinkTypeInfo {
+ char name[32];
+ char assignment_struct_name[32];
+ int assignment_struct_size;
+ int type;
+ void (*init_assignment)(struct Object *ob, struct ParticleSystem *psys, struct ParticleLinkAssignment *as, void *target);
+ void (*free_assignment)(struct Object *ob, struct ParticleSystem *psys, struct ParticleLinkAssignment *as);
+} ParticleLinkTypeInfo;
-int pset_add_link_slot(struct ParticleSettings *pset, int type);
-void pset_remove_link_slot(struct ParticleSettings *pset, int slot_id);
-struct ParticleLinkSlot* pset_find_link_slot(struct ParticleSettings *pset, int slot_id);
+struct ParticleLinkTypeInfo *particle_link_type_get_info (ParticleLinkType type);
-struct ParticleEmitter *pset_add_emitter(struct ParticleSettings *pset);
-void pset_remove_emitter(struct ParticleSettings *pset, int index);
-void pset_remove_all_emitters(struct ParticleSettings *pset);
-
-#endif
-/* BKE_particle_system.h
- *
- *
- * $Id: BKE_particle_system.h 29079 2010-05-30 14:53:26Z jhk $
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2007 by Janne Karhu.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef BKE_PARTICLE_SETTINGS_H
-#define BKE_PARTICLE_SETTINGS_H
-
-struct Main;
-struct ParticleEmitter;
-struct ParticleLinkSlot;
-struct ParticleSettings;
-
-typedef struct ParticleSeam{
- float v0[3], v1[3];
- float nor[3], dir[3], tan[3];
- float length2;
-} ParticleSeam;
-
struct ParticleSettings *psys_new_settings(char *name, struct Main *main);
struct ParticleSettings *psys_copy_settings(struct ParticleSettings *part);
void make_local_particlesettings(struct ParticleSettings *part);
Modified: branches/particles-2010/source/blender/blenkernel/BKE_particle_system.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_particle_system.h 2010-06-25 00:09:50 UTC (rev 29679)
+++ branches/particles-2010/source/blender/blenkernel/BKE_particle_system.h 2010-06-25 10:28:07 UTC (rev 29680)
@@ -224,24 +224,6 @@
#define LOOP_EXISTING_PARTICLES for(psys_iterator_init(&pit, psys), p=pit.index, pa=pit.pa; pit.pa; psys_iterator_next(&pit), p=pit.index, pa=pit.pa)
#define LOOP_SHOWN_PARTICLES for(psys_iterator_init_shown(&pit, psys), p=pit.index, pa=pit.pa; pit.pa; psys_iterator_next(&pit), p=pit.index, pa=pit.pa)
-#if 0
-typedef struct PModifierTypeInfo {
- char name[32];
-
- char structName[32];
- int structSize;
-
- void (*init)(struct PModifierData *md);
- void (*free)(struct PModifierData *md);
- void (*copy)(struct PModifierData *md, struct PModifierData *target);
-
- void (*simulate)(struct ParticleSimulationData *sim, float curtime, float timestep);
-} PModifierTypeInfo;
-
-void pmodifier_type_init(PModifierTypeInfo *types[]);
-PModifierTypeInfo *pmodifierType_getInfo (PModifierType type);
-#endif
-
int count_particles(struct ParticleSystem *psys);
int count_particles_mod(struct ParticleSystem *psys, int totgr, int cur);
@@ -364,383 +346,17 @@
void reset_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, int pa_bufpos, float dtime, float cfra);
-/* psys_reset */
-#define PSYS_RESET_ALL 1
-#define PSYS_RESET_DEPSGRAPH 2
-#define PSYS_RESET_CHILDREN 3
-#define PSYS_RESET_CACHE_MISS 4
-
-/* index_dmcache */
-#define DMCACHE_NOTFOUND -1
-#define DMCACHE_ISCHILD -2
-
-#endif
-/* BKE_particle_system.h
- *
- *
- * $Id: BKE_particle_system.h 29079 2010-05-30 14:53:26Z jhk $
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list