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
path: root/source
diff options
context:
space:
mode:
authorChris Want <cwant@ualberta.ca>2004-01-02 23:57:43 +0300
committerChris Want <cwant@ualberta.ca>2004-01-02 23:57:43 +0300
commit171ee6e2dfa53744aecd53f58f6b42143a89a900 (patch)
tree123d3a447ee083eecd2310060264422d5d7e4fdf /source
parentb9f98c3545bbcb762b4fc98ad4462ccae4d270c0 (diff)
Fixed the goofy way the function prototypes in these files were done
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_action.h106
-rw-r--r--source/blender/blenkernel/intern/action.c88
2 files changed, 49 insertions, 145 deletions
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index 50a025c5356..0a187450c79 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -59,114 +59,70 @@ extern "C" {
* Allocate a new pose channel on the heap and binary copy the
* contents of the src pose channel.
*/
- struct bPoseChannel *
-copy_pose_channel (
- const struct bPoseChannel *src
-);
+struct bPoseChannel *copy_pose_channel(const struct bPoseChannel *src);
/**
* Removes and deallocates all channels from a pose.
* Does not free the pose itself.
*/
- void
-clear_pose (
- struct bPose *pose
-);
+void clear_pose(struct bPose *pose);
/* Sets the value of a pose channel */
- struct bPoseChannel *
-set_pose_channel (
- struct bPose *pose,
- struct bPoseChannel *chan
-);
+struct bPoseChannel *set_pose_channel(struct bPose *pose,
+ struct bPoseChannel *chan);
/**
* Allocate a new pose on the heap, and copy the src pose and it's channels
* into the new pose. *dst is set to the newly allocated structure.
*/
- void
-copy_pose(
- struct bPose **dst,
- const struct bPose *src,
- int copyconstraints
-);
+void copy_pose(struct bPose **dst, const struct bPose *src,
+ int copyconstraints);
/**
* Deallocate the action's channels including constraint channels.
* does not free the action structure.
*/
- void
-free_action(
- struct bAction * id
-);
+void free_action(struct bAction * id);
- void
-make_local_action(
- struct bAction *act
-);
+void make_local_action(struct bAction *act);
- void
-do_all_actions(
- void
-);
+void do_all_actions(void);
/**
* Return a pointer to the pose channel of the given name
* from this pose.
*/
-
- struct bPoseChannel *
-get_pose_channel (
- const struct bPose *pose,
- const char *name
-);
+struct bPoseChannel *get_pose_channel(const struct bPose *pose,
+ const char *name);
/**
* Looks to see if the channel with the given name
* already exists in this pose - if not a new one is
* allocated and initialized.
*/
- void
-verify_pose_channel (
- struct bPose* pose,
- const char* name
-);
+void verify_pose_channel(struct bPose* pose, const char* name);
/**
* Allocate a new bAction on the heap and copy
* the contents of src into it. If src is NULL NULL is returned.
*/
- struct bAction*
-copy_action(
- const struct bAction *src
-);
+struct bAction *copy_action(const struct bAction *src);
/**
* Some kind of bounding box operation on the action.
*/
+float calc_action_start(const struct bAction *act);
- float
-calc_action_start (
- const struct bAction *act
-);
-
- float
-calc_action_end (
- const struct bAction *act
-);
+float calc_action_end(const struct bAction *act);
/**
* Evaluate the pose from the given action.
* If the pose does not exist, a new one is created.
* Some deep calls into blender are made here.
*/
- void
-get_pose_from_action (
- struct bPose **pose,
- struct bAction *act,
- float ctime
-);
+void get_pose_from_action(struct bPose **pose, struct bAction *act,
+ float ctime);
/**
* I think this duplicates the src into *pose.
@@ -174,40 +130,24 @@ get_pose_from_action (
* If the pose does not contain channels from src
* new channels are created.
*/
- void
-get_pose_from_pose (
- struct bPose **pose,
- const struct bPose *src
-);
+void get_pose_from_pose(struct bPose **pose, const struct bPose *src);
- void
-clear_pose_constraint_status (
- struct Object *ob
-);
+void clear_pose_constraint_status(struct Object *ob);
/**
* Blends the common subset of channels from dst and src.
* and writes result to dst.
*/
- void
-blend_poses (
- struct bPose *dst,
- const struct bPose *src,
- float srcweight,
- short mode
-);
+void blend_poses(struct bPose *dst, const struct bPose *src,
+ float srcweight, short mode);
/**
* Iterate through the action channels of the action
* and return the channel with the given name.
* Returns NULL if no channel.
*/
-
- struct bActionChannel *
-get_named_actionchannel (
- struct bAction *act,
- const char *name
-);
+struct bActionChannel *get_named_actionchannel(struct bAction *act,
+ const char *name);
#ifdef __cplusplus
};
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index d018c551171..ed21c3e9656 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -71,44 +71,17 @@
#endif
/* Local function prototypes */
-static
- void
-do_pose_constraint_channels(
- bPose *pose,
- bAction *act,
- float ctime
-);
-
-static
- void
-get_constraint_influence_from_pose (
- bPose *dst,
- bPose *src
-);
-
-static
- void
-blend_constraints(
- ListBase *dst,
- const ListBase *src,
- float srcweight,
- short mode
-);
-
-static
- void
-rest_pose (
- bPose *pose,
- int clearflag
-);
+static void do_pose_constraint_channels(bPose *pose, bAction *act,
+ float ctime);
+static void get_constraint_influence_from_pose(bPose *dst, bPose *src);
+static void blend_constraints(ListBase *dst, const ListBase *src,
+ float srcweight, short mode);
+static void rest_pose(bPose *pose, int clearflag);
/* Implementation */
- bPoseChannel *
-get_pose_channel (
- const bPose *pose,
- const char *name
-){
+bPoseChannel *get_pose_channel(const bPose *pose, const char *name)
+{
bPoseChannel *chan;
for (chan=pose->chanbase.first; chan; chan=chan->next){
@@ -119,12 +92,8 @@ get_pose_channel (
return NULL;
}
-static
- void
-rest_pose (
- bPose *pose,
- int clearflag
-){
+static void rest_pose(bPose *pose, int clearflag)
+{
bPoseChannel *chan;
int i;
@@ -143,14 +112,9 @@ rest_pose (
}
}
-static
- void
-blend_constraints(
- ListBase *dst,
- const ListBase *src,
- float srcweight,
- short mode
-){
+static void blend_constraints(ListBase *dst, const ListBase *src,
+ float srcweight, short mode)
+{
bConstraint *dcon;
const bConstraint *scon;
float dstweight = 0;
@@ -185,7 +149,7 @@ blend_constraints(
}
}
-void blend_poses ( bPose *dst, const bPose *src, float srcweight, short mode)
+void blend_poses(bPose *dst, const bPose *src, float srcweight, short mode)
{
bPoseChannel *dchan;
const bPoseChannel *schan;
@@ -240,7 +204,7 @@ void blend_poses ( bPose *dst, const bPose *src, float srcweight, short mode)
}
}
-void clear_pose_constraint_status ( Object *ob)
+void clear_pose_constraint_status(Object *ob)
{
bPoseChannel *chan;
@@ -254,7 +218,7 @@ void clear_pose_constraint_status ( Object *ob)
}
}
-float calc_action_start (const bAction *act)
+float calc_action_start(const bAction *act)
{
const bActionChannel *chan;
const IpoCurve *icu;
@@ -289,7 +253,7 @@ float calc_action_start (const bAction *act)
return size;
}
-float calc_action_end (const bAction *act)
+float calc_action_end(const bAction *act)
{
const bActionChannel *chan;
const bConstraintChannel *conchan;
@@ -314,7 +278,7 @@ float calc_action_end (const bAction *act)
return size;
}
-void verify_pose_channel (bPose* pose, const char* name)
+void verify_pose_channel(bPose* pose, const char* name)
{
bPoseChannel *chan;
@@ -341,7 +305,7 @@ void verify_pose_channel (bPose* pose, const char* name)
BLI_addtail (&pose->chanbase, chan);
}
-void get_pose_from_pose (bPose **pose, const bPose *src)
+void get_pose_from_pose(bPose **pose, const bPose *src)
{
const bPoseChannel *pchan;
bPoseChannel *newchan;
@@ -364,7 +328,7 @@ void get_pose_from_pose (bPose **pose, const bPose *src)
}
}
-static void get_constraint_influence_from_pose (bPose *dst, bPose *src)
+static void get_constraint_influence_from_pose(bPose *dst, bPose *src)
{
bConstraint *dcon, *scon;
@@ -384,7 +348,7 @@ static void get_constraint_influence_from_pose (bPose *dst, bPose *src)
/* If the pose does not exist, a new one is created */
-void get_pose_from_action ( bPose **pose, bAction *act, float ctime)
+void get_pose_from_action(bPose **pose, bAction *act, float ctime)
{
bActionChannel *achan;
bPoseChannel *pchan;
@@ -649,7 +613,7 @@ static void do_pose_constraint_channels(bPose *pose, bAction *act, float ctime)
}
}
-bActionChannel *get_named_actionchannel (bAction *act, const char *name)
+bActionChannel *get_named_actionchannel(bAction *act, const char *name)
{
bActionChannel *chan;
@@ -664,7 +628,7 @@ bActionChannel *get_named_actionchannel (bAction *act, const char *name)
return NULL;
}
-void clear_pose ( bPose *pose)
+void clear_pose(bPose *pose)
{
bPoseChannel *chan;
@@ -740,7 +704,7 @@ void free_action(bAction *act)
BLI_freelistN (&act->chanbase);
}
-bAction* copy_action (const bAction *src)
+bAction* copy_action(const bAction *src)
{
bAction *dst = NULL;
bActionChannel *dchan, *schan;
@@ -759,7 +723,7 @@ bAction* copy_action (const bAction *src)
return dst;
}
-bPoseChannel *copy_pose_channel (const bPoseChannel* src)
+bPoseChannel *copy_pose_channel(const bPoseChannel* src)
{
bPoseChannel *dst;
@@ -809,7 +773,7 @@ void copy_pose(bPose **dst, const bPose *src, int copycon)
*dst=outPose;
}
-bPoseChannel *set_pose_channel (bPose *pose, bPoseChannel *chan)
+bPoseChannel *set_pose_channel(bPose *pose, bPoseChannel *chan)
{
/* chan is no longer valid for the calling function.
and should not be used by that function after calling