forked from bartvdbraak/blender
Compiler warning fixes for mingw:
* There's an unresolved error in transform_conversions.c which I've flagged in this commit. I'm not quite sure what the exact intentions of that code were (i.e. was the "void_pointer = 1" really intended)
This commit is contained in:
parent
1c1659eb28
commit
e76ce369bb
@ -289,7 +289,7 @@ void BLF_blur(int size)
|
||||
void BLF_draw_default(float x, float y, float z, char *str)
|
||||
{
|
||||
FontBLF *font;
|
||||
int old_font, old_point, old_dpi;
|
||||
int old_font=0, old_point=0, old_dpi=0;
|
||||
|
||||
if (!str)
|
||||
return;
|
||||
@ -404,7 +404,7 @@ float BLF_width_default(char *str)
|
||||
{
|
||||
FontBLF *font;
|
||||
float width;
|
||||
int old_font, old_point, old_dpi;
|
||||
int old_font=0, old_point=0, old_dpi=0;
|
||||
|
||||
if (global_font_default == -1)
|
||||
global_font_default= blf_search("default");
|
||||
@ -447,7 +447,7 @@ float BLF_height_default(char *str)
|
||||
{
|
||||
FontBLF *font;
|
||||
float height;
|
||||
int old_font, old_point, old_dpi;
|
||||
int old_font=0, old_point=0, old_dpi=0;
|
||||
|
||||
if (global_font_default == -1)
|
||||
global_font_default= blf_search("default");
|
||||
|
@ -278,7 +278,7 @@ int where_on_path(Object *ob, float ctime, float *vec, float *dir, float *quat,
|
||||
/* Need to verify the quat interpolation is correct - XXX */
|
||||
|
||||
if (quat) {
|
||||
float totfac, q1[4], q2[4];
|
||||
//float totfac, q1[4], q2[4];
|
||||
|
||||
/* checks for totfac are needed when 'fac' is 1.0 key_curve_position_weights can assign zero
|
||||
* to more then one index in data which can give divide by zero error */
|
||||
|
@ -145,6 +145,7 @@ void ui_but_anim_autokey(uiBut *but, Scene *scene, float cfra)
|
||||
if(fcu && !driven) {
|
||||
id= but->rnapoin.id.data;
|
||||
|
||||
// TODO: this should probably respect the keyingset only option for anim
|
||||
if(autokeyframe_cfra_can_key(scene, id)) {
|
||||
short flag = 0;
|
||||
|
||||
@ -232,91 +233,3 @@ void ui_but_anim_remove_keyingset(bContext *C)
|
||||
/* this operator calls uiAnimContextProperty above */
|
||||
WM_operator_name_call(C, "ANIM_OT_remove_keyingset_button", WM_OP_INVOKE_DEFAULT, NULL);
|
||||
}
|
||||
|
||||
void ui_but_anim_menu(bContext *C, uiBut *but)
|
||||
{
|
||||
uiPopupMenu *pup;
|
||||
uiLayout *layout;
|
||||
int length;
|
||||
|
||||
if(but->rnapoin.data && but->rnaprop) {
|
||||
|
||||
length= RNA_property_array_length(&but->rnapoin, but->rnaprop);
|
||||
|
||||
if(but->flag & UI_BUT_ANIMATED_KEY) {
|
||||
if(length) {
|
||||
uiItemBooleanO(layout, "Replace Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1);
|
||||
uiItemBooleanO(layout, "Replace Single Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0);
|
||||
uiItemBooleanO(layout, "Delete Keyframes", 0, "ANIM_OT_delete_keyframe_button", "all", 1);
|
||||
uiItemBooleanO(layout, "Delete Single Keyframe", 0, "ANIM_OT_delete_keyframe_button", "all", 0);
|
||||
}
|
||||
else {
|
||||
uiItemBooleanO(layout, "Replace Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0);
|
||||
uiItemBooleanO(layout, "Delete Keyframe", 0, "ANIM_OT_delete_keyframe_button", "all", 0);
|
||||
}
|
||||
}
|
||||
else if(but->flag & UI_BUT_DRIVEN);
|
||||
else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
|
||||
if(length) {
|
||||
uiItemBooleanO(layout, "Insert Keyframes", 0, "ANIM_OT_insert_keyframe_button", "all", 1);
|
||||
uiItemBooleanO(layout, "Insert Single Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0);
|
||||
}
|
||||
else
|
||||
uiItemBooleanO(layout, "Insert Keyframe", 0, "ANIM_OT_insert_keyframe_button", "all", 0);
|
||||
}
|
||||
|
||||
if(but->flag & UI_BUT_DRIVEN) {
|
||||
uiItemS(layout);
|
||||
|
||||
if(length) {
|
||||
uiItemBooleanO(layout, "Delete Drivers", 0, "ANIM_OT_remove_driver_button", "all", 1);
|
||||
uiItemBooleanO(layout, "Delete Single Driver", 0, "ANIM_OT_remove_driver_button", "all", 0);
|
||||
}
|
||||
else
|
||||
uiItemBooleanO(layout, "Delete Driver", 0, "ANIM_OT_remove_driver_button", "all", 0);
|
||||
|
||||
uiItemO(layout, "Copy Driver", 0, "ANIM_OT_copy_driver_button");
|
||||
if (ANIM_driver_can_paste())
|
||||
uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
|
||||
}
|
||||
else if(but->flag & UI_BUT_ANIMATED_KEY);
|
||||
else if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
|
||||
uiItemS(layout);
|
||||
|
||||
if(length) {
|
||||
uiItemBooleanO(layout, "Add Drivers", 0, "ANIM_OT_add_driver_button", "all", 1);
|
||||
uiItemBooleanO(layout, "Add Single Driver", 0, "ANIM_OT_add_driver_button", "all", 0);
|
||||
}
|
||||
else
|
||||
uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_add_driver_button", "all", 0);
|
||||
|
||||
if (ANIM_driver_can_paste())
|
||||
uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
|
||||
}
|
||||
|
||||
if(RNA_property_animateable(&but->rnapoin, but->rnaprop)) {
|
||||
uiItemS(layout);
|
||||
|
||||
if(length) {
|
||||
uiItemBooleanO(layout, "Add All to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 1);
|
||||
uiItemBooleanO(layout, "Add Single to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 0);
|
||||
uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
|
||||
}
|
||||
else {
|
||||
uiItemBooleanO(layout, "Add to Keying Set", 0, "ANIM_OT_add_keyingset_button", "all", 0);
|
||||
uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button");
|
||||
}
|
||||
}
|
||||
|
||||
uiItemS(layout);
|
||||
|
||||
uiItemO(layout, "Copy Data Path", 0, "ANIM_OT_copy_clipboard_button");
|
||||
|
||||
uiItemS(layout);
|
||||
|
||||
//ui_but_doc_menu(layout, &but->rnapoin, but->rnaprop);
|
||||
|
||||
uiPupMenuEnd(C, pup);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3391,7 +3391,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
|
||||
|
||||
|
||||
if(but->rnaprop)
|
||||
name= RNA_property_ui_name(but->rnaprop);
|
||||
name= (char*)RNA_property_ui_name(but->rnaprop);
|
||||
else if (but->optype)
|
||||
name= but->optype->name;
|
||||
else
|
||||
|
@ -724,7 +724,6 @@ void OBJECT_OT_parent_set(wmOperatorType *ot)
|
||||
|
||||
static int parent_noinv_set_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
Object *par= CTX_data_active_object(C);
|
||||
|
||||
par->recalc |= OB_RECALC_OB;
|
||||
|
@ -588,7 +588,7 @@ static void vgroup_normalize(Object *ob)
|
||||
dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
|
||||
|
||||
if(dg) {
|
||||
float weight_max;
|
||||
float weight_max = 0.0f;
|
||||
|
||||
def_nr= ob->actdef-1;
|
||||
|
||||
@ -606,7 +606,7 @@ static void vgroup_normalize(Object *ob)
|
||||
dw = ED_vgroup_weight_get(dvert, def_nr);
|
||||
if(dw) {
|
||||
dw->weight /= weight_max;
|
||||
|
||||
|
||||
/* incase of division errors with very low weights */
|
||||
CLAMP(dw->weight, 0.0f, 1.0f);
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
|
||||
return 1;
|
||||
}
|
||||
else if(CTX_data_equals(member, "particle_system_editable")) {
|
||||
if(PE_poll(C))
|
||||
if(PE_poll((bContext*)C))
|
||||
set_pointer_type(path, result, &RNA_ParticleSystem);
|
||||
else
|
||||
CTX_data_pointer_set(result, NULL, &RNA_ParticleSystem, NULL);
|
||||
|
@ -4092,7 +4092,7 @@ static void freeSeqData(TransInfo *t)
|
||||
for(a=0; a<t->total; a++, td++) {
|
||||
seq= ((TransDataSeq *)td->extra)->seq;
|
||||
if ((seq != seq_prev)) {
|
||||
seq->tmp= 1;
|
||||
seq->tmp= 1; // XXX what's the intention here? this currently gives a compiler warning
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user