[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25776] trunk/blender/source/blender/ editors/physics/particle_edit.c: Particle edit: optimization for combing, was computing hair space too often,
Brecht Van Lommel
brecht at blender.org
Wed Jan 6 13:00:53 CET 2010
Revision: 25776
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25776
Author: blendix
Date: 2010-01-06 13:00:53 +0100 (Wed, 06 Jan 2010)
Log Message:
-----------
Particle edit: optimization for combing, was computing hair space too often,
and fix some warnings.
Modified Paths:
--------------
trunk/blender/source/blender/editors/physics/particle_edit.c
Modified: trunk/blender/source/blender/editors/physics/particle_edit.c
===================================================================
--- trunk/blender/source/blender/editors/physics/particle_edit.c 2010-01-06 11:42:52 UTC (rev 25775)
+++ trunk/blender/source/blender/editors/physics/particle_edit.c 2010-01-06 12:00:53 UTC (rev 25776)
@@ -588,25 +588,34 @@
unit_m4(mat);
LOOP_VISIBLE_POINTS {
- if(edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
- psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
- invert_m4_m4(imat,mat);
- }
-
if(pset->selectmode==SCE_SELECT_END) {
/* only do end keys */
key= point->keys + point->totkey-1;
- if(selected==0 || key->flag & PEK_SELECT)
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist))
+ if(selected==0 || key->flag & PEK_SELECT) {
+ if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
+ if(edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
+ psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
+ invert_m4_m4(imat,mat);
+ }
+
func(data, mat, imat, p, point->totkey-1, key);
+ }
+ }
}
else {
/* do all keys */
LOOP_VISIBLE_KEYS {
- if(selected==0 || key->flag & PEK_SELECT)
- if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist))
+ if(selected==0 || key->flag & PEK_SELECT) {
+ if(key_inside_circle(data, data->rad, KEY_WCO, &data->dist)) {
+ if(edit->psys && !(edit->psys->flag & PSYS_GLOBAL_HAIR)) {
+ psys_mat_hair_to_global(data->ob, psmd->dm, psys->part->from, psys->particles + p, mat);
+ invert_m4_m4(imat,mat);
+ }
+
func(data, mat, imat, p, k, key);
+ }
+ }
}
}
}
@@ -2008,7 +2017,6 @@
static int remove_tagged_particles(Scene *scene, Object *ob, ParticleSystem *psys, int mirror)
{
PTCacheEdit *edit = psys->edit;
- ParticleEditSettings *pset= PE_settings(scene);
ParticleData *pa, *npa=0, *new_pars=0;
POINT_P;
PTCacheEditPoint *npoint=0, *new_points=0;
@@ -2079,7 +2087,6 @@
static void remove_tagged_keys(Scene *scene, Object *ob, ParticleSystem *psys)
{
PTCacheEdit *edit= psys->edit;
- ParticleEditSettings *pset= PE_settings(scene);
ParticleData *pa;
HairKey *hkey, *nhkey, *new_hkeys=0;
POINT_P; KEY_K;
@@ -2270,7 +2277,6 @@
{
Scene *scene= CTX_data_scene(C);
Object *ob= CTX_data_active_object(C);
- ParticleEditSettings *pset=PE_settings(scene);
PTCacheEdit *edit= PE_get_current(scene, ob);
ParticleSystem *psys = edit->psys;
ParticleSystemModifierData *psmd;
More information about the Bf-blender-cvs
mailing list