fix errors in code
- BKE_mball_center_median(), didn't work. - clip_refresh was removing handlers from wrong space. - new_modifier, replace strcpy with BLI_strncpy
This commit is contained in:
@@ -183,7 +183,7 @@ static LineStyleModifier *new_modifier(int type, size_t size)
|
||||
|
||||
m = (LineStyleModifier *)MEM_callocN(size, "line style modifier");
|
||||
m->type = type;
|
||||
strcpy(m->name, modifier_name[type]);
|
||||
BLI_strncpy(m->name, modifier_name[type], sizeof(m->name));
|
||||
m->influence = 1.0f;
|
||||
m->flags = LS_MODIFIER_ENABLED | LS_MODIFIER_EXPANDED;
|
||||
|
||||
|
||||
@@ -2446,6 +2446,7 @@ bool BKE_mball_center_median(MetaBall *mb, float r_cent[3])
|
||||
|
||||
for (ml = mb->elems.first; ml; ml = ml->next) {
|
||||
add_v3_v3(r_cent, &ml->x);
|
||||
total++;
|
||||
}
|
||||
|
||||
if (total) {
|
||||
|
||||
@@ -1019,7 +1019,7 @@ static void clip_refresh(const bContext *C, ScrArea *sa)
|
||||
if (ar_channels && !(ar_channels->flag & RGN_FLAG_HIDDEN)) {
|
||||
ar_channels->flag |= RGN_FLAG_HIDDEN;
|
||||
ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
|
||||
WM_event_remove_handlers((bContext *)C, &ar_tools->handlers);
|
||||
WM_event_remove_handlers((bContext *)C, &ar_channels->handlers);
|
||||
view_changed = TRUE;
|
||||
}
|
||||
if (ar_channels && ar_channels->alignment != RGN_ALIGN_NONE) {
|
||||
|
||||
Reference in New Issue
Block a user