Removed tool settings for particle edit mode.
This commit is contained in:
@@ -321,9 +321,6 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u
|
||||
|
||||
if (toolsett) {
|
||||
CALLBACK_INVOKE(toolsett->skgen_template, IDWALK_NOP);
|
||||
CALLBACK_INVOKE(toolsett->particle.scene, IDWALK_NOP);
|
||||
CALLBACK_INVOKE(toolsett->particle.object, IDWALK_NOP);
|
||||
CALLBACK_INVOKE(toolsett->particle.shape_object, IDWALK_NOP);
|
||||
CALLBACK_INVOKE(toolsett->imapaint.stencil, IDWALK_NOP);
|
||||
CALLBACK_INVOKE(toolsett->imapaint.clone, IDWALK_NOP);
|
||||
CALLBACK_INVOKE(toolsett->imapaint.canvas, IDWALK_NOP);
|
||||
|
||||
@@ -638,8 +638,6 @@ void BKE_object_unlink(Main *bmain, Object *ob)
|
||||
if (sce->id.lib == NULL) {
|
||||
if (sce->camera == ob) sce->camera = NULL;
|
||||
if (sce->toolsettings->skgen_template == ob) sce->toolsettings->skgen_template = NULL;
|
||||
if (sce->toolsettings->particle.object == ob) sce->toolsettings->particle.object = NULL;
|
||||
if (sce->toolsettings->particle.shape_object == ob) sce->toolsettings->particle.shape_object = NULL;
|
||||
|
||||
#ifdef DURIAN_CAMERA_SWITCH
|
||||
{
|
||||
|
||||
@@ -290,7 +290,6 @@ Scene *BKE_scene_copy(Scene *sce, int type)
|
||||
BKE_paint_copy(&ts->imapaint.paint, &ts->imapaint.paint);
|
||||
ts->imapaint.paintcursor = NULL;
|
||||
id_us_plus((ID *)ts->imapaint.stencil);
|
||||
ts->particle.paintcursor = NULL;
|
||||
}
|
||||
|
||||
/* make a private copy of the avicodecdata */
|
||||
@@ -469,8 +468,6 @@ void BKE_scene_free(Scene *sce)
|
||||
|
||||
void BKE_scene_init(Scene *sce)
|
||||
{
|
||||
ParticleEditSettings *pset;
|
||||
int a;
|
||||
const char *colorspace_name;
|
||||
SceneRenderView *srv;
|
||||
CurveMapping *mblur_shutter_curve;
|
||||
@@ -646,23 +643,6 @@ void BKE_scene_init(Scene *sce)
|
||||
|
||||
sce->unit.scale_length = 1.0f;
|
||||
|
||||
pset = &sce->toolsettings->particle;
|
||||
pset->flag = PE_KEEP_LENGTHS | PE_LOCK_FIRST | PE_DEFLECT_EMITTER | PE_AUTO_VELOCITY;
|
||||
pset->emitterdist = 0.25f;
|
||||
pset->totrekey = 5;
|
||||
pset->totaddkey = 5;
|
||||
pset->brushtype = PE_BRUSH_NONE;
|
||||
pset->draw_step = 2;
|
||||
pset->fade_frames = 2;
|
||||
pset->selectmode = SCE_SELECT_PATH;
|
||||
for (a = 0; a < PE_TOT_BRUSH; a++) {
|
||||
pset->brush[a].strength = 0.5f;
|
||||
pset->brush[a].size = 50;
|
||||
pset->brush[a].step = 10;
|
||||
pset->brush[a].count = 10;
|
||||
}
|
||||
pset->brush[PE_BRUSH_CUT].strength = 1.0f;
|
||||
|
||||
sce->r.ffcodecdata.audio_mixrate = 48000;
|
||||
sce->r.ffcodecdata.audio_volume = 1.0f;
|
||||
sce->r.ffcodecdata.audio_bitrate = 192;
|
||||
|
||||
@@ -5322,8 +5322,6 @@ static void lib_link_scene(FileData *fd, Main *main)
|
||||
|
||||
sce->toolsettings->skgen_template = newlibadr(fd, sce->id.lib, sce->toolsettings->skgen_template);
|
||||
|
||||
sce->toolsettings->particle.shape_object = newlibadr(fd, sce->id.lib, sce->toolsettings->particle.shape_object);
|
||||
|
||||
for (base = sce->base.first; base; base = next) {
|
||||
next = base->next;
|
||||
|
||||
@@ -5569,9 +5567,6 @@ static void direct_link_scene(FileData *fd, Scene *sce)
|
||||
direct_link_paint(fd, &sce->toolsettings->imapaint.paint);
|
||||
|
||||
sce->toolsettings->imapaint.paintcursor = NULL;
|
||||
sce->toolsettings->particle.paintcursor = NULL;
|
||||
sce->toolsettings->particle.scene = NULL;
|
||||
sce->toolsettings->particle.object = NULL;
|
||||
sce->toolsettings->gp_sculpt.paintcursor = NULL;
|
||||
|
||||
/* in rare cases this is needed, see [#33806] */
|
||||
|
||||
@@ -1414,14 +1414,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
|
||||
}
|
||||
|
||||
if (main->versionfile < 250 || (main->versionfile == 250 && main->subversionfile < 9)) {
|
||||
Scene *sce;
|
||||
Mesh *me;
|
||||
Object *ob;
|
||||
|
||||
for (sce = main->scene.first; sce; sce = sce->id.next)
|
||||
if (!sce->toolsettings->particle.selectmode)
|
||||
sce->toolsettings->particle.selectmode = SCE_SELECT_PATH;
|
||||
|
||||
if (main->versionfile == 250 && main->subversionfile > 1) {
|
||||
for (me = main->mesh.first; me; me = me->id.next)
|
||||
multires_load_old_250(me);
|
||||
@@ -1750,15 +1745,6 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main)
|
||||
SEQ_END
|
||||
}
|
||||
|
||||
/* particle brush strength factor was changed from int to float */
|
||||
for (sce = main->scene.first; sce; sce = sce->id.next) {
|
||||
ParticleEditSettings *pset = &sce->toolsettings->particle;
|
||||
int a;
|
||||
|
||||
for (a = 0; a < PE_TOT_BRUSH; a++)
|
||||
pset->brush[a].strength /= 100.0f;
|
||||
}
|
||||
|
||||
for (ma = main->mat.first; ma; ma = ma->id.next)
|
||||
if (ma->mode & MA_TRACEBLE)
|
||||
ma->shade_flag |= MA_APPROX_OCCLUSION;
|
||||
|
||||
@@ -958,15 +958,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
|
||||
}
|
||||
|
||||
if (!MAIN_VERSION_ATLEAST(main, 277, 1)) {
|
||||
for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
|
||||
ParticleEditSettings *pset = &scene->toolsettings->particle;
|
||||
for (int a = 0; a < PE_TOT_BRUSH; a++) {
|
||||
if (pset->brush[a].strength > 1.0f) {
|
||||
pset->brush[a].strength *= 0.01f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (bScreen *screen = main->screen.first; screen; screen = screen->id.next) {
|
||||
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
|
||||
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
|
||||
|
||||
@@ -138,12 +138,6 @@ void BLO_update_defaults_startup_blend(Main *bmain)
|
||||
ts->gpencil_v2d_align = GP_PROJECT_VIEWSPACE;
|
||||
ts->gpencil_seq_align = GP_PROJECT_VIEWSPACE;
|
||||
ts->gpencil_ima_align = GP_PROJECT_VIEWSPACE;
|
||||
|
||||
ParticleEditSettings *pset = &ts->particle;
|
||||
for (int a = 0; a < PE_TOT_BRUSH; a++) {
|
||||
pset->brush[a].strength = 0.5f;
|
||||
}
|
||||
pset->brush[PE_BRUSH_CUT].strength = 1.0f;
|
||||
}
|
||||
|
||||
scene->gm.lodflag |= SCE_LOD_USE_HYST;
|
||||
|
||||
@@ -2950,7 +2950,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
|
||||
}
|
||||
|
||||
if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 8)) {
|
||||
Scene *sce;
|
||||
Object *ob;
|
||||
|
||||
for (ob = main->object.first; ob; ob = ob->id.next) {
|
||||
@@ -2969,27 +2968,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main)
|
||||
sb->totkey = 0;
|
||||
}
|
||||
}
|
||||
|
||||
for (sce = main->scene.first; sce; sce = sce->id.next) {
|
||||
ParticleEditSettings *pset = &sce->toolsettings->particle;
|
||||
int a;
|
||||
|
||||
if (pset->brush[0].size == 0) {
|
||||
pset->flag = PE_KEEP_LENGTHS|PE_LOCK_FIRST|PE_DEFLECT_EMITTER;
|
||||
pset->emitterdist = 0.25f;
|
||||
pset->totrekey = 5;
|
||||
pset->totaddkey = 5;
|
||||
pset->brushtype = PE_BRUSH_NONE;
|
||||
|
||||
for (a = 0; a < PE_TOT_BRUSH; a++) {
|
||||
pset->brush[a].strength = 50;
|
||||
pset->brush[a].size = 50;
|
||||
pset->brush[a].step = 10;
|
||||
}
|
||||
|
||||
pset->brush[PE_BRUSH_CUT].strength = 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((main->versionfile < 245) || (main->versionfile == 245 && main->subversionfile < 9)) {
|
||||
Material *ma;
|
||||
|
||||
@@ -1007,39 +1007,6 @@ typedef struct ImagePaintSettings {
|
||||
float dither; /* dither amount used when painting on byte images */
|
||||
} ImagePaintSettings;
|
||||
|
||||
/* ------------------------------------------- */
|
||||
/* Particle Edit */
|
||||
|
||||
/* Settings for a Particle Editing Brush */
|
||||
typedef struct ParticleBrushData {
|
||||
short size; /* common setting */
|
||||
short step, invert, count; /* for specific brushes only */
|
||||
int flag;
|
||||
float strength;
|
||||
} ParticleBrushData;
|
||||
|
||||
/* Particle Edit Mode Settings */
|
||||
typedef struct ParticleEditSettings {
|
||||
short flag;
|
||||
short totrekey;
|
||||
short totaddkey;
|
||||
short brushtype;
|
||||
|
||||
ParticleBrushData brush[7]; /* 7 = PE_TOT_BRUSH */
|
||||
void *paintcursor; /* runtime */
|
||||
|
||||
float emitterdist, rt;
|
||||
|
||||
int selectmode;
|
||||
int edittype;
|
||||
|
||||
int draw_step, fade_frames;
|
||||
|
||||
struct Scene *scene;
|
||||
struct Object *object;
|
||||
struct Object *shape_object;
|
||||
} ParticleEditSettings;
|
||||
|
||||
/* ------------------------------------------- */
|
||||
/* Sculpt */
|
||||
|
||||
@@ -1371,9 +1338,6 @@ typedef struct ToolSettings {
|
||||
/* Image Paint (8 byttse aligned please!) */
|
||||
struct ImagePaintSettings imapaint;
|
||||
|
||||
/* Particle Editing */
|
||||
struct ParticleEditSettings particle;
|
||||
|
||||
/* Transform Proportional Area of Effect */
|
||||
float proportional_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user