diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 89 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 1 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 2 |
8 files changed, 10 insertions, 98 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index db88d84d0b5..99ba3d50821 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -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"); diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index f119f52a47d..5cae2418e89 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -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 */ diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 4ddfde5e2bb..d2948852346 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -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); - } -} - diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 3386a2e3bda..5cdf3b9dcc8 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -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 diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 9511f367930..3d2f64b9c91 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -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; diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 5d76990b0e9..aa60679321a 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -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); } diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 8100bf38995..a503aefe751 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -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); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 077e39d6a2b..06a7461618c 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -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 } } |