本文整理汇总了C++中KeyFrame::load方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyFrame::load方法的具体用法?C++ KeyFrame::load怎么用?C++ KeyFrame::load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyFrame
的用法示例。
在下文中一共展示了KeyFrame::load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: paste_keyframes
void PluginSet::paste_keyframes(int64_t start,
int64_t length,
FileXML *file,
int default_only,
int active_only)
{
int result = 0;
int first_keyframe = 1;
Plugin *current;
while(!result)
{
result = file->read_tag();
if(!result)
{
if(file->tag.title_is("/PLUGINSET"))
result = 1;
else
if(file->tag.title_is("KEYFRAME"))
{
int64_t position = file->tag.get_property("POSITION", 0);
if(first_keyframe && default_only)
{
position = start;
}
else
{
position += start;
}
// Get plugin owning keyframe
for(current = (Plugin*)last;
current;
current = (Plugin*)PREVIOUS)
{
// We want keyframes to exist beyond the end of the last plugin to
// make editing intuitive, but it will always be possible to
// paste keyframes from one plugin into an incompatible plugin.
if(position >= current->startproject)
{
KeyFrame *keyframe = 0;
if(file->tag.get_property("DEFAULT", 0) || default_only)
{
keyframe = (KeyFrame*)current->keyframes->default_auto;
}
else
if(!default_only)
{
keyframe =
(KeyFrame*)current->keyframes->insert_auto(position);
}
if(keyframe)
{
keyframe->load(file);
keyframe->position = position;
}
break;
}
}
first_keyframe = 0;
}
}
}
}
示例2: load
void Plugin::load(FileXML *file)
{
int result = 0;
int first_keyframe = 1;
in = 0;
out = 0;
// Currently show is ignored when loading
show = 0;
on = 0;
while(keyframes->last) delete keyframes->last;
do{
result = file->read_tag();
//printf("Plugin::load 1 %s\n", file->tag.get_title());
if(!result)
{
if(file->tag.title_is("/PLUGIN"))
{
result = 1;
}
else
if(file->tag.title_is("SHARED_LOCATION"))
{
shared_location.load(file);
}
else
if(file->tag.title_is("IN"))
{
in = 1;
}
else
if(file->tag.title_is("OUT"))
{
out = 1;
}
else
if(file->tag.title_is("SHOW"))
{
// show = 1;
}
else
if(file->tag.title_is("ON"))
{
on = 1;
}
else
if(file->tag.title_is("KEYFRAME"))
{
// Default keyframe
if(first_keyframe)
{
keyframes->default_auto->load(file);
first_keyframe = 0;
}
else
// Override default keyframe
{
KeyFrame *keyframe = (KeyFrame*)keyframes->append(new KeyFrame(edl, keyframes));
keyframe->position = file->tag.get_property("POSITION", (int64_t)0);
keyframe->load(file);
}
}
}
}while(!result);
}