Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
This commit is contained in:
parent
c735aca42e
commit
2abfcebb0e
|
@ -38,10 +38,10 @@
|
|||
*/
|
||||
|
||||
/* Global defines */
|
||||
// Uncomment to see debug information
|
||||
/* Uncomment to see debug information */
|
||||
// #define IN_DEBUG_MODE
|
||||
|
||||
// Uncomment to see more output messages during repair
|
||||
/* Uncomment to see more output messages during repair */
|
||||
// #define IN_VERBOSE_MODE
|
||||
|
||||
/* Set scan convert params */
|
||||
|
@ -65,19 +65,19 @@ struct InternalNode {
|
|||
/* Can have up to eight children */
|
||||
Node *children[0];
|
||||
|
||||
/// Test if child is leaf
|
||||
/** Test if child is leaf */
|
||||
int is_child_leaf(int index) const
|
||||
{
|
||||
return (child_is_leaf_bitfield >> index) & 1;
|
||||
}
|
||||
|
||||
/// If child index exists
|
||||
/** If child index exists */
|
||||
int has_child(int index) const
|
||||
{
|
||||
return (has_child_bitfield >> index) & 1;
|
||||
}
|
||||
|
||||
/// Get the pointer to child index
|
||||
/** Get the pointer to child index */
|
||||
Node *get_child(int count)
|
||||
{
|
||||
return children[count];
|
||||
|
@ -88,13 +88,13 @@ struct InternalNode {
|
|||
return children[count];
|
||||
}
|
||||
|
||||
/// Get total number of children
|
||||
/** Get total number of children */
|
||||
int get_num_children() const
|
||||
{
|
||||
return numChildrenTable[has_child_bitfield];
|
||||
}
|
||||
|
||||
/// Get the count of children
|
||||
/** Get the count of children */
|
||||
int get_child_count(int index) const
|
||||
{
|
||||
return childrenCountTable[has_child_bitfield][index];
|
||||
|
@ -108,7 +108,7 @@ struct InternalNode {
|
|||
return childrenCountTable[has_child_bitfield];
|
||||
}
|
||||
|
||||
/// Get all children
|
||||
/** Get all children */
|
||||
void fill_children(Node *children[8], int leaf[8])
|
||||
{
|
||||
int count = 0;
|
||||
|
@ -125,7 +125,7 @@ struct InternalNode {
|
|||
}
|
||||
}
|
||||
|
||||
/// Sets the child pointer
|
||||
/** Sets the child pointer */
|
||||
void set_child(int count, Node *chd)
|
||||
{
|
||||
children[count] = chd;
|
||||
|
@ -195,22 +195,22 @@ extern const int dirEdge[3][4];
|
|||
*/
|
||||
|
||||
struct PathElement {
|
||||
// Origin
|
||||
/* Origin */
|
||||
int pos[3];
|
||||
|
||||
// link
|
||||
/* link */
|
||||
PathElement *next;
|
||||
};
|
||||
|
||||
struct PathList {
|
||||
// Head
|
||||
/* Head */
|
||||
PathElement *head;
|
||||
PathElement *tail;
|
||||
|
||||
// Length of the list
|
||||
/* Length of the list */
|
||||
int length;
|
||||
|
||||
// Next list
|
||||
/* Next list */
|
||||
PathList *next;
|
||||
};
|
||||
|
||||
|
@ -221,31 +221,31 @@ class Octree {
|
|||
public:
|
||||
/* Public members */
|
||||
|
||||
/// Memory allocators
|
||||
/** Memory allocators */
|
||||
VirtualMemoryAllocator *alloc[9];
|
||||
VirtualMemoryAllocator *leafalloc[4];
|
||||
|
||||
/// Root node
|
||||
/** Root node */
|
||||
Node *root;
|
||||
|
||||
/// Model reader
|
||||
/** Model reader */
|
||||
ModelReader *reader;
|
||||
|
||||
/// Marching cubes table
|
||||
/** Marching cubes table */
|
||||
Cubes *cubes;
|
||||
|
||||
/// Length of grid
|
||||
/** Length of grid */
|
||||
int dimen;
|
||||
int mindimen, minshift;
|
||||
|
||||
/// Maximum depth
|
||||
/** Maximum depth */
|
||||
int maxDepth;
|
||||
|
||||
/// The lower corner of the bounding box and the size
|
||||
/** The lower corner of the bounding box and the size */
|
||||
float origin[3];
|
||||
float range;
|
||||
|
||||
/// Counting information
|
||||
/** Counting information */
|
||||
int nodeCount;
|
||||
int nodeSpace;
|
||||
int nodeCounts[9];
|
||||
|
@ -255,9 +255,9 @@ class Octree {
|
|||
PathList *ringList;
|
||||
|
||||
int maxTrianglePerCell;
|
||||
int outType; // 0 for OFF, 1 for PLY, 2 for VOL
|
||||
int outType; /* 0 for OFF, 1 for PLY, 2 for VOL */
|
||||
|
||||
// For flood filling
|
||||
/* For flood filling */
|
||||
int use_flood_fill;
|
||||
float thresh;
|
||||
|
||||
|
@ -469,11 +469,11 @@ class Octree {
|
|||
private:
|
||||
/************ Operators for all nodes ************/
|
||||
|
||||
/// Lookup table
|
||||
/** Lookup table */
|
||||
int numEdgeTable[8];
|
||||
int edgeCountTable[8][3];
|
||||
|
||||
/// Build up lookup table
|
||||
/** Build up lookup table */
|
||||
void buildTable()
|
||||
{
|
||||
for (int i = 0; i < 256; i++) {
|
||||
|
@ -550,13 +550,13 @@ class Octree {
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
/// Retrieve signs
|
||||
/** Retrieve signs */
|
||||
int getSign(const LeafNode *leaf, int index)
|
||||
{
|
||||
return ((leaf->signs >> index) & 1);
|
||||
}
|
||||
|
||||
/// Set sign
|
||||
/** Set sign */
|
||||
void setSign(LeafNode *leaf, int index)
|
||||
{
|
||||
leaf->signs |= (1 << index);
|
||||
|
@ -624,7 +624,7 @@ class Octree {
|
|||
return (leaf->flood_fill >> eind) & 1;
|
||||
}
|
||||
|
||||
/// Generate signs at the corners from the edge parity
|
||||
/** Generate signs at the corners from the edge parity */
|
||||
void generateSigns(LeafNode *leaf, unsigned char table[], int start)
|
||||
{
|
||||
leaf->signs = table[leaf->edge_parity];
|
||||
|
@ -634,7 +634,7 @@ class Octree {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get edge parity
|
||||
/** Get edge parity */
|
||||
int getEdgeParity(const LeafNode *leaf, int index) const
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
|
@ -642,7 +642,7 @@ class Octree {
|
|||
return (leaf->edge_parity >> index) & 1;
|
||||
}
|
||||
|
||||
/// Get edge parity on a face
|
||||
/** Get edge parity on a face */
|
||||
int getFaceParity(LeafNode *leaf, int index)
|
||||
{
|
||||
int a = getEdgeParity(leaf, faceMap[index][0]) + getEdgeParity(leaf, faceMap[index][1]) +
|
||||
|
@ -656,7 +656,7 @@ class Octree {
|
|||
return a;
|
||||
}
|
||||
|
||||
/// Set edge parity
|
||||
/** Set edge parity */
|
||||
void flipEdge(LeafNode *leaf, int index)
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
|
@ -664,7 +664,7 @@ class Octree {
|
|||
leaf->edge_parity ^= (1 << index);
|
||||
}
|
||||
|
||||
/// Set 1
|
||||
/** Set 1 */
|
||||
void setEdge(LeafNode *leaf, int index)
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
|
@ -672,7 +672,7 @@ class Octree {
|
|||
leaf->edge_parity |= (1 << index);
|
||||
}
|
||||
|
||||
/// Set 0
|
||||
/** Set 0 */
|
||||
void resetEdge(LeafNode *leaf, int index)
|
||||
{
|
||||
assert(index >= 0 && index <= 11);
|
||||
|
@ -680,7 +680,7 @@ class Octree {
|
|||
leaf->edge_parity &= ~(1 << index);
|
||||
}
|
||||
|
||||
/// Flipping with a new intersection offset
|
||||
/** Flipping with a new intersection offset */
|
||||
void createPrimalEdgesMask(LeafNode *leaf)
|
||||
{
|
||||
leaf->primary_edge_intersections = getPrimalEdgesMask2(leaf);
|
||||
|
@ -707,7 +707,7 @@ class Octree {
|
|||
if ((index & 3) == 0) {
|
||||
int ind = index / 4;
|
||||
if (getEdgeParity(leaf, index) && !getStoredEdgesParity(leaf, ind)) {
|
||||
// Create a new node
|
||||
/* Create a new node */
|
||||
int num = getNumEdges(leaf) + 1;
|
||||
setStoredEdgesParity(leaf, ind);
|
||||
int count = getEdgeCount(leaf, ind);
|
||||
|
@ -739,14 +739,14 @@ class Octree {
|
|||
return leaf;
|
||||
}
|
||||
|
||||
/// Update parent link
|
||||
/** Update parent link */
|
||||
void updateParent(InternalNode *node, int len, int st[3], LeafNode *leaf)
|
||||
{
|
||||
// First, locate the parent
|
||||
/* First, locate the parent */
|
||||
int count;
|
||||
InternalNode *parent = locateParent(node, len, st, count);
|
||||
|
||||
// Update
|
||||
/* Update */
|
||||
parent->set_child(count, (Node *)leaf);
|
||||
}
|
||||
|
||||
|
@ -757,18 +757,18 @@ class Octree {
|
|||
return;
|
||||
}
|
||||
|
||||
// First, locate the parent
|
||||
/* First, locate the parent */
|
||||
int count;
|
||||
InternalNode *parent = locateParent(len, st, count);
|
||||
|
||||
// UPdate
|
||||
/* Update */
|
||||
parent->set_child(count, (Node *)node);
|
||||
}
|
||||
|
||||
/// Find edge intersection on a given edge
|
||||
/** Find edge intersection on a given edge */
|
||||
int getEdgeIntersectionByIndex(int st[3], int index, float pt[3], int check) const
|
||||
{
|
||||
// First, locat the leaf
|
||||
/* First, locat the leaf */
|
||||
const LeafNode *leaf;
|
||||
if (check) {
|
||||
leaf = locateLeafCheck(st);
|
||||
|
@ -791,7 +791,7 @@ class Octree {
|
|||
}
|
||||
}
|
||||
|
||||
/// Retrieve number of edges intersected
|
||||
/** Retrieve number of edges intersected */
|
||||
int getPrimalEdgesMask(const LeafNode *leaf) const
|
||||
{
|
||||
return leaf->primary_edge_intersections;
|
||||
|
@ -803,7 +803,7 @@ class Octree {
|
|||
((leaf->edge_parity & 0x100) >> 6));
|
||||
}
|
||||
|
||||
/// Get the count for a primary edge
|
||||
/** Get the count for a primary edge */
|
||||
int getEdgeCount(const LeafNode *leaf, int index) const
|
||||
{
|
||||
return edgeCountTable[getPrimalEdgesMask(leaf)][index];
|
||||
|
@ -818,7 +818,7 @@ class Octree {
|
|||
return numEdgeTable[getPrimalEdgesMask2(leaf)];
|
||||
}
|
||||
|
||||
/// Set edge intersection
|
||||
/** Set edge intersection */
|
||||
void setEdgeOffset(LeafNode *leaf, float pt, int count)
|
||||
{
|
||||
float *pts = leaf->edge_intersections;
|
||||
|
@ -828,7 +828,7 @@ class Octree {
|
|||
pts[EDGE_FLOATS * count + 3] = 0;
|
||||
}
|
||||
|
||||
/// Set multiple edge intersections
|
||||
/** Set multiple edge intersections */
|
||||
void setEdgeOffsets(LeafNode *leaf, float pt[3], int len)
|
||||
{
|
||||
float *pts = leaf->edge_intersections;
|
||||
|
@ -837,35 +837,35 @@ class Octree {
|
|||
}
|
||||
}
|
||||
|
||||
/// Retrieve edge intersection
|
||||
/** Retrieve edge intersection */
|
||||
float getEdgeOffset(const LeafNode *leaf, int count) const
|
||||
{
|
||||
return leaf->edge_intersections[4 * count];
|
||||
}
|
||||
|
||||
/// Update method
|
||||
/** Update method */
|
||||
LeafNode *updateEdgeOffsets(LeafNode *leaf, int oldlen, int newlen, float offs[3])
|
||||
{
|
||||
// First, create a new leaf node
|
||||
/* First, create a new leaf node */
|
||||
LeafNode *nleaf = createLeaf(newlen);
|
||||
*nleaf = *leaf;
|
||||
|
||||
// Next, fill in the offsets
|
||||
/* Next, fill in the offsets */
|
||||
setEdgeOffsets(nleaf, offs, newlen);
|
||||
|
||||
// Finally, delete the old leaf
|
||||
/* Finally, delete the old leaf */
|
||||
removeLeaf(oldlen, leaf);
|
||||
|
||||
return nleaf;
|
||||
}
|
||||
|
||||
/// Set minimizer index
|
||||
/** Set minimizer index */
|
||||
void setMinimizerIndex(LeafNode *leaf, int index)
|
||||
{
|
||||
leaf->minimizer_index = index;
|
||||
}
|
||||
|
||||
/// Get minimizer index
|
||||
/** Get minimizer index */
|
||||
int getMinimizerIndex(LeafNode *leaf)
|
||||
{
|
||||
return leaf->minimizer_index;
|
||||
|
@ -890,7 +890,7 @@ class Octree {
|
|||
}
|
||||
}
|
||||
|
||||
/// Set edge intersection
|
||||
/** Set edge intersection */
|
||||
void setEdgeOffsetNormal(LeafNode *leaf, float pt, float a, float b, float c, int count)
|
||||
{
|
||||
float *pts = leaf->edge_intersections;
|
||||
|
@ -909,7 +909,7 @@ class Octree {
|
|||
return pts[4 * count];
|
||||
}
|
||||
|
||||
/// Set multiple edge intersections
|
||||
/** Set multiple edge intersections */
|
||||
void setEdgeOffsetsNormals(
|
||||
LeafNode *leaf, const float pt[], const float a[], const float b[], const float c[], int len)
|
||||
{
|
||||
|
@ -925,7 +925,7 @@ class Octree {
|
|||
}
|
||||
}
|
||||
|
||||
/// Retrieve complete edge intersection
|
||||
/** Retrieve complete edge intersection */
|
||||
void getEdgeIntersectionByIndex(
|
||||
const LeafNode *leaf, int index, int st[3], int len, float pt[3], float nm[3]) const
|
||||
{
|
||||
|
@ -1168,25 +1168,25 @@ class Octree {
|
|||
}
|
||||
}
|
||||
|
||||
/// Update method
|
||||
/** Update method */
|
||||
LeafNode *updateEdgeOffsetsNormals(
|
||||
LeafNode *leaf, int oldlen, int newlen, float offs[3], float a[3], float b[3], float c[3])
|
||||
{
|
||||
// First, create a new leaf node
|
||||
/* First, create a new leaf node */
|
||||
LeafNode *nleaf = createLeaf(newlen);
|
||||
*nleaf = *leaf;
|
||||
|
||||
// Next, fill in the offsets
|
||||
/* Next, fill in the offsets */
|
||||
setEdgeOffsetsNormals(nleaf, offs, a, b, c, newlen);
|
||||
|
||||
// Finally, delete the old leaf
|
||||
/* Finally, delete the old leaf */
|
||||
removeLeaf(oldlen, leaf);
|
||||
|
||||
return nleaf;
|
||||
}
|
||||
|
||||
/// Locate a leaf
|
||||
/// WARNING: assuming this leaf already exists!
|
||||
/** Locate a leaf
|
||||
* WARNING: assuming this leaf already exists! */
|
||||
|
||||
LeafNode *locateLeaf(int st[3])
|
||||
{
|
||||
|
@ -1282,7 +1282,7 @@ class Octree {
|
|||
|
||||
/************ Operators for internal nodes ************/
|
||||
|
||||
/// Add a kid to an existing internal node
|
||||
/** Add a kid to an existing internal node */
|
||||
InternalNode *addChild(InternalNode *node, int index, Node *child, int aLeaf)
|
||||
{
|
||||
// Create new internal node
|
||||
|
@ -1318,7 +1318,7 @@ class Octree {
|
|||
return rnode;
|
||||
}
|
||||
|
||||
/// Allocate a node
|
||||
/** Allocate a node */
|
||||
InternalNode *createInternal(int length)
|
||||
{
|
||||
InternalNode *inode = (InternalNode *)alloc[length]->allocate();
|
||||
|
@ -1350,7 +1350,7 @@ class Octree {
|
|||
leafalloc[num]->deallocate(leaf);
|
||||
}
|
||||
|
||||
/// Add a leaf (by creating a new par node with the leaf added)
|
||||
/** Add a leaf (by creating a new par node with the leaf added) */
|
||||
InternalNode *addLeafChild(InternalNode *par, int index, int count, LeafNode *leaf)
|
||||
{
|
||||
int num = par->get_num_children() + 1;
|
||||
|
|
|
@ -29,7 +29,7 @@ struct bAddon;
|
|||
#ifdef __RNA_TYPES_H__
|
||||
typedef struct bAddonPrefType {
|
||||
/* type info */
|
||||
char idname[64]; // best keep the same size as BKE_ST_MAXNAME
|
||||
char idname[64]; /* best keep the same size as #BKE_ST_MAXNAME */
|
||||
|
||||
/* RNA integration */
|
||||
ExtensionRNA rna_ext;
|
||||
|
|
|
@ -63,14 +63,14 @@ typedef enum {
|
|||
////////////////////////////////////////
|
||||
/* used for collisions in collision.c */
|
||||
typedef struct CollPair {
|
||||
unsigned int face1; // cloth face
|
||||
unsigned int face2; // object face
|
||||
unsigned int face1; /* cloth face */
|
||||
unsigned int face2; /* object face */
|
||||
float distance;
|
||||
float normal[3];
|
||||
float vector[3]; // unnormalized collision vector: p2-p1
|
||||
float pa[3], pb[3]; // collision point p1 on face1, p2 on face2
|
||||
float vector[3]; /* unnormalized collision vector: p2-p1 */
|
||||
float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */
|
||||
int flag;
|
||||
float time; // collision time, from 0 up to 1
|
||||
float time; /* collision time, from 0 up to 1 */
|
||||
|
||||
/* mesh-mesh collision */
|
||||
#ifdef WITH_ELTOPO /*either ap* or bp* can be set, but not both*/
|
||||
|
@ -90,7 +90,7 @@ typedef struct EdgeCollPair {
|
|||
float vector[3];
|
||||
float time;
|
||||
int lastsign;
|
||||
float pa[3], pb[3]; // collision point p1 on face1, p2 on face2
|
||||
float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */
|
||||
} EdgeCollPair;
|
||||
|
||||
/* used for collisions in collision.c */
|
||||
|
@ -100,7 +100,7 @@ typedef struct FaceCollPair {
|
|||
float vector[3];
|
||||
float time;
|
||||
int lastsign;
|
||||
float pa[3], pb[3]; // collision point p1 on face1, p2 on face2
|
||||
float pa[3], pb[3]; /* collision point p1 on face1, p2 on face2 */
|
||||
} FaceCollPair;
|
||||
|
||||
////////////////////////////////////////
|
||||
|
@ -126,8 +126,8 @@ void bvhtree_update_from_mvert(BVHTree *bvhtree,
|
|||
|
||||
/////////////////////////////////////////////////
|
||||
|
||||
// move Collision modifier object inter-frame with step = [0,1]
|
||||
// defined in collisions.c
|
||||
/* move Collision modifier object inter-frame with step = [0,1]
|
||||
* defined in collisions.c */
|
||||
void collision_move_object(struct CollisionModifierData *collmd,
|
||||
const float step,
|
||||
const float prevstep,
|
||||
|
|
|
@ -115,7 +115,7 @@ struct Scene *BKE_scene_find_from_collection(const struct Main *bmain,
|
|||
const struct Collection *collection);
|
||||
|
||||
#ifdef DURIAN_CAMERA_SWITCH
|
||||
struct Object *BKE_scene_camera_switch_find(struct Scene *scene); // DURIAN_CAMERA_SWITCH
|
||||
struct Object *BKE_scene_camera_switch_find(struct Scene *scene); /* DURIAN_CAMERA_SWITCH */
|
||||
#endif
|
||||
bool BKE_scene_camera_switch_update(struct Scene *scene);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ typedef struct BodyPoint {
|
|||
int *springs;
|
||||
float choke, choke2, frozen;
|
||||
float colball;
|
||||
short loc_flag; // reserved by locale module specific states
|
||||
short loc_flag; /* reserved by locale module specific states */
|
||||
// char octantflag;
|
||||
float mass;
|
||||
float springweight;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "BLI_sys_types.h" // for intptr_t support
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_utildefines.h" /* for BLI_assert */
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#include "BLI_sys_types.h" // for intptr_t support
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_math.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "BLI_sys_types.h" // for intptr_t support
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_utildefines.h" /* for BLI_assert */
|
||||
|
|
|
@ -199,17 +199,17 @@ static void action_blend_read_data(BlendDataReader *reader, ID *id)
|
|||
bAction *act = (bAction *)id;
|
||||
|
||||
BLO_read_list(reader, &act->curves);
|
||||
BLO_read_list(reader, &act->chanbase); // XXX deprecated - old animation system
|
||||
BLO_read_list(reader, &act->chanbase); /* XXX deprecated - old animation system */
|
||||
BLO_read_list(reader, &act->groups);
|
||||
BLO_read_list(reader, &act->markers);
|
||||
|
||||
// XXX deprecated - old animation system <<<
|
||||
/* XXX deprecated - old animation system <<< */
|
||||
LISTBASE_FOREACH (bActionChannel *, achan, &act->chanbase) {
|
||||
BLO_read_data_address(reader, &achan->grp);
|
||||
|
||||
BLO_read_list(reader, &achan->constraintChannels);
|
||||
}
|
||||
// >>> XXX deprecated - old animation system
|
||||
/* >>> XXX deprecated - old animation system */
|
||||
|
||||
BKE_fcurve_blend_read_data(reader, &act->curves);
|
||||
|
||||
|
@ -230,12 +230,12 @@ static void action_blend_read_lib(BlendLibReader *reader, ID *id)
|
|||
{
|
||||
bAction *act = (bAction *)id;
|
||||
|
||||
// XXX deprecated - old animation system <<<
|
||||
/* XXX deprecated - old animation system <<< */
|
||||
LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) {
|
||||
BLO_read_id_address(reader, act->id.lib, &chan->ipo);
|
||||
blend_read_lib_constraint_channels(reader, &act->id, &chan->constraintChannels);
|
||||
}
|
||||
// >>> XXX deprecated - old animation system
|
||||
/* >>> XXX deprecated - old animation system */
|
||||
|
||||
BKE_fcurve_blend_read_lib(reader, &act->id, &act->curves);
|
||||
|
||||
|
@ -257,12 +257,12 @@ static void action_blend_read_expand(BlendExpander *expander, ID *id)
|
|||
{
|
||||
bAction *act = (bAction *)id;
|
||||
|
||||
// XXX deprecated - old animation system --------------
|
||||
/* XXX deprecated - old animation system -------------- */
|
||||
LISTBASE_FOREACH (bActionChannel *, chan, &act->chanbase) {
|
||||
BLO_expand(expander, chan->ipo);
|
||||
blend_read_expand_constraint_channels(expander, &chan->constraintChannels);
|
||||
}
|
||||
// ---------------------------------------------------
|
||||
/* --------------------------------------------------- */
|
||||
|
||||
/* F-Curves in Action */
|
||||
BKE_fcurve_blend_read_expand(expander, &act->curves);
|
||||
|
@ -827,7 +827,7 @@ void BKE_pose_copy_data_ex(bPose **dst,
|
|||
|
||||
if (copy_constraints) {
|
||||
BKE_constraints_copy_ex(
|
||||
&listb, &pchan->constraints, flag, true); // BKE_constraints_copy NULLs listb
|
||||
&listb, &pchan->constraints, flag, true); /* BKE_constraints_copy NULLs listb */
|
||||
pchan->constraints = listb;
|
||||
|
||||
/* XXX: This is needed for motionpath drawing to work.
|
||||
|
|
|
@ -1527,14 +1527,14 @@ void BKE_animdata_blend_write(BlendWriter *writer, struct AnimData *adt)
|
|||
BKE_fcurve_blend_write(writer, &adt->drivers);
|
||||
|
||||
/* write overrides */
|
||||
// FIXME: are these needed?
|
||||
/* FIXME: are these needed? */
|
||||
LISTBASE_FOREACH (AnimOverride *, aor, &adt->overrides) {
|
||||
/* overrides consist of base data + rna_path */
|
||||
BLO_write_struct(writer, AnimOverride, aor);
|
||||
BLO_write_string(writer, aor->rna_path);
|
||||
}
|
||||
|
||||
// TODO write the remaps (if they are needed)
|
||||
/* TODO write the remaps (if they are needed) */
|
||||
|
||||
/* write NLA data */
|
||||
BKE_nla_blend_write(writer, &adt->nla_tracks);
|
||||
|
@ -1553,7 +1553,7 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt)
|
|||
adt->driver_array = NULL;
|
||||
|
||||
/* link overrides */
|
||||
// TODO...
|
||||
/* TODO... */
|
||||
|
||||
/* link NLA-data */
|
||||
BLO_read_list(reader, &adt->nla_tracks);
|
||||
|
@ -1563,8 +1563,8 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt)
|
|||
* if we're in 'tweaking mode', we need to be able to have this loaded back for
|
||||
* undo, but also since users may not exit tweakmode before saving (T24535)
|
||||
*/
|
||||
// TODO: it's not really nice that anyone should be able to save the file in this
|
||||
// state, but it's going to be too hard to enforce this single case...
|
||||
/* TODO: it's not really nice that anyone should be able to save the file in this
|
||||
* state, but it's going to be too hard to enforce this single case... */
|
||||
BLO_read_data_address(reader, &adt->act_track);
|
||||
BLO_read_data_address(reader, &adt->actstrip);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ TEST(mat3_vec_to_roll, UnitMatrix)
|
|||
|
||||
unit_m3(unit_matrix);
|
||||
|
||||
// Any vector with a unit matrix should return zero roll.
|
||||
/* Any vector with a unit matrix should return zero roll. */
|
||||
mat3_vec_to_roll(unit_matrix, unit_matrix[0], &roll);
|
||||
EXPECT_FLOAT_EQ(0.0f, roll);
|
||||
|
||||
|
@ -45,12 +45,12 @@ TEST(mat3_vec_to_roll, UnitMatrix)
|
|||
EXPECT_FLOAT_EQ(0.0f, roll);
|
||||
|
||||
{
|
||||
// Non-unit vector.
|
||||
/* Non-unit vector. */
|
||||
float vector[3] = {1.0f, 1.0f, 1.0f};
|
||||
mat3_vec_to_roll(unit_matrix, vector, &roll);
|
||||
EXPECT_NEAR(0.0f, roll, FLOAT_EPSILON);
|
||||
|
||||
// Normalized version of the above vector.
|
||||
/* Normalized version of the above vector. */
|
||||
normalize_v3(vector);
|
||||
mat3_vec_to_roll(unit_matrix, vector, &roll);
|
||||
EXPECT_NEAR(0.0f, roll, FLOAT_EPSILON);
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
*/
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <unistd.h> // for read close
|
||||
# include <unistd.h> /* for read close */
|
||||
#else
|
||||
# include <io.h> // for open close read
|
||||
# include <io.h> /* for open close read */
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
|
|
@ -216,7 +216,7 @@ void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
|
|||
|
||||
BKE_ptcache_id_from_cloth(&pid, ob, clmd);
|
||||
|
||||
// don't do anything as long as we're in editmode!
|
||||
/* don't do anything as long as we're in editmode! */
|
||||
if (pid.cache->edit && ob->mode & OB_MODE_PARTICLE_EDIT) {
|
||||
return;
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
|
|||
if (cloth) {
|
||||
SIM_cloth_solver_free(clmd);
|
||||
|
||||
// Free the verts.
|
||||
/* Free the verts. */
|
||||
if (cloth->verts != NULL) {
|
||||
MEM_freeN(cloth->verts);
|
||||
}
|
||||
|
@ -447,7 +447,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
|
|||
cloth->verts = NULL;
|
||||
cloth->mvert_num = 0;
|
||||
|
||||
// Free the springs.
|
||||
/* Free the springs. */
|
||||
if (cloth->springs != NULL) {
|
||||
LinkNode *search = cloth->springs;
|
||||
while (search) {
|
||||
|
@ -467,7 +467,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
|
|||
cloth->springs = NULL;
|
||||
cloth->numsprings = 0;
|
||||
|
||||
// free BVH collision tree
|
||||
/* free BVH collision tree */
|
||||
if (cloth->bvhtree) {
|
||||
BLI_bvhtree_free(cloth->bvhtree);
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ void cloth_free_modifier(ClothModifierData *clmd)
|
|||
BLI_bvhtree_free(cloth->bvhselftree);
|
||||
}
|
||||
|
||||
// we save our faces for collision objects
|
||||
/* we save our faces for collision objects */
|
||||
if (cloth->tri) {
|
||||
MEM_freeN(cloth->tri);
|
||||
}
|
||||
|
@ -521,7 +521,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
|
|||
|
||||
SIM_cloth_solver_free(clmd);
|
||||
|
||||
// Free the verts.
|
||||
/* Free the verts. */
|
||||
if (cloth->verts != NULL) {
|
||||
MEM_freeN(cloth->verts);
|
||||
}
|
||||
|
@ -529,7 +529,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
|
|||
cloth->verts = NULL;
|
||||
cloth->mvert_num = 0;
|
||||
|
||||
// Free the springs.
|
||||
/* Free the springs. */
|
||||
if (cloth->springs != NULL) {
|
||||
LinkNode *search = cloth->springs;
|
||||
while (search) {
|
||||
|
@ -549,7 +549,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
|
|||
cloth->springs = NULL;
|
||||
cloth->numsprings = 0;
|
||||
|
||||
// free BVH collision tree
|
||||
/* free BVH collision tree */
|
||||
if (cloth->bvhtree) {
|
||||
BLI_bvhtree_free(cloth->bvhtree);
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ void cloth_free_modifier_extern(ClothModifierData *clmd)
|
|||
BLI_bvhtree_free(cloth->bvhselftree);
|
||||
}
|
||||
|
||||
// we save our faces for collision objects
|
||||
/* we save our faces for collision objects */
|
||||
if (cloth->tri) {
|
||||
MEM_freeN(cloth->tri);
|
||||
}
|
||||
|
@ -655,8 +655,8 @@ static void cloth_apply_vgroup(ClothModifierData *clmd, Mesh *mesh)
|
|||
|
||||
/* goalfac= 1.0f; */ /* UNUSED */
|
||||
|
||||
// Kicking goal factor to simplify things...who uses that anyway?
|
||||
// ABS ( clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal );
|
||||
/* Kicking goal factor to simplify things...who uses that anyway? */
|
||||
// ABS (clmd->sim_parms->maxgoal - clmd->sim_parms->mingoal);
|
||||
|
||||
verts->goal = pow4f(verts->goal);
|
||||
if (verts->goal >= SOFTGOALSNAP) {
|
||||
|
@ -727,7 +727,7 @@ static bool cloth_from_object(
|
|||
float(*shapekey_rest)[3] = NULL;
|
||||
const float tnull[3] = {0, 0, 0};
|
||||
|
||||
// If we have a clothObject, free it.
|
||||
/* If we have a clothObject, free it. */
|
||||
if (clmd->clothObject != NULL) {
|
||||
cloth_free_modifier(clmd);
|
||||
if (G.debug & G_DEBUG_SIMDATA) {
|
||||
|
@ -735,7 +735,7 @@ static bool cloth_from_object(
|
|||
}
|
||||
}
|
||||
|
||||
// Allocate a new cloth object.
|
||||
/* Allocate a new cloth object. */
|
||||
clmd->clothObject = MEM_callocN(sizeof(Cloth), "cloth");
|
||||
if (clmd->clothObject) {
|
||||
clmd->clothObject->old_solver_type = 255;
|
||||
|
@ -746,14 +746,14 @@ static bool cloth_from_object(
|
|||
return false;
|
||||
}
|
||||
|
||||
// mesh input objects need Mesh
|
||||
/* mesh input objects need Mesh */
|
||||
if (!mesh) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cloth_from_mesh(clmd, mesh);
|
||||
|
||||
// create springs
|
||||
/* create springs */
|
||||
clmd->clothObject->springs = NULL;
|
||||
clmd->clothObject->numsprings = -1;
|
||||
|
||||
|
@ -768,7 +768,7 @@ static bool cloth_from_object(
|
|||
|
||||
verts = clmd->clothObject->verts;
|
||||
|
||||
// set initial values
|
||||
/* set initial values */
|
||||
for (i = 0; i < mesh->totvert; i++, verts++) {
|
||||
if (first) {
|
||||
copy_v3_v3(verts->x, mvert[i].co);
|
||||
|
@ -808,8 +808,8 @@ static bool cloth_from_object(
|
|||
copy_v3_v3(verts->impulse, tnull);
|
||||
}
|
||||
|
||||
// apply / set vertex groups
|
||||
// has to be happen before springs are build!
|
||||
/* apply / set vertex groups */
|
||||
/* has to be happen before springs are build! */
|
||||
cloth_apply_vgroup(clmd, mesh);
|
||||
|
||||
if (!cloth_build_springs(clmd, mesh)) {
|
||||
|
@ -818,7 +818,7 @@ static bool cloth_from_object(
|
|||
return false;
|
||||
}
|
||||
|
||||
// init our solver
|
||||
/* init our solver */
|
||||
SIM_cloth_solver_init(ob, clmd);
|
||||
|
||||
if (!first) {
|
||||
|
@ -1471,13 +1471,13 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
|
|||
const MEdge *medge = mesh->medge;
|
||||
const MPoly *mpoly = mesh->mpoly;
|
||||
const MLoop *mloop = mesh->mloop;
|
||||
int index2 = 0; // our second vertex index
|
||||
int index2 = 0; /* our second vertex index */
|
||||
LinkNodePair *edgelist = NULL;
|
||||
EdgeSet *edgeset = NULL;
|
||||
LinkNode *search = NULL, *search2 = NULL;
|
||||
BendSpringRef *spring_ref = NULL;
|
||||
|
||||
// error handling
|
||||
/* error handling */
|
||||
if (numedges == 0) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1599,7 +1599,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
|
|||
if (spring) {
|
||||
spring_verts_ordered_set(spring, medge[i].v1, medge[i].v2);
|
||||
if (clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_SEW && medge[i].flag & ME_LOOSEEDGE) {
|
||||
// handle sewing (loose edges will be pulled together)
|
||||
/* handle sewing (loose edges will be pulled together) */
|
||||
spring->restlen = 0.0f;
|
||||
spring->lin_stiffness = 1.0f;
|
||||
spring->type = CLOTH_SPRING_TYPE_SEWING;
|
||||
|
|
|
@ -744,7 +744,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph),
|
|||
* (Hopefully all compilers will be happy with the lines with just a space on them.
|
||||
* Those are really just to help this code easier to read).
|
||||
*/
|
||||
// TODO: cope with getting rotation order...
|
||||
/* TODO: cope with getting rotation order... */
|
||||
#define SINGLETARGET_GET_TARS(con, datatar, datasubtarget, ct, list) \
|
||||
{ \
|
||||
ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
|
||||
|
@ -779,7 +779,7 @@ static void default_get_tarmat_full_bbone(struct Depsgraph *UNUSED(depsgraph),
|
|||
* (Hopefully all compilers will be happy with the lines with just a space on them. Those are
|
||||
* really just to help this code easier to read)
|
||||
*/
|
||||
// TODO: cope with getting rotation order...
|
||||
/* TODO: cope with getting rotation order... */
|
||||
#define SINGLETARGETNS_GET_TARS(con, datatar, ct, list) \
|
||||
{ \
|
||||
ct = MEM_callocN(sizeof(bConstraintTarget), "tempConstraintTarget"); \
|
||||
|
@ -4340,7 +4340,7 @@ static void damptrack_do_transform(float matrix[4][4], const float tarvec_in[3],
|
|||
* we may have destroyed that in the process of multiplying the matrix
|
||||
*/
|
||||
unit_m4(tmat);
|
||||
mul_m4_m3m4(tmat, rmat, matrix); // m1, m3, m2
|
||||
mul_m4_m3m4(tmat, rmat, matrix); /* m1, m3, m2 */
|
||||
|
||||
copy_m4_m4(matrix, tmat);
|
||||
copy_v3_v3(matrix[3], obloc);
|
||||
|
@ -4577,7 +4577,7 @@ static bConstraintTypeInfo CTI_PIVOT = {
|
|||
pivotcon_id_looper, /* id looper */
|
||||
NULL, /* copy data */
|
||||
NULL,
|
||||
/* new data */ // XXX: might be needed to get 'normal' pivot behavior...
|
||||
/* new data */ /* XXX: might be needed to get 'normal' pivot behavior... */
|
||||
pivotcon_get_tars, /* get constraint targets */
|
||||
pivotcon_flush_tars, /* flush constraint targets */
|
||||
default_get_tarmat, /* get target matrix */
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#include <math.h> // floor
|
||||
#include <math.h> /* floor */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -282,7 +282,7 @@ static void curve_blend_read_lib(BlendLibReader *reader, ID *id)
|
|||
BLO_read_id_address(reader, cu->id.lib, &cu->vfonti);
|
||||
BLO_read_id_address(reader, cu->id.lib, &cu->vfontbi);
|
||||
|
||||
BLO_read_id_address(reader, cu->id.lib, &cu->ipo); // XXX deprecated - old animation system
|
||||
BLO_read_id_address(reader, cu->id.lib, &cu->ipo); /* XXX deprecated - old animation system */
|
||||
BLO_read_id_address(reader, cu->id.lib, &cu->key);
|
||||
}
|
||||
|
||||
|
@ -298,7 +298,7 @@ static void curve_blend_read_expand(BlendExpander *expander, ID *id)
|
|||
BLO_expand(expander, cu->vfonti);
|
||||
BLO_expand(expander, cu->vfontbi);
|
||||
BLO_expand(expander, cu->key);
|
||||
BLO_expand(expander, cu->ipo); // XXX deprecated - old animation system
|
||||
BLO_expand(expander, cu->ipo); /* XXX deprecated - old animation system */
|
||||
BLO_expand(expander, cu->bevobj);
|
||||
BLO_expand(expander, cu->taperobj);
|
||||
BLO_expand(expander, cu->textoncurve);
|
||||
|
@ -3639,7 +3639,7 @@ static bool tridiagonal_solve_with_limits(float *a,
|
|||
* see if it may be a good idea to unlock some handles. */
|
||||
if (!locked) {
|
||||
for (int i = 0; i < solve_count; i++) {
|
||||
// to definitely avoid infinite loops limit this to 2 times
|
||||
/* to definitely avoid infinite loops limit this to 2 times */
|
||||
if (!is_locked[i] || num_unlocks[i] >= 2) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -444,8 +444,8 @@ FCurve *BKE_fcurve_find_by_rna_context_ui(bContext *C,
|
|||
continue;
|
||||
}
|
||||
|
||||
// XXX: the logic here is duplicated with a function up above
|
||||
/* animation takes priority over drivers */
|
||||
/* XXX: the logic here is duplicated with a function up above
|
||||
* animation takes priority over drivers. */
|
||||
if (adt->action && adt->action->curves.first) {
|
||||
fcu = BKE_fcurve_find(&adt->action->curves, path, rnaindex);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
namespace blender::bke::tests {
|
||||
|
||||
// Epsilon for floating point comparisons.
|
||||
/* Epsilon for floating point comparisons. */
|
||||
static const float EPSILON = 1e-7f;
|
||||
|
||||
TEST(evaluate_fcurve, EmptyFCurve)
|
||||
|
@ -45,9 +45,9 @@ TEST(evaluate_fcurve, OnKeys)
|
|||
insert_vert_fcurve(fcu, 2.0f, 13.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF);
|
||||
insert_vert_fcurve(fcu, 3.0f, 19.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF);
|
||||
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 1.0f), 7.0f, EPSILON); // hits 'on or before first' function
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); // hits 'between' function
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); // hits 'on or after last' function
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 1.0f), 7.0f, EPSILON); /* hits 'on or before first' function */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 2.0f), 13.0f, EPSILON); /* hits 'between' function */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 3.0f), 19.0f, EPSILON); /* hits 'on or after last' function */
|
||||
|
||||
/* Also test within a specific time epsilon of the keys, as this was an issue in T39207.
|
||||
* This epsilon is just slightly smaller than the epsilon given to binarysearch_bezt_index_ex()
|
||||
|
@ -102,21 +102,21 @@ TEST(evaluate_fcurve, InterpolationBezier)
|
|||
EXPECT_EQ(fcu->bezt[0].ipo, BEZT_IPO_BEZ);
|
||||
EXPECT_EQ(fcu->bezt[1].ipo, BEZT_IPO_BEZ);
|
||||
|
||||
// Test with default handles.
|
||||
/* Test with default handles. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 1.25f), 7.8297067f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 1.50f), 10.0f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 1.75f), 12.170294f, EPSILON);
|
||||
|
||||
// Test with modified handles.
|
||||
fcu->bezt[0].vec[0][0] = 0.71855f; // left handle X
|
||||
fcu->bezt[0].vec[0][1] = 6.22482f; // left handle Y
|
||||
fcu->bezt[0].vec[2][0] = 1.35148f; // right handle X
|
||||
fcu->bezt[0].vec[2][1] = 7.96806f; // right handle Y
|
||||
/* Test with modified handles. */
|
||||
fcu->bezt[0].vec[0][0] = 0.71855f; /* left handle X */
|
||||
fcu->bezt[0].vec[0][1] = 6.22482f; /* left handle Y */
|
||||
fcu->bezt[0].vec[2][0] = 1.35148f; /* right handle X */
|
||||
fcu->bezt[0].vec[2][1] = 7.96806f; /* right handle Y */
|
||||
|
||||
fcu->bezt[1].vec[0][0] = 1.66667f; // left handle X
|
||||
fcu->bezt[1].vec[0][1] = 10.4136f; // left handle Y
|
||||
fcu->bezt[1].vec[2][0] = 2.33333f; // right handle X
|
||||
fcu->bezt[1].vec[2][1] = 15.5864f; // right handle Y
|
||||
fcu->bezt[1].vec[0][0] = 1.66667f; /* left handle X */
|
||||
fcu->bezt[1].vec[0][1] = 10.4136f; /* left handle Y */
|
||||
fcu->bezt[1].vec[2][0] = 2.33333f; /* right handle X */
|
||||
fcu->bezt[1].vec[2][1] = 15.5864f; /* right handle Y */
|
||||
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 1.25f), 7.945497f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 1.50f), 9.3495407f, EPSILON);
|
||||
|
@ -155,19 +155,19 @@ TEST(evaluate_fcurve, ExtrapolationLinearKeys)
|
|||
fcu->bezt[1].ipo = BEZT_IPO_LIN;
|
||||
|
||||
fcu->extend = FCURVE_EXTRAPOLATE_LINEAR;
|
||||
// Before first keyframe.
|
||||
/* Before first keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 5.5f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 0.50f), 4.0f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), -8.0f, EPSILON);
|
||||
// After last keyframe.
|
||||
/* After last keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 17.5f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 22.0f, EPSILON);
|
||||
|
||||
fcu->extend = FCURVE_EXTRAPOLATE_CONSTANT;
|
||||
// Before first keyframe.
|
||||
/* Before first keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 7.0f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), 7.0f, EPSILON);
|
||||
// After last keyframe.
|
||||
/* After last keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 13.0f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 13.0f, EPSILON);
|
||||
|
||||
|
@ -181,29 +181,29 @@ TEST(evaluate_fcurve, ExtrapolationBezierKeys)
|
|||
EXPECT_EQ(insert_vert_fcurve(fcu, 1.0f, 7.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF), 0);
|
||||
EXPECT_EQ(insert_vert_fcurve(fcu, 2.0f, 13.0f, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NO_USERPREF), 1);
|
||||
|
||||
fcu->bezt[0].vec[0][0] = 0.71855f; // left handle X
|
||||
fcu->bezt[0].vec[0][1] = 6.22482f; // left handle Y
|
||||
fcu->bezt[0].vec[2][0] = 1.35148f; // right handle X
|
||||
fcu->bezt[0].vec[2][1] = 7.96806f; // right handle Y
|
||||
fcu->bezt[0].vec[0][0] = 0.71855f; /* left handle X */
|
||||
fcu->bezt[0].vec[0][1] = 6.22482f; /* left handle Y */
|
||||
fcu->bezt[0].vec[2][0] = 1.35148f; /* right handle X */
|
||||
fcu->bezt[0].vec[2][1] = 7.96806f; /* right handle Y */
|
||||
|
||||
fcu->bezt[1].vec[0][0] = 1.66667f; // left handle X
|
||||
fcu->bezt[1].vec[0][1] = 10.4136f; // left handle Y
|
||||
fcu->bezt[1].vec[2][0] = 2.33333f; // right handle X
|
||||
fcu->bezt[1].vec[2][1] = 15.5864f; // right handle Y
|
||||
fcu->bezt[1].vec[0][0] = 1.66667f; /* left handle X */
|
||||
fcu->bezt[1].vec[0][1] = 10.4136f; /* left handle Y */
|
||||
fcu->bezt[1].vec[2][0] = 2.33333f; /* right handle X */
|
||||
fcu->bezt[1].vec[2][1] = 15.5864f; /* right handle Y */
|
||||
|
||||
fcu->extend = FCURVE_EXTRAPOLATE_LINEAR;
|
||||
// Before first keyframe.
|
||||
/* Before first keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 6.3114409f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, -0.50f), 2.8686447f, EPSILON);
|
||||
// After last keyframe.
|
||||
/* After last keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 18.81946f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 24.63892f, EPSILON);
|
||||
|
||||
fcu->extend = FCURVE_EXTRAPOLATE_CONSTANT;
|
||||
// Before first keyframe.
|
||||
/* Before first keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 0.75f), 7.0f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, -1.50f), 7.0f, EPSILON);
|
||||
// After last keyframe.
|
||||
/* After last keyframe. */
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 2.75f), 13.0f, EPSILON);
|
||||
EXPECT_NEAR(evaluate_fcurve(fcu, 3.50f), 13.0f, EPSILON);
|
||||
|
||||
|
@ -232,7 +232,7 @@ TEST(fcurve_subdivide, BKE_bezt_subdivide_handles)
|
|||
|
||||
/* Create new keyframe point with defaults from insert_vert_fcurve(). */
|
||||
BezTriple beztr;
|
||||
const float x = 7.375f; // at this X-coord, the FCurve should evaluate to 1.000f.
|
||||
const float x = 7.375f; /* at this X-coord, the FCurve should evaluate to 1.000f. */
|
||||
const float y = 1.000f;
|
||||
beztr.vec[0][0] = x - 1.0f;
|
||||
beztr.vec[0][1] = y;
|
||||
|
@ -249,25 +249,25 @@ TEST(fcurve_subdivide, BKE_bezt_subdivide_handles)
|
|||
|
||||
EXPECT_FLOAT_EQ(y_delta, 0.0f);
|
||||
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][0], -5.0f); // Left handle should not be touched.
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][0], -5.0f); /* Left handle should not be touched. */
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[0][1], 0.0f);
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][0], 1.0f); // Coordinates should not be touched.
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][0], 1.0f); /* Coordinates should not be touched. */
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[1][1], 0.0f);
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][0], 1.5f); // Right handle should be updated.
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][0], 1.5f); /* Right handle should be updated. */
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[0].vec[2][1], 2.0f);
|
||||
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][0], 13.0f); // Left handle should be updated.
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][0], 13.0f); /* Left handle should be updated. */
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[0][1], 0.0f);
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][0], 13.0f); // Coordinates should not be touched.
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][0], 13.0f); /* Coordinates should not be touched. */
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[1][1], 2.0f);
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][0], 16.0f); // Right handle should not be touched
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][0], 16.0f); /* Right handle should not be touched */
|
||||
EXPECT_FLOAT_EQ(fcu->bezt[1].vec[2][1], -3.0f);
|
||||
|
||||
EXPECT_FLOAT_EQ(beztr.vec[0][0], 4.5f); // Left handle should be updated.
|
||||
EXPECT_FLOAT_EQ(beztr.vec[0][0], 4.5f); /* Left handle should be updated. */
|
||||
EXPECT_FLOAT_EQ(beztr.vec[0][1], 1.5f);
|
||||
EXPECT_FLOAT_EQ(beztr.vec[1][0], 7.375f); // Coordinates should not be touched.
|
||||
EXPECT_FLOAT_EQ(beztr.vec[1][0], 7.375f); /* Coordinates should not be touched. */
|
||||
EXPECT_FLOAT_EQ(beztr.vec[1][1], 1.0f);
|
||||
EXPECT_FLOAT_EQ(beztr.vec[2][0], 10.250); // Right handle should be updated.
|
||||
EXPECT_FLOAT_EQ(beztr.vec[2][0], 10.250); /* Right handle should be updated. */
|
||||
EXPECT_FLOAT_EQ(beztr.vec[2][1], 0.5);
|
||||
|
||||
BKE_fcurve_free(fcu);
|
||||
|
|
|
@ -3208,7 +3208,7 @@ static void update_effectors(
|
|||
effectors = BKE_effectors_create(depsgraph, ob, NULL, fds->effector_weights);
|
||||
|
||||
if (effectors) {
|
||||
// precalculate wind forces
|
||||
/* Precalculate wind forces. */
|
||||
UpdateEffectorsData data;
|
||||
data.scene = scene;
|
||||
data.fds = fds;
|
||||
|
|
|
@ -133,8 +133,8 @@ static void fcm_generator_new_data(void *mdata)
|
|||
data->poly_order = 1;
|
||||
data->arraysize = 2;
|
||||
cp = data->coefficients = MEM_callocN(sizeof(float) * 2, "FMod_Generator_Coefs");
|
||||
cp[0] = 0; // y-offset
|
||||
cp[1] = 1; // gradient
|
||||
cp[0] = 0; /* y-offset */
|
||||
cp[1] = 1; /* gradient */
|
||||
}
|
||||
|
||||
static void fcm_generator_verify(FModifier *fcm)
|
||||
|
@ -1057,7 +1057,8 @@ static void fmods_init_typeinfo(void)
|
|||
fmodifiersTypeInfo[3] = &FMI_ENVELOPE; /* Envelope F-Curve Modifier */
|
||||
fmodifiersTypeInfo[4] = &FMI_CYCLES; /* Cycles F-Curve Modifier */
|
||||
fmodifiersTypeInfo[5] = &FMI_NOISE; /* Apply-Noise F-Curve Modifier */
|
||||
fmodifiersTypeInfo[6] = NULL /*&FMI_FILTER*/; /* Filter F-Curve Modifier */ // XXX unimplemented
|
||||
fmodifiersTypeInfo[6] = NULL /*&FMI_FILTER*/;
|
||||
/* Filter F-Curve Modifier */ /* XXX unimplemented. */
|
||||
fmodifiersTypeInfo[7] = &FMI_PYTHON; /* Custom Python F-Curve Modifier */
|
||||
fmodifiersTypeInfo[8] = &FMI_LIMITS; /* Limits F-Curve Modifier */
|
||||
fmodifiersTypeInfo[9] = &FMI_STEPPED; /* Stepped F-Curve Modifier */
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include "BKE_icons.h"
|
||||
#include "BKE_studiolight.h"
|
||||
|
||||
#include "BLI_sys_types.h" // for intptr_t support
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
|
||||
#include "GPU_texture.h"
|
||||
|
||||
|
|
|
@ -967,7 +967,7 @@ bool IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
|
|||
* \code{.c}
|
||||
* IDPropertyTemplate val;
|
||||
* IDProperty *group, *idgroup, *color;
|
||||
* group = IDP_New(IDP_GROUP, val, "group1"); //groups don't need a template.
|
||||
* group = IDP_New(IDP_GROUP, val, "group1"); // groups don't need a template.
|
||||
*
|
||||
* val.array.len = 4
|
||||
* val.array.type = IDP_FLOAT;
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
#include "GPU_texture.h"
|
||||
|
||||
#include "BLI_sys_types.h" // for intptr_t support
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
#include "DEG_depsgraph_query.h"
|
||||
|
@ -1812,7 +1812,7 @@ void BKE_imbuf_to_image_format(struct ImageFormatData *im_format, const ImBuf *i
|
|||
im_format->depth = R_IMF_CHAN_DEPTH_16;
|
||||
}
|
||||
if (custom_flags & OPENEXR_COMPRESS) {
|
||||
im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; // Can't determine compression
|
||||
im_format->exr_codec = R_IMF_EXR_CODEC_ZIP; /* Can't determine compression */
|
||||
}
|
||||
if (imbuf->zbuf_float) {
|
||||
im_format->flag |= R_IMF_FLAG_ZBUF;
|
||||
|
@ -2200,7 +2200,7 @@ void BKE_image_stamp_buf(Scene *scene,
|
|||
float w, h, pad;
|
||||
int x, y, y_ofs;
|
||||
float h_fixed;
|
||||
const int mono = blf_mono_font_render; // XXX
|
||||
const int mono = blf_mono_font_render; /* XXX */
|
||||
struct ColorManagedDisplay *display;
|
||||
const char *display_device;
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *to
|
|||
if ((blocktype == ID_OB) && (adrcode == OB_LAY)) {
|
||||
RET_ABP(ob_layer_bits);
|
||||
}
|
||||
// XXX TODO: add other types...
|
||||
/* XXX TODO: add other types... */
|
||||
|
||||
/* Normal curve */
|
||||
return NULL;
|
||||
|
@ -473,7 +473,7 @@ static const char *mtex_adrcodes_to_paths(int adrcode, int *UNUSED(array_index))
|
|||
/* property identifier for path */
|
||||
adrcode = (adrcode & (MA_MAP1 - 1));
|
||||
switch (adrcode) {
|
||||
#if 0 // XXX these are not wrapped in RNA yet!
|
||||
#if 0 /* XXX these are not wrapped in RNA yet! */
|
||||
case MAP_OFS_X:
|
||||
poin = &(mtex->ofs[0]);
|
||||
break;
|
||||
|
@ -541,17 +541,17 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
|
|||
case TE_TURB:
|
||||
return "turbulence";
|
||||
|
||||
case TE_NDEPTH: // XXX texture RNA undefined
|
||||
case TE_NDEPTH: /* XXX texture RNA undefined */
|
||||
// poin= &(tex->noisedepth); *type= IPO_SHORT; break;
|
||||
break;
|
||||
case TE_NTYPE: // XXX texture RNA undefined
|
||||
case TE_NTYPE: /* XXX texture RNA undefined */
|
||||
// poin= &(tex->noisetype); *type= IPO_SHORT; break;
|
||||
break;
|
||||
|
||||
case TE_N_BAS1:
|
||||
return "noise_basis";
|
||||
case TE_N_BAS2:
|
||||
return "noise_basis"; // XXX this is not yet defined in RNA...
|
||||
return "noise_basis"; /* XXX this is not yet defined in RNA... */
|
||||
|
||||
/* voronoi */
|
||||
case TE_VNW1:
|
||||
|
@ -582,7 +582,7 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
|
|||
return "distortion_amount";
|
||||
|
||||
/* musgrave */
|
||||
case TE_MG_TYP: // XXX texture RNA undefined
|
||||
case TE_MG_TYP: /* XXX texture RNA undefined */
|
||||
// poin= &(tex->stype); *type= IPO_SHORT; break;
|
||||
break;
|
||||
case TE_MGH:
|
||||
|
@ -717,31 +717,31 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
|
|||
/* result depends on adrcode */
|
||||
switch (adrcode) {
|
||||
case CAM_LENS:
|
||||
#if 0 /* XXX this cannot be resolved easily... \
|
||||
* perhaps we assume camera is perspective (works for most cases... */
|
||||
#if 0 /* XXX this cannot be resolved easily... \
|
||||
* perhaps we assume camera is perspective (works for most cases... */
|
||||
if (ca->type == CAM_ORTHO) {
|
||||
return "ortho_scale";
|
||||
}
|
||||
else {
|
||||
return "lens";
|
||||
}
|
||||
#else // XXX lazy hack for now...
|
||||
#else /* XXX lazy hack for now... */
|
||||
return "lens";
|
||||
#endif // XXX this cannot be resolved easily
|
||||
#endif /* XXX this cannot be resolved easily */
|
||||
|
||||
case CAM_STA:
|
||||
return "clip_start";
|
||||
case CAM_END:
|
||||
return "clip_end";
|
||||
|
||||
#if 0 // XXX these are not defined in RNA
|
||||
#if 0 /* XXX these are not defined in RNA */
|
||||
case CAM_YF_APERT:
|
||||
poin = &(ca->YF_aperture);
|
||||
break;
|
||||
case CAM_YF_FDIST:
|
||||
poin = &(ca->dof_distance);
|
||||
break;
|
||||
#endif // XXX these are not defined in RNA
|
||||
#endif /* XXX these are not defined in RNA */
|
||||
|
||||
case CAM_SHIFT_X:
|
||||
return "shift_x";
|
||||
|
@ -1040,7 +1040,7 @@ static char *get_rna_access(ID *id,
|
|||
|
||||
/* XXX problematic blocktypes */
|
||||
case ID_SEQ: /* sequencer strip */
|
||||
// SEQ_FAC1:
|
||||
/* SEQ_FAC1: */
|
||||
switch (adrcode) {
|
||||
case SEQ_FAC1:
|
||||
propname = "effect_fader";
|
||||
|
@ -1052,7 +1052,8 @@ static char *get_rna_access(ID *id,
|
|||
propname = "blend_opacity";
|
||||
break;
|
||||
}
|
||||
// poin= &(seq->facf0); // XXX this doesn't seem to be included anywhere in sequencer RNA...
|
||||
/* XXX this doesn't seem to be included anywhere in sequencer RNA... */
|
||||
// poin= &(seq->facf0);
|
||||
break;
|
||||
|
||||
/* special hacks */
|
||||
|
@ -1187,7 +1188,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver)
|
|||
/* if 'pydriver', just copy data across */
|
||||
if (idriver->type == IPO_DRIVER_TYPE_PYTHON) {
|
||||
/* PyDriver only requires the expression to be copied */
|
||||
// FIXME: expression will be useless due to API changes, but at least not totally lost
|
||||
/* FIXME: expression will be useless due to API changes, but at least not totally lost */
|
||||
cdriver->type = DRIVER_TYPE_PYTHON;
|
||||
if (idriver->name[0]) {
|
||||
BLI_strncpy(cdriver->expression, idriver->name, sizeof(cdriver->expression));
|
||||
|
@ -1219,7 +1220,7 @@ static ChannelDriver *idriver_to_cdriver(IpoDriver *idriver)
|
|||
dtar = &dvar->targets[1];
|
||||
dtar->id = (ID *)idriver->ob;
|
||||
dtar->idtype = ID_OB;
|
||||
if (idriver->name[0]) { // xxx... for safety
|
||||
if (idriver->name[0]) { /* xxx... for safety */
|
||||
BLI_strncpy(
|
||||
dtar->pchan_name, idriver->name + DRIVER_NAME_OFFS, sizeof(dtar->pchan_name));
|
||||
}
|
||||
|
@ -1272,7 +1273,7 @@ static void fcurve_add_to_list(
|
|||
bActionGroup *agrp = NULL;
|
||||
|
||||
/* init the temp action */
|
||||
memset(&tmp_act, 0, sizeof(bAction)); // XXX only enable this line if we get errors
|
||||
memset(&tmp_act, 0, sizeof(bAction)); /* XXX only enable this line if we get errors */
|
||||
tmp_act.groups.first = groups->first;
|
||||
tmp_act.groups.last = groups->last;
|
||||
tmp_act.curves.first = list->first;
|
||||
|
@ -1544,7 +1545,7 @@ static void icu_to_fcurves(ID *id,
|
|||
*/
|
||||
if (((icu->blocktype == ID_OB) && ELEM(icu->adrcode, OB_ROT_X, OB_ROT_Y, OB_ROT_Z)) ||
|
||||
((icu->blocktype == ID_PO) && ELEM(icu->adrcode, AC_EUL_X, AC_EUL_Y, AC_EUL_Z))) {
|
||||
const float fac = (float)M_PI / 18.0f; // 10.0f * M_PI/180.0f;
|
||||
const float fac = (float)M_PI / 18.0f; /* 10.0f * M_PI/180.0f; */
|
||||
|
||||
dst->vec[0][1] *= fac;
|
||||
dst->vec[1][1] *= fac;
|
||||
|
@ -1719,7 +1720,7 @@ static void action_to_animato(
|
|||
}
|
||||
|
||||
/* get rid of all Action Groups */
|
||||
// XXX this is risky if there's some old + some new data in the Action...
|
||||
/* XXX this is risky if there's some old + some new data in the Action... */
|
||||
if (act->groups.first) {
|
||||
BLI_freelistN(&act->groups);
|
||||
}
|
||||
|
@ -1793,7 +1794,7 @@ static void ipo_to_animdata(
|
|||
/* Convert curves to animato system
|
||||
* (separated into separate lists of F-Curves for animation and drivers),
|
||||
* and the try to put these lists in the right places, but do not free the lists here. */
|
||||
// XXX there shouldn't be any need for the groups, so don't supply pointer for that now...
|
||||
/* XXX there shouldn't be any need for the groups, so don't supply pointer for that now... */
|
||||
ipo_to_animato(id, ipo, actname, constname, seq, NULL, &anim, &drivers);
|
||||
|
||||
/* deal with animation first */
|
||||
|
@ -1942,7 +1943,7 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips)
|
|||
}
|
||||
|
||||
/* modifiers */
|
||||
// FIXME: for now, we just free them...
|
||||
/* FIXME: for now, we just free them... */
|
||||
if (as->modifiers.first) {
|
||||
BLI_freelistN(&as->modifiers);
|
||||
}
|
||||
|
@ -1965,7 +1966,7 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips)
|
|||
* Data that has been converted should be freed immediately, which means that it is immediately
|
||||
* clear which data-blocks have yet to be converted, and also prevent freeing errors when we exit.
|
||||
*/
|
||||
// XXX currently done after all file reading...
|
||||
/* XXX currently done after all file reading... */
|
||||
void do_versions_ipos_to_animato(Main *bmain)
|
||||
{
|
||||
ListBase drivers = {NULL, NULL};
|
||||
|
@ -2084,7 +2085,7 @@ void do_versions_ipos_to_animato(Main *bmain)
|
|||
}
|
||||
|
||||
/* check for Action Constraint */
|
||||
// XXX do we really want to do this here?
|
||||
/* XXX do we really want to do this here? */
|
||||
}
|
||||
|
||||
/* check constraint channels - we need to remove them anyway... */
|
||||
|
|
|
@ -183,14 +183,14 @@ static void shapekey_blend_read_lib(BlendLibReader *reader, ID *id)
|
|||
Key *key = (Key *)id;
|
||||
BLI_assert((key->id.tag & LIB_TAG_EXTERN) == 0);
|
||||
|
||||
BLO_read_id_address(reader, key->id.lib, &key->ipo); // XXX deprecated - old animation system
|
||||
BLO_read_id_address(reader, key->id.lib, &key->ipo); /* XXX deprecated - old animation system */
|
||||
BLO_read_id_address(reader, key->id.lib, &key->from);
|
||||
}
|
||||
|
||||
static void shapekey_blend_read_expand(BlendExpander *expander, ID *id)
|
||||
{
|
||||
Key *key = (Key *)id;
|
||||
BLO_expand(expander, key->ipo); // XXX deprecated - old animation system
|
||||
BLO_expand(expander, key->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
|
||||
IDTypeInfo IDType_ID_KE = {
|
||||
|
@ -922,7 +922,7 @@ static void key_evaluate_relative(const int start,
|
|||
reffrom = refb->data;
|
||||
|
||||
poin += start * poinsize;
|
||||
reffrom += key->elemsize * start; // key elemsize yes!
|
||||
reffrom += key->elemsize * start; /* key elemsize yes! */
|
||||
from += key->elemsize * start;
|
||||
|
||||
for (b = start; b < end; b += step) {
|
||||
|
|
|
@ -1631,18 +1631,19 @@ void BKE_view_layer_selected_editable_objects_iterator_begin(BLI_Iterator *iter,
|
|||
objects_iterator_begin(iter, data_in, BASE_VISIBLE_DEPSGRAPH | BASE_SELECTED);
|
||||
if (iter->valid) {
|
||||
if (BKE_object_is_libdata((Object *)iter->current) == false) {
|
||||
// First object is valid (selectable and not libdata) -> all good.
|
||||
/* First object is valid (selectable and not libdata) -> all good. */
|
||||
return;
|
||||
}
|
||||
|
||||
// Object is selectable but not editable -> search for another one.
|
||||
/* Object is selectable but not editable -> search for another one. */
|
||||
BKE_view_layer_selected_editable_objects_iterator_next(iter);
|
||||
}
|
||||
}
|
||||
|
||||
void BKE_view_layer_selected_editable_objects_iterator_next(BLI_Iterator *iter)
|
||||
{
|
||||
// Search while there are objects and the one we have is not editable (editable = not libdata).
|
||||
/* Search while there are objects and the one we have is not editable (editable = not libdata).
|
||||
*/
|
||||
do {
|
||||
objects_iterator_next(iter, BASE_VISIBLE_DEPSGRAPH | BASE_SELECTED);
|
||||
} while (iter->valid && BKE_object_is_libdata((Object *)iter->current) != false);
|
||||
|
|
|
@ -2059,7 +2059,7 @@ void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linesty
|
|||
uv_along_stroke = nodeAddStaticNode(C, ntree, SH_NODE_UVALONGSTROKE);
|
||||
uv_along_stroke->locx = 0.0f;
|
||||
uv_along_stroke->locy = 300.0f;
|
||||
uv_along_stroke->custom1 = 0; // use_tips
|
||||
uv_along_stroke->custom1 = 0; /* use_tips */
|
||||
|
||||
input_texure = nodeAddStaticNode(C, ntree, SH_NODE_TEX_IMAGE);
|
||||
input_texure->locx = 200.0f;
|
||||
|
@ -2069,16 +2069,16 @@ void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linesty
|
|||
output_linestyle->locx = 400.0f;
|
||||
output_linestyle->locy = 300.0f;
|
||||
output_linestyle->custom1 = MA_RAMP_BLEND;
|
||||
output_linestyle->custom2 = 0; // use_clamp
|
||||
output_linestyle->custom2 = 0; /* use_clamp */
|
||||
|
||||
nodeSetActive(ntree, input_texure);
|
||||
|
||||
fromsock = BLI_findlink(&uv_along_stroke->outputs, 0); // UV
|
||||
tosock = BLI_findlink(&input_texure->inputs, 0); // UV
|
||||
fromsock = BLI_findlink(&uv_along_stroke->outputs, 0); /* UV */
|
||||
tosock = BLI_findlink(&input_texure->inputs, 0); /* UV */
|
||||
nodeAddLink(ntree, uv_along_stroke, fromsock, input_texure, tosock);
|
||||
|
||||
fromsock = BLI_findlink(&input_texure->outputs, 0); // Color
|
||||
tosock = BLI_findlink(&output_linestyle->inputs, 0); // Color
|
||||
fromsock = BLI_findlink(&input_texure->outputs, 0); /* Color */
|
||||
tosock = BLI_findlink(&output_linestyle->inputs, 0); /* Color */
|
||||
nodeAddLink(ntree, input_texure, fromsock, output_linestyle, tosock);
|
||||
|
||||
ntreeUpdateTree(CTX_data_main(C), ntree);
|
||||
|
|
|
@ -225,7 +225,7 @@ static void material_blend_read_data(BlendDataReader *reader, ID *id)
|
|||
static void material_blend_read_lib(BlendLibReader *reader, ID *id)
|
||||
{
|
||||
Material *ma = (Material *)id;
|
||||
BLO_read_id_address(reader, ma->id.lib, &ma->ipo); // XXX deprecated - old animation system
|
||||
BLO_read_id_address(reader, ma->id.lib, &ma->ipo); /* XXX deprecated - old animation system */
|
||||
|
||||
/* relink grease pencil settings */
|
||||
if (ma->gp_style != NULL) {
|
||||
|
@ -242,7 +242,7 @@ static void material_blend_read_lib(BlendLibReader *reader, ID *id)
|
|||
static void material_blend_read_expand(BlendExpander *expander, ID *id)
|
||||
{
|
||||
Material *ma = (Material *)id;
|
||||
BLO_expand(expander, ma->ipo); // XXX deprecated - old animation system
|
||||
BLO_expand(expander, ma->ipo); /* XXX deprecated - old animation system */
|
||||
|
||||
if (ma->gp_style) {
|
||||
MaterialGPencilStyle *gp_style = ma->gp_style;
|
||||
|
|
|
@ -317,7 +317,7 @@ int BKE_mesh_nurbs_displist_to_mdata(Object *ob,
|
|||
*r_allvert = mvert = MEM_calloc_arrayN(totvert, sizeof(MVert), "nurbs_init mvert");
|
||||
*r_alledge = medge = MEM_calloc_arrayN(totedge, sizeof(MEdge), "nurbs_init medge");
|
||||
*r_allloop = mloop = MEM_calloc_arrayN(
|
||||
totpoly, sizeof(MLoop[4]), "nurbs_init mloop"); // totloop
|
||||
totpoly, sizeof(MLoop[4]), "nurbs_init mloop"); /* totloop */
|
||||
*r_allpoly = mpoly = MEM_calloc_arrayN(totpoly, sizeof(MPoly), "nurbs_init mloop");
|
||||
|
||||
if (r_alluv) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/** \file
|
||||
* \ingroup bke
|
||||
*/
|
||||
#include <string.h> // for memcpy
|
||||
#include <string.h> /* for memcpy */
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
|
|
@ -701,7 +701,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh,
|
|||
/* Test same polys. */
|
||||
if ((p1_nv == p2_nv) && (memcmp(p1_v, p2_v, p1_nv * sizeof(*p1_v)) == 0)) {
|
||||
if (do_verbose) {
|
||||
// TODO: convert list to string
|
||||
/* TODO: convert list to string */
|
||||
PRINT_ERR("\tPolys %u and %u use same vertices (%d", prev_sp->index, sp->index, *p1_v);
|
||||
for (j = 1; j < p1_nv; j++) {
|
||||
PRINT_ERR(", %d", p1_v[j]);
|
||||
|
|
|
@ -100,7 +100,7 @@ void BKE_object_eval_parent(Depsgraph *depsgraph, Object *ob)
|
|||
DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
|
||||
|
||||
/* get local matrix (but don't calculate it, as that was done already!) */
|
||||
// XXX: redundant?
|
||||
/* XXX: redundant? */
|
||||
copy_m4_m4(locmat, ob->obmat);
|
||||
|
||||
/* get parent effect matrix */
|
||||
|
|
|
@ -193,7 +193,7 @@ static TseGroup *BKE_outliner_treehash_lookup_group(GHash *th, short type, short
|
|||
{
|
||||
TreeStoreElem tse_template;
|
||||
tse_template.type = type;
|
||||
tse_template.nr = type ? nr : 0; // we're picky! :)
|
||||
tse_template.nr = type ? nr : 0; /* we're picky! :) */
|
||||
tse_template.id = id;
|
||||
|
||||
BLI_assert(th);
|
||||
|
|
|
@ -4195,7 +4195,7 @@ float psys_get_child_size(ParticleSystem *psys,
|
|||
float *UNUSED(pa_time))
|
||||
{
|
||||
ParticleSettings *part = psys->part;
|
||||
float size; // time XXX
|
||||
float size; /* time XXX */
|
||||
|
||||
if (part->childtype == PART_CHILD_FACES) {
|
||||
int w = 0;
|
||||
|
|
|
@ -2001,7 +2001,7 @@ static void sphclassical_force_cb(void *sphdata_v,
|
|||
/* 4.77 is an experimentally determined density factor */
|
||||
float rest_density = fluid->rest_density * (fluid->flag & SPH_FAC_DENSITY ? 4.77f : 1.0f);
|
||||
|
||||
// Use speed of sound squared
|
||||
/* Use speed of sound squared */
|
||||
float stiffness = pow2f(fluid->stiffness_k);
|
||||
|
||||
ParticleData *npa;
|
||||
|
@ -2118,7 +2118,7 @@ void psys_sph_init(ParticleSimulationData *sim, SPHData *sphdata)
|
|||
|
||||
BLI_buffer_field_init(&sphdata->new_springs, ParticleSpring);
|
||||
|
||||
// Add other coupled particle systems.
|
||||
/* Add other coupled particle systems. */
|
||||
sphdata->psys[0] = sim->psys;
|
||||
for (i = 1, pt = sim->psys->targets.first; i < 10; i++, pt = (pt ? pt->next : NULL)) {
|
||||
sphdata->psys[i] = pt ? psys_get_target_system(sim->ob, pt) : NULL;
|
||||
|
@ -2132,8 +2132,8 @@ void psys_sph_init(ParticleSimulationData *sim, SPHData *sphdata)
|
|||
}
|
||||
sphdata->eh = sph_springhash_build(sim->psys);
|
||||
|
||||
// These per-particle values should be overridden later, but just for
|
||||
// completeness we give them default values now.
|
||||
/* These per-particle values should be overridden later, but just for
|
||||
* completeness we give them default values now. */
|
||||
sphdata->pa = NULL;
|
||||
sphdata->mass = 1.0f;
|
||||
|
||||
|
|
|
@ -116,14 +116,14 @@
|
|||
static CLG_LogRef LOG = {"bke.pointcache"};
|
||||
|
||||
static int ptcache_data_size[] = {
|
||||
sizeof(unsigned int), // BPHYS_DATA_INDEX
|
||||
sizeof(float[3]), // BPHYS_DATA_LOCATION
|
||||
sizeof(float[3]), // BPHYS_DATA_VELOCITY
|
||||
sizeof(float[4]), // BPHYS_DATA_ROTATION
|
||||
sizeof(float[3]), // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST
|
||||
sizeof(float), // BPHYS_DATA_SIZE
|
||||
sizeof(float[3]), // BPHYS_DATA_TIMES
|
||||
sizeof(BoidData), // case BPHYS_DATA_BOIDS
|
||||
sizeof(unsigned int), /* BPHYS_DATA_INDEX */
|
||||
sizeof(float[3]), /* BPHYS_DATA_LOCATION */
|
||||
sizeof(float[3]), /* BPHYS_DATA_VELOCITY */
|
||||
sizeof(float[4]), /* BPHYS_DATA_ROTATION */
|
||||
sizeof(float[3]), /* BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
|
||||
sizeof(float), /* BPHYS_DATA_SIZE */
|
||||
sizeof(float[3]), /* BPHYS_DATA_TIMES */
|
||||
sizeof(BoidData), /* case BPHYS_DATA_BOIDS */
|
||||
};
|
||||
|
||||
static int ptcache_extra_datasize[] = {
|
||||
|
@ -1550,7 +1550,7 @@ static int ptcache_file_compressed_write(
|
|||
r = LzmaCompress(out,
|
||||
&out_len,
|
||||
in,
|
||||
in_len, // assume sizeof(char)==1....
|
||||
in_len, /* assume sizeof(char)==1.... */
|
||||
props,
|
||||
&sizeOfIt,
|
||||
5,
|
||||
|
@ -2117,7 +2117,7 @@ static int ptcache_read_stream(PTCacheID *pid, int cfra)
|
|||
if (!error) {
|
||||
ptcache_file_pointers_init(pf);
|
||||
|
||||
// we have stream reading here
|
||||
/* We have stream reading here. */
|
||||
if (!pid->read_stream(pf, pid->calldata)) {
|
||||
pid->error(pid->calldata, "Failed to read point cache file data");
|
||||
error = 1;
|
||||
|
@ -3245,7 +3245,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker)
|
|||
scene, pid->calldata, &cache->startframe, &cache->endframe);
|
||||
}
|
||||
|
||||
// XXX workaround for regression inroduced in ee3fadd, needs looking into
|
||||
/* XXX workaround for regression inroduced in ee3fadd, needs looking into */
|
||||
if (pid->type == PTCACHE_TYPE_RIGIDBODY) {
|
||||
if ((cache->flag & PTCACHE_REDO_NEEDED ||
|
||||
(cache->flag & PTCACHE_SIMULATION_VALID) == 0) &&
|
||||
|
|
|
@ -509,7 +509,7 @@ static rbCollisionShape *rigidbody_validate_sim_shape_helper(RigidBodyWorld *rbw
|
|||
* - assume even distribution of mass around the Object's pivot
|
||||
* (i.e. Object pivot is centralized in boundbox)
|
||||
*/
|
||||
// XXX: all dimensions are auto-determined now... later can add stored settings for this
|
||||
/* XXX: all dimensions are auto-determined now... later can add stored settings for this */
|
||||
/* get object dimensions without scaling */
|
||||
bb = BKE_object_boundbox_get(ob);
|
||||
if (bb) {
|
||||
|
@ -636,7 +636,7 @@ static void rigidbody_validate_sim_shape(RigidBodyWorld *rbw, Object *ob, bool r
|
|||
/* --------------------- */
|
||||
|
||||
/* helper function to calculate volume of rigidbody object */
|
||||
// TODO: allow a parameter to specify method used to calculate this?
|
||||
/* TODO: allow a parameter to specify method used to calculate this? */
|
||||
void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
|
||||
{
|
||||
RigidBodyOb *rbo = ob->rigidbody_object;
|
||||
|
@ -653,7 +653,7 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
|
|||
* (i.e. Object pivot is centralized in boundbox)
|
||||
* - boundbox gives full width
|
||||
*/
|
||||
// XXX: all dimensions are auto-determined now... later can add stored settings for this
|
||||
/* XXX: all dimensions are auto-determined now... later can add stored settings for this */
|
||||
BKE_object_dimensions_get(ob, size);
|
||||
|
||||
if (ELEM(rbo->shape, RB_SHAPE_CAPSULE, RB_SHAPE_CYLINDER, RB_SHAPE_CONE)) {
|
||||
|
@ -742,7 +742,7 @@ void BKE_rigidbody_calc_center_of_mass(Object *ob, float r_center[3])
|
|||
* (i.e. Object pivot is centralized in boundbox)
|
||||
* - boundbox gives full width
|
||||
*/
|
||||
// XXX: all dimensions are auto-determined now... later can add stored settings for this
|
||||
/* XXX: all dimensions are auto-determined now... later can add stored settings for this */
|
||||
BKE_object_dimensions_get(ob, size);
|
||||
|
||||
/* calculate volume as appropriate */
|
||||
|
@ -2034,7 +2034,7 @@ void BKE_rigidbody_sync_transforms(RigidBodyWorld *rbw, Object *ob, float ctime)
|
|||
!(ob->base_flag & BASE_SELECTED && G.moving & G_TRANSFORM_OBJ)) {
|
||||
float mat[4][4], size_mat[4][4], size[3];
|
||||
|
||||
normalize_qt(rbo->orn); // RB_TODO investigate why quaternion isn't normalized at this point
|
||||
normalize_qt(rbo->orn); /* RB_TODO investigate why quaternion isn't normalized at this point */
|
||||
quat_to_mat4(mat, rbo->orn);
|
||||
copy_v3_v3(mat[3], rbo->pos);
|
||||
|
||||
|
@ -2200,7 +2200,7 @@ void BKE_rigidbody_do_simulation(Depsgraph *depsgraph, Scene *scene, float ctime
|
|||
}
|
||||
|
||||
/* try to read from cache */
|
||||
// RB_TODO deal with interpolated, old and baked results
|
||||
/* RB_TODO deal with interpolated, old and baked results */
|
||||
bool can_simulate = (ctime == rbw->ltime + 1) && !(cache->flag & PTCACHE_BAKED);
|
||||
|
||||
if (BKE_ptcache_read(&pid, ctime, can_simulate) == PTCACHE_READ_EXACT) {
|
||||
|
|
|
@ -421,10 +421,10 @@ static void scene_free_data(ID *id)
|
|||
}
|
||||
|
||||
/* Master Collection */
|
||||
// TODO: what to do with do_id_user? it's also true when just
|
||||
// closing the file which seems wrong? should decrement users
|
||||
// for objects directly in the master collection? then other
|
||||
// collections in the scene need to do it too?
|
||||
/* TODO: what to do with do_id_user? it's also true when just
|
||||
* closing the file which seems wrong? should decrement users
|
||||
* for objects directly in the master collection? then other
|
||||
* collections in the scene need to do it too? */
|
||||
if (scene->master_collection) {
|
||||
BKE_collection_free(scene->master_collection);
|
||||
MEM_freeN(scene->master_collection);
|
||||
|
|
|
@ -70,25 +70,25 @@
|
|||
#define OUT_OF_MEMORY() ((void)printf("Shrinkwrap: Out of memory\n"))
|
||||
|
||||
typedef struct ShrinkwrapCalcData {
|
||||
ShrinkwrapModifierData *smd; // shrinkwrap modifier data
|
||||
ShrinkwrapModifierData *smd; /* shrinkwrap modifier data */
|
||||
|
||||
struct Object *ob; // object we are applying shrinkwrap to
|
||||
struct Object *ob; /* object we are applying shrinkwrap to */
|
||||
|
||||
struct MVert *vert; // Array of verts being projected (to fetch normals or other data)
|
||||
float (*vertexCos)[3]; // vertexs being shrinkwraped
|
||||
struct MVert *vert; /* Array of verts being projected (to fetch normals or other data) */
|
||||
float (*vertexCos)[3]; /* vertexs being shrinkwraped */
|
||||
int numVerts;
|
||||
|
||||
struct MDeformVert *dvert; // Pointer to mdeform array
|
||||
int vgroup; // Vertex group num
|
||||
bool invert_vgroup; /* invert vertex group influence */
|
||||
struct MDeformVert *dvert; /* Pointer to mdeform array */
|
||||
int vgroup; /* Vertex group num */
|
||||
bool invert_vgroup; /* invert vertex group influence */
|
||||
|
||||
struct Mesh *target; // mesh we are shrinking to
|
||||
struct SpaceTransform local2target; // transform to move between local and target space
|
||||
struct ShrinkwrapTreeData *tree; // mesh BVH tree data
|
||||
struct Mesh *target; /* mesh we are shrinking to */
|
||||
struct SpaceTransform local2target; /* transform to move between local and target space */
|
||||
struct ShrinkwrapTreeData *tree; /* mesh BVH tree data */
|
||||
|
||||
struct Object *aux_target;
|
||||
|
||||
float keepDist; // Distance to keep above target surface (units are in local space)
|
||||
float keepDist; /* Distance to keep above target surface (units are in local space) */
|
||||
} ShrinkwrapCalcData;
|
||||
|
||||
typedef struct ShrinkwrapCalcCBData {
|
||||
|
|
|
@ -1506,7 +1506,7 @@ static void _scan_for_ext_spring_forces(
|
|||
madd_v3_v3fl(bs->ext_force, vel, f * (1.0f - fabsf(dot_v3v3(vel, sp))));
|
||||
}
|
||||
else {
|
||||
madd_v3_v3fl(bs->ext_force, vel, f); // to keep compatible with 2.45 release files
|
||||
madd_v3_v3fl(bs->ext_force, vel, f); /* to keep compatible with 2.45 release files */
|
||||
}
|
||||
}
|
||||
/* --- springs seeing wind */
|
||||
|
@ -1554,7 +1554,7 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
|
|||
for (i = 0; i < totthread; i++) {
|
||||
sb_threads[i].scene = scene;
|
||||
sb_threads[i].ob = ob;
|
||||
sb_threads[i].forcetime = 0.0; // not used here
|
||||
sb_threads[i].forcetime = 0.0; /* not used here */
|
||||
sb_threads[i].timenow = timenow;
|
||||
sb_threads[i].ilast = left;
|
||||
left = left - dec;
|
||||
|
@ -1565,9 +1565,9 @@ static void sb_sfesf_threads_run(struct Depsgraph *depsgraph,
|
|||
sb_threads[i].ifirst = 0;
|
||||
}
|
||||
sb_threads[i].effectors = effectors;
|
||||
sb_threads[i].do_deflector = false; // not used here
|
||||
sb_threads[i].fieldfactor = 0.0f; // not used here
|
||||
sb_threads[i].windfactor = 0.0f; // not used here
|
||||
sb_threads[i].do_deflector = false; /* not used here */
|
||||
sb_threads[i].fieldfactor = 0.0f; /* not used here */
|
||||
sb_threads[i].windfactor = 0.0f; /* not used here */
|
||||
sb_threads[i].nr = i;
|
||||
sb_threads[i].tot = totthread;
|
||||
}
|
||||
|
@ -1741,8 +1741,7 @@ static int sb_detect_vertex_collisionCached(float opco[3],
|
|||
cross_v3_v3v3(d_nvect, edge2, edge1);
|
||||
/* n_mag = */ /* UNUSED */ normalize_v3(d_nvect);
|
||||
facedist = dot_v3v3(dv1, d_nvect);
|
||||
// so rules are
|
||||
//
|
||||
/* so rules are */
|
||||
|
||||
if ((facedist > innerfacethickness) && (facedist < outerfacethickness)) {
|
||||
if (isect_point_tri_prism_v3(opco, nv1, nv2, nv3)) {
|
||||
|
@ -1781,7 +1780,7 @@ static int sb_detect_vertex_collisionCached(float opco[3],
|
|||
}
|
||||
} /* while () */
|
||||
|
||||
if (deflected == 1) { // no face but 'outer' edge cylinder sees vert
|
||||
if (deflected == 1) { /* no face but 'outer' edge cylinder sees vert */
|
||||
force_mag_norm = (float)exp(-ee * mindistedge);
|
||||
if (mindistedge > outerfacethickness * ff) {
|
||||
force_mag_norm = (float)force_mag_norm * fa * (mindistedge - outerfacethickness) *
|
||||
|
@ -1793,10 +1792,10 @@ static int sb_detect_vertex_collisionCached(float opco[3],
|
|||
*damp *= (1.0f - mindistedge / outerfacethickness);
|
||||
}
|
||||
}
|
||||
if (deflected == 2) { // face inner detected
|
||||
if (deflected == 2) { /* face inner detected */
|
||||
add_v3_v3(force, innerforceaccu);
|
||||
}
|
||||
if (deflected == 3) { // face outer detected
|
||||
if (deflected == 3) { /* face outer detected */
|
||||
add_v3_v3(force, outerforceaccu);
|
||||
}
|
||||
|
||||
|
@ -3496,14 +3495,14 @@ static void softbody_step(
|
|||
}
|
||||
else if (sb->solver_ID == 2) {
|
||||
/* do semi "fake" implicit euler */
|
||||
// removed
|
||||
/* removed */
|
||||
} /*SOLVER SELECT*/
|
||||
else if (sb->solver_ID == 4) {
|
||||
/* do semi "fake" implicit euler */
|
||||
} /*SOLVER SELECT*/
|
||||
else if (sb->solver_ID == 3) {
|
||||
/* do "stupid" semi "fake" implicit euler */
|
||||
// removed
|
||||
/* removed */
|
||||
|
||||
} /*SOLVER SELECT*/
|
||||
else {
|
||||
|
|
|
@ -180,13 +180,13 @@ static void sound_blend_read_lib(BlendLibReader *reader, ID *id)
|
|||
{
|
||||
bSound *sound = (bSound *)id;
|
||||
BLO_read_id_address(
|
||||
reader, sound->id.lib, &sound->ipo); // XXX deprecated - old animation system
|
||||
reader, sound->id.lib, &sound->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
|
||||
static void sound_blend_read_expand(BlendExpander *expander, ID *id)
|
||||
{
|
||||
bSound *snd = (bSound *)id;
|
||||
BLO_expand(expander, snd->ipo); // XXX deprecated - old animation system
|
||||
BLO_expand(expander, snd->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
|
||||
IDTypeInfo IDType_ID_SO = {
|
||||
|
@ -957,7 +957,7 @@ double BKE_sound_sync_scene(Scene *scene)
|
|||
{
|
||||
sound_verify_evaluated_id(&scene->id);
|
||||
|
||||
// Ugly: Blender doesn't like it when the animation is played back during rendering
|
||||
/* Ugly: Blender doesn't like it when the animation is played back during rendering */
|
||||
if (G.is_rendering) {
|
||||
return NAN_FLT;
|
||||
}
|
||||
|
@ -976,12 +976,12 @@ int BKE_sound_scene_playing(Scene *scene)
|
|||
{
|
||||
sound_verify_evaluated_id(&scene->id);
|
||||
|
||||
// Ugly: Blender doesn't like it when the animation is played back during rendering
|
||||
/* Ugly: Blender doesn't like it when the animation is played back during rendering */
|
||||
if (G.is_rendering) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// in case of a "Null" audio device, we have no playback information
|
||||
/* In case of a "Null" audio device, we have no playback information. */
|
||||
if (AUD_Device_getRate(sound_device) == AUD_RATE_INVALID) {
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -906,7 +906,7 @@ void txt_move_left(Text *text, const bool sel)
|
|||
}
|
||||
else {
|
||||
/* do nice left only if there are only spaces */
|
||||
// TXT_TABSIZE hardcoded in DNA_text_types.h
|
||||
/* #TXT_TABSIZE hard-coded in DNA_text_types.h */
|
||||
if (text->flags & TXT_TABSTOSPACES) {
|
||||
tabsize = txt_calc_tab_left(*linep, *charp);
|
||||
}
|
||||
|
|
|
@ -193,14 +193,14 @@ static void texture_blend_read_lib(BlendLibReader *reader, ID *id)
|
|||
{
|
||||
Tex *tex = (Tex *)id;
|
||||
BLO_read_id_address(reader, tex->id.lib, &tex->ima);
|
||||
BLO_read_id_address(reader, tex->id.lib, &tex->ipo); // XXX deprecated - old animation system
|
||||
BLO_read_id_address(reader, tex->id.lib, &tex->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
|
||||
static void texture_blend_read_expand(BlendExpander *expander, ID *id)
|
||||
{
|
||||
Tex *tex = (Tex *)id;
|
||||
BLO_expand(expander, tex->ima);
|
||||
BLO_expand(expander, tex->ipo); // XXX deprecated - old animation system
|
||||
BLO_expand(expander, tex->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
|
||||
IDTypeInfo IDType_ID_TE = {
|
||||
|
|
|
@ -174,13 +174,13 @@ static void world_blend_read_data(BlendDataReader *reader, ID *id)
|
|||
static void world_blend_read_lib(BlendLibReader *reader, ID *id)
|
||||
{
|
||||
World *wrld = (World *)id;
|
||||
BLO_read_id_address(reader, wrld->id.lib, &wrld->ipo); // XXX deprecated - old animation system
|
||||
BLO_read_id_address(reader, wrld->id.lib, &wrld->ipo); /* XXX deprecated, old animation system */
|
||||
}
|
||||
|
||||
static void world_blend_read_expand(BlendExpander *expander, ID *id)
|
||||
{
|
||||
World *wrld = (World *)id;
|
||||
BLO_expand(expander, wrld->ipo); // XXX deprecated - old animation system
|
||||
BLO_expand(expander, wrld->ipo); /* XXX deprecated, old animation system */
|
||||
}
|
||||
|
||||
IDTypeInfo IDType_ID_WO = {
|
||||
|
|
|
@ -249,7 +249,7 @@ static int write_audio_frame(FFMpegContext *context)
|
|||
|
||||
return 0;
|
||||
}
|
||||
# endif // #ifdef WITH_AUDASPACE
|
||||
# endif /* #ifdef WITH_AUDASPACE */
|
||||
|
||||
/* Allocate a temporary frame */
|
||||
static AVFrame *alloc_picture(int pix_fmt, int width, int height)
|
||||
|
@ -878,9 +878,9 @@ static AVStream *alloc_audio_stream(FFMpegContext *context,
|
|||
# endif
|
||||
|
||||
if (c->frame_size == 0) {
|
||||
// used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
|
||||
// not sure if that is needed anymore, so let's try out if there are any
|
||||
// complaints regarding some ffmpeg versions users might have
|
||||
/* Used to be if ((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
|
||||
* not sure if that is needed anymore, so let's try out if there are any
|
||||
* complaints regarding some FFmpeg versions users might have. */
|
||||
context->audio_input_samples = FF_MIN_BUFFER_SIZE * 8 / c->bits_per_coded_sample / c->channels;
|
||||
}
|
||||
else {
|
||||
|
@ -1675,9 +1675,9 @@ static void ffmpeg_set_expert_options(RenderData *rd)
|
|||
/* This breaks compatibility for QT. */
|
||||
// BKE_ffmpeg_property_add_string(rd, "video", "flags:loop");
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "cmp:chroma");
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); // Deprecated.
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); // Deprecated.
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "partitions:partb8x8"); // Deprecated.
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); /* Deprecated. */
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); /* Deprecated. */
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "partitions:partb8x8"); /* Deprecated. */
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "me:hex");
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "subq:6");
|
||||
BKE_ffmpeg_property_add_string(rd, "video", "me_range:16");
|
||||
|
@ -1787,7 +1787,7 @@ void BKE_ffmpeg_preset_set(RenderData *rd, int preset)
|
|||
rd->ffcodecdata.codec = AV_CODEC_ID_MPEG4;
|
||||
}
|
||||
else if (preset == FFMPEG_PRESET_THEORA) {
|
||||
rd->ffcodecdata.type = FFMPEG_OGG; // XXX broken
|
||||
rd->ffcodecdata.type = FFMPEG_OGG; /* XXX broken */
|
||||
rd->ffcodecdata.codec = AV_CODEC_ID_THEORA;
|
||||
}
|
||||
|
||||
|
|
|
@ -248,8 +248,8 @@ unsigned int BLI_filelist_dir_contents(const char *dirname, struct direntry **r_
|
|||
*r_filelist = dir_ctx.files;
|
||||
}
|
||||
else {
|
||||
// keep blender happy. Blender stores this in a variable
|
||||
// where 0 has special meaning.....
|
||||
/* Keep Blender happy. Blender stores this in a variable
|
||||
* where 0 has special meaning..... */
|
||||
*r_filelist = MEM_mallocN(sizeof(**r_filelist), __func__);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
#include "BLI_fileops.h"
|
||||
#include "BLI_path_util.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_sys_types.h" // for intptr_t support
|
||||
#include "BLI_sys_types.h" /* for intptr_t support */
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
|
|
|
@ -264,7 +264,7 @@ void rgb_to_hsl(float r, float g, float b, float *r_h, float *r_s, float *r_l)
|
|||
float h, s, l = min_ff(1.0, (cmax + cmin) / 2.0f);
|
||||
|
||||
if (cmax == cmin) {
|
||||
h = s = 0.0f; // achromatic
|
||||
h = s = 0.0f; /* achromatic */
|
||||
}
|
||||
else {
|
||||
float d = cmax - cmin;
|
||||
|
|
|
@ -1026,7 +1026,7 @@ bool BLI_path_abs(char *path, const char *basepath)
|
|||
if (!wasrelative && !BLI_path_is_abs(path)) {
|
||||
char *p = path;
|
||||
BLI_windows_get_default_root_dir(tmp);
|
||||
// get rid of the slashes at the beginning of the path
|
||||
/* Get rid of the slashes at the beginning of the path. */
|
||||
while (ELEM(*p, '\\', '/')) {
|
||||
p++;
|
||||
}
|
||||
|
|
|
@ -244,7 +244,7 @@ static void bli_windows_system_backtrace_modules(FILE *fp)
|
|||
me32.dwSize = sizeof(MODULEENTRY32);
|
||||
|
||||
if (!Module32First(hModuleSnap, &me32)) {
|
||||
CloseHandle(hModuleSnap); // Must clean up the snapshot object!
|
||||
CloseHandle(hModuleSnap); /* Must clean up the snapshot object! */
|
||||
fprintf(fp, " Error getting module list.\n");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -284,9 +284,9 @@ TEST(path_util, JoinTruncateLong)
|
|||
JOIN("//longer/p", 11, "//", "//longer", "path");
|
||||
JOIN("//longer/pa", 12, "//", "//longer", "path");
|
||||
JOIN("//longer/pat", 13, "//", "//longer", "path");
|
||||
JOIN("//longer/path", 14, "//", "//longer", "path"); // not truncated
|
||||
JOIN("//longer/path", 14, "//", "//longer", "path"); /* not truncated. */
|
||||
JOIN("//longer/path", 14, "//", "//longer", "path/");
|
||||
JOIN("//longer/path/", 15, "//", "//longer", "path/"); // not truncated
|
||||
JOIN("//longer/path/", 15, "//", "//longer", "path/"); /* not truncated. */
|
||||
JOIN("//longer/path/", 15, "//", "//longer", "path/", "trunc");
|
||||
JOIN("//longer/path/t", 16, "//", "//longer", "path/", "trunc");
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <array>
|
||||
#include <initializer_list>
|
||||
#include <ostream> // NOLINT
|
||||
#include <ostream> /* NOLINT */
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
* by Markus Kuhn <http://www.cl.cam.ac.uk/~mgk25/> - 2015-08-28 - CC BY 4.0
|
||||
*/
|
||||
const char *utf8_invalid_tests[][3] = {
|
||||
// 1 Some correct UTF-8 text
|
||||
/* 1 Some correct UTF-8 text. */
|
||||
{"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |",
|
||||
"You should see the Greek word 'kosme': \"\xce\xba\xe1\xbd\xb9\xcf\x83\xce\xbc\xce\xb5\" |", "\x00"},
|
||||
|
||||
// 2 Boundary condition test cases
|
||||
// Note that those will pass for us, those are not erronéous unicode code points
|
||||
// (asside from \x00, which is only valid as string terminator).
|
||||
// 2.1 First possible sequence of a certain length
|
||||
/* 2 Boundary condition test cases
|
||||
* Note that those will pass for us, those are not erronéous unicode code points
|
||||
* (asside from \x00, which is only valid as string terminator).
|
||||
* 2.1 First possible sequence of a certain length */
|
||||
{"2.1.1 1 byte (U-00000000): \"\x00\" |",
|
||||
"2.1.1 1 byte (U-00000000): \"\" |", "\x01"},
|
||||
{"2.1.2 2 bytes (U-00000080): \"\xc2\x80\" |",
|
||||
|
@ -43,7 +43,7 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"2.1.5 5 bytes (U-00200000): \"\xf8\x88\x80\x80\x80\" |", "\x00"},
|
||||
{"2.1.6 6 bytes (U-04000000): \"\xfc\x84\x80\x80\x80\x80\" |",
|
||||
"2.1.6 6 bytes (U-04000000): \"\xfc\x84\x80\x80\x80\x80\" |", "\x00"},
|
||||
// 2.2 Last possible sequence of a certain length
|
||||
/* 2.2 Last possible sequence of a certain length */
|
||||
{"2.2.1 1 byte (U-0000007F): \"\x7f\" |",
|
||||
"2.2.1 1 byte (U-0000007F): \"\x7f\" |", "\x00"},
|
||||
{"2.2.2 2 bytes (U-000007FF): \"\xdf\xbf\" |",
|
||||
|
@ -56,7 +56,7 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"2.2.5 5 bytes (U-03FFFFFF): \"\xfb\xbf\xbf\xbf\xbf\" |", "\x00"},
|
||||
{"2.2.6 6 bytes (U-7FFFFFFF): \"\xfd\xbf\xbf\xbf\xbf\xbf\" |",
|
||||
"2.2.6 6 bytes (U-7FFFFFFF): \"\xfd\xbf\xbf\xbf\xbf\xbf\" |", "\x00"},
|
||||
// 2.3 Other boundary conditions
|
||||
/* 2.3 Other boundary conditions */
|
||||
{"2.3.1 U-0000D7FF = ed 9f bf = \"\xed\x9f\xbf\" |",
|
||||
"2.3.1 U-0000D7FF = ed 9f bf = \"\xed\x9f\xbf\" |", "\x00"},
|
||||
{"2.3.2 U-0000E000 = ee 80 80 = \"\xee\x80\x80\" |",
|
||||
|
@ -68,9 +68,9 @@ const char *utf8_invalid_tests[][3] = {
|
|||
{"2.3.5 U-00110000 = f4 90 80 80 = \"\xf4\x90\x80\x80\" |",
|
||||
"2.3.5 U-00110000 = f4 90 80 80 = \"\xf4\x90\x80\x80\" |", "\x00"},
|
||||
|
||||
// 3 Malformed sequences
|
||||
// 3.1 Unexpected continuation bytes
|
||||
// Each unexpected continuation byte should be separately signaled as a malformed sequence of its own.
|
||||
/* 3 Malformed sequences
|
||||
* 3.1 Unexpected continuation bytes
|
||||
* Each unexpected continuation byte should be separately signaled as a malformed sequence of its own. */
|
||||
{"3.1.1 First continuation byte 0x80: \"\x80\" |",
|
||||
"3.1.1 First continuation byte 0x80: \"\" |", "\x01"},
|
||||
{"3.1.2 Last continuation byte 0xbf: \"\xbf\" |",
|
||||
|
@ -87,33 +87,33 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"3.1.7 6 continuation bytes: \"\" |", "\x06"},
|
||||
{"3.1.8 7 continuation bytes: \"\x80\xbf\x80\xbf\x80\xbf\x80\" |",
|
||||
"3.1.8 7 continuation bytes: \"\" |", "\x07"},
|
||||
// 3.1.9 Sequence of all 64 possible continuation bytes (0x80-0xbf): |
|
||||
/* 3.1.9 Sequence of all 64 possible continuation bytes (0x80-0xbf): | */
|
||||
{"3.1.9 \"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
|
||||
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
|
||||
"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
|
||||
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\" |",
|
||||
"3.1.9 \"\" |", "\x40"},
|
||||
// 3.2 Lonely start characters
|
||||
// 3.2.1 All 32 first bytes of 2-byte sequences (0xc0-0xdf), each followed by a space character:
|
||||
/* 3.2 Lonely start characters
|
||||
* 3.2.1 All 32 first bytes of 2-byte sequences (0xc0-0xdf), each followed by a space character: */
|
||||
{"3.2.1 \"\xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf "
|
||||
"\xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \" |",
|
||||
"3.2.1 \" \" |", "\x20"},
|
||||
// 3.2.2 All 16 first bytes of 3-byte sequences (0xe0-0xef), each followed by a space character:
|
||||
/* 3.2.2 All 16 first bytes of 3-byte sequences (0xe0-0xef), each followed by a space character: */
|
||||
{"3.2.2 \"\xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \" |",
|
||||
"3.2.2 \" \" |", "\x10"},
|
||||
// 3.2.3 All 8 first bytes of 4-byte sequences (0xf0-0xf7), each followed by a space character:
|
||||
/* 3.2.3 All 8 first bytes of 4-byte sequences (0xf0-0xf7), each followed by a space character: */
|
||||
{"3.2.3 \"\xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \" |",
|
||||
"3.2.3 \" \" |", "\x08"},
|
||||
// 3.2.4 All 4 first bytes of 5-byte sequences (0xf8-0xfb), each followed by a space character:
|
||||
/* 3.2.4 All 4 first bytes of 5-byte sequences (0xf8-0xfb), each followed by a space character: */
|
||||
{"3.2.4 \"\xf8 \xf9 \xfa \xfb \" |",
|
||||
"3.2.4 \" \" |", "\x04"},
|
||||
// 3.2.5 All 2 first bytes of 6-byte sequences (0xfc-0xfd), each followed by a space character:
|
||||
/* 3.2.5 All 2 first bytes of 6-byte sequences (0xfc-0xfd), each followed by a space character: */
|
||||
{"3.2.4 \"\xfc \xfd \" |",
|
||||
"3.2.4 \" \" |", "\x02"},
|
||||
// 3.3 Sequences with last continuation byte missing
|
||||
// All bytes of an incomplete sequence should be signaled as a single malformed sequence,
|
||||
// i.e., you should see only a single replacement character in each of the next 10 tests.
|
||||
// (Characters as in section 2)
|
||||
/* 3.3 Sequences with last continuation byte missing
|
||||
* All bytes of an incomplete sequence should be signaled as a single malformed sequence,
|
||||
* i.e., you should see only a single replacement character in each of the next 10 tests.
|
||||
* (Characters as in section 2) */
|
||||
{"3.3.1 2-byte sequence with last byte missing (U+0000): \"\xc0\" |",
|
||||
"3.3.1 2-byte sequence with last byte missing (U+0000): \"\" |", "\x01"},
|
||||
{"3.3.2 3-byte sequence with last byte missing (U+0000): \"\xe0\x80\" |",
|
||||
|
@ -134,14 +134,14 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"3.3.9 5-byte sequence with last byte missing (U-03FFFFFF): \"\" |", "\x04"},
|
||||
{"3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"\xfd\xbf\xbf\xbf\xbf\" |",
|
||||
"3.3.10 6-byte sequence with last byte missing (U-7FFFFFFF): \"\" |", "\x05"},
|
||||
// 3.4 Concatenation of incomplete sequences
|
||||
// All the 10 sequences of 3.3 concatenated, you should see 10 malformed sequences being signaled:
|
||||
/* 3.4 Concatenation of incomplete sequences
|
||||
* All the 10 sequences of 3.3 concatenated, you should see 10 malformed sequences being signaled: */
|
||||
{"3.4 \"\xc0\xe0\x80\xf0\x80\x80\xf8\x80\x80\x80\xfc\x80\x80\x80\x80"
|
||||
"\xdf\xef\xbf\xf7\xbf\xbf\xfb\xbf\xbf\xbf\xfd\xbf\xbf\xbf\xbf\""
|
||||
" |",
|
||||
"3.4 \"\" |", "\x1e"},
|
||||
// 3.5 Impossible bytes
|
||||
// The following two bytes cannot appear in a correct UTF-8 string
|
||||
/* 3.5 Impossible bytes
|
||||
* The following two bytes cannot appear in a correct UTF-8 string */
|
||||
{"3.5.1 fe = \"\xfe\" |",
|
||||
"3.5.1 fe = \"\" |", "\x01"},
|
||||
{"3.5.2 ff = \"\xff\" |",
|
||||
|
@ -149,24 +149,24 @@ const char *utf8_invalid_tests[][3] = {
|
|||
{"3.5.3 fe fe ff ff = \"\xfe\xfe\xff\xff\" |",
|
||||
"3.5.3 fe fe ff ff = \"\" |", "\x04"},
|
||||
|
||||
// 4 Overlong sequences
|
||||
// The following sequences are not malformed according to the letter of the Unicode 2.0 standard.
|
||||
// However, they are longer then necessary and a correct UTF-8 encoder is not allowed to produce them.
|
||||
// A "safe UTF-8 decoder" should reject them just like malformed sequences for two reasons:
|
||||
// (1) It helps to debug applications if overlong sequences are not treated as valid representations
|
||||
// of characters, because this helps to spot problems more quickly. (2) Overlong sequences provide
|
||||
// alternative representations of characters, that could maliciously be used to bypass filters that check
|
||||
// only for ASCII characters. For instance, a 2-byte encoded line feed (LF) would not be caught by a
|
||||
// line counter that counts only 0x0a bytes, but it would still be processed as a line feed by an unsafe
|
||||
// UTF-8 decoder later in the pipeline. From a security point of view, ASCII compatibility of UTF-8
|
||||
// sequences means also, that ASCII characters are *only* allowed to be represented by ASCII bytes
|
||||
// in the range 0x00-0x7f. To ensure this aspect of ASCII compatibility, use only "safe UTF-8 decoders"
|
||||
// that reject overlong UTF-8 sequences for which a shorter encoding exists.
|
||||
//
|
||||
// 4.1 Examples of an overlong ASCII character
|
||||
// With a safe UTF-8 decoder, all of the following five overlong representations of the ASCII character
|
||||
// slash ("/") should be rejected like a malformed UTF-8 sequence, for instance by substituting it with
|
||||
// a replacement character. If you see a slash below, you do not have a safe UTF-8 decoder!
|
||||
/* 4 Overlong sequences
|
||||
* The following sequences are not malformed according to the letter of the Unicode 2.0 standard.
|
||||
* However, they are longer then necessary and a correct UTF-8 encoder is not allowed to produce them.
|
||||
* A "safe UTF-8 decoder" should reject them just like malformed sequences for two reasons:
|
||||
* (1) It helps to debug applications if overlong sequences are not treated as valid representations
|
||||
* of characters, because this helps to spot problems more quickly. (2) Overlong sequences provide
|
||||
* alternative representations of characters, that could maliciously be used to bypass filters that check
|
||||
* only for ASCII characters. For instance, a 2-byte encoded line feed (LF) would not be caught by a
|
||||
* line counter that counts only 0x0a bytes, but it would still be processed as a line feed by an unsafe
|
||||
* UTF-8 decoder later in the pipeline. From a security point of view, ASCII compatibility of UTF-8
|
||||
* sequences means also, that ASCII characters are *only* allowed to be represented by ASCII bytes
|
||||
* in the range 0x00-0x7f. To ensure this aspect of ASCII compatibility, use only "safe UTF-8 decoders"
|
||||
* that reject overlong UTF-8 sequences for which a shorter encoding exists.
|
||||
*
|
||||
* 4.1 Examples of an overlong ASCII character
|
||||
* With a safe UTF-8 decoder, all of the following five overlong representations of the ASCII character
|
||||
* slash ("/") should be rejected like a malformed UTF-8 sequence, for instance by substituting it with
|
||||
* a replacement character. If you see a slash below, you do not have a safe UTF-8 decoder! */
|
||||
{"4.1.1 U+002F = c0 af = \"\xc0\xaf\" |",
|
||||
"4.1.1 U+002F = c0 af = \"\" |", "\x02"},
|
||||
{"4.1.2 U+002F = e0 80 af = \"\xe0\x80\xaf\" |",
|
||||
|
@ -177,10 +177,10 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"4.1.4 U+002F = f8 80 80 80 af = \"\" |", "\x05"},
|
||||
{"4.1.5 U+002F = fc 80 80 80 80 af = \"\xfc\x80\x80\x80\x80\xaf\" |",
|
||||
"4.1.5 U+002F = fc 80 80 80 80 af = \"\" |", "\x06"},
|
||||
// 4.2 Maximum overlong sequences
|
||||
// Below you see the highest Unicode value that is still resulting in an overlong sequence if represented
|
||||
// with the given number of bytes. This is a boundary test for safe UTF-8 decoders. All five characters
|
||||
// should be rejected like malformed UTF-8 sequences.
|
||||
/* 4.2 Maximum overlong sequences
|
||||
* Below you see the highest Unicode value that is still resulting in an overlong sequence if represented
|
||||
* with the given number of bytes. This is a boundary test for safe UTF-8 decoders. All five characters
|
||||
* should be rejected like malformed UTF-8 sequences. */
|
||||
{"4.2.1 U-0000007F = c1 bf = \"\xc1\xbf\" |",
|
||||
"4.2.1 U-0000007F = c1 bf = \"\" |", "\x02"},
|
||||
{"4.2.2 U-000007FF = e0 9f bf = \"\xe0\x9f\xbf\" |",
|
||||
|
@ -191,9 +191,9 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"4.2.4 U-001FFFFF = f8 87 bf bf bf = \"\" |", "\x05"},
|
||||
{"4.2.5 U+0000 = fc 83 bf bf bf bf = \"\xfc\x83\xbf\xbf\xbf\xbf\" |",
|
||||
"4.2.5 U+0000 = fc 83 bf bf bf bf = \"\" |", "\x06"},
|
||||
// 4.3 Overlong representation of the NUL character
|
||||
// The following five sequences should also be rejected like malformed UTF-8 sequences and should not be
|
||||
// treated like the ASCII NUL character.
|
||||
/* 4.3 Overlong representation of the NUL character
|
||||
* The following five sequences should also be rejected like malformed UTF-8 sequences and should not be
|
||||
* treated like the ASCII NUL character. */
|
||||
{"4.3.1 U+0000 = c0 80 = \"\xc0\x80\" |",
|
||||
"4.3.1 U+0000 = c0 80 = \"\" |", "\x02"},
|
||||
{"4.3.2 U+0000 = e0 80 80 = \"\xe0\x80\x80\" |",
|
||||
|
@ -205,11 +205,11 @@ const char *utf8_invalid_tests[][3] = {
|
|||
{"4.3.5 U+0000 = fc 80 80 80 80 80 = \"\xfc\x80\x80\x80\x80\x80\" |",
|
||||
"4.3.5 U+0000 = fc 80 80 80 80 80 = \"\" |", "\x06"},
|
||||
|
||||
// 5 Illegal code positions
|
||||
// The following UTF-8 sequences should be rejected like malformed sequences, because they never represent
|
||||
// valid ISO 10646 characters and a UTF-8 decoder that accepts them might introduce security problems
|
||||
// comparable to overlong UTF-8 sequences.
|
||||
// 5.1 Single UTF-16 surrogates
|
||||
/* 5 Illegal code positions
|
||||
* The following UTF-8 sequences should be rejected like malformed sequences, because they never represent
|
||||
* valid ISO 10646 characters and a UTF-8 decoder that accepts them might introduce security problems
|
||||
* comparable to overlong UTF-8 sequences.
|
||||
* 5.1 Single UTF-16 surrogates */
|
||||
{"5.1.1 U+D800 = ed a0 80 = \"\xed\xa0\x80\" |",
|
||||
"5.1.1 U+D800 = ed a0 80 = \"\" |", "\x03"},
|
||||
{"5.1.2 U+DB7F = ed ad bf = \"\xed\xad\xbf\" |",
|
||||
|
@ -224,7 +224,7 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"5.1.6 U+DF80 = ed be 80 = \"\" |", "\x03"},
|
||||
{"5.1.7 U+DFFF = ed bf bf = \"\xed\xbf\xbf\" |",
|
||||
"5.1.7 U+DFFF = ed bf bf = \"\" |", "\x03"},
|
||||
// 5.2 Paired UTF-16 surrogates
|
||||
/* 5.2 Paired UTF-16 surrogates */
|
||||
{"5.2.1 U+D800 U+DC00 = ed a0 80 ed b0 80 = \"\xed\xa0\x80\xed\xb0\x80\" |",
|
||||
"5.2.1 U+D800 U+DC00 = ed a0 80 ed b0 80 = \"\" |", "\x06"},
|
||||
{"5.2.2 U+D800 U+DFFF = ed a0 80 ed bf bf = \"\xed\xa0\x80\xed\xbf\xbf\" |",
|
||||
|
@ -241,27 +241,27 @@ const char *utf8_invalid_tests[][3] = {
|
|||
"5.2.7 U+DBFF U+DC00 = ed af bf ed b0 80 = \"\" |", "\x06"},
|
||||
{"5.2.8 U+DBFF U+DFFF = ed af bf ed bf bf = \"\xed\xaf\xbf\xed\xbf\xbf\" |",
|
||||
"5.2.8 U+DBFF U+DFFF = ed af bf ed bf bf = \"\" |", "\x06"},
|
||||
// 5.3 Noncharacter code positions
|
||||
// The following "noncharacters" are "reserved for internal use" by applications, and according to older versions
|
||||
// of the Unicode Standard "should never be interchanged". Unicode Corrigendum #9 dropped the latter restriction.
|
||||
// Nevertheless, their presence in incoming UTF-8 data can remain a potential security risk, depending
|
||||
// on what use is made of these codes subsequently. Examples of such internal use:
|
||||
// - Some file APIs with 16-bit characters may use the integer value -1 = U+FFFF to signal
|
||||
// an end-of-file (EOF) or error condition.
|
||||
// - In some UTF-16 receivers, code point U+FFFE might trigger a byte-swap operation
|
||||
// (to convert between UTF-16LE and UTF-16BE).
|
||||
// With such internal use of noncharacters, it may be desirable and safer to block those code points in
|
||||
// UTF-8 decoders, as they should never occur legitimately in incoming UTF-8 data, and could trigger
|
||||
// unsafe behavior in subsequent processing.
|
||||
//
|
||||
// Particularly problematic noncharacters in 16-bit applications:
|
||||
/* 5.3 Noncharacter code positions
|
||||
* The following "noncharacters" are "reserved for internal use" by applications, and according to older versions
|
||||
* of the Unicode Standard "should never be interchanged". Unicode Corrigendum #9 dropped the latter restriction.
|
||||
* Nevertheless, their presence in incoming UTF-8 data can remain a potential security risk, depending
|
||||
* on what use is made of these codes subsequently. Examples of such internal use:
|
||||
* - Some file APIs with 16-bit characters may use the integer value -1 = U+FFFF to signal
|
||||
* an end-of-file (EOF) or error condition.
|
||||
* - In some UTF-16 receivers, code point U+FFFE might trigger a byte-swap operation
|
||||
* (to convert between UTF-16LE and UTF-16BE).
|
||||
* With such internal use of noncharacters, it may be desirable and safer to block those code points in
|
||||
* UTF-8 decoders, as they should never occur legitimately in incoming UTF-8 data, and could trigger
|
||||
* unsafe behavior in subsequent processing.
|
||||
*
|
||||
* Particularly problematic noncharacters in 16-bit applications: */
|
||||
{"5.3.1 U+FFFE = ef bf be = \"\xef\xbf\xbe\" |",
|
||||
"5.3.1 U+FFFE = ef bf be = \"\" |", "\x03"},
|
||||
{"5.3.2 U+FFFF = ef bf bf = \"\xef\xbf\xbf\" |",
|
||||
"5.3.2 U+FFFF = ef bf bf = \"\" |", "\x03"},
|
||||
/* Fo now, we ignore those, they do not seem to be crucial anyway... */
|
||||
// 5.3.3 U+FDD0 .. U+FDEF
|
||||
// 5.3.4 U+nFFFE U+nFFFF (for n = 1..10)
|
||||
/* For now, we ignore those, they do not seem to be crucial anyway... */
|
||||
/* 5.3.3 U+FDD0 .. U+FDEF
|
||||
* 5.3.4 U+nFFFE U+nFFFF (for n = 1..10) */
|
||||
{NULL, NULL, NULL},
|
||||
};
|
||||
/* clang-format on */
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* \note Does not *fix* anything, only reports found errors.
|
||||
*/
|
||||
|
||||
#include <string.h> // for strrchr strncmp strstr
|
||||
#include <string.h> /* for strrchr strncmp strstr */
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
|
||||
#include "BLI_utildefines.h"
|
||||
#ifndef WIN32
|
||||
# include <unistd.h> // for read close
|
||||
# include <unistd.h> /* for read close */
|
||||
#else
|
||||
# include "BLI_winstuff.h"
|
||||
# include "winsock2.h"
|
||||
# include <io.h> // for open close read
|
||||
# include <io.h> /* for open close read */
|
||||
#endif
|
||||
|
||||
/* allow readfile to use deprecated functionality */
|
||||
|
@ -126,7 +126,7 @@
|
|||
#include "BKE_fcurve.h"
|
||||
#include "BKE_fcurve_driver.h"
|
||||
#include "BKE_fluid.h"
|
||||
#include "BKE_global.h" // for G
|
||||
#include "BKE_global.h" /* for G */
|
||||
#include "BKE_gpencil.h"
|
||||
#include "BKE_gpencil_modifier.h"
|
||||
#include "BKE_hair.h"
|
||||
|
@ -138,15 +138,15 @@
|
|||
#include "BKE_lib_id.h"
|
||||
#include "BKE_lib_override.h"
|
||||
#include "BKE_lib_query.h"
|
||||
#include "BKE_main.h" // for Main
|
||||
#include "BKE_main.h" /* for Main */
|
||||
#include "BKE_main_idmap.h"
|
||||
#include "BKE_material.h"
|
||||
#include "BKE_mesh.h" // for ME_ defines (patching)
|
||||
#include "BKE_mesh.h" /* for ME_ defines (patching) */
|
||||
#include "BKE_mesh_runtime.h"
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_multires.h"
|
||||
#include "BKE_nla.h"
|
||||
#include "BKE_node.h" // for tree type defines
|
||||
#include "BKE_node.h" /* for tree type defines */
|
||||
#include "BKE_object.h"
|
||||
#include "BKE_packedFile.h"
|
||||
#include "BKE_paint.h"
|
||||
|
@ -1490,7 +1490,7 @@ static ssize_t fd_read_gzip_from_memory(FileData *filedata,
|
|||
filedata->strm.next_out = (Bytef *)buffer;
|
||||
filedata->strm.avail_out = (uint)size;
|
||||
|
||||
// Inflate another chunk.
|
||||
/* Inflate another chunk. */
|
||||
err = inflate(&filedata->strm, Z_SYNC_FLUSH);
|
||||
|
||||
if (err == Z_STREAM_END) {
|
||||
|
@ -2490,7 +2490,7 @@ static void direct_link_id_common(
|
|||
/** \name Read Animation (legacy for version patching)
|
||||
* \{ */
|
||||
|
||||
// XXX deprecated - old animation system
|
||||
/* XXX deprecated - old animation system */
|
||||
static void lib_link_ipo(BlendLibReader *reader, Ipo *ipo)
|
||||
{
|
||||
LISTBASE_FOREACH (IpoCurve *, icu, &ipo->curve) {
|
||||
|
@ -2500,7 +2500,7 @@ static void lib_link_ipo(BlendLibReader *reader, Ipo *ipo)
|
|||
}
|
||||
}
|
||||
|
||||
// XXX deprecated - old animation system
|
||||
/* XXX deprecated - old animation system */
|
||||
static void direct_link_ipo(BlendDataReader *reader, Ipo *ipo)
|
||||
{
|
||||
BLO_read_list(reader, &(ipo->curve));
|
||||
|
@ -2538,7 +2538,7 @@ static void direct_link_ipo(BlendDataReader *reader, Ipo *ipo)
|
|||
}
|
||||
}
|
||||
|
||||
// XXX deprecated - old animation system
|
||||
/* XXX deprecated - old animation system */
|
||||
static void lib_link_nlastrips(BlendLibReader *reader, ID *id, ListBase *striplist)
|
||||
{
|
||||
LISTBASE_FOREACH (bActionStrip *, strip, striplist) {
|
||||
|
@ -2551,7 +2551,7 @@ static void lib_link_nlastrips(BlendLibReader *reader, ID *id, ListBase *stripli
|
|||
}
|
||||
}
|
||||
|
||||
// XXX deprecated - old animation system
|
||||
/* XXX deprecated - old animation system */
|
||||
static void direct_link_nlastrips(BlendDataReader *reader, ListBase *strips)
|
||||
{
|
||||
BLO_read_list(reader, strips);
|
||||
|
@ -2561,7 +2561,7 @@ static void direct_link_nlastrips(BlendDataReader *reader, ListBase *strips)
|
|||
}
|
||||
}
|
||||
|
||||
// XXX deprecated - old animation system
|
||||
/* XXX deprecated - old animation system */
|
||||
static void lib_link_constraint_channels(BlendLibReader *reader, ID *id, ListBase *chanbase)
|
||||
{
|
||||
LISTBASE_FOREACH (bConstraintChannel *, chan, chanbase) {
|
||||
|
@ -2680,7 +2680,7 @@ static void lib_link_constraints(BlendLibReader *reader, ID *id, ListBase *conli
|
|||
con->type = CONSTRAINT_TYPE_NULL;
|
||||
}
|
||||
/* own ipo, all constraints have it */
|
||||
BLO_read_id_address(reader, id->lib, &con->ipo); // XXX deprecated - old animation system
|
||||
BLO_read_id_address(reader, id->lib, &con->ipo); /* XXX deprecated - old animation system */
|
||||
|
||||
/* If linking from a library, clear 'local' library override flag. */
|
||||
if (id->lib != NULL) {
|
||||
|
@ -2829,14 +2829,14 @@ void blo_do_versions_key_uidgen(Key *key)
|
|||
|
||||
/* update this also to writefile.c */
|
||||
static const char *ptcache_data_struct[] = {
|
||||
"", // BPHYS_DATA_INDEX
|
||||
"", // BPHYS_DATA_LOCATION
|
||||
"", // BPHYS_DATA_VELOCITY
|
||||
"", // BPHYS_DATA_ROTATION
|
||||
"", // BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
|
||||
"", // BPHYS_DATA_SIZE:
|
||||
"", // BPHYS_DATA_TIMES:
|
||||
"BoidData", // case BPHYS_DATA_BOIDS:
|
||||
"", /* BPHYS_DATA_INDEX */
|
||||
"", /* BPHYS_DATA_LOCATION */
|
||||
"", /* BPHYS_DATA_VELOCITY */
|
||||
"", /* BPHYS_DATA_ROTATION */
|
||||
"", /* BPHYS_DATA_AVELOCITY / BPHYS_DATA_XCONST */
|
||||
"", /* BPHYS_DATA_SIZE: */
|
||||
"", /* BPHYS_DATA_TIMES: */
|
||||
"BoidData", /* case BPHYS_DATA_BOIDS: */
|
||||
};
|
||||
|
||||
static void direct_link_pointcache_cb(BlendDataReader *reader, void *data)
|
||||
|
@ -2923,7 +2923,8 @@ static void lib_link_partdeflect(BlendLibReader *reader, ID *id, PartDeflect *pd
|
|||
|
||||
static void lib_link_particlesettings(BlendLibReader *reader, ParticleSettings *part)
|
||||
{
|
||||
BLO_read_id_address(reader, part->id.lib, &part->ipo); // XXX deprecated - old animation system
|
||||
BLO_read_id_address(
|
||||
reader, part->id.lib, &part->ipo); /* XXX deprecated - old animation system */
|
||||
|
||||
BLO_read_id_address(reader, part->id.lib, &part->instance_object);
|
||||
BLO_read_id_address(reader, part->id.lib, &part->instance_collection);
|
||||
|
@ -3222,10 +3223,10 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
|
|||
{
|
||||
bool warn = false;
|
||||
|
||||
// XXX deprecated - old animation system <<<
|
||||
/* XXX deprecated - old animation system <<< */
|
||||
BLO_read_id_address(reader, ob->id.lib, &ob->ipo);
|
||||
BLO_read_id_address(reader, ob->id.lib, &ob->action);
|
||||
// >>> XXX deprecated - old animation system
|
||||
/* >>> XXX deprecated - old animation system */
|
||||
|
||||
BLO_read_id_address(reader, ob->id.lib, &ob->parent);
|
||||
BLO_read_id_address(reader, ob->id.lib, &ob->track);
|
||||
|
@ -3322,10 +3323,10 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
|
|||
lib_link_pose(reader, ob, ob->pose);
|
||||
lib_link_constraints(reader, &ob->id, &ob->constraints);
|
||||
|
||||
// XXX deprecated - old animation system <<<
|
||||
/* XXX deprecated - old animation system <<< */
|
||||
lib_link_constraint_channels(reader, &ob->id, &ob->constraintChannels);
|
||||
lib_link_nlastrips(reader, &ob->id, &ob->nlastrips);
|
||||
// >>> XXX deprecated - old animation system
|
||||
/* >>> XXX deprecated - old animation system */
|
||||
|
||||
LISTBASE_FOREACH (PartEff *, paf, &ob->effect) {
|
||||
if (paf->type == EFF_PARTICLE) {
|
||||
|
@ -3339,7 +3340,7 @@ static void lib_link_object(BlendLibReader *reader, Object *ob)
|
|||
|
||||
if (fluidmd && fluidmd->fss) {
|
||||
BLO_read_id_address(
|
||||
reader, ob->id.lib, &fluidmd->fss->ipo); // XXX deprecated - old animation system
|
||||
reader, ob->id.lib, &fluidmd->fss->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3881,10 +3882,10 @@ static void direct_link_object(BlendDataReader *reader, Object *ob)
|
|||
|
||||
BLO_read_list(reader, &ob->defbase);
|
||||
BLO_read_list(reader, &ob->fmaps);
|
||||
// XXX deprecated - old animation system <<<
|
||||
/* XXX deprecated - old animation system <<< */
|
||||
direct_link_nlastrips(reader, &ob->nlastrips);
|
||||
BLO_read_list(reader, &ob->constraintChannels);
|
||||
// >>> XXX deprecated - old animation system
|
||||
/* >>> XXX deprecated - old animation system */
|
||||
|
||||
BLO_read_pointer_array(reader, (void **)&ob->mat);
|
||||
BLO_read_data_address(reader, &ob->matbits);
|
||||
|
@ -3951,7 +3952,7 @@ static void direct_link_object(BlendDataReader *reader, Object *ob)
|
|||
if (ob->soft) {
|
||||
SoftBody *sb = ob->soft;
|
||||
|
||||
sb->bpoint = NULL; // init pointers so it gets rebuilt nicely
|
||||
sb->bpoint = NULL; /* init pointers so it gets rebuilt nicely */
|
||||
sb->bspring = NULL;
|
||||
sb->scratch = NULL;
|
||||
/* although not used anymore */
|
||||
|
@ -4448,7 +4449,7 @@ static void lib_link_scene(BlendLibReader *reader, Scene *sce)
|
|||
|
||||
if (seq->ipo) {
|
||||
BLO_read_id_address(
|
||||
reader, sce->id.lib, &seq->ipo); // XXX deprecated - old animation system
|
||||
reader, sce->id.lib, &seq->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
seq->scene_sound = NULL;
|
||||
if (seq->scene) {
|
||||
|
@ -5139,7 +5140,7 @@ static void direct_link_area(BlendDataReader *reader, ScrArea *area)
|
|||
}
|
||||
}
|
||||
/* we only saved what was used */
|
||||
space_outliner->storeflag |= SO_TREESTORE_CLEANUP; // at first draw
|
||||
space_outliner->storeflag |= SO_TREESTORE_CLEANUP; /* at first draw */
|
||||
}
|
||||
space_outliner->treehash = NULL;
|
||||
space_outliner->tree.first = space_outliner->tree.last = NULL;
|
||||
|
@ -6895,7 +6896,7 @@ static void link_global(FileData *fd, BlendFileData *bfd)
|
|||
bfd->cur_view_layer = blo_read_get_new_globaldata_address(fd, bfd->cur_view_layer);
|
||||
bfd->curscreen = newlibadr(fd, NULL, bfd->curscreen);
|
||||
bfd->curscene = newlibadr(fd, NULL, bfd->curscene);
|
||||
// this happens in files older than 2.35
|
||||
/* this happens in files older than 2.35 */
|
||||
if (bfd->curscene == NULL) {
|
||||
if (bfd->curscreen) {
|
||||
bfd->curscene = bfd->curscreen->scene;
|
||||
|
@ -7197,7 +7198,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
|
|||
IDP_BlendDataRead(reader, &addon->prop);
|
||||
}
|
||||
|
||||
// XXX
|
||||
/* XXX */
|
||||
user->uifonts.first = user->uifonts.last = NULL;
|
||||
|
||||
BLO_read_list(reader, &user->uistyles);
|
||||
|
@ -7575,7 +7576,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
|
|||
/* ID has not been read yet, add placeholder to the main of the
|
||||
* library it belongs to, so that it will be read later. */
|
||||
read_libblock(fd, libmain, bhead, LIB_TAG_INDIRECT, false, NULL);
|
||||
// commented because this can print way too much
|
||||
/* commented because this can print way too much */
|
||||
// if (G.debug & G_DEBUG) printf("expand_doit: other lib %s\n", lib->filepath);
|
||||
|
||||
/* for outliner dependency only */
|
||||
|
@ -7642,7 +7643,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
|
|||
* and another append happens which invokes same ID...
|
||||
* in that case the lookup table needs this entry */
|
||||
oldnewmap_insert(fd->libmap, bhead->old, id, bhead->code);
|
||||
// commented because this can print way too much
|
||||
/* commented because this can print way too much */
|
||||
// if (G.debug & G_DEBUG) printf("expand: already read %s\n", id->name);
|
||||
}
|
||||
}
|
||||
|
@ -7660,7 +7661,7 @@ static void expand_ipo(BlendExpander *expander, Ipo *ipo)
|
|||
}
|
||||
}
|
||||
|
||||
// XXX deprecated - old animation system
|
||||
/* XXX deprecated - old animation system */
|
||||
static void expand_constraint_channels(BlendExpander *expander, ListBase *chanbase)
|
||||
{
|
||||
LISTBASE_FOREACH (bConstraintChannel *, chan, chanbase) {
|
||||
|
@ -7788,7 +7789,7 @@ static void expand_constraints(BlendExpander *expander, ListBase *lb)
|
|||
/* deprecated manual expansion stuff */
|
||||
LISTBASE_FOREACH (bConstraint *, curcon, lb) {
|
||||
if (curcon->ipo) {
|
||||
BLO_expand(expander, curcon->ipo); // XXX deprecated - old animation system
|
||||
BLO_expand(expander, curcon->ipo); /* XXX deprecated - old animation system */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7840,7 +7841,7 @@ static void expand_object(BlendExpander *expander, Object *ob)
|
|||
|
||||
BLO_expand(expander, ob->gpd);
|
||||
|
||||
// XXX deprecated - old animation system (for version patching only)
|
||||
/* XXX deprecated - old animation system (for version patching only) */
|
||||
BLO_expand(expander, ob->ipo);
|
||||
BLO_expand(expander, ob->action);
|
||||
|
||||
|
@ -7851,7 +7852,7 @@ static void expand_object(BlendExpander *expander, Object *ob)
|
|||
BLO_expand(expander, strip->act);
|
||||
BLO_expand(expander, strip->ipo);
|
||||
}
|
||||
// XXX deprecated - old animation system (for version patching only)
|
||||
/* XXX deprecated - old animation system (for version patching only) */
|
||||
|
||||
for (int a = 0; a < ob->totcol; a++) {
|
||||
BLO_expand(expander, ob->mat[a]);
|
||||
|
@ -8075,7 +8076,7 @@ void BLO_expand_main(void *fdhandle, Main *mainvar)
|
|||
expand_collection(&expander, (Collection *)id);
|
||||
break;
|
||||
case ID_IP:
|
||||
expand_ipo(&expander, (Ipo *)id); // XXX deprecated - old animation system
|
||||
expand_ipo(&expander, (Ipo *)id); /* XXX deprecated - old animation system */
|
||||
break;
|
||||
case ID_PA:
|
||||
expand_particlesettings(&expander, (ParticleSettings *)id);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#else
|
||||
# include "BLI_winstuff.h"
|
||||
# include "winsock2.h"
|
||||
# include <io.h> // for open close read
|
||||
# include <io.h> /* for open close read */
|
||||
# include <zlib.h> /* odd include order-issue */
|
||||
#endif
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
|||
#include "BKE_anim_visualization.h"
|
||||
#include "BKE_armature.h"
|
||||
#include "BKE_colortools.h"
|
||||
#include "BKE_global.h" // for G
|
||||
#include "BKE_global.h" /* for G */
|
||||
#include "BKE_lib_id.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_modifier.h"
|
||||
|
@ -113,7 +113,7 @@ static void area_add_header_region(ScrArea *area, ListBase *lb)
|
|||
|
||||
static void sequencer_init_preview_region(ARegion *region)
|
||||
{
|
||||
// XXX a bit ugly still, copied from space_sequencer
|
||||
/* XXX a bit ugly still, copied from space_sequencer */
|
||||
/* NOTE: if you change values here, also change them in space_sequencer.c, sequencer_new */
|
||||
region->regiontype = RGN_TYPE_PREVIEW;
|
||||
region->alignment = RGN_ALIGN_TOP;
|
||||
|
|
|
@ -54,15 +54,15 @@
|
|||
|
||||
#include "BKE_anim_visualization.h"
|
||||
#include "BKE_image.h"
|
||||
#include "BKE_main.h" // for Main
|
||||
#include "BKE_mesh.h" // for ME_ defines (patching)
|
||||
#include "BKE_main.h" /* for Main */
|
||||
#include "BKE_mesh.h" /* for ME_ defines (patching) */
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_particle.h"
|
||||
#include "BKE_pointcache.h"
|
||||
#include "BKE_scene.h"
|
||||
#include "BKE_screen.h"
|
||||
#include "BKE_sequencer.h"
|
||||
#include "BKE_text.h" // for txt_extended_ascii_as_utf8
|
||||
#include "BKE_text.h" /* for txt_extended_ascii_as_utf8 */
|
||||
#include "BKE_texture.h"
|
||||
#include "BKE_tracking.h"
|
||||
|
||||
|
@ -70,7 +70,7 @@
|
|||
# include "BKE_writeffmpeg.h"
|
||||
#endif
|
||||
|
||||
#include "IMB_imbuf.h" // for proxy / timecode versioning stuff
|
||||
#include "IMB_imbuf.h" /* for proxy / timecode versioning stuff */
|
||||
|
||||
#include "NOD_common.h"
|
||||
#include "NOD_texture.h"
|
||||
|
@ -1343,7 +1343,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
if (bmain->versionfile < 263 || (bmain->versionfile == 263 && bmain->subversionfile < 10)) {
|
||||
{
|
||||
Scene *scene;
|
||||
// composite redesign
|
||||
/* composite redesign */
|
||||
for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
|
||||
if (scene->nodetree) {
|
||||
if (scene->nodetree->chunksize == 0) {
|
||||
|
@ -1921,7 +1921,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
}
|
||||
}
|
||||
|
||||
// add storage for compositor translate nodes when not existing
|
||||
/* add storage for compositor translate nodes when not existing */
|
||||
if (MAIN_VERSION_OLDER(bmain, 265, 11)) {
|
||||
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
|
||||
if (ntree->type == NTREE_COMPOSIT) {
|
||||
|
|
|
@ -978,7 +978,7 @@ static void do_version_curvemapping_walker(Main *bmain, void (*callback)(CurveMa
|
|||
}
|
||||
}
|
||||
|
||||
// toolsettings
|
||||
/* toolsettings */
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
if (ts->vpaint) {
|
||||
callback(ts->vpaint->paint.cavity_curve);
|
||||
|
@ -2988,9 +2988,9 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
|
||||
/* gpencil grid settings */
|
||||
for (bGPdata *gpd = bmain->gpencils.first; gpd; gpd = gpd->id.next) {
|
||||
ARRAY_SET_ITEMS(gpd->grid.color, 0.5f, 0.5f, 0.5f); // Color
|
||||
ARRAY_SET_ITEMS(gpd->grid.scale, 1.0f, 1.0f); // Scale
|
||||
gpd->grid.lines = GP_DEFAULT_GRID_LINES; // Number of lines
|
||||
ARRAY_SET_ITEMS(gpd->grid.color, 0.5f, 0.5f, 0.5f); /* Color */
|
||||
ARRAY_SET_ITEMS(gpd->grid.scale, 1.0f, 1.0f); /* Scale */
|
||||
gpd->grid.lines = GP_DEFAULT_GRID_LINES; /* Number of lines */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
#include <limits.h>
|
||||
|
||||
#ifndef WIN32
|
||||
# include <unistd.h> // for read close
|
||||
# include <unistd.h> /* for read close */
|
||||
#else
|
||||
# include "BLI_winstuff.h"
|
||||
# include "winsock2.h"
|
||||
# include <io.h> // for open close read
|
||||
# include <io.h> /* for open close read */
|
||||
# include <zlib.h> /* odd include order-issue */
|
||||
#endif
|
||||
|
||||
|
@ -72,8 +72,8 @@
|
|||
#include "BKE_deform.h"
|
||||
#include "BKE_fcurve.h"
|
||||
#include "BKE_lattice.h"
|
||||
#include "BKE_main.h" // for Main
|
||||
#include "BKE_mesh.h" // for ME_ defines (patching)
|
||||
#include "BKE_main.h" /* for Main */
|
||||
#include "BKE_mesh.h" /* for ME_ defines (patching) */
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_particle.h"
|
||||
#include "BKE_pointcache.h"
|
||||
|
@ -886,7 +886,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
|
|||
}
|
||||
|
||||
for (sce = bmain->scenes.first; sce; sce = sce->id.next) {
|
||||
sce->r.stereomode = 1; // no stereo
|
||||
sce->r.stereomode = 1; /* no stereo */
|
||||
}
|
||||
|
||||
/* some oldfile patch, moved from set_func_space */
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
#include "BLI_bitmap.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_mempool.h"
|
||||
#include "MEM_guardedalloc.h" // MEM_freeN
|
||||
#include "MEM_guardedalloc.h" /* MEM_freeN */
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_anim_data.h"
|
||||
|
@ -140,7 +140,7 @@
|
|||
#include "BKE_deform.h"
|
||||
#include "BKE_fcurve.h"
|
||||
#include "BKE_fcurve_driver.h"
|
||||
#include "BKE_global.h" // for G
|
||||
#include "BKE_global.h" /* for G */
|
||||
#include "BKE_gpencil_modifier.h"
|
||||
#include "BKE_icons.h"
|
||||
#include "BKE_idprop.h"
|
||||
|
|
|
@ -52,7 +52,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op)
|
|||
BMO_slot_buffer_hflag_enable(bm, op->slots_in, "edges", BM_EDGE, BM_ELEM_TAG, false);
|
||||
|
||||
BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false);
|
||||
BM_mesh_edgenet(bm, true, true); // TODO, sides
|
||||
BM_mesh_edgenet(bm, true, true); /* TODO, sides */
|
||||
|
||||
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
|
||||
|
||||
|
|
|
@ -681,7 +681,7 @@ static void bm_isect_tri_tri(
|
|||
copy_v3_v3(t_scale[2], fv_b[2]->co);
|
||||
tri_v3_scale(UNPACK3(t_scale), 1.0f - s->epsilon.eps2x);
|
||||
|
||||
// second check for verts intersecting the triangle
|
||||
/* second check for verts intersecting the triangle */
|
||||
for (i_a = 0; i_a < 3; i_a++) {
|
||||
if (BM_ELEM_API_FLAG_TEST(fv_a[i_a], VERT_VISIT_A)) {
|
||||
continue;
|
||||
|
|
|
@ -116,7 +116,7 @@ bool ExecutionGroup::addOperation(NodeOperation *operation)
|
|||
NodeOperation *ExecutionGroup::getOutputOperation() const
|
||||
{
|
||||
return this
|
||||
->m_operations[0]; // the first operation of the group is always the output operation.
|
||||
->m_operations[0]; /* the first operation of the group is always the output operation. */
|
||||
}
|
||||
|
||||
void ExecutionGroup::initExecution()
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "COM_MixOperation.h"
|
||||
|
||||
#include "COM_SetValueOperation.h"
|
||||
#include "DNA_material_types.h" // the ramp types
|
||||
#include "DNA_material_types.h" /* the ramp types */
|
||||
|
||||
void AlphaOverNode::convertToOperations(NodeConverter &converter,
|
||||
const CompositorContext & /*context*/) const
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "COM_ExecutionSystem.h"
|
||||
#include "COM_SetValueOperation.h"
|
||||
#include "DNA_material_types.h" // the ramp types
|
||||
#include "DNA_material_types.h" /* the ramp types */
|
||||
|
||||
MixNode::MixNode(bNode *editorNode) : Node(editorNode)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "COM_MixOperation.h"
|
||||
#include "COM_SetValueOperation.h"
|
||||
|
||||
#include "DNA_material_types.h" // the ramp types
|
||||
#include "DNA_material_types.h" /* the ramp types */
|
||||
|
||||
void ZCombineNode::convertToOperations(NodeConverter &converter,
|
||||
const CompositorContext &context) const
|
||||
|
|
|
@ -66,8 +66,8 @@ void deg_debug_fprintf(const DebugContext &ctx, const char *fmt, ...)
|
|||
|
||||
inline double get_node_time(const DebugContext & /*ctx*/, const Node *node)
|
||||
{
|
||||
// TODO(sergey): Figure out a nice way to define which exact time
|
||||
// we want to show.
|
||||
/* TODO(sergey): Figure out a nice way to define which exact time
|
||||
* we want to show. */
|
||||
return node->stats.current_time;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ string gnuplotify_name(const string &name)
|
|||
|
||||
void write_stats_data(const DebugContext &ctx)
|
||||
{
|
||||
// Fill in array of all stats which are to be displayed.
|
||||
/* Fill in array of all stats which are to be displayed. */
|
||||
Vector<StatsEntry> stats;
|
||||
stats.reserve(ctx.graph->id_nodes.size());
|
||||
for (const IDNode *id_node : ctx.graph->id_nodes) {
|
||||
|
@ -110,12 +110,12 @@ void write_stats_data(const DebugContext &ctx)
|
|||
entry.time = time;
|
||||
stats.append(entry);
|
||||
}
|
||||
// Sort the data.
|
||||
/* Sort the data. */
|
||||
std::sort(stats.begin(), stats.end(), stat_entry_comparator);
|
||||
// We limit number of entries, otherwise things become unreadable.
|
||||
/* We limit number of entries, otherwise things become unreadable. */
|
||||
stats.resize(min_ii(stats.size(), 32));
|
||||
std::reverse(stats.begin(), stats.end());
|
||||
// Print data to the file stream.
|
||||
/* Print data to the file stream. */
|
||||
deg_debug_fprintf(ctx, "$data << EOD" NL);
|
||||
for (const StatsEntry &entry : stats) {
|
||||
deg_debug_fprintf(ctx,
|
||||
|
@ -129,14 +129,14 @@ void write_stats_data(const DebugContext &ctx)
|
|||
|
||||
void deg_debug_stats_gnuplot(const DebugContext &ctx)
|
||||
{
|
||||
// Data itself.
|
||||
/* Data itself. */
|
||||
write_stats_data(ctx);
|
||||
// Optional label.
|
||||
/* Optional label. */
|
||||
if (ctx.label && ctx.label[0]) {
|
||||
deg_debug_fprintf(ctx, "set title \"%s\"" NL, ctx.label);
|
||||
}
|
||||
// Rest of the commands.
|
||||
// TODO(sergey): Need to decide on the resolution somehow.
|
||||
/* Rest of the commands.
|
||||
* TODO(sergey): Need to decide on the resolution somehow. */
|
||||
deg_debug_fprintf(ctx, "set terminal pngcairo size 1920,1080" NL);
|
||||
deg_debug_fprintf(ctx, "set output \"%s\"" NL, ctx.output_filename);
|
||||
deg_debug_fprintf(ctx, "set grid" NL);
|
||||
|
|
|
@ -25,12 +25,12 @@
|
|||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include <string.h> // XXX: memcpy
|
||||
#include <string.h> /* XXX: memcpy */
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_action.h" // XXX: BKE_pose_channel_find_name
|
||||
#include "BKE_action.h" /* XXX: BKE_pose_channel_find_name */
|
||||
#include "BKE_customdata.h"
|
||||
#include "BKE_idtype.h"
|
||||
#include "BKE_main.h"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
* Defines and code for core node types.
|
||||
*/
|
||||
|
||||
#include <cstdlib> // for BLI_assert()
|
||||
#include <cstdlib> /* for BLI_assert() */
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace deg {
|
|||
struct ComponentNode;
|
||||
|
||||
/* Evaluation Operation for atomic operation */
|
||||
// XXX: move this to another header that can be exposed?
|
||||
/* XXX: move this to another header that can be exposed? */
|
||||
typedef function<void(struct ::Depsgraph *)> DepsEvalOperationCb;
|
||||
|
||||
/* Identifiers for common operations (as an enum). */
|
||||
|
@ -143,7 +143,7 @@ enum class OperationCode {
|
|||
*
|
||||
* - "DONE" This noop is used to signal that the bone's final pose
|
||||
* transform can be read by others. */
|
||||
// TODO: deform mats could get calculated in the final_transform ops...
|
||||
/* TODO: deform mats could get calculated in the final_transform ops... */
|
||||
BONE_READY,
|
||||
BONE_DONE,
|
||||
/* B-Bone segment shape computation (after DONE) */
|
||||
|
|
|
@ -9,17 +9,17 @@ void main()
|
|||
{
|
||||
float dist = length(gl_PointCoord - vec2(0.5));
|
||||
|
||||
// transparent outside of point
|
||||
// --- 0 ---
|
||||
// smooth transition
|
||||
// --- 1 ---
|
||||
// pure outline color
|
||||
// --- 2 ---
|
||||
// smooth transition
|
||||
// --- 3 ---
|
||||
// pure fill color
|
||||
// ...
|
||||
// dist = 0 at center of point
|
||||
/* transparent outside of point
|
||||
* --- 0 ---
|
||||
* smooth transition
|
||||
* --- 1 ---
|
||||
* pure outline color
|
||||
* --- 2 ---
|
||||
* smooth transition
|
||||
* --- 3 ---
|
||||
* pure fill color
|
||||
* ...
|
||||
* dist = 0 at center of point */
|
||||
|
||||
float midStroke = 0.5 * (radii[1] + radii[2]);
|
||||
|
||||
|
|
|
@ -30,15 +30,15 @@ void main()
|
|||
gl_Position = vec4(point_world_to_ndc(world_pos).xy, depth, 1.0);
|
||||
gl_PointSize = pointSize;
|
||||
|
||||
// calculate concentric radii in pixels
|
||||
/* calculate concentric radii in pixels */
|
||||
float radius = 0.5 * pointSize;
|
||||
|
||||
// start at the outside and progress toward the center
|
||||
/* start at the outside and progress toward the center */
|
||||
radii[0] = radius;
|
||||
radii[1] = radius - 1.0;
|
||||
radii[2] = radius - outlineWidth;
|
||||
radii[3] = radius - outlineWidth - 1.0;
|
||||
|
||||
// convert to PointCoord units
|
||||
/* convert to PointCoord units */
|
||||
radii /= pointSize;
|
||||
}
|
||||
|
|
|
@ -342,23 +342,23 @@ void main()
|
|||
|
||||
# define mnmx3(a, b, c) \
|
||||
mx3(a, b, c); \
|
||||
s2(a, b); // 3 exchanges
|
||||
s2(a, b); /* 3 exchanges */
|
||||
# define mnmx4(a, b, c, d) \
|
||||
s2(a, b); \
|
||||
s2(c, d); \
|
||||
s2(a, c); \
|
||||
s2(b, d); // 4 exchanges
|
||||
s2(b, d); /* 4 exchanges */
|
||||
# define mnmx5(a, b, c, d, e) \
|
||||
s2(a, b); \
|
||||
s2(c, d); \
|
||||
mn3(a, c, e); \
|
||||
mx3(b, d, e); // 6 exchanges
|
||||
mx3(b, d, e); /* 6 exchanges */
|
||||
# define mnmx6(a, b, c, d, e, f) \
|
||||
s2(a, d); \
|
||||
s2(b, e); \
|
||||
s2(c, f); \
|
||||
mn3(a, b, c); \
|
||||
mx3(d, e, f); // 7 exchanges
|
||||
mx3(d, e, f); /* 7 exchanges */
|
||||
|
||||
vec v[9];
|
||||
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
//----------------------------------------------------------------------------------
|
||||
// File: es3-kepler\FXAA/FXAA3_11.h
|
||||
// SDK Version: v3.00
|
||||
// Email: gameworks@nvidia.com
|
||||
// Site: http://developer.nvidia.com/
|
||||
//
|
||||
// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
// contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//----------------------------------------------------------------------------------
|
||||
/* ---------------------------------------------------------------------------------
|
||||
* File: es3-kepler\FXAA/FXAA3_11.h
|
||||
* SDK Version: v3.00
|
||||
* Email: gameworks@nvidia.com
|
||||
* Site: http://developer.nvidia.com/
|
||||
*
|
||||
* Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of NVIDIA CORPORATION nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* --------------------------------------------------------------------------------- */
|
||||
|
||||
/* BLENDER MODIFICATIONS:
|
||||
*
|
||||
|
@ -54,26 +54,26 @@
|
|||
NOTE the other tuning knobs are now in the shader function inputs!
|
||||
============================================================================*/
|
||||
#ifndef FXAA_QUALITY__PRESET
|
||||
//
|
||||
// Choose the quality preset.
|
||||
// This needs to be compiled into the shader as it effects code.
|
||||
// Best option to include multiple presets is to
|
||||
// in each shader define the preset, then include this file.
|
||||
//
|
||||
// OPTIONS
|
||||
// -----------------------------------------------------------------------
|
||||
// 10 to 15 - default medium dither (10=fastest, 15=highest quality)
|
||||
// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
|
||||
// 39 - no dither, very expensive
|
||||
//
|
||||
// NOTES
|
||||
// -----------------------------------------------------------------------
|
||||
// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
|
||||
// 13 = about same speed as FXAA 3.9 and better than 12
|
||||
// 23 = closest to FXAA 3.9 visually and performance wise
|
||||
// _ = the lowest digit is directly related to performance
|
||||
// _ = the highest digit is directly related to style
|
||||
//
|
||||
/*
|
||||
* Choose the quality preset.
|
||||
* This needs to be compiled into the shader as it effects code.
|
||||
* Best option to include multiple presets is to
|
||||
* in each shader define the preset, then include this file.
|
||||
*
|
||||
* OPTIONS
|
||||
* -----------------------------------------------------------------------
|
||||
* 10 to 15 - default medium dither (10=fastest, 15=highest quality)
|
||||
* 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)
|
||||
* 39 - no dither, very expensive
|
||||
*
|
||||
* NOTES
|
||||
* -----------------------------------------------------------------------
|
||||
* 12 = slightly faster then FXAA 3.9 and higher edge quality (default)
|
||||
* 13 = about same speed as FXAA 3.9 and better than 12
|
||||
* 23 = closest to FXAA 3.9 visually and performance wise
|
||||
* _ = the lowest digit is directly related to performance
|
||||
* _ = the highest digit is directly related to style
|
||||
*/
|
||||
# define FXAA_QUALITY__PRESET 12
|
||||
#endif
|
||||
|
||||
|
@ -296,9 +296,9 @@ NOTE the other tuning knobs are now in the shader function inputs!
|
|||
/* (#B1#) */
|
||||
float FxaaLuma(vec4 rgba)
|
||||
{
|
||||
// note: sqrt because the sampled colors are in a linear colorspace!
|
||||
// this approximates a perceptual conversion, which is good enough for the
|
||||
// algorithm
|
||||
/* note: sqrt because the sampled colors are in a linear colorspace!
|
||||
* this approximates a perceptual conversion, which is good enough for the
|
||||
* algorithm */
|
||||
return sqrt(dot(rgba.rgb, vec3(0.2126, 0.7152, 0.0722)));
|
||||
}
|
||||
|
||||
|
@ -311,51 +311,51 @@ float FxaaLuma(vec4 rgba)
|
|||
============================================================================*/
|
||||
/*--------------------------------------------------------------------------*/
|
||||
vec4 FxaaPixelShader(
|
||||
//
|
||||
// Use noperspective interpolation here (turn off perspective interpolation).
|
||||
// {xy} = center of pixel
|
||||
/*
|
||||
* Use noperspective interpolation here (turn off perspective interpolation).
|
||||
* {xy} = center of pixel */
|
||||
vec2 pos,
|
||||
//
|
||||
// Input color texture.
|
||||
// {rgb_} = color in linear or perceptual color space
|
||||
/*
|
||||
* Input color texture.
|
||||
* {rgb_} = color in linear or perceptual color space */
|
||||
sampler2D tex,
|
||||
//
|
||||
// Only used on FXAA Quality.
|
||||
// This must be from a constant/uniform.
|
||||
// {x_} = 1.0/screenWidthInPixels
|
||||
// {_y} = 1.0/screenHeightInPixels
|
||||
/*
|
||||
* Only used on FXAA Quality.
|
||||
* This must be from a constant/uniform.
|
||||
* {x_} = 1.0/screenWidthInPixels
|
||||
* {_y} = 1.0/screenHeightInPixels */
|
||||
vec2 fxaaQualityRcpFrame,
|
||||
//
|
||||
// Only used on FXAA Quality.
|
||||
// This used to be the FXAA_QUALITY__SUBPIX define.
|
||||
// It is here now to allow easier tuning.
|
||||
// Choose the amount of sub-pixel aliasing removal.
|
||||
// This can effect sharpness.
|
||||
// 1.00 - upper limit (softer)
|
||||
// 0.75 - default amount of filtering
|
||||
// 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
|
||||
// 0.25 - almost off
|
||||
// 0.00 - completely off
|
||||
/*
|
||||
* Only used on FXAA Quality.
|
||||
* This used to be the FXAA_QUALITY__SUBPIX define.
|
||||
* It is here now to allow easier tuning.
|
||||
* Choose the amount of sub-pixel aliasing removal.
|
||||
* This can effect sharpness.
|
||||
* 1.00 - upper limit (softer)
|
||||
* 0.75 - default amount of filtering
|
||||
* 0.50 - lower limit (sharper, less sub-pixel aliasing removal)
|
||||
* 0.25 - almost off
|
||||
* 0.00 - completely off */
|
||||
float fxaaQualitySubpix,
|
||||
//
|
||||
// Only used on FXAA Quality.
|
||||
// This used to be the FXAA_QUALITY__EDGE_THRESHOLD define.
|
||||
// It is here now to allow easier tuning.
|
||||
// The minimum amount of local contrast required to apply algorithm.
|
||||
// 0.333 - too little (faster)
|
||||
// 0.250 - low quality
|
||||
// 0.166 - default
|
||||
// 0.125 - high quality
|
||||
// 0.063 - overkill (slower)
|
||||
/*
|
||||
* Only used on FXAA Quality.
|
||||
* This used to be the FXAA_QUALITY__EDGE_THRESHOLD define.
|
||||
* It is here now to allow easier tuning.
|
||||
* The minimum amount of local contrast required to apply algorithm.
|
||||
* 0.333 - too little (faster)
|
||||
* 0.250 - low quality
|
||||
* 0.166 - default
|
||||
* 0.125 - high quality
|
||||
* 0.063 - overkill (slower) */
|
||||
float fxaaQualityEdgeThreshold,
|
||||
//
|
||||
// Only used on FXAA Quality.
|
||||
// This used to be the FXAA_QUALITY__EDGE_THRESHOLD_MIN define.
|
||||
// It is here now to allow easier tuning.
|
||||
// Trims the algorithm from processing darks.
|
||||
// 0.0833 - upper limit (default, the start of visible unfiltered edges)
|
||||
// 0.0625 - high quality (faster)
|
||||
// 0.0312 - visible limit (slower)
|
||||
/*
|
||||
* Only used on FXAA Quality.
|
||||
* This used to be the FXAA_QUALITY__EDGE_THRESHOLD_MIN define.
|
||||
* It is here now to allow easier tuning.
|
||||
* Trims the algorithm from processing darks.
|
||||
* 0.0833 - upper limit (default, the start of visible unfiltered edges)
|
||||
* 0.0625 - high quality (faster)
|
||||
* 0.0312 - visible limit (slower) */
|
||||
float fxaaQualityEdgeThresholdMin)
|
||||
{
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
@ -363,7 +363,7 @@ vec4 FxaaPixelShader(
|
|||
posM.x = pos.x;
|
||||
posM.y = pos.y;
|
||||
vec4 rgbyM = FxaaTexTop(tex, posM);
|
||||
float lumaM = FxaaLuma(rgbyM); // (#B4#)
|
||||
float lumaM = FxaaLuma(rgbyM); /* (#B4#) */
|
||||
float lumaS = FxaaLuma(FxaaTexOff(tex, posM, ivec2(0, 1), fxaaQualityRcpFrame.xy));
|
||||
float lumaE = FxaaLuma(FxaaTexOff(tex, posM, ivec2(1, 0), fxaaQualityRcpFrame.xy));
|
||||
float lumaN = FxaaLuma(FxaaTexOff(tex, posM, ivec2(0, -1), fxaaQualityRcpFrame.xy));
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
#include "WM_types.h"
|
||||
|
||||
/* *********************************************** */
|
||||
// XXX constant defines to be moved elsewhere?
|
||||
/* XXX constant defines to be moved elsewhere? */
|
||||
|
||||
/* extra padding for lengths (to go under scrollers) */
|
||||
#define EXTRA_SCROLL_PAD 100.0f
|
||||
|
@ -288,7 +288,7 @@ static short acf_generic_indention_1(bAnimContext *UNUSED(ac), bAnimListElem *UN
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
#if 0 // XXX not used
|
||||
#if 0 /* XXX not used */
|
||||
static short acf_generic_indention_2(bAnimContext *ac, bAnimListElem *ale)
|
||||
{
|
||||
return 2;
|
||||
|
@ -304,7 +304,7 @@ static short acf_generic_indention_flexible(bAnimContext *UNUSED(ac), bAnimListE
|
|||
if (ale->type == ANIMTYPE_FCURVE) {
|
||||
FCurve *fcu = (FCurve *)ale->data;
|
||||
|
||||
// TODO: we need some way of specifying that the indention color should be one less...
|
||||
/* TODO: we need some way of specifying that the indention color should be one less. */
|
||||
if (fcu->grp) {
|
||||
indent++;
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ static bAnimChannelType ACF_SUMMARY = {
|
|||
|
||||
/* Scene ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_scene_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_SCENE_DATA;
|
||||
|
@ -810,8 +810,8 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings se
|
|||
case ACHANNEL_SETTING_SELECT: /* selected */
|
||||
return GET_ACF_FLAG_PTR(base->flag, type);
|
||||
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanded */
|
||||
return GET_ACF_FLAG_PTR(ob->nlaflag, type); // xxx
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanded */
|
||||
return GET_ACF_FLAG_PTR(ob->nlaflag, type); /* XXX */
|
||||
|
||||
case ACHANNEL_SETTING_MUTE: /* mute (only in NLA) */
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
|
@ -1062,7 +1062,7 @@ static bool acf_fcurve_setting_valid(bAnimContext *ac,
|
|||
return true;
|
||||
}
|
||||
else {
|
||||
return false; // NOTE: in this special case, we need to draw ICON_ZOOMOUT
|
||||
return false; /* NOTE: in this special case, we need to draw ICON_ZOOMOUT */
|
||||
}
|
||||
|
||||
case ACHANNEL_SETTING_VISIBLE: /* Only available in Graph Editor */
|
||||
|
@ -1126,7 +1126,7 @@ static bAnimChannelType ACF_FCURVE = {
|
|||
acf_generic_channel_color, /* backdrop color */
|
||||
acf_generic_channel_backdrop, /* backdrop */
|
||||
acf_generic_indention_flexible,
|
||||
/* indent level */ // xxx rename this to f-curves only?
|
||||
/* indent level */ /* XXX rename this to f-curves only? */
|
||||
acf_generic_group_offset, /* offset */
|
||||
|
||||
acf_fcurve_name, /* name */
|
||||
|
@ -1145,7 +1145,7 @@ static void acf_nla_controls_color(bAnimContext *UNUSED(ac),
|
|||
bAnimListElem *UNUSED(ale),
|
||||
float r_color[3])
|
||||
{
|
||||
// TODO: give this its own theme setting?
|
||||
/* TODO: give this its own theme setting? */
|
||||
UI_GetThemeColorShade3fv(TH_GROUP, 55, r_color);
|
||||
}
|
||||
|
||||
|
@ -1187,7 +1187,7 @@ static bool acf_nla_controls_setting_valid(bAnimContext *UNUSED(ac),
|
|||
case ACHANNEL_SETTING_EXPAND:
|
||||
return true;
|
||||
|
||||
// TODO: selected?
|
||||
/* TODO: selected? */
|
||||
|
||||
default: /* unsupported */
|
||||
return false;
|
||||
|
@ -1290,7 +1290,7 @@ static bAnimChannelType ACF_NLACURVE = {
|
|||
|
||||
/* Object Action Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_fillactd_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_ACTION;
|
||||
|
@ -1380,7 +1380,7 @@ static bAnimChannelType ACF_FILLACTD = {
|
|||
|
||||
/* Drivers Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_filldrivers_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_DRIVER;
|
||||
|
@ -1392,7 +1392,7 @@ static void acf_filldrivers_name(bAnimListElem *UNUSED(ale), char *name)
|
|||
}
|
||||
|
||||
/* check if some setting exists for this channel */
|
||||
// TODO: this could be made more generic
|
||||
/* TODO: this could be made more generic */
|
||||
static bool acf_filldrivers_setting_valid(bAnimContext *UNUSED(ac),
|
||||
bAnimListElem *UNUSED(ale),
|
||||
eAnimChannel_Settings setting)
|
||||
|
@ -1465,7 +1465,7 @@ static bAnimChannelType ACF_FILLDRIVERS = {
|
|||
|
||||
/* Material Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsmat_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_MATERIAL_DATA;
|
||||
|
@ -1544,7 +1544,7 @@ static bAnimChannelType ACF_DSMAT = {
|
|||
|
||||
/* Light Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dslight_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_LIGHT_DATA;
|
||||
|
@ -1625,17 +1625,17 @@ static bAnimChannelType ACF_DSLIGHT = {
|
|||
|
||||
/* Texture Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dstex_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_TEXTURE_DATA;
|
||||
}
|
||||
|
||||
/* offset for texture expanders */
|
||||
// FIXME: soon to be obsolete?
|
||||
/* FIXME: soon to be obsolete? */
|
||||
static short acf_dstex_offset(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return 14; // XXX: simply include this in indention instead?
|
||||
return 14; /* XXX: simply include this in indention instead? */
|
||||
}
|
||||
|
||||
/* get the appropriate flag(s) for the setting when it is valid */
|
||||
|
@ -1711,7 +1711,7 @@ static bAnimChannelType ACF_DSTEX = {
|
|||
|
||||
/* Camera Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dscachefile_icon(bAnimListElem *ale)
|
||||
{
|
||||
UNUSED_VARS(ale);
|
||||
|
@ -1794,7 +1794,7 @@ static bAnimChannelType ACF_DSCACHEFILE = {
|
|||
|
||||
/* Camera Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dscam_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_CAMERA_DATA;
|
||||
|
@ -1877,7 +1877,7 @@ static bAnimChannelType ACF_DSCAM = {
|
|||
|
||||
/* Curve Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dscur_icon(bAnimListElem *ale)
|
||||
{
|
||||
Curve *cu = (Curve *)ale->data;
|
||||
|
@ -1966,7 +1966,7 @@ static bAnimChannelType ACF_DSCUR = {
|
|||
|
||||
/* Shape Key Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsskey_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_SHAPEKEY_DATA;
|
||||
|
@ -2064,7 +2064,7 @@ static bAnimChannelType ACF_DSSKEY = {
|
|||
|
||||
/* World Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dswor_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_WORLD_DATA;
|
||||
|
@ -2143,7 +2143,7 @@ static bAnimChannelType ACF_DSWOR = {
|
|||
|
||||
/* Particle Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dspart_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_PARTICLE_DATA;
|
||||
|
@ -2222,7 +2222,7 @@ static bAnimChannelType ACF_DSPART = {
|
|||
|
||||
/* MetaBall Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsmball_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_META_DATA;
|
||||
|
@ -2303,7 +2303,7 @@ static bAnimChannelType ACF_DSMBALL = {
|
|||
|
||||
/* Armature Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsarm_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_ARMATURE_DATA;
|
||||
|
@ -2382,7 +2382,7 @@ static bAnimChannelType ACF_DSARM = {
|
|||
|
||||
/* NodeTree Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsntree_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_NODETREE;
|
||||
|
@ -2555,7 +2555,7 @@ static bAnimChannelType ACF_DSLINESTYLE = {
|
|||
|
||||
/* Mesh Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsmesh_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_MESH_DATA;
|
||||
|
@ -2621,7 +2621,7 @@ static bAnimChannelType ACF_DSMESH = {
|
|||
acf_generic_dataexpand_color, /* backdrop color */
|
||||
acf_generic_dataexpand_backdrop, /* backdrop */
|
||||
acf_generic_indention_1,
|
||||
/* indent level */ // XXX this only works for compositing
|
||||
/* indent level */ /* XXX this only works for compositing */
|
||||
acf_generic_basic_offset, /* offset */
|
||||
|
||||
acf_generic_idblock_name, /* name */
|
||||
|
@ -2635,7 +2635,7 @@ static bAnimChannelType ACF_DSMESH = {
|
|||
|
||||
/* Lattice Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dslat_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_LATTICE_DATA;
|
||||
|
@ -2701,7 +2701,7 @@ static bAnimChannelType ACF_DSLAT = {
|
|||
acf_generic_dataexpand_color, /* backdrop color */
|
||||
acf_generic_dataexpand_backdrop, /* backdrop */
|
||||
acf_generic_indention_1,
|
||||
/* indent level */ // XXX this only works for compositing
|
||||
/* indent level */ /* XXX this only works for compositing */
|
||||
acf_generic_basic_offset, /* offset */
|
||||
|
||||
acf_generic_idblock_name, /* name */
|
||||
|
@ -2715,7 +2715,7 @@ static bAnimChannelType ACF_DSLAT = {
|
|||
|
||||
/* Speaker Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsspk_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_SPEAKER;
|
||||
|
@ -2794,7 +2794,7 @@ static bAnimChannelType ACF_DSSPK = {
|
|||
|
||||
/* Hair Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dshair_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_HAIR_DATA;
|
||||
|
@ -2873,7 +2873,7 @@ static bAnimChannelType ACF_DSHAIR = {
|
|||
|
||||
/* PointCloud Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dspointcloud_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_POINTCLOUD_DATA;
|
||||
|
@ -2954,7 +2954,7 @@ static bAnimChannelType ACF_DSPOINTCLOUD = {
|
|||
|
||||
/* Volume Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsvolume_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_VOLUME_DATA;
|
||||
|
@ -3113,7 +3113,7 @@ static bAnimChannelType ACF_DSSIMULATION = {
|
|||
|
||||
/* GPencil Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsgpencil_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_GREASEPENCIL;
|
||||
|
@ -3194,7 +3194,7 @@ static bAnimChannelType ACF_DSGPENCIL = {
|
|||
|
||||
/* World Expander ------------------------------------------- */
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_dsmclip_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_SEQUENCE;
|
||||
|
@ -3397,7 +3397,7 @@ static void acf_gpd_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale),
|
|||
UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, r_color);
|
||||
}
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_gpd_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_GREASEPENCIL;
|
||||
|
@ -3576,7 +3576,7 @@ static void acf_mask_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale),
|
|||
UI_GetThemeColorShade3fv(TH_DOPESHEET_CHANNELSUBOB, 20, r_color);
|
||||
}
|
||||
|
||||
// TODO: just get this from RNA?
|
||||
/* TODO: just get this from RNA? */
|
||||
static int acf_mask_icon(bAnimListElem *UNUSED(ale))
|
||||
{
|
||||
return ICON_MOD_MASK;
|
||||
|
@ -3875,7 +3875,7 @@ static bAnimChannelType ACF_NLATRACK = {
|
|||
acf_generic_channel_backdrop, /* backdrop */
|
||||
acf_generic_indention_flexible, /* indent level */
|
||||
acf_generic_group_offset,
|
||||
/* offset */ // XXX?
|
||||
/* offset */ /* XXX? */
|
||||
|
||||
acf_nlatrack_name, /* name */
|
||||
acf_nlatrack_name_prop, /* name prop */
|
||||
|
@ -3970,7 +3970,7 @@ static void acf_nlaaction_name(bAnimListElem *ale, char *name)
|
|||
|
||||
if (name) {
|
||||
if (act) {
|
||||
// TODO: add special decoration when doing this in tweaking mode?
|
||||
/* TODO: add special decoration when doing this in tweaking mode? */
|
||||
BLI_strncpy(name, act->id.name + 2, ANIM_CHAN_NAME_SIZE);
|
||||
}
|
||||
else {
|
||||
|
@ -4027,7 +4027,7 @@ static int acf_nlaaction_setting_flag(bAnimContext *UNUSED(ac),
|
|||
|
||||
switch (setting) {
|
||||
case ACHANNEL_SETTING_PINNED: /* pinned - map/unmap */
|
||||
*neg = true; // XXX
|
||||
*neg = true; /* XXX */
|
||||
return ADT_NLA_EDIT_NOMAP;
|
||||
|
||||
default: /* unsupported */
|
||||
|
@ -4054,7 +4054,7 @@ static bAnimChannelType ACF_NLAACTION = {
|
|||
acf_nlaaction_backdrop, /* backdrop */
|
||||
acf_generic_indention_flexible, /* indent level */
|
||||
acf_generic_group_offset,
|
||||
/* offset */ // XXX?
|
||||
/* offset */ /* XXX? */
|
||||
|
||||
acf_nlaaction_name, /* name */
|
||||
acf_nlaaction_name_prop, /* name prop */
|
||||
|
@ -4328,15 +4328,15 @@ void ANIM_channel_setting_set(bAnimContext *ac,
|
|||
|
||||
/* --------------------------- */
|
||||
|
||||
// size of icons
|
||||
/* size of icons */
|
||||
#define ICON_WIDTH (0.85f * U.widget_unit)
|
||||
// width of sliders
|
||||
/* width of sliders */
|
||||
#define SLIDER_WIDTH (4 * U.widget_unit)
|
||||
// min-width of rename textboxes
|
||||
/* min-width of rename textboxes */
|
||||
#define RENAME_TEXT_MIN_WIDTH (U.widget_unit)
|
||||
// width of graph editor color bands
|
||||
/* width of graph editor color bands */
|
||||
#define GRAPH_COLOR_BAND_WIDTH (0.3f * U.widget_unit)
|
||||
// extra offset for the visibility icons in the graph editor
|
||||
/* extra offset for the visibility icons in the graph editor */
|
||||
#define GRAPH_ICON_VISIBILITY_OFFSET (GRAPH_COLOR_BAND_WIDTH * 1.5f)
|
||||
|
||||
/* Helper - Check if a channel needs renaming */
|
||||
|
@ -4796,7 +4796,7 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi
|
|||
/* try to resolve the path stored in the F-Curve */
|
||||
if (RNA_path_resolve_property(&id_ptr, rna_path, &ptr, &prop)) {
|
||||
/* find or create new F-Curve */
|
||||
// XXX is the group name for this ok?
|
||||
/* XXX is the group name for this ok? */
|
||||
bAction *act = ED_id_action_ensure(bmain, (ID *)key);
|
||||
FCurve *fcu = ED_action_fcurve_ensure(bmain, act, NULL, &ptr, rna_path, 0);
|
||||
|
||||
|
@ -4945,7 +4945,7 @@ static void draw_setting_widget(bAnimContext *ac,
|
|||
/* --- */
|
||||
|
||||
case ACHANNEL_SETTING_PROTECT: /* protected lock */
|
||||
// TODO: what about when there's no protect needed?
|
||||
/* TODO: what about when there's no protect needed? */
|
||||
// icon = ((enabled) ? ICON_LOCKED : ICON_UNLOCKED);
|
||||
icon = ICON_UNLOCKED;
|
||||
|
||||
|
@ -5241,7 +5241,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
|
|||
/* reset offset - now goes from RHS of panel */
|
||||
offset = (int)rect->xmax;
|
||||
|
||||
// TODO: when drawing sliders, make those draw instead of these toggles if not enough space
|
||||
/* TODO: when drawing sliders, make those draw instead of these toggles if not enough space. */
|
||||
if (v2d && !is_being_renamed) {
|
||||
short draw_sliders = 0;
|
||||
|
||||
|
@ -5518,7 +5518,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
|
|||
}
|
||||
}
|
||||
else { /* Special Slider for stuff without RNA Access ---------- */
|
||||
// TODO: only implement this case when we really need it...
|
||||
/* TODO: only implement this case when we really need it... */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_armature.h"
|
||||
#include "ED_keyframes_edit.h" // XXX move the select modes out of there!
|
||||
#include "ED_keyframes_edit.h" /* XXX move the select modes out of there! */
|
||||
#include "ED_object.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_select_utils.h"
|
||||
|
@ -73,7 +73,7 @@
|
|||
/* -------------------------- Selection ------------------------------------- */
|
||||
|
||||
/* Set the given animation-channel as the active one for the active context */
|
||||
// TODO: extend for animdata types...
|
||||
/* TODO: extend for animdata types... */
|
||||
void ANIM_set_active_channel(bAnimContext *ac,
|
||||
void *data,
|
||||
eAnimCont_Types datatype,
|
||||
|
@ -1470,8 +1470,8 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op)
|
|||
rearrange_driver_channels(&ac, adt, mode);
|
||||
break;
|
||||
|
||||
case ANIMCONT_ACTION: /* Single Action only... */
|
||||
case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME...
|
||||
case ANIMCONT_ACTION: /* Single Action only... */
|
||||
case ANIMCONT_SHAPEKEY: /* DOUBLE CHECK ME... */
|
||||
{
|
||||
if (adt->action) {
|
||||
rearrange_action_channels(&ac, adt->action, mode);
|
||||
|
@ -1939,7 +1939,7 @@ static const EnumPropertyItem prop_animchannel_setflag_types[] = {
|
|||
};
|
||||
|
||||
/* defines for set animation-channel settings */
|
||||
// TODO: could add some more types, but those are really quite dependent on the mode...
|
||||
/* TODO: could add some more types, but those are really quite dependent on the mode... */
|
||||
static const EnumPropertyItem prop_animchannel_settings_types[] = {
|
||||
{ACHANNEL_SETTING_PROTECT, "PROTECT", 0, "Protect", ""},
|
||||
{ACHANNEL_SETTING_MUTE, "MUTE", 0, "Mute", ""},
|
||||
|
@ -1948,12 +1948,14 @@ static const EnumPropertyItem prop_animchannel_settings_types[] = {
|
|||
|
||||
/* ------------------- */
|
||||
|
||||
/* Set/clear a particular flag (setting) for all selected + visible channels
|
||||
* setting: the setting to modify
|
||||
* mode: eAnimChannels_SetFlag
|
||||
* onlysel: only selected channels get the flag set
|
||||
/**
|
||||
* Set/clear a particular flag (setting) for all selected + visible channels
|
||||
* \param setting: the setting to modify.
|
||||
* \param mode: eAnimChannels_SetFlag.
|
||||
* \param onlysel: only selected channels get the flag set.
|
||||
*
|
||||
* TODO: enable a setting which turns flushing on/off?.
|
||||
*/
|
||||
// TODO: enable a setting which turns flushing on/off?
|
||||
static void setflag_anim_channels(bAnimContext *ac,
|
||||
eAnimChannel_Settings setting,
|
||||
eAnimChannels_SetFlag mode,
|
||||
|
@ -3295,11 +3297,11 @@ static void ANIM_OT_channels_click(wmOperatorType *ot)
|
|||
|
||||
/* properties */
|
||||
/* NOTE: don't save settings, otherwise, can end up with some weird behavior (sticky extend) */
|
||||
prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); // SHIFTKEY
|
||||
prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); /* SHIFTKEY */
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
|
||||
prop = RNA_def_boolean(
|
||||
ot->srna, "children_only", false, "Select Children Only", ""); // CTRLKEY|SHIFTKEY
|
||||
ot->srna, "children_only", false, "Select Children Only", ""); /* CTRLKEY|SHIFTKEY */
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
@ -3443,7 +3445,7 @@ void ED_operatortypes_animchannels(void)
|
|||
WM_operatortype_append(ANIM_OT_channels_ungroup);
|
||||
}
|
||||
|
||||
// TODO: check on a poll callback for this, to get hotkeys into menus
|
||||
/* TODO: check on a poll callback for this, to get hotkeys into menus */
|
||||
void ED_keymap_animchannels(wmKeyConfig *keyconf)
|
||||
{
|
||||
WM_keymap_ensure(keyconf, "Animation Channels", 0, 0);
|
||||
|
|
|
@ -108,7 +108,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale)
|
|||
* we'd be calling property update functions here too ... */
|
||||
DEG_id_tag_update(id,
|
||||
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY |
|
||||
ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
|
||||
ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,7 @@ void ANIM_id_update(Main *bmain, ID *id)
|
|||
bmain,
|
||||
id,
|
||||
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY |
|
||||
ID_RECALC_ANIMATION); // XXX or do we want something more restrictive?
|
||||
ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,8 +126,11 @@ void ANIM_draw_previewrange(const bContext *C, View2D *v2d, int end_frame_width)
|
|||
/* *************************************************** */
|
||||
/* SCENE FRAME RANGE */
|
||||
|
||||
/* Draw frame range guides (for scene frame range) in background */
|
||||
// TODO: Should we still show these when preview range is enabled?
|
||||
/**
|
||||
* Draw frame range guides (for scene frame range) in background.
|
||||
*
|
||||
* TODO: Should we still show these when preview range is enabled?
|
||||
*/
|
||||
void ANIM_draw_framerange(Scene *scene, View2D *v2d)
|
||||
{
|
||||
/* draw darkened area outside of active timeline frame range */
|
||||
|
@ -167,8 +170,11 @@ void ANIM_draw_framerange(Scene *scene, View2D *v2d)
|
|||
/* *************************************************** */
|
||||
/* NLA-MAPPING UTILITIES (required for drawing and also editing keyframes) */
|
||||
|
||||
/* Obtain the AnimData block providing NLA-mapping for the given channel (if applicable) */
|
||||
// TODO: do not supply return this if the animdata tells us that there is no mapping to perform
|
||||
/**
|
||||
* Obtain the AnimData block providing NLA-mapping for the given channel (if applicable).
|
||||
*
|
||||
* TODO: do not supply return this if the animdata tells us that there is no mapping to perform.
|
||||
*/
|
||||
AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
|
||||
{
|
||||
/* sanity checks */
|
||||
|
@ -182,7 +188,7 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale)
|
|||
}
|
||||
|
||||
/* apart from strictly keyframe-related contexts, this shouldn't even happen */
|
||||
// XXX: nla and channel here may not be necessary...
|
||||
/* XXX: nla and channel here may not be necessary... */
|
||||
if (ELEM(ac->datatype,
|
||||
ANIMCONT_ACTION,
|
||||
ANIMCONT_SHAPEKEY,
|
||||
|
|
|
@ -142,7 +142,7 @@ static Key *actedit_get_shapekeys(bAnimContext *ac)
|
|||
}
|
||||
|
||||
/* XXX pinning is not available in 'ShapeKey' mode... */
|
||||
// if (saction->pin) return NULL;
|
||||
// if (saction->pin) { return NULL; }
|
||||
|
||||
/* shapekey data is stored with geometry data */
|
||||
key = BKE_key_from_object(ob);
|
||||
|
@ -223,9 +223,11 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
|
|||
case SACTCONT_MASK: /* Mask */ /* XXX review how this mode is handled... */
|
||||
{
|
||||
/* TODO, other methods to get the mask */
|
||||
// Sequence *seq = BKE_sequencer_active_get(ac->scene);
|
||||
// MovieClip *clip = ac->scene->clip;
|
||||
// struct Mask *mask = seq ? seq->mask : NULL;
|
||||
#if 0
|
||||
Sequence *seq = BKE_sequencer_active_get(ac->scene);
|
||||
MovieClip *clip = ac->scene->clip;
|
||||
struct Mask *mask = seq ? seq->mask : NULL;
|
||||
#endif
|
||||
|
||||
/* update scene-pointer (no need to check for pinning yet, as not implemented) */
|
||||
saction->ads.source = (ID *)ac->scene;
|
||||
|
@ -562,12 +564,14 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
|
|||
|
||||
/* ............................... */
|
||||
|
||||
/* Add a new animation channel, taking into account the "peek" flag, which is used to just check
|
||||
/**
|
||||
* Add a new animation channel, taking into account the "peek" flag, which is used to just check
|
||||
* whether any channels will be added (but without needing them to actually get created).
|
||||
*
|
||||
* ! This causes the calling function to return early if we're only "peeking" for channels
|
||||
* \warning This causes the calling function to return early if we're only "peeking" for channels.
|
||||
*
|
||||
* XXX: ale_statement stuff is really a hack for one special case. It shouldn't really be needed.
|
||||
*/
|
||||
// XXX: ale_statement stuff is really a hack for one special case. It shouldn't really be needed...
|
||||
#define ANIMCHANNEL_NEW_CHANNEL_FULL( \
|
||||
channel_data, channel_type, owner_id, fcurve_owner_id, ale_statement) \
|
||||
if (filter_mode & ANIMFILTER_TMP_PEEK) { \
|
||||
|
@ -681,7 +685,7 @@ static bAnimListElem *make_new_animlistelem(void *data,
|
|||
|
||||
ale->flag = adt->flag;
|
||||
|
||||
// XXX... drivers don't show summary for now
|
||||
/* XXX drivers don't show summary for now. */
|
||||
ale->key_data = NULL;
|
||||
ale->datatype = ALE_NONE;
|
||||
break;
|
||||
|
@ -921,7 +925,7 @@ static bAnimListElem *make_new_animlistelem(void *data,
|
|||
/* NOTE: we just reuse the same expand filter for this case */
|
||||
ale->flag = EXPANDED_GPD(gpd);
|
||||
|
||||
// XXX: currently, this is only used for access to its animation data
|
||||
/* XXX: currently, this is only used for access to its animation data */
|
||||
ale->key_data = (adt) ? adt->action : NULL;
|
||||
ale->datatype = ALE_ACT;
|
||||
|
||||
|
@ -1234,7 +1238,7 @@ static bool fcurve_has_errors(FCurve *fcu)
|
|||
}
|
||||
|
||||
/* check variables for other things that need linting... */
|
||||
// TODO: maybe it would be more efficient just to have a quick flag for this?
|
||||
/* TODO: maybe it would be more efficient just to have a quick flag for this? */
|
||||
for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
|
||||
DRIVER_TARGETS_USED_LOOPER_BEGIN (dvar) {
|
||||
if (dtar->flag & DTAR_FLAG_INVALID) {
|
||||
|
@ -1476,7 +1480,7 @@ static size_t animfilter_action(bAnimContext *ac,
|
|||
}
|
||||
|
||||
/* do groups */
|
||||
// TODO: do nested groups?
|
||||
/* TODO: do nested groups? */
|
||||
for (agrp = act->groups.first; agrp; agrp = agrp->next) {
|
||||
/* store reference to last channel of group */
|
||||
if (agrp->channels.last) {
|
||||
|
@ -1725,7 +1729,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac,
|
|||
/* Only include this track if selected in a way consistent
|
||||
* with the filtering requirements. */
|
||||
if (ANIMCHANNEL_SELOK(SEL_SHAPEKEY(kb))) {
|
||||
// TODO: consider 'active' too?
|
||||
/* TODO: consider 'active' too? */
|
||||
|
||||
/* owner-id here must be key so that the F-Curve can be resolved... */
|
||||
ANIMCHANNEL_NEW_CHANNEL(kb, ANIMTYPE_SHAPEKEY, key, NULL);
|
||||
|
@ -1735,7 +1739,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac,
|
|||
}
|
||||
else {
|
||||
/* just use the action associated with the shapekey */
|
||||
// TODO: somehow manage to pass dopesheet info down here too?
|
||||
/* TODO: somehow manage to pass dopesheet info down here too? */
|
||||
if (key->adt) {
|
||||
if (filter_mode & ANIMFILTER_ANIMDATA) {
|
||||
if (ANIMCHANNEL_SELOK(SEL_ANIMDATA(key->adt))) {
|
||||
|
@ -1840,8 +1844,11 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data,
|
|||
return items;
|
||||
}
|
||||
|
||||
/* Grab all Grease Pencil data-blocks in file. */
|
||||
// TODO: should this be amalgamated with the dopesheet filtering code?
|
||||
/**
|
||||
* Grab all Grease Pencil data-blocks in file.
|
||||
*
|
||||
* TODO: should this be amalgamated with the dope-sheet filtering code?
|
||||
*/
|
||||
static size_t animdata_filter_gpencil(bAnimContext *ac,
|
||||
ListBase *anim_data,
|
||||
void *UNUSED(data),
|
||||
|
@ -1930,8 +1937,9 @@ static size_t animdata_filter_ds_gpencil(
|
|||
tmp_items += animfilter_block_data(ac, &tmp_data, ads, &gpd->id, filter_mode);
|
||||
|
||||
/* add Grease Pencil layers */
|
||||
// TODO: do these need a separate expander?
|
||||
// XXX: what order should these go in?
|
||||
|
||||
/* TODO: do these need a separate expander?
|
||||
* XXX: what order should these go in? */
|
||||
}
|
||||
END_ANIMFILTER_SUBCHANNELS;
|
||||
|
||||
|
@ -1940,7 +1948,7 @@ static size_t animdata_filter_ds_gpencil(
|
|||
/* include data-expand widget first */
|
||||
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
|
||||
/* check if filtering by active status */
|
||||
// XXX: active check here needs checking
|
||||
/* XXX: active check here needs checking */
|
||||
if (ANIMCHANNEL_ACTIVEOK(gpd)) {
|
||||
ANIMCHANNEL_NEW_CHANNEL(gpd, ANIMTYPE_DSGPENCIL, gpd, NULL);
|
||||
}
|
||||
|
@ -1976,7 +1984,7 @@ static size_t animdata_filter_ds_cachefile(
|
|||
/* include data-expand widget first */
|
||||
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
|
||||
/* check if filtering by active status */
|
||||
// XXX: active check here needs checking
|
||||
/* XXX: active check here needs checking */
|
||||
if (ANIMCHANNEL_ACTIVEOK(cache_file)) {
|
||||
ANIMCHANNEL_NEW_CHANNEL(cache_file, ANIMTYPE_DSCACHEFILE, cache_file, NULL);
|
||||
}
|
||||
|
@ -2027,7 +2035,7 @@ static size_t animdata_filter_mask(Main *bmain,
|
|||
size_t items = 0;
|
||||
|
||||
/* For now, grab mask data-blocks directly from main. */
|
||||
// XXX: this is not good...
|
||||
/* XXX: this is not good... */
|
||||
for (mask = bmain->masks.first; mask; mask = mask->id.next) {
|
||||
ListBase tmp_data = {NULL, NULL};
|
||||
size_t tmp_items = 0;
|
||||
|
@ -2215,8 +2223,10 @@ static size_t animdata_filter_ds_texture(bAnimContext *ac,
|
|||
if ((tex->nodetree) && !(ads->filterflag & ADS_FILTER_NONTREE)) {
|
||||
/* owner_id as id instead of texture,
|
||||
* since it'll otherwise be impossible to track the depth. */
|
||||
// FIXME: perhaps as a result, textures should NOT be included under materials,
|
||||
// but under their own section instead so that free-floating textures can also be animated.
|
||||
|
||||
/* FIXME: perhaps as a result, textures should NOT be included under materials,
|
||||
* but under their own section instead so that free-floating textures can also be animated.
|
||||
*/
|
||||
tmp_items += animdata_filter_ds_nodetree(
|
||||
ac, &tmp_data, ads, (ID *)tex, tex->nodetree, filter_mode);
|
||||
}
|
||||
|
@ -2406,7 +2416,7 @@ static void animfilter_modifier_idpoin_cb(void *afm_ptr,
|
|||
* which would be nice to animate (i.e. texture parameters) but which are not actually
|
||||
* attached to any other objects/materials/etc. in the scene
|
||||
*/
|
||||
// TODO: do we want an expander for this?
|
||||
/* TODO: do we want an expander for this? */
|
||||
static size_t animdata_filter_ds_modifiers(
|
||||
bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Object *ob, int filter_mode)
|
||||
{
|
||||
|
@ -2900,7 +2910,7 @@ static size_t animdata_filter_ds_scene(
|
|||
void *cdata = NULL;
|
||||
|
||||
/* determine the type of expander channels to use */
|
||||
// this is the best way to do this for now...
|
||||
/* this is the best way to do this for now... */
|
||||
ANIMDATA_FILTER_CASES(
|
||||
sce, /* Some useless long comment to prevent wrapping by old clang-format versions... */
|
||||
{/* AnimData - no channel, but consider data */},
|
||||
|
@ -3168,9 +3178,9 @@ static Base **animdata_filter_ds_sorted_bases(bDopeSheet *ads,
|
|||
return sorted_bases;
|
||||
}
|
||||
|
||||
// TODO: implement pinning...
|
||||
// (if and when pinning is done, what we need to do is to provide freeing mechanisms -
|
||||
// to protect against data that was deleted).
|
||||
/* TODO: implement pinning...
|
||||
* (if and when pinning is done, what we need to do is to provide freeing mechanisms -
|
||||
* to protect against data that was deleted). */
|
||||
static size_t animdata_filter_dopesheet(bAnimContext *ac,
|
||||
ListBase *anim_data,
|
||||
bDopeSheet *ads,
|
||||
|
@ -3227,7 +3237,7 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
|
|||
if ((filter_mode & ANIMFILTER_LIST_CHANNELS) && !(ads->flag & ADS_FLAG_NO_DB_SORT) &&
|
||||
(view_layer->object_bases.first != view_layer->object_bases.last)) {
|
||||
/* Filter list of bases (i.e. objects), sort them, then add their contents normally... */
|
||||
// TODO: Cache the old sorted order - if the set of bases hasn't changed, don't re-sort...
|
||||
/* TODO: Cache the old sorted order - if the set of bases hasn't changed, don't re-sort... */
|
||||
Base **sorted_bases;
|
||||
size_t num_bases;
|
||||
|
||||
|
@ -3238,7 +3248,7 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
|
|||
items += animdata_filter_dopesheet_ob(ac, anim_data, ads, sorted_bases[i], filter_mode);
|
||||
}
|
||||
|
||||
// TODO: store something to validate whether any changes are needed?
|
||||
/* TODO: store something to validate whether any changes are needed? */
|
||||
|
||||
/* free temporary data */
|
||||
MEM_freeN(sorted_bases);
|
||||
|
|
|
@ -687,7 +687,7 @@ static int ed_marker_add_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
|
||||
marker->flag = SELECT;
|
||||
marker->frame = frame;
|
||||
BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); // XXX - temp code only
|
||||
BLI_snprintf(marker->name, sizeof(marker->name), "F_%02d", frame); /* XXX - temp code only */
|
||||
BLI_addtail(markers, marker);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
|
||||
|
@ -1110,7 +1110,7 @@ static void ed_marker_duplicate_apply(bContext *C)
|
|||
}
|
||||
|
||||
/* new marker is added to the beginning of list */
|
||||
// FIXME: bad ordering!
|
||||
/* FIXME: bad ordering! */
|
||||
BLI_addhead(markers, newmarker);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -883,9 +883,12 @@ void ANIM_copy_as_driver(struct ID *target_id, const char *target_path, const ch
|
|||
|
||||
/* Add Driver - Enum Defines ------------------------- */
|
||||
|
||||
/* Mapping Types enum for operators */
|
||||
/* NOTE: Used by ANIM_OT_driver_button_add and UI_OT_eyedropper_driver */
|
||||
// XXX: These names need reviewing
|
||||
/**
|
||||
* Mapping Types enum for operators.
|
||||
* \note Used by #ANIM_OT_driver_button_add and #UI_OT_eyedropper_driver.
|
||||
*
|
||||
* XXX: These names need reviewing.
|
||||
*/
|
||||
EnumPropertyItem prop_driver_create_mapping_types[] = {
|
||||
{CREATEDRIVER_MAPPING_1_N,
|
||||
"SINGLE_MANY",
|
||||
|
@ -1014,7 +1017,7 @@ static int add_driver_button_none(bContext *C, wmOperator *op, short mapping_typ
|
|||
/* send updates */
|
||||
UI_context_update_anim_flag(C);
|
||||
DEG_relations_tag_update(CTX_data_main(C));
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
@ -1051,8 +1054,8 @@ static int add_driver_button_menu_invoke(bContext *C, wmOperator *op, const wmEv
|
|||
}
|
||||
|
||||
/* Show menu */
|
||||
// TODO: This should get filtered by the enum filter
|
||||
/* important to execute in the region we're currently in */
|
||||
/* TODO: This should get filtered by the enum filter. */
|
||||
/* important to execute in the region we're currently in. */
|
||||
return WM_menu_invoke_ex(C, op, WM_OP_INVOKE_DEFAULT);
|
||||
}
|
||||
|
||||
|
@ -1167,7 +1170,7 @@ static int remove_driver_button_exec(bContext *C, wmOperator *op)
|
|||
/* send updates */
|
||||
UI_context_update_anim_flag(C);
|
||||
DEG_relations_tag_update(CTX_data_main(C));
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); // XXX
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_FCURVES_ORDER, NULL); /* XXX */
|
||||
}
|
||||
|
||||
return (changed) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
|
||||
|
@ -1183,7 +1186,7 @@ void ANIM_OT_driver_button_remove(wmOperatorType *ot)
|
|||
|
||||
/* callbacks */
|
||||
ot->exec = remove_driver_button_exec;
|
||||
// op->poll = ??? // TODO: need to have some driver to be able to do this...
|
||||
/* TODO: `op->poll` need to have some driver to be able to do this. */
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
@ -1220,7 +1223,7 @@ void ANIM_OT_driver_button_edit(wmOperatorType *ot)
|
|||
|
||||
/* callbacks */
|
||||
ot->exec = edit_driver_button_exec;
|
||||
// op->poll = ??? // TODO: need to have some driver to be able to do this...
|
||||
/* TODO: `op->poll` need to have some driver to be able to do this. */
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
@ -1264,7 +1267,7 @@ void ANIM_OT_copy_driver_button(wmOperatorType *ot)
|
|||
|
||||
/* callbacks */
|
||||
ot->exec = copy_driver_button_exec;
|
||||
// op->poll = ??? // TODO: need to have some driver to be able to do this...
|
||||
/* TODO: `op->poll` need to have some driver to be able to do this. */
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
@ -1295,7 +1298,7 @@ static int paste_driver_button_exec(bContext *C, wmOperator *op)
|
|||
|
||||
DEG_id_tag_update(ptr.owner_id, ID_RECALC_ANIMATION);
|
||||
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); // XXX
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME_PROP, NULL); /* XXX */
|
||||
|
||||
MEM_freeN(path);
|
||||
}
|
||||
|
@ -1314,7 +1317,7 @@ void ANIM_OT_paste_driver_button(wmOperatorType *ot)
|
|||
|
||||
/* callbacks */
|
||||
ot->exec = paste_driver_button_exec;
|
||||
// op->poll = ??? // TODO: need to have some driver to be able to do this...
|
||||
/* TODO: `op->poll` need to have some driver to be able to do this. */
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_UNDO | OPTYPE_INTERNAL;
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
/* ********************************************** */
|
||||
/* UI STUFF */
|
||||
|
||||
// XXX! --------------------------------
|
||||
/* XXX! -------------------------------- */
|
||||
/* Temporary definition for limits of float number buttons
|
||||
* (FLT_MAX tends to infinity with old system). */
|
||||
#define UI_FLT_MAX 10000.0f
|
||||
|
@ -499,7 +499,7 @@ static void draw_modifier__fn_generator(uiLayout *layout,
|
|||
uiItemR(col, &ptr, "function_type", 0, "", ICON_NONE);
|
||||
uiItemR(col, &ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(layout, false); // no grouping for now
|
||||
col = uiLayoutColumn(layout, false); /* no grouping for now */
|
||||
uiItemR(col, &ptr, "amplitude", 0, NULL, ICON_NONE);
|
||||
uiItemR(col, &ptr, "phase_multiplier", 0, NULL, ICON_NONE);
|
||||
uiItemR(col, &ptr, "phase_offset", 0, NULL, ICON_NONE);
|
||||
|
@ -580,7 +580,7 @@ static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(ar
|
|||
/* init template data */
|
||||
fed.min = -1.0f;
|
||||
fed.max = 1.0f;
|
||||
fed.time = (float)scene->r.cfra; // XXX make this int for ease of use?
|
||||
fed.time = (float)scene->r.cfra; /* XXX make this int for ease of use? */
|
||||
fed.f1 = fed.f2 = 0;
|
||||
|
||||
/* check that no data exists for the current frame... */
|
||||
|
@ -625,7 +625,7 @@ static void fmod_envelope_addpoint_cb(bContext *C, void *fcm_dv, void *UNUSED(ar
|
|||
}
|
||||
|
||||
/* callback to remove envelope data point */
|
||||
// TODO: should we have a separate file for things like this?
|
||||
/* TODO: should we have a separate file for things like this? */
|
||||
static void fmod_envelope_deletepoint_cb(bContext *UNUSED(C), void *fcm_dv, void *ind_v)
|
||||
{
|
||||
FMod_Envelope *env = (FMod_Envelope *)fcm_dv;
|
||||
|
@ -914,7 +914,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout,
|
|||
box = uiLayoutBox(layout);
|
||||
|
||||
row = uiLayoutRow(box, false);
|
||||
block = uiLayoutGetBlock(row); // err...
|
||||
block = uiLayoutGetBlock(row); /* err... */
|
||||
|
||||
/* left-align -------------------------------------------- */
|
||||
sub = uiLayoutRow(row, true);
|
||||
|
@ -1008,7 +1008,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout,
|
|||
}
|
||||
|
||||
/* one last panel below this: FModifier range */
|
||||
// TODO: experiment with placement of this
|
||||
/* TODO: experiment with placement of this */
|
||||
{
|
||||
box = uiLayoutBox(layout);
|
||||
|
||||
|
|
|
@ -1071,7 +1071,7 @@ void scene_to_keylist(bDopeSheet *ads, Scene *sce, DLRBT_Tree *keys, int saction
|
|||
ac.datatype = ANIMCONT_CHANNEL;
|
||||
|
||||
/* get F-Curves to take keyframes from */
|
||||
filter = ANIMFILTER_DATA_VISIBLE; // curves only
|
||||
filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
|
||||
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
|
||||
|
||||
/* loop through each F-Curve, grabbing the keyframes */
|
||||
|
@ -1109,7 +1109,7 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, int saction_fl
|
|||
ac.datatype = ANIMCONT_CHANNEL;
|
||||
|
||||
/* get F-Curves to take keyframes from */
|
||||
filter = ANIMFILTER_DATA_VISIBLE; // curves only
|
||||
filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
|
||||
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
|
||||
|
||||
/* loop through each F-Curve, grabbing the keyframes */
|
||||
|
@ -1143,7 +1143,7 @@ void cachefile_to_keylist(bDopeSheet *ads,
|
|||
|
||||
/* get F-Curves to take keyframes from */
|
||||
ListBase anim_data = {NULL, NULL};
|
||||
int filter = ANIMFILTER_DATA_VISIBLE; // curves only
|
||||
int filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
|
||||
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
|
||||
|
||||
/* loop through each F-Curve, grabbing the keyframes */
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
/* This function is used to loop over BezTriples in the given F-Curve, applying a given
|
||||
* operation on them, and optionally applies an F-Curve validation function afterwards.
|
||||
*/
|
||||
// TODO: make this function work on samples too...
|
||||
/* TODO: make this function work on samples too. */
|
||||
short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked,
|
||||
FCurve *fcu,
|
||||
KeyframeEditFunc key_ok,
|
||||
|
@ -237,7 +237,7 @@ static short ob_keyframes_loop(KeyframeEditData *ked,
|
|||
ac.datatype = ANIMCONT_CHANNEL;
|
||||
|
||||
/* get F-Curves to take keyframes from */
|
||||
filter = ANIMFILTER_DATA_VISIBLE; // curves only
|
||||
filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
|
||||
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
|
||||
|
||||
/* Loop through each F-Curve, applying the operation as required,
|
||||
|
@ -286,7 +286,7 @@ static short scene_keyframes_loop(KeyframeEditData *ked,
|
|||
ac.datatype = ANIMCONT_CHANNEL;
|
||||
|
||||
/* get F-Curves to take keyframes from */
|
||||
filter = ANIMFILTER_DATA_VISIBLE; // curves only
|
||||
filter = ANIMFILTER_DATA_VISIBLE; /* curves only */
|
||||
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
|
||||
|
||||
/* Loop through each F-Curve, applying the operation as required,
|
||||
|
@ -478,7 +478,7 @@ void ANIM_animdata_keyframe_callback(bAnimContext *ac,
|
|||
/* Keyframe Integrity Tools */
|
||||
|
||||
/* Rearrange keyframes if some are out of order */
|
||||
// used to be recalc_*_ipos() where * was object or action
|
||||
/* used to be recalc_*_ipos() where * was object or action */
|
||||
void ANIM_editkeyframes_refresh(bAnimContext *ac)
|
||||
{
|
||||
ListBase anim_data = {NULL, NULL};
|
||||
|
@ -834,7 +834,7 @@ void bezt_remap_times(KeyframeEditData *ked, BezTriple *bezt)
|
|||
const float scale = (rmap->newMax - rmap->newMin) / (rmap->oldMax - rmap->oldMin);
|
||||
|
||||
/* perform transform on all three handles unless indicated otherwise */
|
||||
// TODO: need to include some checks for that
|
||||
/* TODO: need to include some checks for that */
|
||||
|
||||
bezt->vec[0][0] = scale * (bezt->vec[0][0] - rmap->oldMin) + rmap->newMin;
|
||||
bezt->vec[1][0] = scale * (bezt->vec[1][0] - rmap->oldMin) + rmap->newMin;
|
||||
|
@ -1025,7 +1025,7 @@ static short mirror_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
|
|||
}
|
||||
|
||||
/* Note: for markers and 'value', the values to use must be supplied as the first float value */
|
||||
// calchandles_fcurve
|
||||
/* calchandles_fcurve */
|
||||
KeyframeEditFunc ANIM_editkeyframes_mirror(short mode)
|
||||
{
|
||||
switch (mode) {
|
||||
|
@ -1128,9 +1128,12 @@ static short set_bezier_vector(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Queries if the handle should be set to 'free' or 'align' */
|
||||
// NOTE: this was used for the 'toggle free/align' option
|
||||
// currently this isn't used, but may be restored later
|
||||
/**
|
||||
* Queries if the handle should be set to 'free' or 'align'.
|
||||
*
|
||||
* \note This was used for the 'toggle free/align' option
|
||||
* currently this isn't used, but may be restored later.
|
||||
*/
|
||||
static short bezier_isfree(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
|
||||
{
|
||||
if ((bezt->f1 & SELECT) && (bezt->h1)) {
|
||||
|
@ -1181,7 +1184,7 @@ static short set_bezier_free(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
|
|||
}
|
||||
|
||||
/* Set all selected Bezier Handles to a single type */
|
||||
// calchandles_fcurve
|
||||
/* calchandles_fcurve */
|
||||
KeyframeEditFunc ANIM_editkeyframes_handles(short mode)
|
||||
{
|
||||
switch (mode) {
|
||||
|
@ -1309,7 +1312,7 @@ static short set_bezt_sine(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
|
|||
}
|
||||
|
||||
/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
|
||||
// ANIM_editkeyframes_ipocurve_ipotype() !
|
||||
/* ANIM_editkeyframes_ipocurve_ipotype() ! */
|
||||
KeyframeEditFunc ANIM_editkeyframes_ipo(short mode)
|
||||
{
|
||||
switch (mode) {
|
||||
|
|
|
@ -485,7 +485,7 @@ typedef struct tSmooth_Bezt {
|
|||
} tSmooth_Bezt;
|
||||
|
||||
/* Use a weighted moving-means method to reduce intensity of fluctuations */
|
||||
// TODO: introduce scaling factor for weighting falloff
|
||||
/* TODO: introduce scaling factor for weighting falloff */
|
||||
void smooth_fcurve(FCurve *fcu)
|
||||
{
|
||||
int totSel = 0;
|
||||
|
|
|
@ -462,8 +462,8 @@ int insert_bezt_fcurve(FCurve *fcu, const BezTriple *bezt, eInsertKeyFlags flag)
|
|||
/* no keyframes already, but can only add if...
|
||||
* 1) keyframing modes say that keyframes can only be replaced, so adding new ones won't know
|
||||
* 2) there are no samples on the curve
|
||||
* // NOTE: maybe we may want to allow this later when doing samples -> bezt conversions,
|
||||
* // but for now, having both is asking for trouble
|
||||
* NOTE: maybe we may want to allow this later when doing samples -> bezt conversions,
|
||||
* but for now, having both is asking for trouble
|
||||
*/
|
||||
else if ((flag & INSERTKEY_REPLACE) == 0 && (fcu->fpt == NULL)) {
|
||||
/* create new keyframes array */
|
||||
|
@ -1875,7 +1875,7 @@ static int insert_key_exec(bContext *C, wmOperator *op)
|
|||
Object *obedit = CTX_data_edit_object(C);
|
||||
bool ob_edit_mode = false;
|
||||
|
||||
float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
|
||||
float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */
|
||||
int num_channels;
|
||||
|
||||
KeyingSet *ks = keyingset_get_from_op_with_error(op, op->type->prop, scene);
|
||||
|
@ -2058,7 +2058,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
|
|||
/* confirm whether a keyframe was added by showing a popup
|
||||
* - by default, this is disabled so that if a menu is shown, this doesn't come up too
|
||||
*/
|
||||
// XXX should this just be always on?
|
||||
/* XXX should this just be always on? */
|
||||
prop = RNA_def_boolean(ot->srna,
|
||||
"confirm_success",
|
||||
0,
|
||||
|
@ -2079,7 +2079,7 @@ void ANIM_OT_keyframe_insert_menu(wmOperatorType *ot)
|
|||
static int delete_key_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
|
||||
float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */
|
||||
int num_channels;
|
||||
|
||||
KeyingSet *ks = keyingset_get_from_op_with_error(op, op->type->prop, scene);
|
||||
|
@ -2609,7 +2609,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
|
|||
PropertyRNA *prop = NULL;
|
||||
Main *bmain = CTX_data_main(C);
|
||||
char *path;
|
||||
float cfra = (float)CFRA; // XXX for now, don't bother about all the yucky offset crap
|
||||
float cfra = (float)CFRA; /* XXX for now, don't bother about all the yucky offset crap */
|
||||
bool changed = false;
|
||||
int index;
|
||||
const bool all = RNA_boolean_get(op->ptr, "all");
|
||||
|
@ -2781,7 +2781,7 @@ void ANIM_OT_keyframe_clear_button(wmOperatorType *ot)
|
|||
|
||||
bool autokeyframe_cfra_can_key(const Scene *scene, ID *id)
|
||||
{
|
||||
float cfra = (float)CFRA; // XXX for now, this will do
|
||||
float cfra = (float)CFRA; /* XXX for now, this will do */
|
||||
|
||||
/* only filter if auto-key mode requires this */
|
||||
if (IS_AUTOKEY_ON(scene) == 0) {
|
||||
|
@ -2981,7 +2981,7 @@ bool id_frame_has_keyframe(ID *id, float frame, short filter)
|
|||
case ID_OB: /* object */
|
||||
return object_frame_has_keyframe((Object *)id, frame, filter);
|
||||
#if 0
|
||||
// XXX TODO... for now, just use 'normal' behavior
|
||||
/* XXX TODO... for now, just use 'normal' behavior */
|
||||
case ID_SCE: /* scene */
|
||||
break;
|
||||
#endif
|
||||
|
|
|
@ -214,7 +214,7 @@ static int add_empty_ks_path_exec(bContext *C, wmOperator *op)
|
|||
BLI_addtail(&ks->paths, ksp);
|
||||
ks->active_path = BLI_listbase_count(&ks->paths);
|
||||
|
||||
ksp->groupmode = KSP_GROUP_KSNAME; // XXX?
|
||||
ksp->groupmode = KSP_GROUP_KSNAME; /* XXX? */
|
||||
ksp->idtype = ID_OB;
|
||||
ksp->flag = KSP_FLAG_WHOLE_ARRAY;
|
||||
|
||||
|
@ -968,14 +968,15 @@ eModifyKey_Returns ANIM_validate_keyingset(bContext *C, ListBase *dsources, Keyi
|
|||
}
|
||||
|
||||
/* if we don't have any paths now, then this still qualifies as invalid context */
|
||||
// FIXME: we need some error conditions (to be retrieved from the iterator why this failed!)
|
||||
/* FIXME: we need some error conditions (to be retrieved from the iterator why this failed!)
|
||||
*/
|
||||
if (BLI_listbase_is_empty(&ks->paths)) {
|
||||
return MODIFYKEY_INVALID_CONTEXT;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* poll callback tells us that KeyingSet is useless in current context */
|
||||
// FIXME: the poll callback needs to give us more info why
|
||||
/* FIXME: the poll callback needs to give us more info why */
|
||||
return MODIFYKEY_INVALID_CONTEXT;
|
||||
}
|
||||
}
|
||||
|
@ -1149,7 +1150,7 @@ int ANIM_apply_keyingset(
|
|||
{
|
||||
Object *ob = (Object *)ksp->id;
|
||||
|
||||
// XXX: only object transforms?
|
||||
/* XXX: only object transforms? */
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -942,7 +942,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op)
|
|||
Object *ob = objects[ob_index];
|
||||
bArmature *arm = ob->data;
|
||||
|
||||
ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed?
|
||||
ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */
|
||||
|
||||
preEditBoneDuplicate(arm->edbo);
|
||||
|
||||
|
@ -1117,7 +1117,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
|
|||
/* The beginning of the duplicated mirrored bones in the edbo list */
|
||||
EditBone *ebone_first_dupe = NULL;
|
||||
|
||||
ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed?
|
||||
ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */
|
||||
|
||||
preEditBoneDuplicate(arm->edbo);
|
||||
|
||||
|
@ -1399,7 +1399,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
|
|||
if (arm->flag & ARM_MIRROR_EDIT) {
|
||||
flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
|
||||
if (flipbone) {
|
||||
forked_iter = 0; // we extrude 2 different bones
|
||||
forked_iter = 0; /* we extrude 2 different bones */
|
||||
if (flipbone->flag & (BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED)) {
|
||||
/* don't want this bone to be selected... */
|
||||
flipbone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL);
|
||||
|
@ -1449,7 +1449,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
|
|||
newbone->dist = ebone->dist;
|
||||
newbone->xwidth = ebone->xwidth;
|
||||
newbone->zwidth = ebone->zwidth;
|
||||
newbone->rad_head = ebone->rad_tail; // don't copy entire bone...
|
||||
newbone->rad_head = ebone->rad_tail; /* don't copy entire bone. */
|
||||
newbone->rad_tail = ebone->rad_tail;
|
||||
newbone->segments = 1;
|
||||
newbone->layer = ebone->layer;
|
||||
|
@ -1470,7 +1470,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
|
|||
|
||||
BLI_strncpy(newbone->name, ebone->name, sizeof(newbone->name));
|
||||
|
||||
if (flipbone && forked_iter) { // only set if mirror edit
|
||||
if (flipbone && forked_iter) { /* only set if mirror edit */
|
||||
if (strlen(newbone->name) < (MAXBONENAME - 2)) {
|
||||
if (a == 0) {
|
||||
strcat(newbone->name, "_L");
|
||||
|
@ -1587,10 +1587,10 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
|
|||
copy_v3_v3(bone->head, curs);
|
||||
|
||||
if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) {
|
||||
add_v3_v3v3(bone->tail, bone->head, imat[1]); // bone with unit length 1
|
||||
add_v3_v3v3(bone->tail, bone->head, imat[1]); /* bone with unit length 1 */
|
||||
}
|
||||
else {
|
||||
add_v3_v3v3(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z
|
||||
add_v3_v3v3(bone->tail, bone->head, imat[2]); /* bone with unit length 1, pointing up Z */
|
||||
}
|
||||
|
||||
ED_armature_edit_refresh_layer_used(obedit->data);
|
||||
|
@ -1638,7 +1638,7 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op)
|
|||
cuts = RNA_int_get(op->ptr, "number_cuts");
|
||||
|
||||
/* loop over all editable bones */
|
||||
// XXX the old code did this in reverse order though!
|
||||
/* XXX the old code did this in reverse order though! */
|
||||
CTX_DATA_BEGIN_WITH_ID (C, EditBone *, ebone, selected_editable_bones, bArmature *, arm) {
|
||||
for (i = cuts + 1; i > 1; i--) {
|
||||
/* compute cut ratio first */
|
||||
|
|
|
@ -685,7 +685,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
|
|||
separate_armature_bones(bmain, ob_old, true);
|
||||
separate_armature_bones(bmain, ob_new, false);
|
||||
|
||||
/* 4) fix links before depsgraph flushes */ // err... or after?
|
||||
/* 4) fix links before depsgraph flushes, err... or after? */
|
||||
separated_armature_fix_links(bmain, ob_old, ob_new);
|
||||
|
||||
DEG_id_tag_update(&ob_old->id, ID_RECALC_GEOMETRY); /* this is the original one */
|
||||
|
|
|
@ -451,7 +451,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys)
|
|||
|
||||
BLI_bvhtree_insert(sys->heat.bvhtree, a, bb, 2);
|
||||
|
||||
// Setup inverse pointers to use on isect.orig
|
||||
/* Setup inverse pointers to use on isect.orig */
|
||||
sys->heat.vltree[vtri[0]] = lt;
|
||||
sys->heat.vltree[vtri[1]] = lt;
|
||||
sys->heat.vltree[vtri[2]] = lt;
|
||||
|
|
|
@ -279,7 +279,7 @@ static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, const wmEven
|
|||
}
|
||||
|
||||
/* show popup dialog to allow editing of range... */
|
||||
// FIXME: hardcoded dimensions here are just arbitrary
|
||||
/* FIXME: hard-coded dimensions here are just arbitrary. */
|
||||
return WM_operator_props_dialog_popup(C, op, 200);
|
||||
}
|
||||
|
||||
|
|
|
@ -1856,7 +1856,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
|
||||
|
||||
/* properties */
|
||||
// TODO: make the pose_index into a proper enum instead of a cryptic int...
|
||||
/* TODO: make the pose_index into a proper enum instead of a cryptic int. */
|
||||
ot->prop = RNA_def_int(
|
||||
ot->srna,
|
||||
"pose_index",
|
||||
|
@ -1868,7 +1868,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot)
|
|||
0,
|
||||
INT_MAX);
|
||||
|
||||
// XXX: percentage vs factor?
|
||||
/* XXX: percentage vs factor? */
|
||||
/* not used yet */
|
||||
#if 0
|
||||
RNA_def_float_factor(ot->srna,
|
||||
|
|
|
@ -114,7 +114,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select)
|
|||
bArmature *arm;
|
||||
|
||||
/* sanity checks */
|
||||
// XXX: actually, we can probably still get away with no object - at most we have no updates
|
||||
/* XXX: actually, we can probably still get away with no object - at most we have no updates */
|
||||
if (ELEM(NULL, ob, ob->pose, pchan, pchan->bone)) {
|
||||
return;
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select)
|
|||
arm->act_bone = NULL;
|
||||
}
|
||||
|
||||
// TODO: select and activate corresponding vgroup?
|
||||
/* TODO: select and activate corresponding vgroup? */
|
||||
ED_pose_bone_select_tag_update(ob);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -480,7 +480,7 @@ static void pose_slide_apply_props(tPoseSlideOp *pso,
|
|||
float tval = (float)RNA_property_boolean_get(&ptr, prop);
|
||||
pose_slide_apply_val(pso, fcu, pfl->ob, &tval);
|
||||
RNA_property_boolean_set(
|
||||
&ptr, prop, (int)tval); // XXX: do we need threshold clamping here?
|
||||
&ptr, prop, (int)tval); /* XXX: do we need threshold clamping here? */
|
||||
break;
|
||||
}
|
||||
case PROP_ENUM: {
|
||||
|
@ -681,14 +681,14 @@ static void pose_slide_rest_pose_apply(bContext *C, tPoseSlideOp *pso)
|
|||
|
||||
if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_BBONE_SHAPE) && (pchan->flag & POSE_BBONE_SHAPE)) {
|
||||
/* bbone properties - they all start a "bbone_" prefix */
|
||||
// TODO Not implemented
|
||||
/* TODO Not implemented */
|
||||
// pose_slide_apply_props(pso, pfl, "bbone_");
|
||||
}
|
||||
|
||||
if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_PROPS) && (pfl->oldprops)) {
|
||||
/* Not strictly a transform, but custom properties contribute
|
||||
* to the pose produced in many rigs (e.g. the facial rigs used in Sintel). */
|
||||
// TODO Not implemented
|
||||
/* TODO Not implemented */
|
||||
// pose_slide_apply_props(pso, pfl, "[\""); /* dummy " for texteditor bugs */
|
||||
}
|
||||
}
|
||||
|
@ -790,7 +790,7 @@ static void pose_slide_reset(tPoseSlideOp *pso)
|
|||
/* ------------------------------------ */
|
||||
|
||||
/* draw percentage indicator in header */
|
||||
// TODO: Include hints about locks here...
|
||||
/* TODO: Include hints about locks here... */
|
||||
static void pose_slide_draw_status(tPoseSlideOp *pso)
|
||||
{
|
||||
char status_str[UI_MAX_DRAW_STR];
|
||||
|
|
|
@ -385,7 +385,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
|
|||
Main *bmain = CTX_data_main(C);
|
||||
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
// must be active object, not edit-object
|
||||
/* must be active object, not edit-object */
|
||||
Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
|
||||
const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
|
||||
bArmature *arm = BKE_armature_from_object(ob);
|
||||
|
@ -688,8 +688,8 @@ static bPoseChannel *pose_bone_do_paste(Object *ob,
|
|||
|
||||
pchan->curve_in_x *= -1;
|
||||
pchan->curve_out_x *= -1;
|
||||
pchan->roll1 *= -1; // XXX?
|
||||
pchan->roll2 *= -1; // XXX?
|
||||
pchan->roll1 *= -1; /* XXX? */
|
||||
pchan->roll2 *= -1; /* XXX? */
|
||||
|
||||
/* has to be done as eulers... */
|
||||
if (pchan->rotmode > 0) {
|
||||
|
@ -1108,7 +1108,7 @@ static int pose_clear_transform_generic_exec(bContext *C,
|
|||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
View3D *v3d = CTX_wm_view3d(C);
|
||||
FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob_iter) {
|
||||
// XXX: UGLY HACK (for autokey + clear transforms)
|
||||
/* XXX: UGLY HACK (for autokey + clear transforms) */
|
||||
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob_iter);
|
||||
ListBase dsources = {NULL, NULL};
|
||||
bool changed = false;
|
||||
|
|
|
@ -332,7 +332,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks,
|
|||
FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) {
|
||||
if (ob->id.tag & LIB_TAG_DOIT) {
|
||||
if (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS) {
|
||||
// ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear
|
||||
// ED_pose_clear_paths(C, ob); /* XXX for now, don't need to clear. */
|
||||
/* TODO(sergey): Should ensure we can use more narrow update range here. */
|
||||
ED_pose_recalculate_paths(C, scene, ob, POSE_PATH_CALC_RANGE_FULL);
|
||||
}
|
||||
|
|
|
@ -1349,7 +1349,7 @@ void ED_curve_editnurb_make(Object *obedit)
|
|||
nu = cu->nurb.first;
|
||||
while (nu) {
|
||||
newnu = BKE_nurb_duplicate(nu);
|
||||
BKE_nurb_test_2d(newnu); // after join, or any other creation of curve
|
||||
BKE_nurb_test_2d(newnu); /* after join, or any other creation of curve */
|
||||
BLI_addtail(&editnurb->nurbs, newnu);
|
||||
nu = nu->next;
|
||||
}
|
||||
|
@ -7001,7 +7001,7 @@ int ED_curve_join_objects_exec(bContext *C, wmOperator *op)
|
|||
BKE_curve_curve_dimension_update(cu);
|
||||
}
|
||||
|
||||
DEG_relations_tag_update(bmain); // because we removed object(s), call before editmode!
|
||||
DEG_relations_tag_update(bmain); /* because we removed object(s), call before editmode! */
|
||||
|
||||
DEG_id_tag_update(&ob_active->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(&scene->id, ID_RECALC_SELECT);
|
||||
|
|
|
@ -127,7 +127,7 @@ Nurb *ED_curve_add_nurbs_primitive(
|
|||
float fac;
|
||||
int a, b;
|
||||
const float grid = 1.0f;
|
||||
const int cutype = (type & CU_TYPE); // poly, bezier, nurbs, etc
|
||||
const int cutype = (type & CU_TYPE); /* poly, bezier, nurbs, etc */
|
||||
const int stype = (type & CU_PRIMITIVE);
|
||||
|
||||
unit_m4(umat);
|
||||
|
|
|
@ -386,4 +386,4 @@ void ED_gizmotypes_button_2d(void)
|
|||
WM_gizmotype_append(GIZMO_GT_button_2d);
|
||||
}
|
||||
|
||||
/** \} */ // Button Gizmo API
|
||||
/** \} */ /* Button Gizmo API */
|
||||
|
|
|
@ -92,7 +92,7 @@ static void gizmo_calc_rect_view_scale(const wmGizmo *gz, const float dims[3], f
|
|||
static void gizmo_calc_rect_view_margin(const wmGizmo *gz, const float dims[3], float margin[3])
|
||||
{
|
||||
const float handle_size = 0.15f;
|
||||
// XXX, the scale isn't taking offset into account, we need to calculate scale per handle!
|
||||
/* XXX, the scale isn't taking offset into account, we need to calculate scale per handle! */
|
||||
// handle_size *= gz->scale_final;
|
||||
|
||||
float scale_xyz[3];
|
||||
|
|
|
@ -481,4 +481,4 @@ void ED_gizmotypes_move_3d(void)
|
|||
WM_gizmotype_append(GIZMO_GT_move_3d);
|
||||
}
|
||||
|
||||
/** \} */ // Move Gizmo API
|
||||
/** \} */ /* Move Gizmo API */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue