Merge branch 'master' into blender2.8
This commit is contained in:
@@ -865,7 +865,7 @@ char **BKE_sound_get_device_names(void)
|
||||
audio_device_names = AUD_getDeviceNames();
|
||||
#else
|
||||
static const char *names[] = {
|
||||
"Null", "SDL", "OpenAL", "Jack", NULL
|
||||
"Null", "SDL", "OpenAL", "JACK", NULL
|
||||
};
|
||||
audio_device_names = (char **)names;
|
||||
#endif
|
||||
|
||||
@@ -2624,6 +2624,84 @@ static bAnimChannelType ACF_DSGPENCIL =
|
||||
acf_dsgpencil_setting_ptr /* pointer for setting */
|
||||
};
|
||||
|
||||
/* World Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
static int acf_dsmclip_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_SEQUENCE;
|
||||
}
|
||||
|
||||
/* get the appropriate flag(s) for the setting when it is valid */
|
||||
static int acf_dsmclip_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings setting, bool *neg)
|
||||
{
|
||||
/* clear extra return data first */
|
||||
*neg = false;
|
||||
|
||||
switch (setting) {
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanded */
|
||||
return MCLIP_DATA_EXPAND;
|
||||
|
||||
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
|
||||
return ADT_NLA_EVAL_OFF;
|
||||
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (only in Graph Editor) */
|
||||
*neg = true;
|
||||
return ADT_CURVES_NOT_VISIBLE;
|
||||
|
||||
case ACHANNEL_SETTING_SELECT: /* selected */
|
||||
return ADT_UI_SELECTED;
|
||||
|
||||
default: /* unsupported */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* get pointer to the setting */
|
||||
static void *acf_dsmclip_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
|
||||
{
|
||||
MovieClip *clip = (MovieClip *)ale->data;
|
||||
|
||||
/* clear extra return data first */
|
||||
*type = 0;
|
||||
|
||||
switch (setting) {
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanded */
|
||||
return GET_ACF_FLAG_PTR(clip->flag, type);
|
||||
|
||||
case ACHANNEL_SETTING_SELECT: /* selected */
|
||||
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (clip->adt != NULL) {
|
||||
return GET_ACF_FLAG_PTR(clip->adt->flag, type);
|
||||
}
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* world expander type define */
|
||||
static bAnimChannelType ACF_DSMCLIP =
|
||||
{
|
||||
"Movieclip Expander", /* type name */
|
||||
ACHANNEL_ROLE_EXPANDER, /* role */
|
||||
|
||||
acf_generic_dataexpand_color, /* backdrop color */
|
||||
acf_generic_dataexpand_backdrop, /* backdrop */
|
||||
acf_generic_indention_1, /* indent level */
|
||||
acf_generic_basic_offset, /* offset */
|
||||
|
||||
acf_generic_idblock_name , /* name */
|
||||
acf_generic_idfill_name_prop, /* name prop */
|
||||
acf_dsmclip_icon, /* icon */
|
||||
|
||||
acf_generic_dataexpand_setting_valid, /* has setting */
|
||||
acf_dsmclip_setting_flag, /* flag for setting */
|
||||
acf_dsmclip_setting_ptr /* pointer for setting */
|
||||
};
|
||||
|
||||
/* ShapeKey Entry ------------------------------------------- */
|
||||
|
||||
/* name for ShapeKey */
|
||||
@@ -3424,6 +3502,7 @@ static void ANIM_init_channel_typeinfo_data(void)
|
||||
animchannelTypeInfo[type++] = &ACF_DSLINESTYLE; /* LineStyle Channel */
|
||||
animchannelTypeInfo[type++] = &ACF_DSSPK; /* Speaker Channel */
|
||||
animchannelTypeInfo[type++] = &ACF_DSGPENCIL; /* GreasePencil Channel */
|
||||
animchannelTypeInfo[type++] = &ACF_DSMCLIP; /* MovieClip Channel */
|
||||
|
||||
animchannelTypeInfo[type++] = &ACF_SHAPEKEY; /* ShapeKey */
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat
|
||||
case ANIMTYPE_DSLINESTYLE:
|
||||
case ANIMTYPE_DSSPK:
|
||||
case ANIMTYPE_DSGPENCIL:
|
||||
case ANIMTYPE_DSMCLIP:
|
||||
{
|
||||
/* need to verify that this data is valid for now */
|
||||
if (ale->adt) {
|
||||
@@ -188,6 +189,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat
|
||||
case ANIMTYPE_DSNTREE:
|
||||
case ANIMTYPE_DSTEX:
|
||||
case ANIMTYPE_DSGPENCIL:
|
||||
case ANIMTYPE_DSMCLIP:
|
||||
{
|
||||
/* need to verify that this data is valid for now */
|
||||
if (ale && ale->adt) {
|
||||
@@ -288,6 +290,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
|
||||
case ANIMTYPE_DSLINESTYLE:
|
||||
case ANIMTYPE_DSSPK:
|
||||
case ANIMTYPE_DSGPENCIL:
|
||||
case ANIMTYPE_DSMCLIP:
|
||||
{
|
||||
if ((ale->adt) && (ale->adt->flag & ADT_UI_SELECTED))
|
||||
sel = ACHANNEL_SETFLAG_CLEAR;
|
||||
@@ -383,6 +386,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d
|
||||
case ANIMTYPE_DSLINESTYLE:
|
||||
case ANIMTYPE_DSSPK:
|
||||
case ANIMTYPE_DSGPENCIL:
|
||||
case ANIMTYPE_DSMCLIP:
|
||||
{
|
||||
/* need to verify that this data is valid for now */
|
||||
if (ale->adt) {
|
||||
@@ -2733,6 +2737,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index,
|
||||
case ANIMTYPE_DSLINESTYLE:
|
||||
case ANIMTYPE_DSSPK:
|
||||
case ANIMTYPE_DSGPENCIL:
|
||||
case ANIMTYPE_DSMCLIP:
|
||||
{
|
||||
/* sanity checking... */
|
||||
if (ale->adt) {
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "DNA_material_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meta_types.h"
|
||||
#include "DNA_movieclip_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_space_types.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
@@ -828,6 +829,19 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne
|
||||
ale->adt = BKE_animdata_from_id(data);
|
||||
break;
|
||||
}
|
||||
case ANIMTYPE_DSMCLIP:
|
||||
{
|
||||
MovieClip *clip = (MovieClip *)data;
|
||||
AnimData *adt = clip->adt;
|
||||
|
||||
ale->flag = EXPANDED_MCLIP(clip);
|
||||
|
||||
ale->key_data = (adt) ? adt->action : NULL;
|
||||
ale->datatype = ALE_ACT;
|
||||
|
||||
ale->adt = BKE_animdata_from_id(data);
|
||||
break;
|
||||
}
|
||||
case ANIMTYPE_NLACONTROLS:
|
||||
{
|
||||
AnimData *adt = (AnimData *)data;
|
||||
@@ -2721,6 +2735,50 @@ static size_t animdata_filter_dopesheet_scene(bAnimContext *ac, ListBase *anim_d
|
||||
return items;
|
||||
}
|
||||
|
||||
static size_t animdata_filter_ds_movieclip(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, MovieClip *clip, int filter_mode)
|
||||
{
|
||||
ListBase tmp_data = {NULL, NULL};
|
||||
size_t tmp_items = 0;
|
||||
size_t items = 0;
|
||||
/* add world animation channels */
|
||||
BEGIN_ANIMFILTER_SUBCHANNELS(EXPANDED_MCLIP(clip))
|
||||
{
|
||||
/* animation data filtering */
|
||||
tmp_items += animfilter_block_data(ac, &tmp_data, ads, (ID *)clip, filter_mode);
|
||||
}
|
||||
END_ANIMFILTER_SUBCHANNELS;
|
||||
/* did we find anything? */
|
||||
if (tmp_items) {
|
||||
/* include data-expand widget first */
|
||||
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
|
||||
/* check if filtering by active status */
|
||||
if (ANIMCHANNEL_ACTIVEOK(clip)) {
|
||||
ANIMCHANNEL_NEW_CHANNEL(clip, ANIMTYPE_DSMCLIP, clip);
|
||||
}
|
||||
}
|
||||
/* now add the list of collected channels */
|
||||
BLI_movelisttolist(anim_data, &tmp_data);
|
||||
BLI_assert(BLI_listbase_is_empty(&tmp_data));
|
||||
items += tmp_items;
|
||||
}
|
||||
/* return the number of items added to the list */
|
||||
return items;
|
||||
}
|
||||
|
||||
static size_t animdata_filter_dopesheet_movieclips(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, int filter_mode)
|
||||
{
|
||||
size_t items = 0;
|
||||
MovieClip *clip;
|
||||
for (clip = G.main->movieclip.first; clip != NULL; clip = clip->id.next) {
|
||||
/* only show if gpd is used by something... */
|
||||
if (ID_REAL_USERS(clip) < 1) {
|
||||
continue;
|
||||
}
|
||||
items += animdata_filter_ds_movieclip(ac, anim_data, ads, clip, filter_mode);
|
||||
}
|
||||
/* return the number of items added to the list */
|
||||
return items;
|
||||
}
|
||||
|
||||
/* Helper for animdata_filter_dopesheet() - For checking if an object should be included or not */
|
||||
static bool animdata_filter_base_is_ok(bDopeSheet *ads, Scene *scene, Base *base, int filter_mode)
|
||||
@@ -2854,9 +2912,12 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, b
|
||||
items += animdata_filter_ds_cachefile(ac, anim_data, ads, cache_file, filter_mode);
|
||||
}
|
||||
|
||||
/* movie clip's animation */
|
||||
items += animdata_filter_dopesheet_movieclips(ac, anim_data, ads, filter_mode);
|
||||
|
||||
/* scene-linked animation - e.g. world, compositing nodes, scene anim (including sequencer currently) */
|
||||
items += animdata_filter_dopesheet_scene(ac, anim_data, ads, scene, filter_mode);
|
||||
|
||||
|
||||
/* If filtering for channel drawing, we want the objects in alphabetical order,
|
||||
* to make it easier to predict where items are in the hierarchy
|
||||
* - This order only really matters if we need to show all channels in the list (e.g. for drawing)
|
||||
|
||||
@@ -169,6 +169,7 @@ typedef enum eAnim_ChannelType {
|
||||
ANIMTYPE_DSLINESTYLE,
|
||||
ANIMTYPE_DSSPK,
|
||||
ANIMTYPE_DSGPENCIL,
|
||||
ANIMTYPE_DSMCLIP,
|
||||
|
||||
ANIMTYPE_SHAPEKEY,
|
||||
|
||||
@@ -327,6 +328,8 @@ typedef enum eAnimFilter_Flags {
|
||||
#define SEL_NLT(nlt) (nlt->flag & NLATRACK_SELECTED)
|
||||
#define EDITABLE_NLT(nlt) ((nlt->flag & NLATRACK_PROTECTED) == 0)
|
||||
|
||||
/* Movie clip only */
|
||||
#define EXPANDED_MCLIP(clip) (clip->flag & MCLIP_DATA_EXPAND)
|
||||
|
||||
/* AnimData - NLA mostly... */
|
||||
#define SEL_ANIMDATA(adt) (adt->flag & ADT_UI_SELECTED)
|
||||
|
||||
@@ -808,7 +808,7 @@ int UI_searchbox_size_y(void)
|
||||
|
||||
int UI_searchbox_size_x(void)
|
||||
{
|
||||
return 10 * UI_UNIT_X;
|
||||
return 12 * UI_UNIT_X;
|
||||
}
|
||||
|
||||
int UI_search_items_find_index(uiSearchItems *items, const char *name)
|
||||
|
||||
@@ -739,7 +739,10 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
|
||||
if (oglrender->is_animation) {
|
||||
BLI_task_pool_work_and_wait(oglrender->task_pool);
|
||||
BLI_task_pool_free(oglrender->task_pool);
|
||||
BLI_task_scheduler_free(oglrender->task_scheduler);
|
||||
/* Depending on various things we might or might not use global scheduler. */
|
||||
if (oglrender->task_scheduler != NULL) {
|
||||
BLI_task_scheduler_free(oglrender->task_scheduler);
|
||||
}
|
||||
BLI_spin_end(&oglrender->reports_lock);
|
||||
}
|
||||
BLI_mutex_end(&oglrender->task_mutex);
|
||||
|
||||
@@ -103,7 +103,7 @@ static void sclip_zoom_set(const bContext *C, float zoom, float location[2])
|
||||
width *= sc->zoom;
|
||||
height *= sc->zoom;
|
||||
|
||||
if ((width < 4) && (height < 4))
|
||||
if ((width < 4) && (height < 4) && sc->zoom < oldzoom)
|
||||
sc->zoom = oldzoom;
|
||||
else if (BLI_rcti_size_x(&ar->winrct) <= sc->zoom)
|
||||
sc->zoom = oldzoom;
|
||||
|
||||
@@ -122,7 +122,7 @@ static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, const float
|
||||
width *= sima->zoom;
|
||||
height *= sima->zoom;
|
||||
|
||||
if ((width < 4) && (height < 4))
|
||||
if ((width < 4) && (height < 4) && sima->zoom < oldzoom)
|
||||
sima->zoom = oldzoom;
|
||||
else if (BLI_rcti_size_x(&ar->winrct) <= sima->zoom)
|
||||
sima->zoom = oldzoom;
|
||||
|
||||
@@ -146,6 +146,7 @@ enum {
|
||||
MCLIP_USE_PROXY = (1 << 0),
|
||||
MCLIP_USE_PROXY_CUSTOM_DIR = (1 << 1),
|
||||
/* MCLIP_CUSTOM_START_FRAME = (1<<2), */ /* UNUSED */
|
||||
MCLIP_DATA_EXPAND = (1 << 3),
|
||||
|
||||
MCLIP_TIMECODE_FLAGS = (MCLIP_USE_PROXY | MCLIP_USE_PROXY_CUSTOM_DIR)
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ static EnumPropertyItem audio_device_items[] = {
|
||||
{2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage"},
|
||||
#endif
|
||||
#ifdef WITH_JACK
|
||||
{3, "JACK", 0, "Jack", "JACK - Audio Connection Kit, recommended for pro audio users"},
|
||||
{3, "JACK", 0, "JACK", "JACK Audio Connection Kit, recommended for pro audio users"},
|
||||
#endif
|
||||
{0, NULL, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user