Particles: remove unused sel_col and nosel_col from
authorPhilipp Oeser <info@graphics-engineer.com>
Wed, 12 Feb 2020 18:17:19 +0000 (19:17 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Wed, 12 Feb 2020 18:17:19 +0000 (19:17 +0100)
CacheEditrPathsIterData and PTCacheEdit

Followup to 80cecee5b7c8.

ref D6725

source/blender/blenkernel/BKE_pointcache.h
source/blender/blenkernel/intern/particle.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c

index fd29480cac7e0ea29f2a8ae647e50e220b9d07ef..d906e1e3f65db101fdbf63dcad058e135c77bdf0 100644 (file)
@@ -274,9 +274,6 @@ typedef struct PTCacheEdit {
   ListBase pathcachebufs;
 
   int totpoint, totframes, totcached, edited;
-
-  unsigned char sel_col[3];
-  unsigned char nosel_col[3];
 } PTCacheEdit;
 
 /* Particle functions */
index bda768626b4d8e288494a8e4a806e1cd613ba046..68df93d742a605993d5f6fc0df44bfaa570b2026 100644 (file)
@@ -3112,8 +3112,6 @@ typedef struct CacheEditrPathsIterData {
   ParticleData *pa;
   int segments;
   bool use_weight;
-  float sel_col[3];
-  float nosel_col[3];
 } CacheEditrPathsIterData;
 
 static void psys_cache_edit_paths_iter(void *__restrict iter_data_v,
@@ -3330,18 +3328,6 @@ void psys_cache_edit_paths(Depsgraph *depsgraph,
   iter_data.segments = segments;
   iter_data.use_weight = use_weight;
 
-  if (use_weight) {
-    /* use weight painting colors now... */
-  }
-  else {
-    iter_data.sel_col[0] = (float)edit->sel_col[0] / 255.0f;
-    iter_data.sel_col[1] = (float)edit->sel_col[1] / 255.0f;
-    iter_data.sel_col[2] = (float)edit->sel_col[2] / 255.0f;
-    iter_data.nosel_col[0] = (float)edit->nosel_col[0] / 255.0f;
-    iter_data.nosel_col[1] = (float)edit->nosel_col[1] / 255.0f;
-    iter_data.nosel_col[2] = (float)edit->nosel_col[2] / 255.0f;
-  }
-
   TaskParallelSettings settings;
   BLI_parallel_range_settings_defaults(&settings);
   settings.scheduling_mode = TASK_SCHEDULING_DYNAMIC;
index 02842f8770036c11d7c1bb85ca95a742efa01307..ca13133662f4ed4d253d4180411b351dcf2d0a53 100644 (file)
@@ -5188,15 +5188,6 @@ void PE_create_particle_edit(
       psys = NULL;
     }
 
-    /* Causes assert on startup. */
-#if 0
-    /* These are unused and can be removed. */
-    UI_GetThemeColor3ubv(TH_VERTEX_SELECT, edit->sel_col);
-    UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
-#else
-    memset(edit->sel_col, 0xff, sizeof(edit->sel_col));
-    memset(edit->nosel_col, 0x00, sizeof(edit->nosel_col));
-#endif
     recalc_lengths(edit);
     if (psys && !cache) {
       recalc_emitter_field(depsgraph, ob, psys);
index c2407310e6446da6de097750cd5c9bca73f74fa0..4bd58d1bebc3a8ad3c5a547771654d4e65812577 100644 (file)
@@ -1037,10 +1037,6 @@ static void copy_particle_edit(Depsgraph *depsgraph,
   }
   update_world_cos(ob, edit);
 
-  /* These are unused and can be removed. */
-  UI_GetThemeColor3ubv(TH_VERTEX_SELECT, edit->sel_col);
-  UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
-
   recalc_lengths(edit);
   recalc_emitter_field(depsgraph, ob, psys);
   PE_update_object(depsgraph, scene, ob, true);