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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/blenkernel/nla_private.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/blenkernel/nla_private.h')
-rw-r--r--source/blender/blenkernel/nla_private.h148
1 files changed, 78 insertions, 70 deletions
diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h
index 522f2374918..59c9b4e7d33 100644
--- a/source/blender/blenkernel/nla_private.h
+++ b/source/blender/blenkernel/nla_private.h
@@ -21,7 +21,6 @@
* \ingroup bke
*/
-
#ifndef __NLA_PRIVATE_H__
#define __NLA_PRIVATE_H__
@@ -35,27 +34,27 @@ struct Depsgraph;
/* used for list of strips to accumulate at current time */
typedef struct NlaEvalStrip {
- struct NlaEvalStrip *next, *prev;
+ struct NlaEvalStrip *next, *prev;
- NlaTrack *track; /* track that this strip belongs to */
- NlaStrip *strip; /* strip that's being used */
+ NlaTrack *track; /* track that this strip belongs to */
+ NlaStrip *strip; /* strip that's being used */
- short track_index; /* the index of the track within the list */
- short strip_mode; /* which end of the strip are we looking at */
+ short track_index; /* the index of the track within the list */
+ short strip_mode; /* which end of the strip are we looking at */
- float strip_time; /* time at which which strip is being evaluated */
+ float strip_time; /* time at which which strip is being evaluated */
} NlaEvalStrip;
/* NlaEvalStrip->strip_mode */
enum eNlaEvalStrip_StripMode {
- /* standard evaluation */
- NES_TIME_BEFORE = -1,
- NES_TIME_WITHIN,
- NES_TIME_AFTER,
-
- /* transition-strip evaluations */
- NES_TIME_TRANSITION_START,
- NES_TIME_TRANSITION_END,
+ /* standard evaluation */
+ NES_TIME_BEFORE = -1,
+ NES_TIME_WITHIN,
+ NES_TIME_AFTER,
+
+ /* transition-strip evaluations */
+ NES_TIME_TRANSITION_START,
+ NES_TIME_TRANSITION_END,
};
struct NlaEvalChannel;
@@ -63,99 +62,99 @@ struct NlaEvalData;
/* Unique channel key for GHash. */
typedef struct NlaEvalChannelKey {
- struct PointerRNA ptr;
- struct PropertyRNA *prop;
+ struct PointerRNA ptr;
+ struct PropertyRNA *prop;
} NlaEvalChannelKey;
/* Bitmask of array indices touched by actions. */
typedef struct NlaValidMask {
- BLI_bitmap *ptr;
- BLI_bitmap buffer[sizeof(uint64_t) / sizeof(BLI_bitmap)];
+ BLI_bitmap *ptr;
+ BLI_bitmap buffer[sizeof(uint64_t) / sizeof(BLI_bitmap)];
} NlaValidMask;
/* Set of property values for blending. */
typedef struct NlaEvalChannelSnapshot {
- struct NlaEvalChannel *channel;
+ struct NlaEvalChannel *channel;
- int length; /* Number of values in the property. */
- bool is_base; /* Base snapshot of the channel. */
+ int length; /* Number of values in the property. */
+ bool is_base; /* Base snapshot of the channel. */
- float values[]; /* Item values. */
- /* Memory over-allocated to provide space for values. */
+ float values[]; /* Item values. */
+ /* Memory over-allocated to provide space for values. */
} NlaEvalChannelSnapshot;
/* NlaEvalChannel->mix_mode */
enum eNlaEvalChannel_MixMode {
- NEC_MIX_ADD,
- NEC_MIX_MULTIPLY,
- NEC_MIX_QUATERNION,
- NEC_MIX_AXIS_ANGLE,
+ NEC_MIX_ADD,
+ NEC_MIX_MULTIPLY,
+ NEC_MIX_QUATERNION,
+ NEC_MIX_AXIS_ANGLE,
};
/* Temp channel for accumulating data from NLA for a single property.
* Handles array properties as a unit to allow intelligent blending. */
typedef struct NlaEvalChannel {
- struct NlaEvalChannel *next, *prev;
- struct NlaEvalData *owner;
+ struct NlaEvalChannel *next, *prev;
+ struct NlaEvalData *owner;
- /* Original RNA path string and property key. */
- const char *rna_path;
- NlaEvalChannelKey key;
+ /* Original RNA path string and property key. */
+ const char *rna_path;
+ NlaEvalChannelKey key;
- int index;
- bool is_array;
- bool in_blend;
- char mix_mode;
+ int index;
+ bool is_array;
+ bool in_blend;
+ char mix_mode;
- struct NlaEvalChannel *next_blend;
- NlaEvalChannelSnapshot *blend_snapshot;
+ struct NlaEvalChannel *next_blend;
+ NlaEvalChannelSnapshot *blend_snapshot;
- /* Mask of array items controlled by NLA. */
- NlaValidMask valid;
+ /* Mask of array items controlled by NLA. */
+ NlaValidMask valid;
- /* Base set of values. */
- NlaEvalChannelSnapshot base_snapshot;
- /* Memory over-allocated to provide space for base_snapshot.values. */
+ /* Base set of values. */
+ NlaEvalChannelSnapshot base_snapshot;
+ /* Memory over-allocated to provide space for base_snapshot.values. */
} NlaEvalChannel;
/* Set of values for all channels. */
typedef struct NlaEvalSnapshot {
- /* Snapshot this one defaults to. */
- struct NlaEvalSnapshot *base;
+ /* Snapshot this one defaults to. */
+ struct NlaEvalSnapshot *base;
- int size;
- NlaEvalChannelSnapshot **channels;
+ int size;
+ NlaEvalChannelSnapshot **channels;
} NlaEvalSnapshot;
/* Set of all channels covered by NLA. */
typedef struct NlaEvalData {
- ListBase channels;
+ ListBase channels;
- /* Mapping of paths and NlaEvalChannelKeys to channels. */
- GHash *path_hash;
- GHash *key_hash;
+ /* Mapping of paths and NlaEvalChannelKeys to channels. */
+ GHash *path_hash;
+ GHash *key_hash;
- /* Base snapshot. */
- int num_channels;
- NlaEvalSnapshot base_snapshot;
+ /* Base snapshot. */
+ int num_channels;
+ NlaEvalSnapshot base_snapshot;
- /* Evaluation result shapshot. */
- NlaEvalSnapshot eval_snapshot;
+ /* Evaluation result shapshot. */
+ NlaEvalSnapshot eval_snapshot;
} NlaEvalData;
/* Information about the currently edited strip and ones below it for keyframing. */
typedef struct NlaKeyframingContext {
- struct NlaKeyframingContext *next, *prev;
+ struct NlaKeyframingContext *next, *prev;
- /* AnimData for which this context was built. */
- struct AnimData *adt;
+ /* AnimData for which this context was built. */
+ struct AnimData *adt;
- /* Data of the currently edited strip (copy, or fake strip for the main action). */
- NlaStrip strip;
- NlaEvalStrip *eval_strip;
+ /* Data of the currently edited strip (copy, or fake strip for the main action). */
+ NlaStrip strip;
+ NlaEvalStrip *eval_strip;
- /* Evaluated NLA stack below the current strip. */
- NlaEvalData nla_channels;
+ /* Evaluated NLA stack below the current strip. */
+ NlaEvalData nla_channels;
} NlaKeyframingContext;
/* --------------- NLA Functions (not to be used as a proper API) ----------------------- */
@@ -166,8 +165,17 @@ float nlastrip_get_frame(NlaStrip *strip, float cframe, short mode);
/* --------------- NLA Evaluation (very-private stuff) ----------------------- */
/* these functions are only defined here to avoid problems with the order in which they get defined... */
-NlaEvalStrip *nlastrips_ctime_get_strip(struct Depsgraph *depsgraph, ListBase *list, ListBase *strips, short index, float ctime);
-void nlastrip_evaluate(struct Depsgraph *depsgraph, PointerRNA *ptr, NlaEvalData *channels, ListBase *modifiers, NlaEvalStrip *nes, NlaEvalSnapshot *snapshot);
-void nladata_flush_channels(struct Depsgraph *depsgraph, PointerRNA *ptr, NlaEvalData *channels, NlaEvalSnapshot *snapshot);
-
-#endif /* __NLA_PRIVATE_H__ */
+NlaEvalStrip *nlastrips_ctime_get_strip(
+ struct Depsgraph *depsgraph, ListBase *list, ListBase *strips, short index, float ctime);
+void nlastrip_evaluate(struct Depsgraph *depsgraph,
+ PointerRNA *ptr,
+ NlaEvalData *channels,
+ ListBase *modifiers,
+ NlaEvalStrip *nes,
+ NlaEvalSnapshot *snapshot);
+void nladata_flush_channels(struct Depsgraph *depsgraph,
+ PointerRNA *ptr,
+ NlaEvalData *channels,
+ NlaEvalSnapshot *snapshot);
+
+#endif /* __NLA_PRIVATE_H__ */