A few bugfixes:
* #19583: Keying Sets list issues Deleting a Keying Set (or a Keying Set Path) set the active index to 0, but that would mean that the first item would be selected but not visible. * #19590: Keyframing properties of a modifier with more than one of it's type the property will highlight in all - Modifiers now always have a unique name, so renaming a modifier should check that the name is unique. Most of the files changed in this commit were just to make sure that modifiers got unique names when they were created - Modifiers path getter was wrapped a bit wrong (missing the "s around the name) * Constraints Bugs - Constraints renaming now also makes sure the names stay unique - Fixed (or attempted to fix) compiler warnings about some enum declaration for distance constraint
This commit is contained in:
@@ -848,6 +848,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
|
||||
BooleanModifierData *bmd = NULL;
|
||||
bmd = (BooleanModifierData *)modifier_new(eModifierType_Boolean);
|
||||
BLI_addtail(&ob->modifiers, bmd);
|
||||
modifier_unique_name(&ob->modifiers, bmd);
|
||||
bmd->object = base_select->object;
|
||||
bmd->modifier.mode |= eModifierMode_Realtime;
|
||||
switch(nr){
|
||||
@@ -978,9 +979,10 @@ static void object_flip_subdivison_particles(Scene *scene, Object *ob, int *set,
|
||||
}
|
||||
else if(depth == 0 && *set != 0) {
|
||||
SubsurfModifierData *smd = (SubsurfModifierData*) modifier_new(eModifierType_Subsurf);
|
||||
|
||||
|
||||
BLI_addtail(&ob->modifiers, smd);
|
||||
|
||||
modifier_unique_name(&ob->modifiers, smd);
|
||||
|
||||
if (level!=-1) {
|
||||
smd->levels = level;
|
||||
}
|
||||
@@ -1197,6 +1199,7 @@ static void copymenu_modifiers(Scene *scene, View3D *v3d, Object *ob)
|
||||
nmd = modifier_new(md->type);
|
||||
modifier_copyData(md, nmd);
|
||||
BLI_addtail(&base->object->modifiers, nmd);
|
||||
modifier_unique_name(&base->object->modifiers, nmd);
|
||||
}
|
||||
|
||||
copy_object_particlesystems(base->object, ob);
|
||||
@@ -1220,6 +1223,7 @@ static void copymenu_modifiers(Scene *scene, View3D *v3d, Object *ob)
|
||||
|
||||
mdn = modifier_new(event);
|
||||
BLI_addtail(&base->object->modifiers, mdn);
|
||||
modifier_unique_name(&base->object->modifiers, mdn);
|
||||
|
||||
modifier_copyData(md, mdn);
|
||||
}
|
||||
|
||||
@@ -480,6 +480,7 @@ void add_hook(Scene *scene, View3D *v3d, int mode)
|
||||
hmd = (HookModifierData*) modifier_new(eModifierType_Hook);
|
||||
BLI_insertlinkbefore(&obedit->modifiers, md, hmd);
|
||||
sprintf(hmd->modifier.name, "Hook-%s", ob->id.name+2);
|
||||
modifier_unique_name(&obedit->modifiers, hmd);
|
||||
}
|
||||
else if (hmd->indexar) MEM_freeN(hmd->indexar); /* reassign, hook was set */
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int type)
|
||||
{
|
||||
ModifierData *md;
|
||||
ModifierData *md=NULL, *new_md=NULL;
|
||||
ModifierTypeInfo *mti = modifierType_getInfo(type);
|
||||
|
||||
if(mti->flags&eModifierTypeFlag_Single) {
|
||||
@@ -87,19 +87,28 @@ int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int ty
|
||||
}
|
||||
|
||||
if(type == eModifierType_ParticleSystem) {
|
||||
/* don't need to worry about the new modifier's name, since that is set to the number
|
||||
* of particle systems which shouldn't have too many duplicates
|
||||
*/
|
||||
object_add_particle_system(scene, ob);
|
||||
}
|
||||
else {
|
||||
/* get new modifier data to add */
|
||||
new_md= modifier_new(type);
|
||||
|
||||
if(mti->flags&eModifierTypeFlag_RequiresOriginalData) {
|
||||
md = ob->modifiers.first;
|
||||
|
||||
|
||||
while(md && modifierType_getInfo(md->type)->type==eModifierTypeType_OnlyDeform)
|
||||
md = md->next;
|
||||
|
||||
BLI_insertlinkbefore(&ob->modifiers, md, modifier_new(type));
|
||||
|
||||
BLI_insertlinkbefore(&ob->modifiers, md, new_md);
|
||||
}
|
||||
else
|
||||
BLI_addtail(&ob->modifiers, modifier_new(type));
|
||||
BLI_addtail(&ob->modifiers, new_md);
|
||||
|
||||
/* make sure modifier data has unique name */
|
||||
modifier_unique_name(&ob->modifiers, new_md);
|
||||
|
||||
/* special cases */
|
||||
if(type == eModifierType_Softbody) {
|
||||
@@ -111,7 +120,7 @@ int ED_object_modifier_add(ReportList *reports, Scene *scene, Object *ob, int ty
|
||||
else if(type == eModifierType_Collision) {
|
||||
if(!ob->pd)
|
||||
ob->pd= object_add_collision_fields(0);
|
||||
|
||||
|
||||
ob->pd->deflect= 1;
|
||||
DAG_scene_sort(scene);
|
||||
}
|
||||
@@ -400,6 +409,7 @@ int ED_object_modifier_copy(ReportList *reports, Object *ob, ModifierData *md)
|
||||
nmd = modifier_new(md->type);
|
||||
modifier_copyData(md, nmd);
|
||||
BLI_insertlink(&ob->modifiers, md, nmd);
|
||||
modifier_unique_name(&ob->modifiers, nmd);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user