Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
animjobenqueuemode.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
12
#include "
core/types.h
"
13
14
//------------------------------------------------------------------------------
15
namespace
Animation
16
{
17
class
AnimJobEnqueueMode
18
{
19
public
:
21
enum
Code
22
{
23
Append
= 0,
// append the new job after other enqueued jobs on same track
24
Intercept
= 1,
// stop all clips on same track and insert new job at current time
25
IgnoreIfSameClipActive
= 2,
// ignore the new job if another job with the same clip name is running
26
IgnoreIfSameExclTagActive
= 4,
// ignore the new job is another job with the same exclusive tag is running
27
};
28
30
static
const
char
*
ToString
(
Code
c);
32
static
Code
FromString
(
const
char
* s);
33
};
34
35
//------------------------------------------------------------------------------
38
inline
AnimJobEnqueueMode::Code
39
AnimJobEnqueueMode::FromString
(
const
char
* s)
40
{
41
n_assert
(0 != s);
42
if
(0 ==
Util::String::StrCmp
(s,
"Append"
))
return
Append
;
43
else
if
(0 ==
Util::String::StrCmp
(s,
"Intercept"
))
return
Intercept
;
44
else
if
(0 ==
Util::String::StrCmp
(s,
"IgnoreIfSameClipActive"
))
return
IgnoreIfSameClipActive
;
45
else
if
(0 ==
Util::String::StrCmp
(s,
"IgnoreIfSameExclTagActive"
))
return
IgnoreIfSameExclTagActive
;
46
else
47
{
48
n_error
(
"AnimJobEnqueueMode: Invalid mode string '%s'!\n"
, s);
49
}
50
return
Intercept
;
51
}
52
53
//------------------------------------------------------------------------------
56
inline
const
char
*
57
AnimJobEnqueueMode::ToString
(
Code
c)
58
{
59
switch
(c)
60
{
61
case
Append
:
return
"Append"
;
62
case
Intercept
:
return
"Intercept"
;
63
case
IgnoreIfSameClipActive
:
return
"IgnoreIfSameClipActive"
;
64
case
IgnoreIfSameExclTagActive
:
return
"IgnoreIfSameExclTagActive"
;
65
default
:
66
n_error
(
"AnimJobEnqueueMode: Invalid mode '%d'!\n"
, c);
67
break
;
68
}
69
return
0;
70
}
71
72
}
// namespace Animation
73
//------------------------------------------------------------------------------
74
Animation::AnimJobEnqueueMode
Describes the behaviour when enqueueing a new animation job into an anim sequencer.
Definition
animjobenqueuemode.h:18
Animation::AnimJobEnqueueMode::FromString
static Code FromString(const char *s)
convert from string
Definition
animjobenqueuemode.h:39
Animation::AnimJobEnqueueMode::ToString
static const char * ToString(Code c)
convert to string
Definition
animjobenqueuemode.h:57
Animation::AnimJobEnqueueMode::Code
Code
enqueue modes
Definition
animjobenqueuemode.h:22
Animation::AnimJobEnqueueMode::Append
@ Append
Definition
animjobenqueuemode.h:23
Animation::AnimJobEnqueueMode::IgnoreIfSameClipActive
@ IgnoreIfSameClipActive
Definition
animjobenqueuemode.h:25
Animation::AnimJobEnqueueMode::Intercept
@ Intercept
Definition
animjobenqueuemode.h:24
Animation::AnimJobEnqueueMode::IgnoreIfSameExclTagActive
@ IgnoreIfSameExclTagActive
Definition
animjobenqueuemode.h:26
n_error
void __cdecl n_error(const char *msg,...)
This function is called when a serious situation is encountered which requires abortion of the applic...
Definition
debug.cc:138
n_assert
#define n_assert(exp)
Definition
debug.h:50
Animation
Definition
animeventhandlerbase.cc:10
Util.String::StrCmp
static int StrCmp(const char *str0, const char *str1)
lowlevel string compare wrapper function
Definition
string.cc:1181
types.h
code
render
animation
animjobenqueuemode.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.