forked from bartvdbraak/blender
style cleanup
This commit is contained in:
parent
ff336aca02
commit
c36f20a7d2
@ -123,7 +123,7 @@ void u_free_getenv(char *val)
|
||||
free(val);
|
||||
}
|
||||
|
||||
int uput_getenv(const char *varname, char * value, size_t buffsize)
|
||||
int uput_getenv(const char *varname, char *value, size_t buffsize)
|
||||
{
|
||||
int r = 0;
|
||||
wchar_t * str;
|
||||
|
@ -127,12 +127,12 @@ static unsigned long getipaddress(const char * ipaddr)
|
||||
return (ip);
|
||||
}
|
||||
|
||||
static void my_send(SOCKET sock, char * str)
|
||||
static void my_send(SOCKET sock, char *str)
|
||||
{
|
||||
send(sock, str, strlen(str), 0);
|
||||
}
|
||||
|
||||
static int my_recv(SOCKET sock, char * line, int maxlen)
|
||||
static int my_recv(SOCKET sock, char *line, int maxlen)
|
||||
{
|
||||
int got = 0;
|
||||
int toget = maxlen;
|
||||
@ -148,7 +148,7 @@ static int my_recv(SOCKET sock, char * line, int maxlen)
|
||||
return maxlen;
|
||||
}
|
||||
|
||||
static int my_gets(SOCKET sock, char * line, int maxlen)
|
||||
static int my_gets(SOCKET sock, char *line, int maxlen)
|
||||
{
|
||||
int last_rval = 0;
|
||||
|
||||
|
@ -54,7 +54,7 @@ extern const char PAINT_CURSOR_VERTEX_PAINT[3];
|
||||
extern const char PAINT_CURSOR_WEIGHT_PAINT[3];
|
||||
extern const char PAINT_CURSOR_TEXTURE_PAINT[3];
|
||||
|
||||
typedef enum PaintMode{
|
||||
typedef enum PaintMode {
|
||||
PAINT_SCULPT,
|
||||
PAINT_VERTEX,
|
||||
PAINT_WEIGHT,
|
||||
|
@ -192,7 +192,7 @@ void BKE_sequencer_pixel_from_sequencer_space_v4(struct Scene *scene, float pixe
|
||||
/* **********************************************************************
|
||||
* sequencer scene functions
|
||||
* ********************************************************************** */
|
||||
struct Editing *BKE_sequencer_editing_get(struct Scene *scene, int alloc);
|
||||
struct Editing *BKE_sequencer_editing_get(struct Scene *scene, bool alloc);
|
||||
struct Editing *BKE_sequencer_editing_ensure(struct Scene *scene);
|
||||
void BKE_sequencer_editing_free(struct Scene *scene);
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include "BKE_bmfont.h"
|
||||
#include "BKE_bmfont_types.h"
|
||||
|
||||
void printfGlyph(bmGlyph * glyph)
|
||||
void printfGlyph(bmGlyph *glyph)
|
||||
{
|
||||
printf("unicode: %d '%c'\n", glyph->unicode, glyph->unicode);
|
||||
printf(" locx: %4d locy: %4d\n", glyph->locx, glyph->locy);
|
||||
@ -68,7 +68,7 @@ void printfGlyph(bmGlyph * glyph)
|
||||
#define MAX2(x, y) ((x) > (y) ? (x) : (y))
|
||||
#define MAX3(x, y, z) (MAX2(MAX2((x), (y)), (z)))
|
||||
|
||||
void calcAlpha(ImBuf * ibuf)
|
||||
void calcAlpha(ImBuf *ibuf)
|
||||
{
|
||||
int i;
|
||||
char * rect;
|
||||
@ -82,7 +82,7 @@ void calcAlpha(ImBuf * ibuf)
|
||||
}
|
||||
}
|
||||
|
||||
void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step)
|
||||
void readBitmapFontVersion0(ImBuf *ibuf, unsigned char *rect, int step)
|
||||
{
|
||||
int glyphcount, bytes, i, index, linelength, ysize;
|
||||
unsigned char * buffer;
|
||||
|
@ -116,7 +116,7 @@ BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert
|
||||
return tree;
|
||||
}
|
||||
|
||||
void bvhtree_update_from_mvert(BVHTree * bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int UNUSED(numverts), int moving )
|
||||
void bvhtree_update_from_mvert(BVHTree *bvhtree, MFace *faces, int numfaces, MVert *x, MVert *xnew, int UNUSED(numverts), int moving )
|
||||
{
|
||||
int i;
|
||||
MFace *mfaces = faces;
|
||||
@ -706,7 +706,7 @@ static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, Collision
|
||||
}
|
||||
|
||||
// cloth - object collisions
|
||||
int cloth_bvh_objcollision(Object *ob, ClothModifierData * clmd, float step, float dt )
|
||||
int cloth_bvh_objcollision(Object *ob, ClothModifierData *clmd, float step, float dt )
|
||||
{
|
||||
Cloth *cloth= clmd->clothObject;
|
||||
BVHTree *cloth_bvh= cloth->bvhtree;
|
||||
|
@ -1716,7 +1716,7 @@ static void simulate_implicit_euler(lfVector *Vnew, lfVector *UNUSED(lX), lfVect
|
||||
* (edge distance constraints) in a lagrangian solver. then add forces to help
|
||||
* guide the implicit solver to that state. this function is called after
|
||||
* collisions*/
|
||||
static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), ClothModifierData * clmd, float (*initial_cos)[3], float UNUSED(step), float dt)
|
||||
static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), ClothModifierData *clmd, float (*initial_cos)[3], float UNUSED(step), float dt)
|
||||
{
|
||||
Cloth *cloth= clmd->clothObject;
|
||||
float (*cos)[3] = MEM_callocN(sizeof(float)*3*cloth->numverts, "cos cloth_calc_helper_forces");
|
||||
|
@ -1660,7 +1660,7 @@ void BKE_nla_tweakmode_exit(AnimData *adt)
|
||||
|
||||
/* Baking Tools ------------------------------------------- */
|
||||
|
||||
static void UNUSED_FUNCTION(BKE_nla_bake) (Scene * scene, ID *UNUSED(id), AnimData * adt, int UNUSED(flag))
|
||||
static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
|
||||
{
|
||||
|
||||
/* verify that data is valid
|
||||
|
@ -1342,7 +1342,7 @@ void pbvh_bmesh_verify(PBVH *bvh)
|
||||
|
||||
/* Check that the vertex is in the node */
|
||||
BLI_assert(BLI_ghash_haskey(n->bm_unique_verts, v) ^
|
||||
BLI_ghash_haskey(n->bm_other_verts, v));
|
||||
BLI_ghash_haskey(n->bm_other_verts, v));
|
||||
|
||||
/* Check that the vertex has a node owner */
|
||||
nv = pbvh_bmesh_node_lookup(bvh, bvh->bm_vert_to_node, v);
|
||||
|
@ -3039,7 +3039,7 @@ static void *ptcache_bake_thread(void *ptr)
|
||||
}
|
||||
|
||||
/* if bake is not given run simulations to current frame */
|
||||
void BKE_ptcache_bake(PTCacheBaker* baker)
|
||||
void BKE_ptcache_bake(PTCacheBaker *baker)
|
||||
{
|
||||
Main *bmain = baker->main;
|
||||
Scene *scene = baker->scene;
|
||||
|
@ -26,7 +26,6 @@
|
||||
* \ingroup bke
|
||||
*/
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "BLO_sys_types.h" /* for intptr_t */
|
||||
@ -34,7 +33,6 @@
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "DNA_sequence_types.h"
|
||||
#include "BKE_sequencer.h"
|
||||
|
||||
#include "IMB_moviecache.h"
|
||||
#include "IMB_imbuf.h"
|
||||
@ -42,6 +40,8 @@
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
|
||||
#include "BKE_sequencer.h"
|
||||
|
||||
typedef struct SeqCacheKey {
|
||||
struct Sequence *seq;
|
||||
SeqRenderData context;
|
||||
|
@ -245,7 +245,7 @@ static void seq_free_sequence_recurse(Scene *scene, Sequence *seq)
|
||||
}
|
||||
|
||||
|
||||
Editing *BKE_sequencer_editing_get(Scene *scene, int alloc)
|
||||
Editing *BKE_sequencer_editing_get(Scene *scene, bool alloc)
|
||||
{
|
||||
if (alloc) {
|
||||
BKE_sequencer_editing_ensure(scene);
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
#define VERT_MARK 1
|
||||
|
||||
static bool UNUSED_FUNCTION(check_hole_in_region) (BMesh * bm, BMFace * f)
|
||||
static bool UNUSED_FUNCTION(check_hole_in_region) (BMesh *bm, BMFace *f)
|
||||
{
|
||||
BMWalker regwalker;
|
||||
BMIter liter2;
|
||||
|
@ -901,7 +901,7 @@ std::string AnimationExporter::create_source_from_vector(COLLADASW::InputSemanti
|
||||
}
|
||||
|
||||
|
||||
std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Object * ob, Bone *bone, const std::string& anim_id)
|
||||
std::string AnimationExporter::create_4x4_source(std::vector<float> &frames, Object *ob, Bone *bone, const std::string &anim_id)
|
||||
{
|
||||
COLLADASW::InputSemantic::Semantics semantic = COLLADASW::InputSemantic::OUTPUT;
|
||||
std::string source_id = anim_id + get_semantic_suffix(semantic);
|
||||
|
@ -117,7 +117,7 @@ private:
|
||||
|
||||
struct GeometryFunctor {
|
||||
// f should have
|
||||
// void operator()(Object* ob)
|
||||
// void operator()(Object *ob)
|
||||
template<class Functor>
|
||||
void forEachMeshObjectInExportSet(Scene *sce, Functor &f, LinkNode *export_set)
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
struct MaterialFunctor {
|
||||
// calls f for each unique material linked to each object in sce
|
||||
// f should have
|
||||
// void operator()(Material* ma)
|
||||
// void operator()(Material *ma)
|
||||
template<class Functor>
|
||||
void forEachMaterialInExportSet(Scene *sce, Functor &f, LinkNode *export_set)
|
||||
{
|
||||
|
@ -200,12 +200,12 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons
|
||||
/* move up/down */
|
||||
if (gpl->prev) {
|
||||
but = uiDefIconBut(block, BUT, 0, ICON_TRIA_UP, 0, 0, UI_UNIT_X, UI_UNIT_Y,
|
||||
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Move layer up"));
|
||||
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Move layer up"));
|
||||
uiButSetFunc(but, gp_ui_layer_up_cb, gpd, gpl);
|
||||
}
|
||||
if (gpl->next) {
|
||||
but = uiDefIconBut(block, BUT, 0, ICON_TRIA_DOWN, 0, 0, UI_UNIT_X, UI_UNIT_Y,
|
||||
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Move layer down"));
|
||||
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Move layer down"));
|
||||
uiButSetFunc(but, gp_ui_layer_down_cb, gpd, gpl);
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@ struct Scene;
|
||||
struct Sequence;
|
||||
struct SpaceSeq;
|
||||
|
||||
void ED_sequencer_select_sequence_single(struct Scene *scene, struct Sequence *seq, int deselect_all);
|
||||
void ED_sequencer_select_sequence_single(struct Scene *scene, struct Sequence *seq, bool deselect_all);
|
||||
void ED_sequencer_deselect_all(struct Scene *scene);
|
||||
|
||||
int ED_space_sequencer_maskedit_mask_poll(struct bContext *C);
|
||||
|
@ -3041,7 +3041,7 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType *
|
||||
}
|
||||
|
||||
#if 0 /* UNUSED */
|
||||
static uiBut *UNUSED_FUNCTION(ui_def_but_operator) (uiBlock * block, int type, const char *opname, int opcontext, const char *str, int x, int y, short width, short height, const char *tip)
|
||||
static uiBut *UNUSED_FUNCTION(ui_def_but_operator) (uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x, int y, short width, short height, const char *tip)
|
||||
{
|
||||
wmOperatorType *ot = WM_operatortype_find(opname, 0);
|
||||
if (str == NULL && ot == NULL) str = opname;
|
||||
|
@ -116,7 +116,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
|
||||
deform_bones_only = RNA_boolean_get(op->ptr, "deform_bones_only");
|
||||
|
||||
include_uv_textures = RNA_boolean_get(op->ptr, "include_uv_textures");
|
||||
include_material_textures= RNA_boolean_get(op->ptr, "include_material_textures");
|
||||
include_material_textures = RNA_boolean_get(op->ptr, "include_material_textures");
|
||||
use_texture_copies = RNA_boolean_get(op->ptr, "use_texture_copies");
|
||||
active_uv_only = RNA_boolean_get(op->ptr, "active_uv_only");
|
||||
|
||||
@ -147,7 +147,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
|
||||
triangulate,
|
||||
use_object_instantiation,
|
||||
sort_by_name,
|
||||
export_transformation_type,
|
||||
export_transformation_type,
|
||||
second_life))
|
||||
{
|
||||
return OPERATOR_FINISHED;
|
||||
|
@ -1012,7 +1012,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
|
||||
DAG_relations_tag_update(bmain);
|
||||
}
|
||||
|
||||
static void UNUSED_FUNCTION(copy_attr_menu) (Main * bmain, Scene * scene, View3D * v3d)
|
||||
static void UNUSED_FUNCTION(copy_attr_menu) (Main *bmain, Scene *scene, View3D *v3d)
|
||||
{
|
||||
Object *ob;
|
||||
short event;
|
||||
@ -1358,7 +1358,7 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot)
|
||||
|
||||
/* ********************** */
|
||||
|
||||
static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d)
|
||||
static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d)
|
||||
{
|
||||
/* all selected objects with an image map: scale in image aspect */
|
||||
Base *base;
|
||||
|
@ -408,11 +408,13 @@ typedef struct UndoImageTile {
|
||||
* paint operation, but for now just give a public interface */
|
||||
static ImagePaintPartialRedraw imapaintpartial = {0, 0, 0, 0, 0};
|
||||
|
||||
ImagePaintPartialRedraw *get_imapaintpartial(void) {
|
||||
ImagePaintPartialRedraw *get_imapaintpartial(void)
|
||||
{
|
||||
return &imapaintpartial;
|
||||
}
|
||||
|
||||
void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr) {
|
||||
void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr)
|
||||
{
|
||||
imapaintpartial = *ippr;
|
||||
}
|
||||
|
||||
|
@ -944,7 +944,8 @@ int paint_2d_stroke(void *ps, const int mval[2], float pressure, int eraser)
|
||||
return redraw;
|
||||
}
|
||||
|
||||
void *paint_2d_new_stroke(bContext *C, wmOperator *op) {
|
||||
void *paint_2d_new_stroke(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ToolSettings *settings = scene->toolsettings;
|
||||
Brush *brush = paint_brush(&settings->imapaint.paint);
|
||||
@ -980,7 +981,8 @@ void *paint_2d_new_stroke(bContext *C, wmOperator *op) {
|
||||
return s;
|
||||
}
|
||||
|
||||
void paint_2d_redraw (const bContext *C, void *ps, int final) {
|
||||
void paint_2d_redraw (const bContext *C, void *ps, int final)
|
||||
{
|
||||
ImagePaintState *s = ps;
|
||||
|
||||
if (final) {
|
||||
@ -998,7 +1000,8 @@ void paint_2d_redraw (const bContext *C, void *ps, int final) {
|
||||
}
|
||||
}
|
||||
|
||||
void paint_2d_stroke_done(void *ps) {
|
||||
void paint_2d_stroke_done(void *ps)
|
||||
{
|
||||
ImagePaintState *s = ps;
|
||||
|
||||
paint_2d_canvas_free(s);
|
||||
|
@ -24,7 +24,7 @@
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/** \file blender/editors/sculpt_paint/paint_image.c
|
||||
/** \file blender/editors/sculpt_paint/paint_image_proj.c
|
||||
* \ingroup edsculpt
|
||||
* \brief Functions to paint images in 2D and 3D.
|
||||
*/
|
||||
@ -4310,7 +4310,8 @@ static void paint_redraw(const bContext *C, PaintOperation *pop, int final)
|
||||
{
|
||||
if (pop->mode == PAINT_MODE_2D) {
|
||||
paint_2d_redraw(C, pop->custom_paint, final);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (final) {
|
||||
/* compositor listener deals with updating */
|
||||
WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, NULL);
|
||||
@ -4509,8 +4510,10 @@ static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke)
|
||||
paint_brush_exit_tex(pop->ps.brush);
|
||||
|
||||
project_paint_end(&pop->ps);
|
||||
} else
|
||||
}
|
||||
else {
|
||||
paint_2d_stroke_done(pop->custom_paint);
|
||||
}
|
||||
|
||||
paint_redraw(C, pop, 1);
|
||||
undo_paint_push_end(UNDO_PAINT_IMAGE);
|
||||
@ -4529,7 +4532,8 @@ static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke)
|
||||
}
|
||||
}
|
||||
|
||||
static int paint_stroke_test_start(bContext * UNUSED(C), wmOperator * UNUSED(op), const float UNUSED(mouse[2])) {
|
||||
static int paint_stroke_test_start(bContext *UNUSED(C), wmOperator *UNUSED(op), const float UNUSED(mouse[2]))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ PaintStroke *paint_stroke_new(bContext *C,
|
||||
|
||||
stroke->brush = paint_brush(paint_get_active_from_context(C));
|
||||
view3d_set_viewcontext(C, &stroke->vc);
|
||||
if(stroke->vc.v3d)
|
||||
if (stroke->vc.v3d)
|
||||
view3d_get_transformation(stroke->vc.ar, stroke->vc.rv3d, stroke->vc.obact, &stroke->mats);
|
||||
|
||||
stroke->get_location = get_location;
|
||||
@ -338,7 +338,8 @@ bool paint_supports_dynamic_size(Brush *br)
|
||||
!ELEM4(br->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK);
|
||||
}
|
||||
|
||||
bool paint_supports_jitter(PaintMode mode) {
|
||||
bool paint_supports_jitter(PaintMode mode)
|
||||
{
|
||||
return ELEM(mode, PAINT_SCULPT, PAINT_TEXTURE_PROJECTIVE);
|
||||
}
|
||||
|
||||
|
@ -3205,8 +3205,8 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
|
||||
if (use_orco) {
|
||||
if (ss->bm) {
|
||||
copy_v3_v3(val,
|
||||
BM_log_original_vert_co(ss->bm_log,
|
||||
vd.bm_vert));
|
||||
BM_log_original_vert_co(ss->bm_log,
|
||||
vd.bm_vert));
|
||||
}
|
||||
else
|
||||
copy_v3_v3(val, orco[vd.i]);
|
||||
@ -3374,7 +3374,7 @@ static void sculpt_fix_noise_tear(Sculpt *sd, Object *ob)
|
||||
}
|
||||
|
||||
static void do_symmetrical_brush_actions(Sculpt *sd, Object *ob,
|
||||
BrushActionFunc action)
|
||||
BrushActionFunc action)
|
||||
{
|
||||
Brush *brush = paint_brush(&sd->paint);
|
||||
SculptSession *ss = ob->sculpt;
|
||||
@ -4317,9 +4317,9 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
|
||||
sculpt_restore_mesh(sd, ob);
|
||||
|
||||
BKE_pbvh_bmesh_detail_size_set(ss->pbvh,
|
||||
(ss->cache->radius /
|
||||
(float)ss->cache->pixel_radius) *
|
||||
(float)sd->detail_size);
|
||||
(ss->cache->radius /
|
||||
(float)ss->cache->pixel_radius) *
|
||||
(float)sd->detail_size);
|
||||
|
||||
if (sculpt_stroke_dynamic_topology(ss, brush)) {
|
||||
do_symmetrical_brush_actions(sd, ob, sculpt_topology_update);
|
||||
@ -4598,7 +4598,7 @@ void sculpt_dynamic_topology_enable(bContext *C)
|
||||
sculpt_pbvh_clear(ob);
|
||||
|
||||
ss->bm_smooth_shading = (scene->toolsettings->sculpt->flags &
|
||||
SCULPT_DYNTOPO_SMOOTH_SHADING);
|
||||
SCULPT_DYNTOPO_SMOOTH_SHADING);
|
||||
|
||||
/* Create triangles-only BMesh */
|
||||
ss->bm = BM_mesh_create(&bm_mesh_allocsize_default);
|
||||
@ -4624,7 +4624,7 @@ void sculpt_dynamic_topology_enable(bContext *C)
|
||||
* If 'unode' is given, the BMesh's data is copied out to the unode
|
||||
* before the BMesh is deleted so that it can be restored from */
|
||||
void sculpt_dynamic_topology_disable(bContext *C,
|
||||
SculptUndoNode *unode)
|
||||
SculptUndoNode *unode)
|
||||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
SculptSession *ss = ob->sculpt;
|
||||
@ -4647,13 +4647,13 @@ void sculpt_dynamic_topology_disable(bContext *C,
|
||||
me->totedge = unode->bm_enter_totedge;
|
||||
me->totface = 0;
|
||||
CustomData_copy(&unode->bm_enter_vdata, &me->vdata, CD_MASK_MESH,
|
||||
CD_DUPLICATE, unode->bm_enter_totvert);
|
||||
CD_DUPLICATE, unode->bm_enter_totvert);
|
||||
CustomData_copy(&unode->bm_enter_edata, &me->edata, CD_MASK_MESH,
|
||||
CD_DUPLICATE, unode->bm_enter_totedge);
|
||||
CD_DUPLICATE, unode->bm_enter_totedge);
|
||||
CustomData_copy(&unode->bm_enter_ldata, &me->ldata, CD_MASK_MESH,
|
||||
CD_DUPLICATE, unode->bm_enter_totloop);
|
||||
CD_DUPLICATE, unode->bm_enter_totloop);
|
||||
CustomData_copy(&unode->bm_enter_pdata, &me->pdata, CD_MASK_MESH,
|
||||
CD_DUPLICATE, unode->bm_enter_totpoly);
|
||||
CD_DUPLICATE, unode->bm_enter_totpoly);
|
||||
|
||||
mesh_update_customdata_pointers(me, FALSE);
|
||||
}
|
||||
|
@ -3331,7 +3331,7 @@ void draw_nodespace_back_pix(const bContext *C, ARegion *ar, SpaceNode *snode)
|
||||
}
|
||||
|
||||
if ((snode->edittree->flag & NTREE_VIEWER_BORDER) &&
|
||||
viewer_border->xmin < viewer_border->xmax &&
|
||||
viewer_border->xmin < viewer_border->xmax &&
|
||||
viewer_border->ymin < viewer_border->ymax)
|
||||
{
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
@ -3339,9 +3339,9 @@ void draw_nodespace_back_pix(const bContext *C, ARegion *ar, SpaceNode *snode)
|
||||
cpack(0x4040FF);
|
||||
|
||||
glRectf(x + snode->zoom * viewer_border->xmin * ibuf->x,
|
||||
y + snode->zoom * viewer_border->ymin * ibuf->y,
|
||||
y + snode->zoom * viewer_border->ymin * ibuf->y,
|
||||
x + snode->zoom * viewer_border->xmax * ibuf->x,
|
||||
y + snode->zoom * viewer_border->ymax * ibuf->y);
|
||||
y + snode->zoom * viewer_border->ymax * ibuf->y);
|
||||
|
||||
setlinestyle(0);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
|
@ -1057,7 +1057,7 @@ void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set)
|
||||
}
|
||||
|
||||
/* return 0, nothing done */
|
||||
static int UNUSED_FUNCTION(node_mouse_groupheader) (SpaceNode * snode)
|
||||
static int UNUSED_FUNCTION(node_mouse_groupheader) (SpaceNode *snode)
|
||||
{
|
||||
bNode *gnode;
|
||||
float mx = 0, my = 0;
|
||||
|
@ -526,9 +526,9 @@ static void sequence_cb(int event, TreeElement *te, TreeStoreElem *tselem, void
|
||||
Sequence *seq = (Sequence *)te->directdata;
|
||||
if (event == 1) {
|
||||
Scene *scene = (Scene *)scene_ptr;
|
||||
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
|
||||
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
||||
if (BLI_findindex(ed->seqbasep, seq) != -1) {
|
||||
ED_sequencer_select_sequence_single(scene, seq, TRUE);
|
||||
ED_sequencer_select_sequence_single(scene, seq, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -889,7 +889,7 @@ static int insert_gap(Scene *scene, int gap, int cfra)
|
||||
return done;
|
||||
}
|
||||
|
||||
static void UNUSED_FUNCTION(touch_seq_files) (Scene * scene)
|
||||
static void UNUSED_FUNCTION(touch_seq_files) (Scene *scene)
|
||||
{
|
||||
Sequence *seq;
|
||||
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
|
||||
@ -946,7 +946,7 @@ static void set_filter_seq(Scene *scene)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void UNUSED_FUNCTION(seq_remap_paths) (Scene * scene)
|
||||
static void UNUSED_FUNCTION(seq_remap_paths) (Scene *scene)
|
||||
{
|
||||
Sequence *seq, *last_seq = BKE_sequencer_active_get(scene);
|
||||
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
|
||||
@ -988,7 +988,7 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene * scene)
|
||||
}
|
||||
|
||||
|
||||
static void UNUSED_FUNCTION(no_gaps) (Scene * scene)
|
||||
static void UNUSED_FUNCTION(no_gaps) (Scene *scene)
|
||||
{
|
||||
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
|
||||
int cfra, first = 0, done;
|
||||
|
@ -162,7 +162,7 @@ void select_surround_from_last(Scene *scene)
|
||||
}
|
||||
#endif
|
||||
|
||||
void ED_sequencer_select_sequence_single(Scene * scene, Sequence * seq, int deselect_all)
|
||||
void ED_sequencer_select_sequence_single(Scene *scene, Sequence *seq, bool deselect_all)
|
||||
{
|
||||
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
|
||||
|
||||
|
@ -299,7 +299,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a
|
||||
|
||||
glColor3ubv(color_wire);
|
||||
|
||||
for(j = 0; j <= arc_steps; j++) {
|
||||
for (j = 0; j <= arc_steps; j++) {
|
||||
madd_v3_v3v3fl(co_tmp, ruler_item->co[1], dir_tmp, px_scale);
|
||||
ED_view3d_project_float_global(ar, co_tmp, arc_ss_coords[j], V3D_PROJ_TEST_NOP);
|
||||
mul_qt_v3(quat, dir_tmp);
|
||||
|
@ -807,7 +807,7 @@ static float ResizeBetween(TransInfo *t, float p1[3], float p2[3])
|
||||
|
||||
/********************** CALC **************************/
|
||||
|
||||
static void UNUSED_FUNCTION(CalcSnapGrid) (TransInfo * t, float *UNUSED(vec))
|
||||
static void UNUSED_FUNCTION(CalcSnapGrid) (TransInfo *t, float *UNUSED(vec))
|
||||
{
|
||||
snapGridAction(t, t->tsnap.snapPoint, BIG_GEARS);
|
||||
}
|
||||
|
@ -670,7 +670,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int
|
||||
}
|
||||
|
||||
/* Image *ima can be NULL */
|
||||
void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float * frect, int rectw, int recth, int mipmap, int use_high_bit_depth, Image *ima)
|
||||
void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float *frect, int rectw, int recth, int mipmap, int use_high_bit_depth, Image *ima)
|
||||
{
|
||||
unsigned int *scalerect = NULL;
|
||||
float *fscalerect = NULL;
|
||||
|
@ -250,7 +250,7 @@ void BlockDXT1::decodeBlockNV5x(ColorBlock * block) const
|
||||
}
|
||||
}
|
||||
|
||||
void BlockDXT1::setIndices(int * idx)
|
||||
void BlockDXT1::setIndices(int *idx)
|
||||
{
|
||||
indices = 0;
|
||||
for (uint i = 0; i < 16; i++) {
|
||||
@ -595,7 +595,7 @@ void BlockCTX1::decodeBlock(ColorBlock * block) const
|
||||
}
|
||||
}
|
||||
|
||||
void BlockCTX1::setIndices(int * idx)
|
||||
void BlockCTX1::setIndices(int *idx)
|
||||
{
|
||||
indices = 0;
|
||||
for (uint i = 0; i < 16; i++) {
|
||||
|
@ -1092,7 +1092,7 @@ void DirectDrawSurface::setUserVersion(int version)
|
||||
header.setUserVersion(version);
|
||||
}
|
||||
|
||||
void DirectDrawSurface::mipmap(Image * img, uint face, uint mipmap)
|
||||
void DirectDrawSurface::mipmap(Image *img, uint face, uint mipmap)
|
||||
{
|
||||
stream.seek(offset(face, mipmap));
|
||||
|
||||
@ -1158,7 +1158,7 @@ void* DirectDrawSurface::readData(uint &rsize)
|
||||
return data;
|
||||
}
|
||||
|
||||
void DirectDrawSurface::readLinearImage(Image * img)
|
||||
void DirectDrawSurface::readLinearImage(Image *img)
|
||||
{
|
||||
|
||||
const uint w = img->width();
|
||||
@ -1204,7 +1204,7 @@ void DirectDrawSurface::readLinearImage(Image * img)
|
||||
}
|
||||
}
|
||||
|
||||
void DirectDrawSurface::readBlockImage(Image * img)
|
||||
void DirectDrawSurface::readBlockImage(Image *img)
|
||||
{
|
||||
|
||||
const uint w = img->width();
|
||||
@ -1246,7 +1246,7 @@ static Color32 buildNormal(uint8 x, uint8 y)
|
||||
}
|
||||
|
||||
|
||||
void DirectDrawSurface::readBlock(ColorBlock * rgba)
|
||||
void DirectDrawSurface::readBlock(ColorBlock *rgba)
|
||||
{
|
||||
uint fourcc = header.pf.fourcc;
|
||||
|
||||
|
@ -551,7 +551,7 @@ DEFINE_CUSTOMDATA_LAYER_COLLECTION_ACTIVEITEM(uv_layer, ldata, CD_MLOOPUV, rende
|
||||
|
||||
/* MeshUVLoopLayer */
|
||||
|
||||
static char *rna_MeshUVLoopLayer_path(PointerRNA * ptr)
|
||||
static char *rna_MeshUVLoopLayer_path(PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("uv_layers[\"%s\"]", ((CustomDataLayer *)ptr->data)->name);
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ static void fill_laplacian_matrix(LaplacianSystem *sys)
|
||||
}
|
||||
}
|
||||
|
||||
static void validate_solution(LaplacianSystem * sys, short flag, float lambda, float lambda_border)
|
||||
static void validate_solution(LaplacianSystem *sys, short flag, float lambda, float lambda_border)
|
||||
{
|
||||
int i;
|
||||
float lam;
|
||||
|
@ -829,7 +829,7 @@ static float EWA_WTS[EWA_MAXIDX + 1] = {
|
||||
#endif
|
||||
//static int ISNAN(float x) { return (x != x); }
|
||||
|
||||
static void radangle2imp(float a2, float b2, float th, float* A, float* B, float* C, float* F)
|
||||
static void radangle2imp(float a2, float b2, float th, float *A, float *B, float *C, float *F)
|
||||
{
|
||||
float ct2 = cosf(th);
|
||||
const float st2 = 1.0f - ct2 * ct2; /* <- sin(th)^2 */
|
||||
@ -841,7 +841,7 @@ static void radangle2imp(float a2, float b2, float th, float* A, float* B, float
|
||||
}
|
||||
|
||||
/* all tests here are done to make sure possible overflows are hopefully minimized */
|
||||
static void imp2radangle(float A, float B, float C, float F, float* a, float* b, float* th, float* ecc)
|
||||
static void imp2radangle(float A, float B, float C, float F, float *a, float *b, float *th, float *ecc)
|
||||
{
|
||||
if (F <= 1e-5f) { /* use arbitrary major radius, zero minor, infinite eccentricity */
|
||||
*a = sqrtf(A > C ? A : C);
|
||||
|
@ -166,7 +166,7 @@ void BL_draw_gamedebug_box(int xco, int yco, int width, int height, float percen
|
||||
}
|
||||
|
||||
/* Print 3D text */
|
||||
void BL_print_game_line(int fontid, const char* text, int size, int dpi, float* color, double* mat, float aspect)
|
||||
void BL_print_game_line(int fontid, const char *text, int size, int dpi, float *color, double *mat, float aspect)
|
||||
{
|
||||
/* gl prepping */
|
||||
DisableForText();
|
||||
|
@ -89,7 +89,7 @@ class MatrixTesting(unittest.TestCase):
|
||||
(19, 26, 33),
|
||||
(29, 40, 51)))
|
||||
|
||||
self.assertEqual(mat1*mat2, prod_mat1)
|
||||
self.assertEqual(mat1 * mat2, prod_mat1)
|
||||
self.assertEqual(mat2 * mat1, prod_mat2)
|
||||
|
||||
def test_mat4x4_vec3D_mult(self):
|
||||
|
Loading…
Reference in New Issue
Block a user