diff options
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 24 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 50 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_filter.c | 24 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_ipo_utils.c | 18 | ||||
-rw-r--r-- | source/blender/editors/animation/fmodifier_ui.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 16 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 14 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 16 |
9 files changed, 87 insertions, 87 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index f6b301c4594..a21154bde1b 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -3009,28 +3009,28 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float offset += ICON_WIDTH; } } - + /* step 5) draw name ............................................... */ - // TODO: when renaming, we might not want to draw this, especially if name happens to be longer than channel + /* TODO: when renaming, we might not want to draw this, especially if name happens to be longer than channel */ if (acf->name) { char name[ANIM_CHAN_NAME_SIZE]; /* hopefully this will be enough! */ - + /* set text color */ - // XXX: if active, highlight differently? + /* XXX: if active, highlight differently? */ if (selected) UI_ThemeColor(TH_TEXT_HI); else UI_ThemeColor(TH_TEXT); - + /* get name */ acf->name(ale, name); - + offset += 3; UI_DrawString(offset, ytext, name); - + /* draw red underline if channel is disabled */ if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & FCURVE_DISABLED)) { - // FIXME: replace hardcoded color here, and check on extents! + /* FIXME: replace hardcoded color here, and check on extents! */ glColor3f(1.0f, 0.0f, 0.0f); glLineWidth(2.0); fdrawline((float)(offset), yminc, @@ -3038,13 +3038,13 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float glLineWidth(1.0); } } - + /* step 6) draw backdrops behidn mute+protection toggles + (sliders) ....................... */ /* reset offset - now goes from RHS of panel */ offset = 0; - - // TODO: when drawing sliders, make those draw instead of these toggles if not enough space - + + /* TODO: when drawing sliders, make those draw instead of these toggles if not enough space */ + if (v2d) { short draw_sliders = 0; float color[3]; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 5c57407d14e..9cd2b29afa6 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -400,7 +400,7 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac, ListBase *anim_data, bAn /* compare data, and type as main way of identifying the channel */ if ((ale->data == ale_setting->data) && (ale->type == ale_setting->type)) { /* we also have to check the ID, this is assigned to, since a block may have multiple users */ - // TODO: is the owner-data more revealing? + /* TODO: is the owner-data more revealing? */ if (ale->id == ale_setting->id) { match = ale; break; @@ -576,13 +576,13 @@ static int animedit_poll_channels_active(bContext *C) ScrArea *sa = CTX_wm_area(C); /* channels region test */ - // TODO: could enhance with actually testing if channels region? + /* TODO: could enhance with actually testing if channels region? */ if (ELEM(NULL, sa, CTX_wm_region(C))) return 0; /* animation editor test */ if (ELEM3(sa->spacetype, SPACE_ACTION, SPACE_IPO, SPACE_NLA) == 0) return 0; - + return 1; } @@ -591,9 +591,9 @@ static int animedit_poll_channels_nla_tweakmode_off(bContext *C) { ScrArea *sa = CTX_wm_area(C); Scene *scene = CTX_data_scene(C); - + /* channels region test */ - // TODO: could enhance with actually testing if channels region? + /* TODO: could enhance with actually testing if channels region? */ if (ELEM(NULL, sa, CTX_wm_region(C))) return 0; /* animation editor test */ @@ -1314,16 +1314,16 @@ static int animchannels_visibility_set_exec(bContext *C, wmOperator *UNUSED(op)) /* make all the selected channels visible */ filter = (ANIMFILTER_SEL | ANIMFILTER_NODUPLIS); ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); - + for (ale = anim_data.first; ale; ale = ale->next) { /* hack: skip object channels for now, since flushing those will always flush everything, but they are always included */ - // TODO: find out why this is the case, and fix that + /* TODO: find out why this is the case, and fix that */ if (ale->type == ANIMTYPE_OBJECT) continue; - + /* enable the setting */ ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, ACHANNEL_SETFLAG_ADD); - + /* now, also flush selection status up/down as appropriate */ ANIM_flush_setting_anim_channels(&ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, 1); } @@ -1394,13 +1394,13 @@ static int animchannels_visibility_toggle_exec(bContext *C, wmOperator *UNUSED(o /* Now set the flags */ for (ale = anim_data.first; ale; ale = ale->next) { /* hack: skip object channels for now, since flushing those will always flush everything, but they are always included */ - // TODO: find out why this is the case, and fix that + /* TODO: find out why this is the case, and fix that */ if (ale->type == ANIMTYPE_OBJECT) continue; - + /* change the setting */ ANIM_channel_setting_set(&ac, ale, ACHANNEL_SETTING_VISIBLE, vis); - + /* now, also flush selection status up/down as appropriate */ ANIM_flush_setting_anim_channels(&ac, &all_data, ale, ACHANNEL_SETTING_VISIBLE, (vis == ACHANNEL_SETFLAG_ADD)); } @@ -1734,9 +1734,9 @@ static void ANIM_OT_channels_collapse(wmOperatorType *ot) static int animchannels_enable_poll(bContext *C) { ScrArea *sa = CTX_wm_area(C); - + /* channels region test */ - // TODO: could enhance with actually testing if channels region? + /* TODO: could enhance with actually testing if channels region? */ if (ELEM(NULL, sa, CTX_wm_region(C))) return 0; @@ -2103,17 +2103,17 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in BLI_freelistN(&anim_data); return 0; } - + /* selectmode -1 is a special case for ActionGroups only, which selects all of the channels underneath it only... */ - // TODO: should this feature be extended to work with other channel types too? + /* TODO: should this feature be extended to work with other channel types too? */ if ((selectmode == -1) && (ale->type != ANIMTYPE_GROUP)) { /* normal channels should not behave normally in this case */ BLI_freelistN(&anim_data); return 0; } - + /* action to take depends on what channel we've got */ - // WARNING: must keep this in sync with the equivalent function in nla_channels.c + /* WARNING: must keep this in sync with the equivalent function in nla_channels.c */ switch (ale->type) { case ANIMTYPE_SCENE: { @@ -2152,9 +2152,9 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in } else { Base *b; - + /* deselect all */ - // TODO: should this deselect all other types of channels too? + /* TODO: should this deselect all other types of channels too? */ for (b = sce->base.first; b; b = b->next) { b->flag &= ~SELECT; b->object->flag = b->flag; @@ -2438,10 +2438,10 @@ void ED_operatortypes_animchannels(void) WM_operatortype_append(ANIM_OT_channels_setting_enable); WM_operatortype_append(ANIM_OT_channels_setting_disable); WM_operatortype_append(ANIM_OT_channels_setting_toggle); - + WM_operatortype_append(ANIM_OT_channels_delete); - - // XXX does this need to be a separate operator? + + /* XXX does this need to be a separate operator? */ WM_operatortype_append(ANIM_OT_channels_editable_toggle); WM_operatortype_append(ANIM_OT_channels_move); @@ -2463,11 +2463,11 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf) /* selection */ /* click-select */ - // XXX for now, only leftmouse.... + /* XXX for now, only leftmouse.... */ WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0); RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "children_only", TRUE); - + /* rename */ WM_keymap_add_item(keymap, "ANIM_OT_channels_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index ddc4f4d943c..0d48bf19c9e 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -381,11 +381,11 @@ float ANIM_unit_mapping_get_factor(Scene *scene, ID *id, FCurve *fcu, short rest return RAD2DEGF(1.0f); /* radians to degrees */ } } - - // TODO: other rotation types here as necessary + + /* TODO: other rotation types here as necessary */ } } - + /* no mapping needs to occur... */ return 1.0f; } diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index a6d1ac64bbe..e239719d894 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -164,21 +164,21 @@ static short actedit_get_context(bAnimContext *ac, SpaceAction *saction) ac->mode = saction->mode; return 1; - - case SACTCONT_GPENCIL: /* Grease Pencil */ // XXX review how this mode is handled... + + case SACTCONT_GPENCIL: /* Grease Pencil */ /* XXX review how this mode is handled... */ /* update scene-pointer (no need to check for pinning yet, as not implemented) */ saction->ads.source = (ID *)ac->scene; - + ac->datatype = ANIMCONT_GPENCIL; ac->data = &saction->ads; - + ac->mode = saction->mode; return 1; - - case SACTCONT_MASK: /* Grease Pencil */ // XXX review how this mode is handled... + + case SACTCONT_MASK: /* Grease Pencil */ /* XXX review how this mode is handled... */ /* update scene-pointer (no need to check for pinning yet, as not implemented) */ { - // TODO, other methods to get the mask + /* TODO, other methods to get the mask */ // Sequence *seq = BKE_sequencer_active_get(ac->scene); //MovieClip *clip = ac->scene->clip; // struct Mask *mask = seq ? seq->mask : NULL; @@ -1890,9 +1890,9 @@ static size_t animdata_filter_ds_obanim(bAnimContext *ac, ListBase *anim_data, b AnimData *adt = ob->adt; short type = 0, expanded = 1; void *cdata = NULL; - + /* determine the type of expander channels to use */ - // this is the best way to do this for now... + /* this is the best way to do this for now... */ ANIMDATA_FILTER_CASES(ob, { /* AnimData - no channel, but consider data */ }, { /* NLA - no channel, but consider data */ }, @@ -2122,11 +2122,11 @@ static size_t animdata_filter_dopesheet_scene(bAnimContext *ac, ListBase *anim_d if ((ntree) && !(ads->filterflag & ADS_FILTER_NONTREE)) { tmp_items += animdata_filter_ds_nodetree(ac, &tmp_data, ads, (ID *)sce, ntree, filter_mode); } - - // TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here + + /* TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here */ } END_ANIMFILTER_SUBCHANNELS; - + /* if we collected some channels, add these to the new list... */ if (tmp_items) { /* firstly add object expander if required */ diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index a73651d7664..35782c3b3ae 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -143,15 +143,15 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* no array index */ arrayname = ""; } - + /* putting this all together into the buffer */ - // XXX we need to check for invalid names... - // XXX the name length limit needs to be passed in or as some define + /* XXX we need to check for invalid names... + * XXX the name length limit needs to be passed in or as some define */ if (structname) - BLI_snprintf(name, 256, "%s%s (%s)", arrayname, propname, structname); + BLI_snprintf(name, 256, "%s%s (%s)", arrayname, propname, structname); else - BLI_snprintf(name, 256, "%s%s", arrayname, propname); - + BLI_snprintf(name, 256, "%s%s", arrayname, propname); + /* free temp name if nameprop is set */ if (free_structname) MEM_freeN((void *)structname); @@ -170,11 +170,11 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) else { /* invalid path */ BLI_snprintf(name, 256, "\"%s[%d]\"", fcu->rna_path, fcu->array_index); - + /* icon for this should be the icon for the base ID */ - // TODO: or should we just use the error icon? + /* TODO: or should we just use the error icon? */ icon = RNA_struct_ui_icon(id_ptr.type); - + /* tag F-Curve as disabled - as not usable path */ fcu->flag |= FCURVE_DISABLED; } diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 8c1e2bedd86..91cc602c838 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -506,10 +506,10 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh row = uiLayoutRow(col, TRUE); uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE); uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE); - + /* control points header */ - // TODO: move this control-point control stuff to using the new special widgets for lists - // the current way is far too cramped + /* TODO: move this control-point control stuff to using the new special widgets for lists + * the current way is far too cramped */ row = uiLayoutRow(layout, FALSE); block = uiLayoutGetBlock(row); diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 46a89963ad9..84711b97729 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -673,23 +673,23 @@ static void draw_keylist(View2D *v2d, DLRBT_Tree *keys, DLRBT_Tree *blocks, floa /* draw keys */ if (keys) { /* locked channels are less strongly shown, as feedback for locked channels in DopeSheet */ - // TODO: allow this opacity factor to be themed? + /* TODO: allow this opacity factor to be themed? */ float kalpha = (channelLocked) ? 0.35f : 1.0f; - + for (ak = keys->first; ak; ak = ak->next) { - /* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw + /* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw * - this might give some improvements, since we current have to flip between view/region matrices */ if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax) == 0) continue; - + /* draw using OpenGL - uglier but faster */ - // NOTE1: a previous version of this didn't work nice for some intel cards - // NOTE2: if we wanted to go back to icons, these are icon = (ak->sel & SELECT) ? ICON_SPACE2 : ICON_SPACE3; + /* NOTE1: a previous version of this didn't work nice for some intel cards + * NOTE2: if we wanted to go back to icons, these are icon = (ak->sel & SELECT) ? ICON_SPACE2 : ICON_SPACE3; */ draw_keyframe_shape(ak->cfra, ypos, xscale, 5.0f, (ak->sel & SELECT), ak->key_type, KEYFRAME_SHAPE_BOTH, kalpha); - } + } } - + glDisable(GL_BLEND); } diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 0c9a6ff6bf1..7600e1d4690 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -134,9 +134,9 @@ bAction *verify_adt_action(ID *id, short add) printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : "<None>"); return NULL; } - + /* init action if none available yet */ - // TODO: need some wizardry to handle NLA stuff correct + /* TODO: need some wizardry to handle NLA stuff correct */ if ((adt->action == NULL) && (add)) { char actname[sizeof(id->name) - 2]; BLI_snprintf(actname, sizeof(actname), "%sAction", id->name + 2); @@ -256,8 +256,8 @@ int insert_bezt_fcurve(FCurve *fcu, BezTriple *bezt, short flag) dst->f1 = bezt->f1; dst->f2 = bezt->f2; dst->f3 = bezt->f3; - - // TODO: perform some other operations? + + /* TODO: perform some other operations? */ } } /* keyframing modes allow to not replace keyframe */ @@ -1691,11 +1691,11 @@ static short object_frame_has_keyframe(Object *ob, float frame, short filter) /* 1. test for relative (with keyframes) */ if (id_frame_has_keyframe((ID *)key, frame, filter)) return 1; - + /* 2. test for time */ - // TODO... yet to be implemented (this feature may evolve before then anyway) + /* TODO... yet to be implemented (this feature may evolve before then anyway) */ } - + /* try materials */ if (!(filter & ANIMFILTER_KEYS_LOCAL) && !(filter & ANIMFILTER_KEYS_NOMAT) ) { /* if only active, then we can skip a lot of looping */ diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index cd914f9ff9a..04fd7f677b0 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -597,13 +597,13 @@ void ANIM_keyingset_info_register(KeyingSetInfo *ksi) void ANIM_keyingset_info_unregister(Main *bmain, KeyingSetInfo *ksi) { KeyingSet *ks, *ksn; - + /* find relevant builtin KeyingSets which use this, and remove them */ - // TODO: this isn't done now, since unregister is really only used atm when we - // reload the scripts, which kindof defeats the purpose of "builtin"? + /* TODO: this isn't done now, since unregister is really only used atm when we + * reload the scripts, which kindof defeats the purpose of "builtin"? */ for (ks = builtin_keyingsets.first; ks; ks = ksn) { ksn = ks->next; - + /* remove if matching typeinfo name */ if (strcmp(ks->typeinfo, ksi->idname) == 0) { Scene *scene; @@ -791,8 +791,8 @@ short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) /* get the associated 'type info' for this KeyingSet */ if (ksi == NULL) return 0; - // TODO: check for missing callbacks! - + /* TODO: check for missing callbacks! */ + /* check if it can be used in the current context */ return (ksi->poll(ksi, C)); } @@ -878,8 +878,8 @@ short ANIM_validate_keyingset(bContext *C, ListBase *dsources, KeyingSet *ks) /* get the associated 'type info' for this KeyingSet */ if (ksi == NULL) return MODIFYKEY_MISSING_TYPEINFO; - // TODO: check for missing callbacks! - + /* TODO: check for missing callbacks! */ + /* check if it can be used in the current context */ if (ksi->poll(ksi, C)) { /* if a list of data sources are provided, run a special iterator over them, |