- correct typos in comments.

- move boxpack struct out of the public header.
This commit is contained in:
Campbell Barton 2011-01-02 11:06:50 +00:00
parent 4119132580
commit a7ceeafd71
13 changed files with 34 additions and 35 deletions

@ -131,7 +131,7 @@ def _read(context, filepath, frame_start, frame_end, global_scale=1.0):
"pose_imat", # pose_mat inverted
"rest_arm_imat", # rest_arm_mat inverted
"rest_local_imat", # rest_local_mat inverted
"prev_euler", # last used euler to preserve euler compability inbetween keyframes
"prev_euler", # last used euler to preserve euler compability in between keyframes
)
def __init__(self, bone_name):
self.name = bone_name

@ -125,9 +125,9 @@ def read_bvh(context, file_path, rotate_mode='XYZ', global_scale=1.0):
#print '%snode: %s, parent: %s' % (len(bvh_nodes_serial) * ' ', name, bvh_nodes_serial[-1])
lineIdx += 2 # Incriment to the next line (Offset)
lineIdx += 2 # Increment to the next line (Offset)
rest_head_local = Vector((float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3]))) * global_scale
lineIdx += 1 # Incriment to the next line (Channels)
lineIdx += 1 # Increment to the next line (Channels)
# newChannel[Xposition, Yposition, Zposition, Xrotation, Yrotation, Zrotation]
# newChannel references indecies to the motiondata,
@ -163,7 +163,7 @@ def read_bvh(context, file_path, rotate_mode='XYZ', global_scale=1.0):
my_parent = bvh_nodes_serial[-1] # account for none
# Apply the parents offset accumletivly
# Apply the parents offset accumulatively
if my_parent is None:
rest_head_world = Vector(rest_head_local)
else:
@ -175,14 +175,14 @@ def read_bvh(context, file_path, rotate_mode='XYZ', global_scale=1.0):
bvh_nodes_serial.append(bvh_node)
# Account for an end node
if file_lines[lineIdx][0].lower() == 'end' and file_lines[lineIdx][1].lower() == 'site': # There is somtimes a name after 'End Site' but we will ignore it.
lineIdx += 2 # Incriment to the next line (Offset)
if file_lines[lineIdx][0].lower() == 'end' and file_lines[lineIdx][1].lower() == 'site': # There is sometimes a name after 'End Site' but we will ignore it.
lineIdx += 2 # Increment to the next line (Offset)
rest_tail = Vector((float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3]))) * global_scale
bvh_nodes_serial[-1].rest_tail_world = bvh_nodes_serial[-1].rest_head_world + rest_tail
bvh_nodes_serial[-1].rest_tail_local = bvh_nodes_serial[-1].rest_head_local + rest_tail
# Just so we can remove the Parents in a uniform way- End end never has kids
# Just so we can remove the Parents in a uniform way- End has kids
# so this is a placeholder
bvh_nodes_serial.append(None)

@ -737,7 +737,7 @@ void accum_mballfaces(int i1, int i2, int i3, int i4)
void *new_pgn_element(int size)
{
/* during polygonize 1000s of elements are allocated
* and never freed inbetween. Freeing only done at the end.
* and never freed in between. Freeing only done at the end.
*/
int blocksize= 16384;
static int offs= 0; /* the current free address */

@ -350,7 +350,7 @@ void psys_calc_dmcache(Object *ob, DerivedMesh *dm, ParticleSystem *psys)
pa->num_dmcache= GET_INT_FROM_POINTER(nodearray[pa->num]->link);
}
else { /* FROM_FACE/FROM_VOLUME */
/* Note that somtimes the pa->num is over the nodearray size, this is bad, maybe there is a better place to fix this,
/* Note that sometimes the pa->num is over the nodearray size, this is bad, maybe there is a better place to fix this,
* but for now passing NULL is OK. every face will be searched for the particle so its slower - Campbell */
pa->num_dmcache= psys_particle_dm_face_lookup(ob, dm, pa->num, pa->fuv, pa->num < totelem ? nodearray[pa->num] : NULL);
}

