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:
authorJanne Karhu <jhkarh@gmail.com>2009-08-29 19:20:36 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-08-29 19:20:36 +0400
commit874d38eeb401a75f849cc36c7d7b911129c3aa75 (patch)
treef9d1ad815e40cfd27668dae5be83de72b385c650 /source/blender/makesdna
parentc03004f93eb94d4af10acaf0b7e8ca7adb097dd0 (diff)
Point cache editing:
- Baked point caches for particles, cloth and softbody can now be edited in particle mode. * This overwrites the old cloth/sb cache editmode editing. * The type of editable system is chosen from a menu. * For particles the current particle system and it's current cache are used. - Currently this only works for caches that are in memory, but some automatic conversion from disk to memory and back can be implemented later. - All tools from hair editing can't be applied to point caches and are hidden in the tool panel and specials menu. Some functionality like subdividing paths can be later implemented in a slightly different way from how it works for hair. - Code is not yet optimized for speed, so editing might be slow sometimes. Known issues: - Cloth doesn't update properly while in particle mode, due to the way cloth modifier currently works. Daniel can you check on this? - As "particle mode" is not only for particles any more some other name would be in place? - Better icons are needed for the path, point, and tip-modes as the current icons from mesh edit mode are quite misleading. - Direct editing of point velocities is not yet implemented, but will be in the future. Other changes: - Hair editing doesn't require a "make editable" button press any more. - Multiple caches in single particle system disables changing emission properties. - Unified ui code for all point cache panels. * Defined in buttons_particle.py and imported for cloth, smoke & softbody. - Proper disabling of properties in ui after baking point caches. (Daniel could you please make needed disable code for smoke panels as their functionality is not familiar to me.) - Hair weight brush has been removed. Once hair dynamics is re-implemented I'll code a more useable alternative to the functionality. Bug fixes: - Unlinking particle settings crashed. - Deleting the active object with particles in the scene crashed. - Softbody didn't write point caches correctly on save.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_object_force.h9
-rw-r--r--source/blender/makesdna/DNA_particle_types.h12
-rw-r--r--source/blender/makesdna/DNA_scene_types.h26
3 files changed, 28 insertions, 19 deletions
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 625864c4888..5696f82ab0d 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -95,7 +95,7 @@ typedef struct PartDeflect {
typedef struct PTCacheMem {
struct PTCacheMem *next, *prev;
int frame, totpoint;
- unsigned int data_types, rt;
+ unsigned int data_types, flag;
int *index_array; /* quick access to stored points with index */
void *data[8]; /* BPHYS_TOT_DATA */
@@ -121,6 +121,9 @@ typedef struct PointCache {
char info[64];
char path[240]; /* file path */
struct ListBase mem_cache;
+
+ struct PTCacheEdit *edit;
+ void (*free_edit)(struct PTCacheEdit *edit); /* free callback */
} PointCache;
typedef struct SBVertex {
@@ -300,8 +303,8 @@ typedef struct SoftBody {
#define PTCACHE_OUTDATED 2
#define PTCACHE_SIMULATION_VALID 4
#define PTCACHE_BAKING 8
-#define PTCACHE_BAKE_EDIT 16
-#define PTCACHE_BAKE_EDIT_ACTIVE 32
+//#define PTCACHE_BAKE_EDIT 16
+//#define PTCACHE_BAKE_EDIT_ACTIVE 32
#define PTCACHE_DISK_CACHE 64
#define PTCACHE_QUICK_CACHE 128
#define PTCACHE_FRAMES_SKIPPED 256
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 925fd31328d..12c253a7cb8 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -194,8 +194,8 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
ParticleData *particles; /* (parent) particles */
ChildParticle *child; /* child particles */
- struct ParticleEdit *edit; /* particle editmode (runtime) */
- void (*free_edit)(struct ParticleSystem *sys); /* free callback */
+ struct PTCacheEdit *edit; /* particle editmode (runtime) */
+ void (*free_edit)(struct PTCacheEdit *edit); /* free callback */
struct ParticleCacheKey **pathcache; /* path cache (runtime) */
struct ParticleCacheKey **childcache; /* child cache (runtime) */
@@ -419,7 +419,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PSYS_DELETE 256 /* remove particlesystem as soon as possible */
#define PSYS_HAIR_DONE 512
#define PSYS_KEYED 1024
-#define PSYS_EDITED 2048
+//#define PSYS_EDITED 2048
//#define PSYS_PROTECT_CACHE 4096
#define PSYS_DISABLED 8192
@@ -427,11 +427,7 @@ typedef struct ParticleSystem{ /* note, make sure all (runtime) are NULL's in
#define PARS_UNEXIST 1
#define PARS_NO_DISP 2
#define PARS_STICKY 4
-#define PARS_TRANSFORM 8
-#define PARS_HIDE 16
-#define PARS_TAG 32
-#define PARS_REKEY 64
-#define PARS_EDIT_RECALC 128
+#define PARS_REKEY 8
/* pars->alive */
#define PARS_KILLED 0
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 20429120812..73afc3d1a53 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -488,10 +488,15 @@ typedef struct ParticleEditSettings {
ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
void *paintcursor; /* runtime */
- float emitterdist;
- int draw_timed;
+ float emitterdist, rt;
- int selectmode, pad;
+ int selectmode;
+ int edittype;
+
+ int draw_step, fade_frames;
+
+ struct Scene *scene;
+ struct Object *object;
} ParticleEditSettings;
typedef struct TransformOrientation {
@@ -1042,9 +1047,10 @@ typedef enum SculptFlags {
#define PE_LOCK_FIRST 2
#define PE_DEFLECT_EMITTER 4
#define PE_INTERPOLATE_ADDED 8
-#define PE_SHOW_CHILD 16
-#define PE_SHOW_TIME 32
+#define PE_DRAW_PART 16
#define PE_X_MIRROR 64
+#define PE_FADE_TIME 128
+#define PE_AUTO_VELOCITY 256
/* toolsetting->particle brushtype */
#define PE_BRUSH_NONE -1
@@ -1053,11 +1059,15 @@ typedef enum SculptFlags {
#define PE_BRUSH_LENGTH 2
#define PE_BRUSH_PUFF 3
#define PE_BRUSH_ADD 4
-#define PE_BRUSH_WEIGHT 5
-#define PE_BRUSH_SMOOTH 6
+#define PE_BRUSH_SMOOTH 5
/* this must equal ParticleEditSettings.brush array size */
-#define PE_TOT_BRUSH 7
+#define PE_TOT_BRUSH 6
+
+/* tooksettings->particle edittype */
+#define PE_TYPE_PARTICLES 0
+#define PE_TYPE_SOFTBODY 1
+#define PE_TYPE_CLOTH 2
/* toolsettings->retopo_mode */
#define RETOPO 1