DNA: rename dup_* struct members to instance_*
This commit is contained in:
@@ -422,10 +422,10 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
part = psys->part;
|
||||
for (dw = part->dupliweights.first; dw; dw = dw->next) {
|
||||
for (dw = part->instance_weights.first; dw; dw = dw->next) {
|
||||
if (dw->flag & PART_DUPLIW_CURRENT && dw->prev) {
|
||||
BLI_remlink(&part->dupliweights, dw);
|
||||
BLI_insertlinkbefore(&part->dupliweights, dw->prev, dw);
|
||||
BLI_remlink(&part->instance_weights, dw);
|
||||
BLI_insertlinkbefore(&part->instance_weights, dw->prev, dw);
|
||||
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
|
||||
@@ -460,12 +460,12 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
if (!psys)
|
||||
return OPERATOR_CANCELLED;
|
||||
part = psys->part;
|
||||
for (dw = part->dupliweights.first; dw; dw = dw->next) {
|
||||
for (dw = part->instance_weights.first; dw; dw = dw->next) {
|
||||
if (dw->flag & PART_DUPLIW_CURRENT) {
|
||||
dw->flag &= ~PART_DUPLIW_CURRENT;
|
||||
dw = MEM_dupallocN(dw);
|
||||
dw->flag |= PART_DUPLIW_CURRENT;
|
||||
BLI_addhead(&part->dupliweights, dw);
|
||||
BLI_addhead(&part->instance_weights, dw);
|
||||
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
|
||||
@@ -501,15 +501,15 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
part = psys->part;
|
||||
for (dw = part->dupliweights.first; dw; dw = dw->next) {
|
||||
for (dw = part->instance_weights.first; dw; dw = dw->next) {
|
||||
if (dw->flag & PART_DUPLIW_CURRENT) {
|
||||
BLI_remlink(&part->dupliweights, dw);
|
||||
BLI_remlink(&part->instance_weights, dw);
|
||||
MEM_freeN(dw);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
dw = part->dupliweights.last;
|
||||
dw = part->instance_weights.last;
|
||||
|
||||
if (dw)
|
||||
dw->flag |= PART_DUPLIW_CURRENT;
|
||||
@@ -547,10 +547,10 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
part = psys->part;
|
||||
for (dw = part->dupliweights.first; dw; dw = dw->next) {
|
||||
for (dw = part->instance_weights.first; dw; dw = dw->next) {
|
||||
if (dw->flag & PART_DUPLIW_CURRENT && dw->next) {
|
||||
BLI_remlink(&part->dupliweights, dw);
|
||||
BLI_insertlinkafter(&part->dupliweights, dw->next, dw);
|
||||
BLI_remlink(&part->instance_weights, dw);
|
||||
BLI_insertlinkafter(&part->instance_weights, dw->next, dw);
|
||||
|
||||
DEG_id_tag_update(&part->id, ID_RECALC_GEOMETRY | ID_RECALC_PSYS_REDO);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE, NULL);
|
||||
|
||||
Reference in New Issue
Block a user