@ -29,24 +29,6 @@
/* Box Packer */
/* verts, internal use only */
typedef struct boxVert {
float x;
float y;
short free;
struct boxPack *trb; /* top right box */
struct boxPack *blb; /* bottom left box */
struct boxPack *brb; /* bottom right box */
struct boxPack *tlb; /* top left box */
/* Store last intersecting boxes here
* speedup intersection testing */
struct boxPack *isect_cache[4];
int index;
} boxVert;
typedef struct boxPack {
float x;
float y;
@ -56,7 +38,7 @@ typedef struct boxPack {
/* Verts this box uses
* (BL,TR,TL,BR) / 0,1,2,3 */
boxVert *v[4];
struct boxVert *v[4];
} boxPack;
void boxPack2D(boxPack *boxarray, int len, float *tot_width, float *tot_height);

@ -30,6 +30,23 @@
*
* The defined Below are for internal use only */
typedef struct boxVert {
float x;
float y;
short free;
struct boxPack *trb; /* top right box */
struct boxPack *blb; /* bottom left box */
struct boxPack *brb; /* bottom right box */
struct boxPack *tlb; /* top left box */
/* Store last intersecting boxes here
* speedup intersection testing */
struct boxPack *isect_cache[4];
int index;
} boxVert;
/* free vert flags */
#define eps 0.0000001f
#define BLF 1

@ -271,7 +271,7 @@ typedef void (*uiMenuHandleFunc)(struct bContext *C, void *arg, int event);
*
* Functions used to create popup menus. For more extended menus the
* uiPupMenuBegin/End functions can be used to define own items with
* the uiItem functions inbetween. If it is a simple confirmation menu
* the uiItem functions in between. If it is a simple confirmation menu
* or similar, popups can be created with a single function call. */
typedef struct uiPopupMenu uiPopupMenu;

@ -4830,7 +4830,7 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
/* we disable auto_open in the block after a threshold, because we still
* want to allow auto opening adjacent menus even if no button is activated
* inbetween going over to the other button, but only for a short while */
* in between going over to the other button, but only for a short while */
if(type == BUTTON_ACTIVATE_OVER && but->block->auto_open)
if(but->block->auto_open_last+BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer())
but->block->auto_open= 0;

@ -1073,7 +1073,7 @@ static void step_to_grid(float *step, int *power, int unit)
/* for frames, we want 1.0 frame intervals only */
if (unit == V2D_UNIT_FRAMES) {
rem = 1.0f;
*step = 2.0f; /* use 2 since there are grid lines drawn inbetween, this way to get 1 line per frane */
*step = 2.0f; /* use 2 since there are grid lines drawn in between, this way to get 1 line per frane */
}
/* prevents printing 1.0 2.0 3.0 etc */

@ -450,7 +450,7 @@ static PyObject *pyrna_py_from_array_internal(PointerRNA *ptr, PropertyRNA *prop
return NULL;
}
PyTuple_SetItem(tuple, i, item);
PyTuple_SET_ITEM(tuple, i, item);
}
return tuple;

@ -808,7 +808,7 @@ static void imp2radangle(float A, float B, float C, float F, float* a, float* b,
static void ewa_eval(TexResult* texr, ImBuf* ibuf, float fx, float fy, afdata_t* AFD)
{
// scaling dxt/dyt by full resolution can cause overflow because of huge A/B/C and esp. F values,
// scaling by aspect ratio alone does the opposite, so try something inbetween instead...
// scaling by aspect ratio alone does the opposite, so try something in between instead...
const float ff2 = ibuf->x, ff = sqrtf(ff2), q = ibuf->y / ff;
const float Ux = AFD->dxt[0]*ff, Vx = AFD->dxt[1]*q, Uy = AFD->dyt[0]*ff, Vy = AFD->dyt[1]*q;
float A = Vx*Vx + Vy*Vy;

@ -2575,7 +2575,7 @@ static void shade_tface(BakeShade *bs)
/* get pixel level vertex coordinates */
for(a=0; a<4; a++) {
/* Note, workaround for pixel aligned UVs which are common and can screw up our intersection tests
* where a pixel gets inbetween 2 faces or the middle of a quad,
* where a pixel gets in between 2 faces or the middle of a quad,
* camera aligned quads also have this problem but they are less common.
* Add a small offset to the UVs, fixes bug #18685 - Campbell */
vec[a][0]= tface->uv[a][0]*(float)bs->rectx - (0.5f + 0.001);

@ -2276,7 +2276,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
event.type= MOUSEMOVE;
/* some painting operators want accurate mouse events, they can
handle inbetween mouse move moves, others can happily ignore
handle in between mouse move moves, others can happily ignore
them for better performance */
if(lastevent && lastevent->type == MOUSEMOVE)
lastevent->type = INBETWEEN_MOUSEMOVE;