Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-23 22:50:56 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-09-23 22:50:56 +0400
commita42ba82f638e481d7fd3c3ed2ba05c331ef6717e (patch)
tree81a2b9221799707b49b74a5df8bb3ff964ba78bd /source/blender/editors/animation/anim_channels_defines.c
parent7afbdff1b6c348227e652e1c3071ab7ba7c91c44 (diff)
parenta73dd3476e7d180d3320afc04d218ce22f2f3bfc (diff)
Merged changes in the trunk up to revision 50829.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/render/intern/source/convertblender.c source/blender/render/intern/source/pipeline.c Also addressed code inconsistency due to changes in the trunk revision 50628 (color management with OCIO) and 50806 (UV project material). OCIO-related changes are marked OCIO_TODO as in some other files modified in revision 50628.
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c72
1 files changed, 34 insertions, 38 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index f220f0ee762..12c0e851f88 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -85,6 +85,7 @@
/* size of indent steps */
#define INDENT_STEP_SIZE 7
+/* size of string buffers used for animation channel displayed names */
#define ANIM_CHAN_NAME_SIZE 256
/* get the pointer used for some flag */
@@ -293,7 +294,7 @@ static short acf_nodetree_rootType_offset(bNodeTree *ntree)
}
}
- // unknown
+ /* unknown */
return 0;
}
@@ -423,7 +424,7 @@ static void acf_summary_name(bAnimListElem *UNUSED(ale), char *name)
BLI_strncpy(name, "DopeSheet Summary", ANIM_CHAN_NAME_SIZE);
}
-// TODO: this is really a temp icon I think
+// FIXME: this is really a temp icon I think
static int acf_summary_icon(bAnimListElem *UNUSED(ale))
{
return ICON_BORDERMOVE;
@@ -602,7 +603,6 @@ static int acf_object_icon(bAnimListElem *ale)
Object *ob = base->object;
/* icon depends on object-type */
-
switch (ob->type) {
case OB_LAMP:
return ICON_OUTLINER_OB_LAMP;
@@ -629,7 +629,6 @@ static int acf_object_icon(bAnimListElem *ale)
default:
return ICON_OBJECT_DATA;
}
-
}
/* name for object */
@@ -2256,7 +2255,7 @@ static int acf_dsspk_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
{
/* clear extra return data first */
*neg = 0;
-
+
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
return SPK_DS_EXPAND;
@@ -2280,10 +2279,10 @@ static int acf_dsspk_setting_flag(bAnimContext *UNUSED(ac), int setting, short *
static void *acf_dsspk_setting_ptr(bAnimListElem *ale, int setting, short *type)
{
Speaker *spk = (Speaker *)ale->data;
-
+
/* clear extra return data first */
*type = 0;
-
+
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
return GET_ACF_FLAG_PTR(spk->flag, type);
@@ -2555,7 +2554,7 @@ static int acf_gpl_setting_flag(bAnimContext *UNUSED(ac), int setting, short *ne
return GP_LAYER_HIDE;
case ACHANNEL_SETTING_PROTECT: /* protected */
- // *neg = 1; - if we change this to edtiability
+ // *neg = 1; - if we change this to editability
return GP_LAYER_LOCKED;
default: /* unsupported */
@@ -2604,7 +2603,7 @@ static void acf_mask_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale),
// TODO: just get this from RNA?
static int acf_mask_icon(bAnimListElem *UNUSED(ale))
{
- return ICON_GREASEPENCIL; // MASK_TODO - need real icon
+ return ICON_MOD_MASK;
}
/* check if some setting exists for this channel */
@@ -2651,15 +2650,15 @@ static void *acf_mask_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short
/* mask datablock type define */
static bAnimChannelType ACF_MASKDATA =
{
- "Mask Datablock", /* type name */
+ "Mask Datablock", /* type name */
acf_mask_color, /* backdrop color */
- acf_group_backdrop, /* backdrop */
- acf_generic_indention_0, /* indent level */
- acf_generic_group_offset, /* offset */
+ acf_group_backdrop, /* backdrop */
+ acf_generic_indention_0, /* indent level */
+ acf_generic_group_offset, /* offset */
- acf_generic_idblock_name, /* name */
- acf_generic_idfill_nameprop, /* name prop */
+ acf_generic_idblock_name, /* name */
+ acf_generic_idfill_nameprop, /* name prop */
acf_mask_icon, /* icon */
acf_mask_setting_valid, /* has setting */
@@ -2720,7 +2719,7 @@ static int acf_masklay_setting_flag(bAnimContext *UNUSED(ac), int setting, short
// return GP_LAYER_HIDE;
case ACHANNEL_SETTING_PROTECT: /* protected */
- // *neg = 1; - if we change this to edtiability
+ // *neg = 1; - if we change this to editability
return MASK_LAYERFLAG_LOCKED;
default: /* unsupported */
@@ -2732,7 +2731,7 @@ static int acf_masklay_setting_flag(bAnimContext *UNUSED(ac), int setting, short
static void *acf_masklay_setting_ptr(bAnimListElem *ale, int UNUSED(setting), short *type)
{
MaskLayer *masklay = (MaskLayer *)ale->data;
-
+
/* all flags are just in agrp->flag for now... */
return GET_ACF_FLAG_PTR(masklay->flag, type);
}
@@ -2740,20 +2739,20 @@ static void *acf_masklay_setting_ptr(bAnimListElem *ale, int UNUSED(setting), sh
/* grease pencil layer type define */
static bAnimChannelType ACF_MASKLAYER =
{
- "Mask Layer", /* type name */
-
+ "Mask Layer", /* type name */
+
acf_generic_channel_color, /* backdrop color */
acf_generic_channel_backdrop, /* backdrop */
acf_generic_indention_flexible, /* indent level */
acf_generic_group_offset, /* offset */
-
- acf_masklay_name, /* name */
- acf_masklay_name_prop, /* name prop */
+
+ acf_masklay_name, /* name */
+ acf_masklay_name_prop, /* name prop */
NULL, /* icon */
-
- acf_masklay_setting_valid, /* has setting */
- acf_masklay_setting_flag, /* flag for setting */
- acf_masklay_setting_ptr /* pointer for setting */
+
+ acf_masklay_setting_valid, /* has setting */
+ acf_masklay_setting_flag, /* flag for setting */
+ acf_masklay_setting_ptr /* pointer for setting */
};
@@ -2855,7 +2854,7 @@ void ANIM_channel_debug_print_info(bAnimListElem *ale, short indent_level)
acf->name(ale, name);
else
BLI_strncpy(name, "<No name>", sizeof(name));
-
+
/* print type name + ui name */
printf("ChanType: <%s> Name: \"%s\"\n", acf->channel_type_name, name);
}
@@ -2999,7 +2998,6 @@ void ANIM_channel_setting_set(bAnimContext *ac, bAnimListElem *ale, int setting,
#define RENAME_TEXT_WIDTH 100
/* Draw the given channel */
-// TODO: make this use UI controls for the buttons
void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
{
bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
@@ -3089,20 +3087,20 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
/* 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? */
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! */
@@ -3147,7 +3145,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float
}
/* check if there's enough space for the toggles if the sliders are drawn too */
- if (!(draw_sliders) || (BLI_RCT_SIZE_X(&v2d->mask) > ACHANNEL_BUTTON_WIDTH / 2) ) {
+ if (!(draw_sliders) || (BLI_rcti_size_x(&v2d->mask) > ACHANNEL_BUTTON_WIDTH / 2) ) {
/* protect... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT))
offset += ICON_WIDTH;
@@ -3232,7 +3230,6 @@ static void achannel_setting_rename_done_cb(bContext *C, void *ads_poin, void *U
ads->renameIndex = 0;
/* send notifiers */
- // XXX: right notifier?
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_RENAME, NULL);
}
@@ -3278,7 +3275,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
{
Key *key = (Key *)key_poin;
KeyBlock *kb = (KeyBlock *)kb_poin;
- char *rna_path = key_get_curValue_rnaPath(key, kb);
+ char *rna_path = BKE_keyblock_curval_rnapath_get(key, kb);
ReportList *reports = CTX_wm_reports(C);
Scene *scene = CTX_data_scene(C);
@@ -3516,7 +3513,6 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
offset = 0;
// TODO: when drawing sliders, make those draw instead of these toggles if not enough space
-
if (v2d) {
short draw_sliders = 0;
@@ -3539,7 +3535,7 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
}
/* check if there's enough space for the toggles if the sliders are drawn too */
- if (!(draw_sliders) || (BLI_RCT_SIZE_X(&v2d->mask) > ACHANNEL_BUTTON_WIDTH / 2) ) {
+ if (!(draw_sliders) || (BLI_rcti_size_x(&v2d->mask) > ACHANNEL_BUTTON_WIDTH / 2) ) {
/* protect... */
if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
offset += ICON_WIDTH;
@@ -3586,7 +3582,7 @@ void ANIM_channel_draw_widgets(bContext *C, bAnimContext *ac, bAnimListElem *ale
KeyBlock *kb = (KeyBlock *)ale->data;
Key *key = (Key *)ale->id;
- rna_path = key_get_curValue_rnaPath(key, kb);
+ rna_path = BKE_keyblock_curval_rnapath_get(key, kb);
free_path = 1;
}