diff options
Diffstat (limited to 'source')
405 files changed, 3229 insertions, 3192 deletions
diff --git a/source/blender/avi/intern/avi_mjpeg.c b/source/blender/avi/intern/avi_mjpeg.c index a2d48c724de..857501c5796 100644 --- a/source/blender/avi/intern/avi_mjpeg.c +++ b/source/blender/avi/intern/avi_mjpeg.c @@ -57,8 +57,8 @@ static void add_huff_table(j_decompress_ptr dinfo, JHUFF_TBL **htblptr, const UI memcpy((*htblptr)->bits, bits, sizeof((*htblptr)->bits)); memcpy((*htblptr)->huffval, val, sizeof((*htblptr)->huffval)); - /* Initialize sent_table FALSE so table will be written to JPEG file. */ - (*htblptr)->sent_table = FALSE; + /* Initialize sent_table false so table will be written to JPEG file. */ + (*htblptr)->sent_table = false; } /* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ @@ -165,7 +165,7 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign dinfo.err = jpeg_std_error(&jerr); jpeg_create_decompress(&dinfo); jpegmemsrcmgr_build(&dinfo, inBuffer, bufsize); - jpeg_read_header(&dinfo, TRUE); + jpeg_read_header(&dinfo, true); if (dinfo.dc_huff_tbl_ptrs[0] == NULL) { std_huff_tables(&dinfo); } @@ -187,7 +187,7 @@ static int Decode_JPEG(unsigned char *inBuffer, unsigned char *outBuffer, unsign jpegmemsrcmgr_build(&dinfo, inBuffer, bufsize - numbytes); numbytes = 0; - jpeg_read_header(&dinfo, TRUE); + jpeg_read_header(&dinfo, true); if (dinfo.dc_huff_tbl_ptrs[0] == NULL) { std_huff_tables(&dinfo); } @@ -224,21 +224,21 @@ static void Compress_JPEG(int quality, unsigned char *outbuffer, const unsigned jpeg_set_defaults(&cinfo); jpeg_set_colorspace(&cinfo, JCS_YCbCr); - jpeg_set_quality(&cinfo, quality, TRUE); + jpeg_set_quality(&cinfo, quality, true); - cinfo.dc_huff_tbl_ptrs[0]->sent_table = TRUE; - cinfo.dc_huff_tbl_ptrs[1]->sent_table = TRUE; - cinfo.ac_huff_tbl_ptrs[0]->sent_table = TRUE; - cinfo.ac_huff_tbl_ptrs[1]->sent_table = TRUE; + cinfo.dc_huff_tbl_ptrs[0]->sent_table = true; + cinfo.dc_huff_tbl_ptrs[1]->sent_table = true; + cinfo.ac_huff_tbl_ptrs[0]->sent_table = true; + cinfo.ac_huff_tbl_ptrs[1]->sent_table = true; cinfo.comp_info[0].component_id = 0; cinfo.comp_info[0].v_samp_factor = 1; cinfo.comp_info[1].component_id = 1; cinfo.comp_info[2].component_id = 2; - cinfo.write_JFIF_header = FALSE; + cinfo.write_JFIF_header = false; - jpeg_start_compress(&cinfo, FALSE); + jpeg_start_compress(&cinfo, false); i = 0; marker[i++] = 'A'; @@ -378,7 +378,7 @@ static void jpegmemdestmgr_init_destination(j_compress_ptr cinfo) static boolean jpegmemdestmgr_empty_output_buffer(j_compress_ptr cinfo) { (void)cinfo; /* unused */ - return TRUE; + return true; } static void jpegmemdestmgr_term_destination(j_compress_ptr cinfo) @@ -422,7 +422,7 @@ static boolean jpegmemsrcmgr_fill_input_buffer(j_decompress_ptr dinfo) dinfo->src->next_input_byte = buf; dinfo->src->bytes_in_buffer = 2; - return TRUE; + return true; } static void jpegmemsrcmgr_skip_input_data(j_decompress_ptr dinfo, long skipcnt) diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index e01631fff6b..2a27a3d6f4d 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -154,11 +154,11 @@ void BLF_shadow_offset(int fontid, int x, int y); /* Set the buffer, size and number of channels to draw, one thing to take care is call * this function with NULL pointer when we finish, for example: * - * BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4, TRUE, NULL); + * BLF_buffer(my_fbuf, my_cbuf, 100, 100, 4, true, NULL); * * ... set color, position and draw ... * - * BLF_buffer(NULL, NULL, NULL, 0, 0, FALSE, NULL); + * BLF_buffer(NULL, NULL, NULL, 0, 0, false, NULL); */ void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch, struct ColorManagedDisplay *display); diff --git a/source/blender/blenkernel/BKE_addon.h b/source/blender/blenkernel/BKE_addon.h index 739a4e3eee6..9c09fffe0a0 100644 --- a/source/blender/blenkernel/BKE_addon.h +++ b/source/blender/blenkernel/BKE_addon.h @@ -36,7 +36,7 @@ typedef struct bAddonPrefType { ExtensionRNA ext; } bAddonPrefType; -bAddonPrefType *BKE_addon_pref_type_find(const char *idname, int quiet); +bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet); void BKE_addon_pref_type_add(bAddonPrefType *apt); void BKE_addon_pref_type_remove(bAddonPrefType *apt); diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 60e03af5077..85329753844 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -93,7 +93,7 @@ void BKE_armature_where_is(struct bArmature *arm); void BKE_armature_where_is_bone(struct Bone *bone, struct Bone *prevbone); void BKE_pose_rebuild(struct Object *ob, struct bArmature *arm); void BKE_pose_where_is(struct Scene *scene, struct Object *ob); -void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, int do_extra); +void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPoseChannel *pchan, float ctime, bool do_extra); void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan); /* get_objectspace_bone_matrix has to be removed still */ @@ -111,8 +111,8 @@ void BKE_armature_mat_pose_to_delta(float delta_mat[4][4], float pose_mat[4][4], void BKE_armature_mat_pose_to_bone_ex(struct Object *ob, struct bPoseChannel *pchan, float inmat[4][4], float outmat[4][4]); -void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[3][3], short use_compat); -void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, float mat[4][4], short use_comat); +void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[3][3], bool use_compat); +void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, float mat[4][4], bool use_comat); void BKE_pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]); void BKE_pchan_calc_mat(struct bPoseChannel *pchan); diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h index 49ba9c9d875..01b401c6bcc 100644 --- a/source/blender/blenkernel/BKE_camera.h +++ b/source/blender/blenkernel/BKE_camera.h @@ -69,7 +69,7 @@ float BKE_camera_sensor_size(int sensor_fit, float sensor_x, float sensor_y); typedef struct CameraParams { /* lens */ - int is_ortho; + bool is_ortho; float lens; float ortho_scale; float zoom; diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index a69a9601c9a..9234625a37c 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -55,7 +55,7 @@ void curvemapping_set_black_white(struct CurveMapping *cumap, con #define CURVEMAP_SLOPE_POSITIVE 1 void curvemap_reset(struct CurveMap *cuma, const struct rctf *clipr, int preset, int slope); void curvemap_remove(struct CurveMap *cuma, const short flag); -int curvemap_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp); +bool curvemap_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp); struct CurveMapPoint *curvemap_insert(struct CurveMap *cuma, float x, float y); void curvemap_sethandle(struct CurveMap *cuma, int type); diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index c79dc62bb61..8a9d3589a4f 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -123,7 +123,7 @@ bConstraintTypeInfo *BKE_get_constraint_typeinfo(int type); void BKE_unique_constraint_name(struct bConstraint *con, struct ListBase *list); void BKE_free_constraints(struct ListBase *list); -void BKE_copy_constraints(struct ListBase *dst, const struct ListBase *src, int do_extern); +void BKE_copy_constraints(struct ListBase *dst, const struct ListBase *src, bool do_extern); void BKE_relink_constraints(struct ListBase *list); void BKE_id_loop_constraints(struct ListBase *list, ConstraintIDFunc func, void *userdata); void BKE_free_constraint_data(struct bConstraint *con); diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 2834a37ca7a..877e376b343 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -185,7 +185,7 @@ enum { PointerRNA CTX_data_pointer_get(const bContext *C, const char *member); PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type); ListBase CTX_data_collection_get(const bContext *C, const char *member); -ListBase CTX_data_dir_get_ex(const bContext *C, const short use_store, const short use_rna, const short use_all); +ListBase CTX_data_dir_get_ex(const bContext *C, const bool use_store, const bool use_rna, const bool use_all); ListBase CTX_data_dir_get(const bContext *C); int CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb, short *r_type); diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 0db2e6a763c..c4dfd9d4e30 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -120,7 +120,7 @@ void BKE_curve_rect_from_textbox(const struct Curve *cu, const struct TextBox *t /* ** Nurbs ** */ -int BKE_nurbList_index_get_co(struct ListBase *editnurb, const int index, float r_co[3]); +bool BKE_nurbList_index_get_co(struct ListBase *editnurb, const int index, float r_co[3]); int BKE_nurbList_verts_count(struct ListBase *nurb); int BKE_nurbList_verts_count_without_handles(struct ListBase *nurb); diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index 05bb01a4490..2a3459dd075 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -127,7 +127,7 @@ int DAG_id_type_tagged(struct Main *bmain, short idtype); void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time); void DAG_ids_flush_tagged(struct Main *bmain); -void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, int time); +void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, bool time); void DAG_ids_clear_recalc(struct Main *bmain); /* Armature: sorts the bones according to dependencies between them */ diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index f7fd7450734..db052f5d879 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -60,9 +60,11 @@ void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char bool BKE_imbuf_alpha_test(struct ImBuf *ibuf); int BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); -int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy); -void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const struct ImageFormatData *im_format, const short use_ext, const short use_frames); -void BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames); +int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const bool is_copy); +void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, + const struct ImageFormatData *im_format, const bool use_ext, const bool use_frames); +void BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame, + const char imtype, const bool use_ext, const bool use_frames); int BKE_add_image_extension(char *string, const struct ImageFormatData *im_format); int BKE_add_image_extension_from_type(char *string, const char imtype); char BKE_ftype_to_imtype(const int ftype); @@ -162,7 +164,8 @@ struct Image *BKE_image_load(struct Main *bmain, const char *filepath); struct Image *BKE_image_load_exists(const char *filepath); /* adds image, adds ibuf, generates color or pattern */ -struct Image *BKE_image_add_generated(struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4]); +struct Image *BKE_image_add_generated( + struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4]); /* adds image from imbuf, owns imbuf */ struct Image *BKE_image_add_from_imbuf(struct ImBuf *ibuf); diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index c866fbb7b13..89d310753fc 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -83,8 +83,8 @@ void assign_matarar(struct Object *ob, struct Material ***matar, short totcol); short find_material_index(struct Object *ob, struct Material *ma); -int object_add_material_slot(struct Object *ob); -int object_remove_material_slot(struct Object *ob); +bool object_add_material_slot(struct Object *ob); +bool object_remove_material_slot(struct Object *ob); /* rna api */ void BKE_material_resize_id(struct ID *id, short totcol, bool do_id_user); @@ -98,7 +98,7 @@ void init_render_materials(struct Main *, int, float *); void end_render_material(struct Material *); void end_render_materials(struct Main *); -int material_in_material(struct Material *parmat, struct Material *mat); +bool material_in_material(struct Material *parmat, struct Material *mat); void ramp_blend(int type, float r_col[3], const float fac, const float col[3]); diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index dc12213bf16..09c5776ccf0 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -459,7 +459,7 @@ void nodeInternalRelink(struct bNodeTree *ntree, struct bNode *node); void nodeToView(struct bNode *node, float x, float y, float *rx, float *ry); void nodeFromView(struct bNode *node, float x, float y, float *rx, float *ry); -int nodeAttachNodeCheck(struct bNode *node, struct bNode *parent); +bool nodeAttachNodeCheck(struct bNode *node, struct bNode *parent); void nodeAttachNode(struct bNode *node, struct bNode *parent); void nodeDetachNode(struct bNode *node); @@ -542,7 +542,7 @@ BLI_INLINE bool BKE_node_instance_hash_iterator_done(bNode /* Node Previews */ int BKE_node_preview_used(struct bNode *node); -bNodePreview *BKE_node_preview_verify(struct bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, int create); +bNodePreview *BKE_node_preview_verify(struct bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create); bNodePreview *BKE_node_preview_copy(struct bNodePreview *preview); void BKE_node_preview_free(struct bNodePreview *preview); void BKE_node_preview_init_tree(struct bNodeTree *ntree, int xsize, int ysize, int create_previews); diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index ef284842cf7..4b4deea044d 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -97,7 +97,7 @@ bool BKE_object_lod_is_usable(struct Object *ob, struct Scene *scene); struct Object *BKE_object_lod_meshob_get(struct Object *ob, struct Scene *scene); struct Object *BKE_object_lod_matob_get(struct Object *ob, struct Scene *scene); -struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, int copy_caches); +struct Object *BKE_object_copy_ex(struct Main *bmain, struct Object *ob, bool copy_caches); struct Object *BKE_object_copy(struct Object *ob); void BKE_object_make_local(struct Object *ob); bool BKE_object_is_libdata(struct Object *ob); diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index e62bd2b4697..12c4e0b8435 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -172,6 +172,6 @@ typedef struct SculptSession { void free_sculptsession(struct Object *ob); void free_sculptsession_deformMats(struct SculptSession *ss); -void sculptsession_bm_to_me(struct Object *ob, int reorder); +void sculptsession_bm_to_me(struct Object *ob, bool reorder); void sculptsession_bm_to_me_for_render(struct Object *object); #endif diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 877aafe67a4..6b8e50494c7 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -303,7 +303,7 @@ void psys_free(struct Object *ob, struct ParticleSystem *psys); void psys_render_set(struct Object *ob, struct ParticleSystem *psys, float viewmat[4][4], float winmat[4][4], int winx, int winy, int timeoffset); void psys_render_restore(struct Object *ob, struct ParticleSystem *psys); int psys_render_simplify_distribution(struct ParticleThreadContext *ctx, int tot); -int psys_render_simplify_params(struct ParticleSystem *psys, struct ChildParticle *cpa, float *params); +bool psys_render_simplify_params(struct ParticleSystem *psys, struct ChildParticle *cpa, float *params); void psys_interpolate_uvs(const struct MTFace *tface, int quad, const float w[4], float uvco[2]); void psys_interpolate_mcol(const struct MCol *mcol, int quad, const float w[4], struct MCol *mc); @@ -333,7 +333,7 @@ void precalc_guides(struct ParticleSimulationData *sim, struct ListBase *effecto float psys_get_timestep(struct ParticleSimulationData *sim); float psys_get_child_time(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *birthtime, float *dietime); float psys_get_child_size(struct ParticleSystem *psys, struct ChildParticle *cpa, float cfra, float *pa_time); -void psys_get_particle_on_path(struct ParticleSimulationData *sim, int pa_num, struct ParticleKey *state, int vel); +void psys_get_particle_on_path(struct ParticleSimulationData *sim, int pa_num, struct ParticleKey *state, const bool vel); int psys_get_particle_state(struct ParticleSimulationData *sim, int p, struct ParticleKey *state, int always); void psys_sph_init(struct ParticleSimulationData *sim, struct SPHData *sphdata); diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 7517a931c76..b6f7a2b0e1a 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -112,7 +112,7 @@ void BKE_pbvh_raycast_project_ray_root(PBVH *bvh, bool original, float ray_start void BKE_pbvh_node_draw(PBVHNode *node, void *data); void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3], - int (*setMaterial)(int, void *attribs), int wireframe); + int (*setMaterial)(int, void *attribs), bool wireframe); /* PBVH Access */ typedef enum { diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index d5131fcd19e..99579086e25 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -304,7 +304,7 @@ struct PointCache *BKE_ptcache_add(struct ListBase *ptcaches); void BKE_ptcache_free_mem(struct ListBase *mem_cache); void BKE_ptcache_free(struct PointCache *cache); void BKE_ptcache_free_list(struct ListBase *ptcaches); -struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct ListBase *ptcaches_old, int copy_data); +struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct ListBase *ptcaches_old, bool copy_data); /********************** Baking *********************/ diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index 101fc463375..2acfeca233e 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -64,7 +64,7 @@ void BKE_reports_print(ReportList *reports, ReportType level); Report *BKE_reports_last_displayable(ReportList *reports); -int BKE_reports_contain(ReportList *reports, ReportType level); +bool BKE_reports_contain(ReportList *reports, ReportType level); bool BKE_report_write_file_fp(FILE *fp, ReportList *reports, const char *header); bool BKE_report_write_file(const char *filepath, ReportList *reports, const char *header); diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index 7d7fad1c58d..4f77e4f5a23 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -94,9 +94,9 @@ void txt_do_redo (struct Text *text); void txt_split_curline (struct Text *text); void txt_backspace_char (struct Text *text); void txt_backspace_word (struct Text *text); -int txt_add_char (struct Text *text, unsigned int add); -int txt_add_raw_char (struct Text *text, unsigned int add); -int txt_replace_char (struct Text *text, unsigned int add); +bool txt_add_char (struct Text *text, unsigned int add); +bool txt_add_raw_char (struct Text *text, unsigned int add); +bool txt_replace_char (struct Text *text, unsigned int add); void txt_unindent (struct Text *text); void txt_comment (struct Text *text); void txt_indent (struct Text *text); diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index 6a5b5626b50..c136a30595d 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -91,7 +91,7 @@ struct Tex *give_current_particle_texture(struct ParticleSettings *part); struct bNode *give_current_material_texture_node(struct Material *ma); -int give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act); +bool give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act); void set_active_mtex(struct ID *id, short act); void set_current_brush_texture(struct Brush *br, struct Tex *tex); diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index b4a2dab8b1e..4e9df194f40 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1115,7 +1115,7 @@ static void calc_weightpaint_vert_color( if (was_a_nonzero == false) { show_alert_color = true; } - else if ((draw_flag & CALC_WP_AUTO_NORMALIZE) == FALSE) { + else if ((draw_flag & CALC_WP_AUTO_NORMALIZE) == false) { input /= defbase_sel_tot; /* get the average */ } } @@ -1402,7 +1402,7 @@ static void dm_ensure_display_normals(DerivedMesh *dm) BLI_assert(CustomData_has_layer(&dm->polyData, CD_NORMAL) == false); if ((dm->type == DM_TYPE_CDDM) && - ((dm->dirty & DM_DIRTY_NORMALS) || CustomData_has_layer(&dm->faceData, CD_NORMAL) == FALSE)) + ((dm->dirty & DM_DIRTY_NORMALS) || CustomData_has_layer(&dm->faceData, CD_NORMAL) == false)) { /* if normals are dirty we want to calculate vertex normals too */ CDDM_calc_normals_mapping_ex(dm, (dm->dirty & DM_DIRTY_NORMALS) ? false : true); @@ -1442,7 +1442,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos #if 0 /* XXX Will re-enable this when we have global mod stack options. */ const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol; #endif - const bool do_final_wmcol = FALSE; + const bool do_final_wmcol = false; const bool do_init_wmcol = ((dataMask & CD_MASK_PREVIEW_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT) && !do_final_wmcol); /* XXX Same as above... For now, only weights preview in WPaint mode. */ const bool do_mod_wmcol = do_init_wmcol; @@ -1968,7 +1968,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D #if 0 /* XXX Will re-enable this when we have global mod stack options. */ const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol; #endif - const bool do_final_wmcol = FALSE; + const bool do_final_wmcol = false; const bool do_init_wmcol = ((((Mesh *)ob->data)->drawflag & ME_DRAWEIGHT) && !do_final_wmcol); const bool do_init_statvis = ((((Mesh *)ob->data)->drawflag & ME_DRAW_STATVIS) && !do_init_wmcol); const bool do_mod_wmcol = do_init_wmcol; diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 3a32cad0873..d5efa09bdc9 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -96,8 +96,8 @@ typedef struct tMakeLocalActionContext { bAction *act; /* original action */ bAction *act_new; /* new action */ - int is_lib; /* some action users were libraries */ - int is_local; /* some action users were not libraries */ + bool is_lib; /* some action users were libraries */ + bool is_local; /* some action users were not libraries */ } tMakeLocalActionContext; /* helper function for BKE_action_make_local() - local/lib init step */ @@ -106,8 +106,8 @@ static void make_localact_init_cb(ID *id, AnimData *adt, void *mlac_ptr) tMakeLocalActionContext *mlac = (tMakeLocalActionContext *)mlac_ptr; if (adt->action == mlac->act) { - if (id->lib) mlac->is_lib = TRUE; - else mlac->is_local = TRUE; + if (id->lib) mlac->is_lib = true; + else mlac->is_local = true; } } @@ -129,7 +129,7 @@ static void make_localact_apply_cb(ID *id, AnimData *adt, void *mlac_ptr) // does copy_fcurve... void BKE_action_make_local(bAction *act) { - tMakeLocalActionContext mlac = {act, NULL, FALSE, FALSE}; + tMakeLocalActionContext mlac = {act, NULL, false, false}; Main *bmain = G.main; if (act->id.lib == NULL) @@ -143,7 +143,7 @@ void BKE_action_make_local(bAction *act) BKE_animdata_main_cb(bmain, make_localact_init_cb, &mlac); - if (mlac.is_local && mlac.is_lib == FALSE) { + if (mlac.is_local && mlac.is_lib == false) { id_clear_lib_data(bmain, &act->id); } else if (mlac.is_local && mlac.is_lib) { @@ -604,7 +604,7 @@ void BKE_pose_copy_data(bPose **dst, bPose *src, const bool copy_constraints) for (pchan = outPose->chanbase.first; pchan; pchan = pchan->next) { if (copy_constraints) { - BKE_copy_constraints(&listb, &pchan->constraints, TRUE); // BKE_copy_constraints NULLs listb + BKE_copy_constraints(&listb, &pchan->constraints, true); // BKE_copy_constraints NULLs listb pchan->constraints = listb; pchan->mpath = NULL; /* motion paths should not get copied yet... */ } @@ -843,7 +843,7 @@ void BKE_pose_channel_copy_data(bPoseChannel *pchan, const bPoseChannel *pchan_f pchan->iklinweight = pchan_from->iklinweight; /* constraints */ - BKE_copy_constraints(&pchan->constraints, &pchan_from->constraints, TRUE); + BKE_copy_constraints(&pchan->constraints, &pchan_from->constraints, true); /* id-properties */ if (pchan->prop) { @@ -1037,7 +1037,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ /* get extents for this curve */ /* TODO: allow enabling/disabling this? */ - calc_fcurve_range(fcu, &nmin, &nmax, FALSE, TRUE); + calc_fcurve_range(fcu, &nmin, &nmax, false, true); /* compare to the running tally */ min = min_ff(min, nmin); diff --git a/source/blender/blenkernel/intern/addon.c b/source/blender/blenkernel/intern/addon.c index 129bc4657b4..119fa266908 100644 --- a/source/blender/blenkernel/intern/addon.c +++ b/source/blender/blenkernel/intern/addon.c @@ -43,7 +43,7 @@ static GHash *global_addonpreftype_hash = NULL; -bAddonPrefType *BKE_addon_pref_type_find(const char *idname, int quiet) +bAddonPrefType *BKE_addon_pref_type_find(const char *idname, bool quiet) { if (idname[0]) { bAddonPrefType *apt; diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 3088f2ccf9b..7bd5e2207a5 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1291,7 +1291,7 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in /* set value - only for animatable numerical values */ if (RNA_property_animateable(&new_ptr, prop)) { int array_len = RNA_property_array_length(&new_ptr, prop); - int written = FALSE; + bool written = false; if (array_len && array_index >= array_len) { if (G.debug & G_DEBUG) { @@ -1308,13 +1308,13 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in if (array_len) { if (RNA_property_boolean_get_index(&new_ptr, prop, array_index) != ANIMSYS_FLOAT_AS_BOOL(value)) { RNA_property_boolean_set_index(&new_ptr, prop, array_index, ANIMSYS_FLOAT_AS_BOOL(value)); - written = TRUE; + written = true; } } else { if (RNA_property_boolean_get(&new_ptr, prop) != ANIMSYS_FLOAT_AS_BOOL(value)) { RNA_property_boolean_set(&new_ptr, prop, ANIMSYS_FLOAT_AS_BOOL(value)); - written = TRUE; + written = true; } } break; @@ -1322,13 +1322,13 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in if (array_len) { if (RNA_property_int_get_index(&new_ptr, prop, array_index) != (int)value) { RNA_property_int_set_index(&new_ptr, prop, array_index, (int)value); - written = TRUE; + written = true; } } else { if (RNA_property_int_get(&new_ptr, prop) != (int)value) { RNA_property_int_set(&new_ptr, prop, (int)value); - written = TRUE; + written = true; } } break; @@ -1336,20 +1336,20 @@ static short animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_in if (array_len) { if (RNA_property_float_get_index(&new_ptr, prop, array_index) != value) { RNA_property_float_set_index(&new_ptr, prop, array_index, value); - written = TRUE; + written = true; } } else { if (RNA_property_float_get(&new_ptr, prop) != value) { RNA_property_float_set(&new_ptr, prop, value); - written = TRUE; + written = true; } } break; case PROP_ENUM: if (RNA_property_enum_get(&new_ptr, prop) != (int)value) { RNA_property_enum_set(&new_ptr, prop, (int)value); - written = TRUE; + written = true; } break; default: diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index afd3ae7e85d..60ec4817f81 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -137,7 +137,7 @@ void BKE_armature_free(bArmature *arm) void BKE_armature_make_local(bArmature *arm) { Main *bmain = G.main; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; Object *ob; if (arm->id.lib == NULL) @@ -150,13 +150,13 @@ void BKE_armature_make_local(bArmature *arm) for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) { if (ob->data == arm) { if (ob->id.lib) - is_lib = TRUE; + is_lib = true; else - is_local = TRUE; + is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &arm->id); } else if (is_local && is_lib) { @@ -827,7 +827,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float const short invert_vgroup = deformflag & ARM_DEF_INVERT_VGROUP; int defbase_tot = 0; /* safety for vertexgroup index overflow */ int i, target_totvert = 0; /* safety for vertexgroup overflow */ - int use_dverts = FALSE; + bool use_dverts = false; int armature_def_nr; int totchan; @@ -891,7 +891,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm, float use_dverts = (dm->getVertDataArray(dm, CD_MDEFORMVERT) != NULL); } else if (dverts) { - use_dverts = TRUE; + use_dverts = true; } if (use_dverts) { @@ -1294,19 +1294,19 @@ void BKE_armature_mat_pose_to_bone_ex(Object *ob, bPoseChannel *pchan, float inm /* recalculate pose matrix with only parent transformations, * bone loc/sca/rot is ignored, scene and frame are not used. */ - BKE_pose_where_is_bone(NULL, ob, &work_pchan, 0.0f, FALSE); + BKE_pose_where_is_bone(NULL, ob, &work_pchan, 0.0f, false); /* find the matrix, need to remove the bone transforms first so this is * calculated as a matrix to set rather then a difference ontop of whats * already there. */ unit_m4(outmat); - BKE_pchan_apply_mat4(&work_pchan, outmat, FALSE); + BKE_pchan_apply_mat4(&work_pchan, outmat, false); BKE_armature_mat_pose_to_bone(&work_pchan, inmat, outmat); } /* same as BKE_object_mat3_to_rot() */ -void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compat) +void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], bool use_compat) { switch (pchan->rotmode) { case ROT_MODE_QUAT: @@ -1326,7 +1326,7 @@ void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compa /* Apply a 4x4 matrix to the pose bone, * similar to BKE_object_apply_mat4() */ -void BKE_pchan_apply_mat4(bPoseChannel *pchan, float mat[4][4], short use_compat) +void BKE_pchan_apply_mat4(bPoseChannel *pchan, float mat[4][4], bool use_compat) { float rot[3][3]; mat4_to_loc_rot_size(pchan->loc, rot, pchan->size, mat); @@ -1619,7 +1619,7 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected * we get the libs direct linked in this blend. */ BKE_extract_proxylocal_constraints(&proxylocal_constraints, &pchan->constraints); - BKE_copy_constraints(&pchanw.constraints, &pchanp->constraints, FALSE); + BKE_copy_constraints(&pchanw.constraints, &pchanp->constraints, false); BLI_movelisttolist(&pchanw.constraints, &proxylocal_constraints); /* constraints - set target ob pointer to own object */ @@ -1768,7 +1768,7 @@ typedef struct tSplineIK_Tree { int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */ - short free_points; /* free the point positions array */ + bool free_points; /* free the point positions array */ short chainlen; /* number of bones in the chain */ float *points; /* parametric positions for the joints along the curve */ @@ -1791,7 +1791,7 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos bSplineIKConstraint *ikData = NULL; float boneLengths[255], *jointPoints; float totLength = 0.0f; - short free_joints = 0; + bool free_joints = 0; int segcount = 0; /* find the SplineIK constraint */ @@ -2261,13 +2261,13 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha int do_modif; for (strip = armob->nlastrips.first; strip; strip = strip->next) { - do_modif = FALSE; + do_modif = false; if (scene_cfra >= strip->start && scene_cfra <= strip->end) - do_modif = TRUE; + do_modif = true; if ((scene_cfra > strip->end) && (strip->flag & ACTSTRIP_HOLDLASTFRAME)) { - do_modif = TRUE; + do_modif = true; /* if there are any other strips active, ignore modifiers for this strip - * 'hold' option should only hold action modifiers if there are @@ -2277,7 +2277,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha if (scene_cfra >= strip2->start && scene_cfra <= strip2->end) { if (!(strip2->flag & ACTSTRIP_MUTE)) - do_modif = FALSE; + do_modif = false; } } @@ -2286,7 +2286,7 @@ static void do_strip_modifiers(Scene *scene, Object *armob, Bone *bone, bPoseCha for (strip2 = strip->next; strip2; strip2 = strip2->next) { if (scene_cfra < strip2->start) continue; if ((strip2->flag & ACTSTRIP_HOLDLASTFRAME) && !(strip2->flag & ACTSTRIP_MUTE)) { - do_modif = FALSE; + do_modif = false; } } } @@ -2390,7 +2390,7 @@ void BKE_pose_where_is_bone_tail(bPoseChannel *pchan) /* pchan is validated, as having bone and parent pointer * 'do_extra': when zero skips loc/size/rot, constraints and strip modifiers. */ -void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, int do_extra) +void BKE_pose_where_is_bone(Scene *scene, Object *ob, bPoseChannel *pchan, float ctime, bool do_extra) { /* This gives a chan_mat with actions (ipos) results. */ if (do_extra) diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index ed48bf5f3a4..9b1f2e87f9e 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -554,7 +554,7 @@ int blender_test_break(void) blender_test_break_cb(); } - return (G.is_break == TRUE); + return (G.is_break == true); } @@ -598,7 +598,7 @@ static int read_undosave(bContext *C, UndoElem *uel) if (success) { /* important not to update time here, else non keyed tranforms are lost */ - DAG_on_visible_update(G.main, FALSE); + DAG_on_visible_update(G.main, false); } return success; diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 17fdb15399f..c34b237f53e 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -212,7 +212,7 @@ void BKE_brush_make_local(Brush *brush) Main *bmain = G.main; Scene *scene; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; if (brush->id.lib == NULL) return; @@ -225,12 +225,12 @@ void BKE_brush_make_local(Brush *brush) for (scene = bmain->scene.first; scene && ELEM(0, is_lib, is_local); scene = scene->id.next) { if (BKE_paint_brush(&scene->toolsettings->imapaint.paint) == brush) { - if (scene->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (scene->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &brush->id); extern_local_brush(brush); @@ -450,7 +450,7 @@ void BKE_brush_curve_preset(Brush *b, int preset) b->curve->preset = preset; curvemap_reset(cm, &b->curve->clipr, b->curve->preset, CURVEMAP_SLOPE_NEGATIVE); - curvemapping_changed(b->curve, FALSE); + curvemapping_changed(b->curve, false); } int BKE_brush_texture_set_nr(Brush *brush, int nr) diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c index 1e47dc3ab53..b20ba40c0dd 100644 --- a/source/blender/blenkernel/intern/camera.c +++ b/source/blender/blenkernel/intern/camera.c @@ -84,7 +84,7 @@ void BKE_camera_make_local(Camera *cam) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -99,12 +99,12 @@ void BKE_camera_make_local(Camera *cam) for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) { if (ob->data == cam) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &cam->id); } else if (is_local && is_lib) { @@ -214,7 +214,7 @@ void BKE_camera_params_from_object(CameraParams *params, Object *ob) Camera *cam = ob->data; if (cam->type == CAM_ORTHO) - params->is_ortho = TRUE; + params->is_ortho = true; params->lens = cam->lens; params->ortho_scale = cam->ortho_scale; @@ -273,7 +273,7 @@ void BKE_camera_params_from_view3d(CameraParams *params, View3D *v3d, RegionView params->clipend *= 0.5f; // otherwise too extreme low zbuffer quality params->clipsta = -params->clipend; - params->is_ortho = TRUE; + params->is_ortho = true; /* make sure any changes to this match ED_view3d_radius_to_ortho_dist() */ params->ortho_scale = rv3d->dist * sensor_size / v3d->lens; params->zoom = 2.0f; @@ -454,7 +454,7 @@ void BKE_camera_view_frame(Scene *scene, Camera *camera, float r_vec[4][3]) float dummy_drawsize; const float dummy_scale[3] = {1.0f, 1.0f, 1.0f}; - BKE_camera_view_frame_ex(scene, camera, FALSE, 1.0, dummy_scale, + BKE_camera_view_frame_ex(scene, camera, false, 1.0, dummy_scale, dummy_asp, dummy_shift, &dummy_drawsize, r_vec); } diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index a7940eb8f9c..64b3cf5f1d3 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -82,7 +82,7 @@ typedef struct { /* Cached */ struct PBVH *pbvh; - int pbvh_draw; + bool pbvh_draw; /* Mesh connectivity */ MeshElemMap *pmap; @@ -223,7 +223,7 @@ static const MeshElemMap *cdDM_getPolyMap(Object *ob, DerivedMesh *dm) return cddm->pmap; } -static int can_pbvh_draw(Object *ob, DerivedMesh *dm) +static bool can_pbvh_draw(Object *ob, DerivedMesh *dm) { CDDerivedMesh *cddm = (CDDerivedMesh *) dm; Mesh *me = ob->data; @@ -265,7 +265,7 @@ static PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm) /* Sculpting on a BMesh (dynamic-topology) gets a special PBVH */ if (!cddm->pbvh && ob->sculpt->bm) { cddm->pbvh = BKE_pbvh_new(); - cddm->pbvh_draw = TRUE; + cddm->pbvh_draw = true; BKE_pbvh_build_bmesh(cddm->pbvh, ob->sculpt->bm, ob->sculpt->bm_smooth_shading, @@ -429,7 +429,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) { - BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, TRUE); + BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, true); return; } @@ -450,7 +450,7 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges else { /* use OpenGL VBOs or Vertex Arrays instead for better, faster rendering */ int prevstart = 0; int prevdraw = 1; - int draw = TRUE; + bool draw = true; GPU_edge_setup(dm); if (!GPU_buffer_legacy(dm)) { @@ -458,10 +458,10 @@ static void cdDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges if ((drawAllEdges || (medge->flag & ME_EDGEDRAW)) && (drawLooseEdges || !(medge->flag & ME_LOOSEEDGE))) { - draw = TRUE; + draw = true; } else { - draw = FALSE; + draw = false; } if (prevdraw != draw) { if (prevdraw > 0 && (i - prevstart) > 0) { @@ -550,7 +550,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm, float (*face_nors)[3] = CustomData_get_layer(&dm->faceData, CD_NORMAL); BKE_pbvh_draw(cddm->pbvh, partial_redraw_planes, face_nors, - setMaterial, FALSE); + setMaterial, false); glShadeModel(GL_FLAT); } @@ -657,7 +657,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm, if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) { if (dm->numTessFaceData) { GPU_set_tpage(NULL, false, false); - BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, FALSE); + BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false); } return; @@ -1136,7 +1136,8 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, MFace *mface = cddm->mface; /* MTFace *tf = dm->getTessFaceDataArray(dm, CD_MTFACE); */ /* UNUSED */ float (*nors)[3] = dm->getTessFaceDataArray(dm, CD_NORMAL); - int a, b, do_draw, matnr, new_matnr; + int a, b, matnr, new_matnr; + bool do_draw; int orig; /* double lookup */ @@ -1153,7 +1154,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) { if (dm->numTessFaceData) { setMaterial(1, &gattribs); - BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, FALSE); + BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false); } return; @@ -1162,7 +1163,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, cdDM_update_normals_from_pbvh(dm); matnr = -1; - do_draw = FALSE; + do_draw = false; glShadeModel(GL_SMOOTH); @@ -1479,7 +1480,7 @@ static void cdDM_drawMappedFacesMat(DerivedMesh *dm, if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) { if (dm->numTessFaceData) { setMaterial(userData, 1, &gattribs); - BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, FALSE); + BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false); } return; @@ -2506,11 +2507,11 @@ DerivedMesh *CDDM_merge_verts(DerivedMesh *dm, const int *vtargetmap, const int /* skip faces with all vertices merged */ { - int all_vertices_merged = TRUE; + bool all_vertices_merged = true; for (j = 0; j < mp->totloop; j++, ml++) { if (vtargetmap[ml->v] == -1) { - all_vertices_merged = FALSE; + all_vertices_merged = false; break; } } @@ -2667,7 +2668,7 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm) index = CustomData_get_layer(&edgeData, CD_ORIGINDEX); for (ehi = BLI_edgehashIterator_new(eh), i = 0; - BLI_edgehashIterator_isDone(ehi) == FALSE; + BLI_edgehashIterator_isDone(ehi) == false; BLI_edgehashIterator_step(ehi), i++, med++, index++) { BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2); @@ -2739,7 +2740,7 @@ void CDDM_calc_edges(DerivedMesh *dm) index = CustomData_get_layer(&edgeData, CD_ORIGINDEX); for (ehi = BLI_edgehashIterator_new(eh), i = 0; - BLI_edgehashIterator_isDone(ehi) == FALSE; + BLI_edgehashIterator_isDone(ehi) == false; BLI_edgehashIterator_step(ehi), ++i, ++med, ++index) { BLI_edgehashIterator_getKey(ehi, &med->v1, &med->v2); diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index e2cb0118e50..75d24fa3a49 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -183,14 +183,14 @@ void curvemapping_set_black_white(CurveMapping *cumap, const float black[3], con /* ********** NOTE: requires curvemapping_changed() call after ******** */ /* remove specified point */ -int curvemap_remove_point(CurveMap *cuma, CurveMapPoint *point) +bool curvemap_remove_point(CurveMap *cuma, CurveMapPoint *point) { CurveMapPoint *cmp; int a, b, removed = 0; /* must have 2 points minimum */ if (cuma->totpoint <= 2) - return FALSE; + return false; cmp = MEM_mallocN((cuma->totpoint) * sizeof(CurveMapPoint), "curve points"); @@ -759,7 +759,7 @@ void curvemapping_changed_all(CurveMapping *cumap) for (a = 0; a < CM_TOT; a++) { if (cumap->cm[a].curve) { cumap->cur = a; - curvemapping_changed(cumap, FALSE); + curvemapping_changed(cumap, false); } } diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 243b99a31e4..7ec00352853 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -717,7 +717,7 @@ static void childof_id_looper(bConstraint *con, ConstraintIDFunc func, void *use bChildOfConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int childof_get_tars(bConstraint *con, ListBase *list) @@ -852,7 +852,7 @@ static void trackto_id_looper(bConstraint *con, ConstraintIDFunc func, void *use bTrackToConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int trackto_get_tars(bConstraint *con, ListBase *list) @@ -1030,10 +1030,10 @@ static void kinematic_id_looper(bConstraint *con, ConstraintIDFunc func, void *u bKinematicConstraint *data = con->data; /* chain target */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); /* poletarget */ - func(con, (ID **)&data->poletar, FALSE, userdata); + func(con, (ID **)&data->poletar, false, userdata); } static int kinematic_get_tars(bConstraint *con, ListBase *list) @@ -1122,7 +1122,7 @@ static void followpath_id_looper(bConstraint *con, ConstraintIDFunc func, void * bFollowPathConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int followpath_get_tars(bConstraint *con, ListBase *list) @@ -1169,7 +1169,7 @@ static void followpath_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra #ifdef CYCLIC_DEPENDENCY_WORKAROUND if (ct->tar->curve_cache == NULL) { - BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE); + BKE_displist_make_curveTypes(cob->scene, ct->tar, false); } #endif @@ -1470,7 +1470,7 @@ static void loclike_id_looper(bConstraint *con, ConstraintIDFunc func, void *use bLocateLikeConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int loclike_get_tars(bConstraint *con, ListBase *list) @@ -1560,7 +1560,7 @@ static void rotlike_id_looper(bConstraint *con, ConstraintIDFunc func, void *use bRotateLikeConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int rotlike_get_tars(bConstraint *con, ListBase *list) @@ -1672,7 +1672,7 @@ static void sizelike_id_looper(bConstraint *con, ConstraintIDFunc func, void *us bSizeLikeConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int sizelike_get_tars(bConstraint *con, ListBase *list) @@ -1761,7 +1761,7 @@ static void translike_id_looper(bConstraint *con, ConstraintIDFunc func, void *u bTransLikeConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int translike_get_tars(bConstraint *con, ListBase *list) @@ -1924,10 +1924,10 @@ static void pycon_id_looper(bConstraint *con, ConstraintIDFunc func, void *userd /* targets */ for (ct = data->targets.first; ct; ct = ct->next) - func(con, (ID **)&ct->tar, FALSE, userdata); + func(con, (ID **)&ct->tar, false, userdata); /* script */ - func(con, (ID **)&data->text, TRUE, userdata); + func(con, (ID **)&data->text, true, userdata); } /* Whether this approach is maintained remains to be seen (aligorith) */ @@ -1942,7 +1942,7 @@ static void pycon_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstraintTa /* special exception for curves - depsgraph issues */ if (ct->tar->type == OB_CURVE) { if (ct->tar->curve_cache == NULL) { - BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE); + BKE_displist_make_curveTypes(cob->scene, ct->tar, false); } } #endif @@ -2017,10 +2017,10 @@ static void actcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *user bActionConstraint *data = con->data; /* target */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); /* action */ - func(con, (ID **)&data->act, TRUE, userdata); + func(con, (ID **)&data->act, true, userdata); } static int actcon_get_tars(bConstraint *con, ListBase *list) @@ -2184,7 +2184,7 @@ static void locktrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *u bLockTrackConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int locktrack_get_tars(bConstraint *con, ListBase *list) @@ -2491,7 +2491,7 @@ static void distlimit_id_looper(bConstraint *con, ConstraintIDFunc func, void *u bDistLimitConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int distlimit_get_tars(bConstraint *con, ListBase *list) @@ -2618,7 +2618,7 @@ static void stretchto_id_looper(bConstraint *con, ConstraintIDFunc func, void *u bStretchToConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int stretchto_get_tars(bConstraint *con, ListBase *list) @@ -2790,7 +2790,7 @@ static void minmax_id_looper(bConstraint *con, ConstraintIDFunc func, void *user bMinMaxConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int minmax_get_tars(bConstraint *con, ListBase *list) @@ -2932,8 +2932,8 @@ static void rbj_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdat bRigidBodyJointConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); - func(con, (ID **)&data->child, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); + func(con, (ID **)&data->child, false, userdata); } static int rbj_get_tars(bConstraint *con, ListBase *list) @@ -2984,7 +2984,7 @@ static void clampto_id_looper(bConstraint *con, ConstraintIDFunc func, void *use bClampToConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int clampto_get_tars(bConstraint *con, ListBase *list) @@ -3018,7 +3018,7 @@ static void clampto_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bCo #ifdef CYCLIC_DEPENDENCY_WORKAROUND if (VALID_CONS_TARGET(ct)) { if (ct->tar->curve_cache == NULL) { - BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE); + BKE_displist_make_curveTypes(cob->scene, ct->tar, false); } } #endif @@ -3046,7 +3046,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar INIT_MINMAX(curveMin, curveMax); /* XXX - don't think this is good calling this here - campbell */ - BKE_object_minmax(ct->tar, curveMin, curveMax, TRUE); + BKE_object_minmax(ct->tar, curveMin, curveMax, true); /* get targetmatrix */ if (data->tar->curve_cache && data->tar->curve_cache->path && data->tar->curve_cache->path->data) { @@ -3164,7 +3164,7 @@ static void transform_id_looper(bConstraint *con, ConstraintIDFunc func, void *u bTransformConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int transform_get_tars(bConstraint *con, ListBase *list) @@ -3311,7 +3311,7 @@ static void shrinkwrap_id_looper(bConstraint *con, ConstraintIDFunc func, void * bShrinkwrapConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->target, FALSE, userdata); + func(con, (ID **)&data->target, false, userdata); } static void shrinkwrap_new_data(void *cdata) @@ -3383,7 +3383,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra bvhtree_from_mesh_faces(&treeData, target, 0.0, 2, 6); if (treeData.tree == NULL) { - fail = TRUE; + fail = true; break; } @@ -3425,13 +3425,13 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra mul_mat3_m4_v3(mat, no); if (normalize_v3(no) < FLT_EPSILON) { - fail = TRUE; + fail = true; break; } bvhtree_from_mesh_faces(&treeData, target, scon->dist, 4, 6); if (treeData.tree == NULL) { - fail = TRUE; + fail = true; break; } @@ -3439,7 +3439,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra if (BKE_shrinkwrap_project_normal(0, co, no, &transform, treeData.tree, &hit, treeData.raycast_callback, &treeData) == false) { - fail = TRUE; + fail = true; break; } copy_v3_v3(co, hit.co); @@ -3451,7 +3451,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra target->release(target); - if (fail == TRUE) { + if (fail == true) { /* Don't move the point */ zero_v3(co); } @@ -3502,7 +3502,7 @@ static void damptrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *u bDampTrackConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int damptrack_get_tars(bConstraint *con, ListBase *list) @@ -3647,7 +3647,7 @@ static void splineik_id_looper(bConstraint *con, ConstraintIDFunc func, void *us bSplineIKConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int splineik_get_tars(bConstraint *con, ListBase *list) @@ -3681,7 +3681,7 @@ static void splineik_get_tarmat(bConstraint *UNUSED(con), bConstraintOb *cob, bC #ifdef CYCLIC_DEPENDENCY_WORKAROUND if (VALID_CONS_TARGET(ct)) { if (ct->tar->curve_cache == NULL) { - BKE_displist_make_curveTypes(cob->scene, ct->tar, FALSE); + BKE_displist_make_curveTypes(cob->scene, ct->tar, false); } } #endif @@ -3715,7 +3715,7 @@ static void pivotcon_id_looper(bConstraint *con, ConstraintIDFunc func, void *us bPivotConstraint *data = con->data; /* target only */ - func(con, (ID **)&data->tar, FALSE, userdata); + func(con, (ID **)&data->tar, false, userdata); } static int pivotcon_get_tars(bConstraint *con, ListBase *list) @@ -3846,9 +3846,9 @@ static void followtrack_id_looper(bConstraint *con, ConstraintIDFunc func, void { bFollowTrackConstraint *data = con->data; - func(con, (ID **)&data->clip, TRUE, userdata); - func(con, (ID **)&data->camera, FALSE, userdata); - func(con, (ID **)&data->depth_ob, FALSE, userdata); + func(con, (ID **)&data->clip, true, userdata); + func(con, (ID **)&data->camera, false, userdata); + func(con, (ID **)&data->depth_ob, false, userdata); } static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) @@ -4082,7 +4082,7 @@ static void camerasolver_id_looper(bConstraint *con, ConstraintIDFunc func, void { bCameraSolverConstraint *data = con->data; - func(con, (ID **)&data->clip, TRUE, userdata); + func(con, (ID **)&data->clip, true, userdata); } static void camerasolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) @@ -4138,8 +4138,8 @@ static void objectsolver_id_looper(bConstraint *con, ConstraintIDFunc func, void { bObjectSolverConstraint *data = con->data; - func(con, (ID **)&data->clip, FALSE, userdata); - func(con, (ID **)&data->camera, FALSE, userdata); + func(con, (ID **)&data->clip, false, userdata); + func(con, (ID **)&data->camera, false, userdata); } static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) @@ -4521,7 +4521,7 @@ static void con_fix_copied_refs_cb(bConstraint *UNUSED(con), ID **idpoin, short } /* duplicate all of the constraints in a constraint stack */ -void BKE_copy_constraints(ListBase *dst, const ListBase *src, int do_extern) +void BKE_copy_constraints(ListBase *dst, const ListBase *src, bool do_extern) { bConstraint *con, *srccon; diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index a63807f4bcb..eeb1f4b9e4f 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -258,7 +258,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res bScreen *sc; ScrArea *sa; ARegion *ar; - int done = FALSE, recursion = C->data.recursion; + int done = 0, recursion = C->data.recursion; int ret = 0; memset(result, 0, sizeof(bContextDataResult)); @@ -291,7 +291,7 @@ static int ctx_data_get(bContext *C, const char *member, bContextDataResult *res entry = BLI_rfindstring(&C->wm.store->entries, member, offsetof(bContextStoreEntry, name)); if (entry) { result->ptr = entry->ptr; - done = TRUE; + done = 1; } } if (done != 1 && recursion < 2 && (ar = CTX_wm_region(C))) { @@ -435,11 +435,11 @@ int CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListB return ret; } -static void data_dir_add(ListBase *lb, const char *member, const short use_all) +static void data_dir_add(ListBase *lb, const char *member, const bool use_all) { LinkData *link; - if ((use_all == FALSE) && strcmp(member, "scene") == 0) /* exception */ + if ((use_all == false) && strcmp(member, "scene") == 0) /* exception */ return; if (BLI_findstring(lb, member, offsetof(LinkData, data))) @@ -456,7 +456,7 @@ static void data_dir_add(ListBase *lb, const char *member, const short use_all) * \param use_rna Use Include the properties from 'RNA_Context' * \param use_all Don't skip values (currently only "scene") */ -ListBase CTX_data_dir_get_ex(const bContext *C, const short use_store, const short use_rna, const short use_all) +ListBase CTX_data_dir_get_ex(const bContext *C, const bool use_store, const bool use_rna, const bool use_all) { bContextDataResult result; ListBase lb; @@ -526,7 +526,7 @@ ListBase CTX_data_dir_get_ex(const bContext *C, const short use_store, const sho ListBase CTX_data_dir_get(const bContext *C) { - return CTX_data_dir_get_ex(C, TRUE, FALSE, FALSE); + return CTX_data_dir_get_ex(C, true, false, false); } bool CTX_data_equals(const char *member, const char *str) diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 109909e8e0b..ae45ca55c5d 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -256,7 +256,7 @@ void BKE_curve_make_local(Curve *cu) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - when there are only lib users: don't do * - when there are only local users: set flag @@ -274,12 +274,12 @@ void BKE_curve_make_local(Curve *cu) for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) { if (ob->data == cu) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &cu->id); extern_local_curve(cu); } @@ -437,7 +437,7 @@ void BKE_curve_texspace_get(Curve *cu, float r_loc[3], float r_rot[3], float r_s if (r_size) copy_v3_v3(r_size, cu->size); } -int BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3]) +bool BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3]) { Nurb *nu; int tot = 0; @@ -448,20 +448,20 @@ int BKE_nurbList_index_get_co(ListBase *nurb, const int index, float r_co[3]) tot_nu = nu->pntsu; if (index - tot < tot_nu) { copy_v3_v3(r_co, nu->bezt[index - tot].vec[1]); - return TRUE; + return true; } } else { tot_nu = nu->pntsu * nu->pntsv; if (index - tot < tot_nu) { copy_v3_v3(r_co, nu->bp[index - tot].vec); - return TRUE; + return true; } } tot += tot_nu; } - return FALSE; + return false; } int BKE_nurbList_verts_count(ListBase *nurb) @@ -1494,12 +1494,12 @@ float *BKE_curve_surf_make_orco(Object *ob) for (b = 0; b < sizeu; b++) { int use_b = b; if (b == sizeu - 1 && (nu->flagu & CU_NURB_CYCLIC)) - use_b = FALSE; + use_b = false; for (a = 0; a < sizev; a++) { int use_a = a; if (a == sizev - 1 && (nu->flagv & CU_NURB_CYCLIC)) - use_a = FALSE; + use_a = false; tdata = _tdata + 3 * (use_b * (nu->pntsv * resolv) + use_a); @@ -2530,7 +2530,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) float min, inp; struct BevelSort *sortdata, *sd, *sd1; int a, b, nr, poly, resolu = 0, len = 0; - int do_tilt, do_radius, do_weight; + bool do_tilt, do_radius, do_weight; bool is_editmode = false; ListBase *bev; @@ -2558,7 +2558,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) /* check if we will calculate tilt data */ do_tilt = CU_DO_TILT(cu, nu); do_radius = CU_DO_RADIUS(cu, nu); /* normal display uses the radius, better just to calculate them */ - do_weight = TRUE; + do_weight = true; /* check we are a single point? also check we are not a surface and that the orderu is sane, * enforced in the UI but can go wrong possibly */ @@ -2591,7 +2591,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) bevp->alfa = bp->alfa; bevp->radius = bp->radius; bevp->weight = bp->weight; - bevp->split_tag = TRUE; + bevp->split_tag = true; bevp++; bp++; } @@ -2631,8 +2631,8 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) bevp->alfa = prevbezt->alfa; bevp->radius = prevbezt->radius; bevp->weight = prevbezt->weight; - bevp->split_tag = TRUE; - bevp->dupe_tag = FALSE; + bevp->split_tag = true; + bevp->dupe_tag = false; bevp++; bl->nr++; bl->dupe_nr = 1; @@ -2665,13 +2665,13 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) /* indicate with handlecodes double points */ if (prevbezt->h1 == prevbezt->h2) { if (prevbezt->h1 == 0 || prevbezt->h1 == HD_VECT) - bevp->split_tag = TRUE; + bevp->split_tag = true; } else { if (prevbezt->h1 == 0 || prevbezt->h1 == HD_VECT) - bevp->split_tag = TRUE; + bevp->split_tag = true; else if (prevbezt->h2 == 0 || prevbezt->h2 == HD_VECT) - bevp->split_tag = TRUE; + bevp->split_tag = true; } bl->nr += resolu; bevp += resolu; @@ -2737,7 +2737,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) if (fabsf(bevp0->vec[0] - bevp1->vec[0]) < 0.00001f) { if (fabsf(bevp0->vec[1] - bevp1->vec[1]) < 0.00001f) { if (fabsf(bevp0->vec[2] - bevp1->vec[2]) < 0.00001f) { - bevp0->dupe_tag = TRUE; + bevp0->dupe_tag = true; bl->dupe_nr++; } } @@ -3175,7 +3175,7 @@ void BKE_nurb_handle_calc(BezTriple *bezt, BezTriple *prev, BezTriple *next, con void BKE_nurb_handles_calc(Nurb *nu) /* first, if needed, set handle flags */ { - calchandlesNurb_intern(nu, FALSE); + calchandlesNurb_intern(nu, false); } /* similar to BKE_nurb_handle_calc but for curves and @@ -3693,7 +3693,7 @@ void BK_curve_nurbs_vertexCos_apply(ListBase *lb, float (*vertexCos)[3]) } } - calchandlesNurb_intern(nu, TRUE); + calchandlesNurb_intern(nu, true); } } diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 82b6dded29c..d072088ac8e 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -359,7 +359,7 @@ void defvert_normalize_lock_map( for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) { if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) { - if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) { + if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == false)) { tot_weight += dw->weight; } else { @@ -377,7 +377,7 @@ void defvert_normalize_lock_map( float scalar = (1.0f / tot_weight) * lock_iweight; for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) { if ((dw->def_nr < vgroup_tot) && vgroup_subset[dw->def_nr]) { - if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == FALSE)) { + if ((dw->def_nr < defbase_tot) && (lock_flags[dw->def_nr] == false)) { dw->weight *= scalar; /* in case of division errors with very low weights */ diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index af321302984..45f80959533 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2535,7 +2535,8 @@ void DAG_ids_flush_tagged(Main *bmain) ListBase listbase; DagSceneLayer *dsl; ListBase *lbarray[MAX_LIBARRAY]; - int a, do_flush = FALSE; + int a; + bool do_flush = false; /* get list of visible scenes and layers */ dag_current_scene_layers(bmain, &listbase); @@ -2559,7 +2560,7 @@ void DAG_ids_flush_tagged(Main *bmain) for (dsl = listbase.first; dsl; dsl = dsl->next) dag_id_flush_update(bmain, dsl->scene, id); - do_flush = TRUE; + do_flush = true; } } } @@ -2574,10 +2575,11 @@ void DAG_ids_flush_tagged(Main *bmain) BLI_freelistN(&listbase); } -void DAG_ids_check_recalc(Main *bmain, Scene *scene, int time) +void DAG_ids_check_recalc(Main *bmain, Scene *scene, bool time) { ListBase *lbarray[MAX_LIBARRAY]; - int a, updated = 0; + int a; + bool updated = false; /* loop over all ID types */ a = set_listbasepointers(bmain, lbarray); @@ -2595,7 +2597,7 @@ void DAG_ids_check_recalc(Main *bmain, Scene *scene, int time) #endif bmain->id_tag_update[id->name[0]]) { - updated = 1; + updated = true; break; } } diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index eeedd07d401..cdff6e249a7 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1538,7 +1538,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba if (!for_orco) curve_calc_modifiers_pre(scene, ob, &nubase, for_render, use_render_resolution); - BKE_curve_bevelList_make(ob, &nubase, for_render != FALSE); + BKE_curve_bevelList_make(ob, &nubase, for_render != false); /* If curve has no bevel will return nothing */ BKE_curve_bevel_make(scene, ob, &dlbev, for_render, use_render_resolution); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 24ccc663878..a778a074722 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -297,12 +297,12 @@ DynamicPaintSurface *get_activeSurface(DynamicPaintCanvasSettings *canvas) void dynamicPaint_resetPreview(DynamicPaintCanvasSettings *canvas) { DynamicPaintSurface *surface = canvas->surfaces.first; - int done = FALSE; + bool done = false; for (; surface; surface = surface->next) { if (!done && dynamicPaint_surfaceHasColorPreview(surface)) { surface->flags |= MOD_DPAINT_PREVIEW; - done = TRUE; + done = true; } else surface->flags &= ~MOD_DPAINT_PREVIEW; diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 752ae293a35..b7c5c605254 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -932,9 +932,10 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm, DMVertexAttribs attribs; GPUVertexAttribs gattribs; - int i, matnr, new_matnr, do_draw, fi; + int i, matnr, new_matnr, fi; + bool do_draw; - do_draw = FALSE; + do_draw = false; matnr = -1; memset(&attribs, 0, sizeof(attribs)); diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 038b9cbafca..1810e41a39c 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -447,7 +447,7 @@ int binarysearch_bezt_index(BezTriple array[], float frame, int arraylen, bool * static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple **last, const bool do_sel_only) { - short found = FALSE; + bool found = false; /* init outputs */ *first = NULL; @@ -467,7 +467,7 @@ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple for (i = 0; i < fcu->totvert; bezt++, i++) { if (BEZSELECTED(bezt)) { *first = bezt; - found = TRUE; + found = true; break; } } @@ -477,7 +477,7 @@ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple for (i = 0; i < fcu->totvert; bezt--, i++) { if (BEZSELECTED(bezt)) { *last = bezt; - found = TRUE; + found = true; break; } } @@ -486,7 +486,7 @@ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple /* just full array */ *first = fcu->bezt; *last = ARRAY_LAST_ITEM(fcu->bezt, BezTriple, sizeof(BezTriple), fcu->totvert); - found = TRUE; + found = true; } return found; @@ -529,7 +529,7 @@ bool calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, floa BezTriple *bezt; for (bezt = fcu->bezt, i = 0; i < fcu->totvert; bezt++, i++) { - if ((do_sel_only == FALSE) || BEZSELECTED(bezt)) { + if ((do_sel_only == false) || BEZSELECTED(bezt)) { if (include_handles) { yminv = min_ffff(yminv, bezt->vec[1][1], bezt->vec[0][1], bezt->vec[2][1]); ymaxv = max_ffff(ymaxv, bezt->vec[1][1], bezt->vec[0][1], bezt->vec[2][1]); @@ -539,7 +539,7 @@ bool calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, floa ymaxv = max_ff(ymaxv, bezt->vec[1][1]); } - foundvert = TRUE; + foundvert = true; } } } @@ -561,7 +561,7 @@ bool calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, floa if (fpt->vec[1] > ymaxv) ymaxv = fpt->vec[1]; - foundvert = TRUE; + foundvert = true; } } } @@ -593,7 +593,7 @@ bool calc_fcurve_range(FCurve *fcu, float *start, float *end, const bool do_sel_only, const bool do_min_length) { float min = 999999999.0f, max = -999999999.0f; - short foundvert = FALSE; + bool foundvert = false; if (fcu->totvert) { if (fcu->bezt) { @@ -608,19 +608,19 @@ bool calc_fcurve_range(FCurve *fcu, float *start, float *end, min = min_ff(min, bezt_first->vec[1][0]); max = max_ff(max, bezt_last->vec[1][0]); - foundvert = TRUE; + foundvert = true; } } else if (fcu->fpt) { min = min_ff(min, fcu->fpt[0].vec[0]); max = max_ff(max, fcu->fpt[fcu->totvert - 1].vec[0]); - foundvert = TRUE; + foundvert = true; } } - if (foundvert == FALSE) { + if (foundvert == false) { min = max = 0.0f; } @@ -1309,7 +1309,8 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar) bPoseChannel *pchan; float mat[4][4]; float oldEul[3] = {0.0f, 0.0f, 0.0f}; - short use_eulers = FALSE, rot_order = ROT_MODE_EUL; + bool use_eulers = false; + short rot_order = ROT_MODE_EUL; /* check if this target has valid data */ if ((ob == NULL) || (GS(ob->id.name) != ID_OB)) { @@ -1337,7 +1338,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar) if (pchan->rotmode > 0) { copy_v3_v3(oldEul, pchan->eul); rot_order = pchan->rotmode; - use_eulers = TRUE; + use_eulers = true; } if (dtar->flag & DTAR_FLAG_LOCALSPACE) { @@ -1364,7 +1365,7 @@ static float dvar_eval_transChan(ChannelDriver *driver, DriverVar *dvar) if (ob->rotmode > 0) { copy_v3_v3(oldEul, ob->rot); rot_order = ob->rotmode; - use_eulers = TRUE; + use_eulers = true; } if (dtar->flag & DTAR_FLAG_LOCALSPACE) { diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index c60c1ea2b5f..6bef88b7f43 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -217,14 +217,14 @@ VFont *BKE_vfont_load(Main *bmain, const char *name) BLI_strncpy(filename, name, sizeof(filename)); pf = get_builtin_packedfile(); - is_builtin = TRUE; + is_builtin = true; } else { BLI_split_file_part(name, filename, sizeof(filename)); pf = newPackedFile(NULL, name, bmain->name); temp_pf = newPackedFile(NULL, name, bmain->name); - is_builtin = FALSE; + is_builtin = false; } if (pf) { diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 2a61b2e7453..e84db7e1f82 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -154,17 +154,17 @@ Group *BKE_group_copy(Group *group) } /* external */ -static int group_object_add_internal(Group *group, Object *ob) +static bool group_object_add_internal(Group *group, Object *ob) { GroupObject *go; if (group == NULL || ob == NULL) { - return FALSE; + return false; } /* check if the object has been added already */ if (BLI_findptr(&group->gobject, ob, offsetof(GroupObject, ob))) { - return FALSE; + return false; } go = MEM_callocN(sizeof(GroupObject), "groupobject"); @@ -172,7 +172,7 @@ static int group_object_add_internal(Group *group, Object *ob) go->ob = ob; - return TRUE; + return true; } bool BKE_group_object_add(Group *group, Object *object, Scene *scene, Base *base) @@ -296,7 +296,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode) { static ListBase nlastrips = {NULL, NULL}; static bAction *action = NULL; - static int done = FALSE; + static bool done = false; bActionStrip *strip, *nstrip; if (mode == 's') { @@ -310,7 +310,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode) action = target->action; target->action = NULL; target->nlaflag |= OB_NLA_OVERRIDE; - done = TRUE; + done = true; } nstrip = MEM_dupallocN(strip); BLI_addtail(&target->nlastrips, nstrip); @@ -325,7 +325,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode) BLI_listbase_clear(&nlastrips); /* not needed, but yah... :) */ action = NULL; - done = FALSE; + done = false; } } } diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 603ddf7ac2e..23d55ad90df 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -806,7 +806,7 @@ IDProperty *IDP_GetProperties(ID *id, const bool create_if_needed) } /** - * \param is_strict When FALSE treat missing items as a match */ + * \param is_strict When false treat missing items as a match */ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is_strict) { if (prop1 == NULL && prop2 == NULL) @@ -871,7 +871,7 @@ bool IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const bool is bool IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2) { - return IDP_EqualsProperties_ex(prop1, prop2, TRUE); + return IDP_EqualsProperties_ex(prop1, prop2, true); } /** diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index b74424a1d28..76643678a0b 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -382,7 +382,7 @@ void BKE_image_make_local(struct Image *ima) Tex *tex; Brush *brush; Mesh *me; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -403,14 +403,14 @@ void BKE_image_make_local(struct Image *ima) for (tex = bmain->tex.first; tex; tex = tex->id.next) { if (tex->ima == ima) { - if (tex->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (tex->id.lib) is_lib = true; + else is_local = true; } } for (brush = bmain->brush.first; brush; brush = brush->id.next) { if (brush->clone.image == ima) { - if (brush->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (brush->id.lib) is_lib = true; + else is_local = true; } } for (me = bmain->mesh.first; me; me = me->id.next) { @@ -424,8 +424,8 @@ void BKE_image_make_local(struct Image *ima) for (a = 0; a < me->totface; a++, tface++) { if (tface->tpage == ima) { - if (me->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (me->id.lib) is_lib = true; + else is_local = true; } } } @@ -442,8 +442,8 @@ void BKE_image_make_local(struct Image *ima) for (a = 0; a < me->totpoly; a++, mtpoly++) { if (mtpoly->tpage == ima) { - if (me->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (me->id.lib) is_lib = true; + else is_local = true; } } } @@ -452,7 +452,7 @@ void BKE_image_make_local(struct Image *ima) } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &ima->id); extern_local_image(ima); } @@ -739,7 +739,7 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char /* both byte and float buffers are filling in sRGB space, need to linearize float buffer after BKE_image_buf_fill* functions */ IMB_buffer_float_from_float(rect_float, rect_float, ibuf->channels, IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB, - TRUE, ibuf->x, ibuf->y, ibuf->x, ibuf->x); + true, ibuf->x, ibuf->y, ibuf->x, ibuf->x); } return ibuf; @@ -1156,7 +1156,7 @@ int BKE_imtype_requires_linear_float(const char imtype) case R_IMF_IMTYPE_RADHDR: case R_IMF_IMTYPE_OPENEXR: case R_IMF_IMTYPE_MULTILAYER: - return TRUE; + return true; } return 0; } @@ -1372,7 +1372,7 @@ static bool do_add_image_extension(char *string, const char imtype, const ImageF } else { - return FALSE; + return false; } } @@ -1895,7 +1895,7 @@ bool BKE_imbuf_alpha_test(ImBuf *ibuf) float *buf = ibuf->rect_float; for (tot = ibuf->x * ibuf->y; tot--; buf += 4) { if (buf[3] < 1.0f) { - return TRUE; + return true; } } } @@ -1903,12 +1903,12 @@ bool BKE_imbuf_alpha_test(ImBuf *ibuf) unsigned char *buf = (unsigned char *)ibuf->rect; for (tot = ibuf->x * ibuf->y; tot--; buf += 4) { if (buf[3] != 255) { - return TRUE; + return true; } } } - return FALSE; + return false; } /* note: imf->planes is ignored here, its assumed the image channels @@ -2055,7 +2055,7 @@ int BKE_imbuf_write(ImBuf *ibuf, const char *name, ImageFormatData *imf) /* same as BKE_imbuf_write() but crappy workaround not to perminantly modify * _some_, values in the imbuf */ int BKE_imbuf_write_as(ImBuf *ibuf, const char *name, ImageFormatData *imf, - const short save_copy) + const bool save_copy) { ImBuf ibuf_back = *ibuf; int ok; @@ -2098,12 +2098,14 @@ static void do_makepicstring(char *string, const char *base, const char *relbase do_add_image_extension(string, imtype, im_format); } -void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const ImageFormatData *im_format, const short use_ext, const short use_frames) +void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, + const ImageFormatData *im_format, const bool use_ext, const bool use_frames) { do_makepicstring(string, base, relbase, frame, im_format->imtype, im_format, use_ext, use_frames); } -void BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames) +void BKE_makepicstring_from_type(char *string, const char *base, const char *relbase, int frame, + const char imtype, const bool use_ext, const bool use_frames) { do_makepicstring(string, base, relbase, frame, imtype, NULL, use_ext, use_frames); } @@ -2441,7 +2443,7 @@ void BKE_image_backup_render(Scene *scene, Image *ima) static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr) { const char *colorspace = ima->colorspace_settings.name; - int predivide = ima->alpha_mode == IMA_ALPHA_PREMUL; + bool predivide = (ima->alpha_mode == IMA_ALPHA_PREMUL); ima->rr = RE_MultilayerConvert(ibuf->userdata, colorspace, predivide, ibuf->x, ibuf->y); @@ -3004,16 +3006,16 @@ static ImBuf *image_get_cached_ibuf(Image *ima, ImageUser *iuser, int *r_frame, BLI_INLINE bool image_quick_test(Image *ima, ImageUser *iuser) { if (ima == NULL) - return FALSE; + return false; if (iuser) { if (iuser->ok == 0) - return FALSE; + return false; } else if (ima->ok == 0) - return FALSE; + return false; - return TRUE; + return true; } /* Checks optional ImageUser and verifies/creates ImBuf. @@ -3157,7 +3159,7 @@ bool BKE_image_has_ibuf(Image *ima, ImageUser *iuser) /* quick reject tests */ if (!image_quick_test(ima, iuser)) - return FALSE; + return false; BLI_spin_lock(&image_spin); @@ -3215,15 +3217,15 @@ void BKE_image_pool_free(ImagePool *pool) MEM_freeN(pool); } -BLI_INLINE ImBuf *image_pool_find_entry(ImagePool *pool, Image *image, int frame, int index, int *found) +BLI_INLINE ImBuf *image_pool_find_entry(ImagePool *pool, Image *image, int frame, int index, bool *found) { ImagePoolEntry *entry; - *found = FALSE; + *found = false; for (entry = pool->image_buffers.first; entry; entry = entry->next) { if (entry->image == image && entry->frame == frame && entry->index == index) { - *found = TRUE; + *found = true; return entry->ibuf; } } @@ -3234,7 +3236,8 @@ BLI_INLINE ImBuf *image_pool_find_entry(ImagePool *pool, Image *image, int frame ImBuf *BKE_image_pool_acquire_ibuf(Image *ima, ImageUser *iuser, ImagePool *pool) { ImBuf *ibuf; - int index, frame, found; + int index, frame; + bool found; if (!image_quick_test(ima, iuser)) return NULL; @@ -3291,7 +3294,7 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, bool const int len = (iuser->fie_ima * iuser->frames) / 2; if (r_is_in_range) { - *r_is_in_range = FALSE; + *r_is_in_range = false; } if (len == 0) { @@ -3308,7 +3311,7 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, bool if (cfra == 0) cfra = len; if (r_is_in_range) { - *r_is_in_range = TRUE; + *r_is_in_range = true; } } @@ -3320,7 +3323,7 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, bool } else { if (r_is_in_range) { - *r_is_in_range = TRUE; + *r_is_in_range = true; } } @@ -3470,7 +3473,7 @@ unsigned char *BKE_image_get_pixels_for_frame(struct Image *image, int frame) unsigned char *pixels = NULL; iuser.framenr = frame; - iuser.ok = TRUE; + iuser.ok = true; ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock); @@ -3497,7 +3500,7 @@ float *BKE_image_get_float_pixels_for_frame(struct Image *image, int frame) float *pixels = NULL; iuser.framenr = frame; - iuser.ok = TRUE; + iuser.ok = true; ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock); diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 9dbaaa939ca..11c00576b61 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -546,10 +546,10 @@ static char *key_block_get_data(Key *key, KeyBlock *actkb, KeyBlock *kb, char ** /* currently only the first value of 'ofs' may be set. */ -static short key_pointer_size(const Key *key, const int mode, int *poinsize, int *ofs) +static bool key_pointer_size(const Key *key, const int mode, int *poinsize, int *ofs) { if (key->from == NULL) { - return FALSE; + return false; } switch (GS(key->from->name)) { @@ -574,10 +574,10 @@ static short key_pointer_size(const Key *key, const int mode, int *poinsize, int break; default: BLI_assert(!"invalid 'key->from' ID type"); - return FALSE; + return false; } - return TRUE; + return true; } static void cp_key(const int start, int end, const int tot, char *poin, Key *key, KeyBlock *actkb, KeyBlock *kb, float *weights, const int mode) diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c index 3cade886a04..749e915e5ca 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -161,7 +161,7 @@ void BKE_lamp_make_local(Lamp *la) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -177,13 +177,13 @@ void BKE_lamp_make_local(Lamp *la) ob = bmain->object.first; while (ob) { if (ob->data == la) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } ob = ob->id.next; } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &la->id); } else if (is_local && is_lib) { diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index f647926fc0f..55abd4b3f6c 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -314,7 +314,7 @@ void BKE_lattice_make_local(Lattice *lt) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + int is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -327,14 +327,14 @@ void BKE_lattice_make_local(Lattice *lt) return; } - for (ob = bmain->object.first; ob && ELEM(FALSE, is_lib, is_local); ob = ob->id.next) { + for (ob = bmain->object.first; ob && ELEM(false, is_lib, is_local); ob = ob->id.next) { if (ob->data == lt) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, <->id); } else if (is_local && is_lib) { @@ -630,7 +630,7 @@ static bool calc_curve_deform(Scene *scene, Object *par, float co[3], /* to be sure, mostly after file load */ if (ELEM(NULL, par->curve_cache, par->curve_cache->path)) { #ifdef CYCLIC_DEPENDENCY_WORKAROUND - BKE_displist_make_curveTypes(scene, par, FALSE); + BKE_displist_make_curveTypes(scene, par, false); #endif if (par->curve_cache->path == NULL) { return 0; // happens on append and cyclic dependencies... @@ -731,7 +731,7 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target, DerivedMesh init_curve_deform(cuOb, target, &cd); /* dummy bounds, keep if CU_DEFORM_BOUNDS_OFF is set */ - if (is_neg_axis == FALSE) { + if (is_neg_axis == false) { cd.dmin[0] = cd.dmin[1] = cd.dmin[2] = 0.0f; cd.dmax[0] = cd.dmax[1] = cd.dmax[2] = 1.0f; } @@ -756,7 +756,7 @@ void curve_deform_verts(Scene *scene, Object *cuOb, Object *target, DerivedMesh } } else { - use_vgroups = FALSE; + use_vgroups = false; } if (vgroup && vgroup[0] && use_vgroups) { @@ -880,7 +880,7 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm, { LatticeDeformData *lattice_deform_data; int a; - int use_vgroups; + bool use_vgroups; if (laOb->type != OB_LATTICE) return; @@ -902,7 +902,7 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm, } } else { - use_vgroups = FALSE; + use_vgroups = false; } if (vgroup && vgroup[0] && use_vgroups) { diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c index 9f05284ef31..92628387dc6 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.c +++ b/source/blender/blenkernel/intern/mask_rasterize.c @@ -318,7 +318,7 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather /* this function is not exact, sometimes it returns false positives, * the main point of it is to clear out _almost_ all bucket/face non-intersections, - * returning TRUE in corner cases is ok but missing an intersection is NOT. + * returning true in corner cases is ok but missing an intersection is NOT. * * method used * - check if the center of the buckets bounding box is intersecting the face diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index eb8b385bbc7..01bbd1db003 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -80,7 +80,7 @@ void init_def_material(void) /* not material itself */ void BKE_material_free(Material *ma) { - BKE_material_free_ex(ma, TRUE); + BKE_material_free_ex(ma, true); } /* not material itself */ @@ -294,7 +294,8 @@ void BKE_material_make_local(Material *ma) Mesh *me; Curve *cu; MetaBall *mb; - int a, is_local = FALSE, is_lib = FALSE; + int a; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -318,8 +319,8 @@ void BKE_material_make_local(Material *ma) if (ob->mat) { for (a = 0; a < ob->totcol; a++) { if (ob->mat[a] == ma) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } } } @@ -331,8 +332,8 @@ void BKE_material_make_local(Material *ma) if (me->mat) { for (a = 0; a < me->totcol; a++) { if (me->mat[a] == ma) { - if (me->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (me->id.lib) is_lib = true; + else is_local = true; } } } @@ -344,8 +345,8 @@ void BKE_material_make_local(Material *ma) if (cu->mat) { for (a = 0; a < cu->totcol; a++) { if (cu->mat[a] == ma) { - if (cu->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (cu->id.lib) is_lib = true; + else is_local = true; } } } @@ -357,8 +358,8 @@ void BKE_material_make_local(Material *ma) if (mb->mat) { for (a = 0; a < mb->totcol; a++) { if (mb->mat[a] == ma) { - if (mb->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (mb->id.lib) is_lib = true; + else is_local = true; } } } @@ -366,7 +367,7 @@ void BKE_material_make_local(Material *ma) } /* Only local users. */ - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &ma->id); extern_local_material(ma); } @@ -944,14 +945,14 @@ short find_material_index(Object *ob, Material *ma) return 0; } -int object_add_material_slot(Object *ob) +bool object_add_material_slot(Object *ob) { - if (ob == NULL) return FALSE; - if (ob->totcol >= MAXMAT) return FALSE; + if (ob == NULL) return false; + if (ob->totcol >= MAXMAT) return false; assign_material(ob, NULL, ob->totcol + 1, BKE_MAT_ASSIGN_USERPREF); ob->actcol = ob->totcol; - return TRUE; + return true; } static void do_init_render_material(Material *ma, int r_mode, float *amb) @@ -1128,7 +1129,7 @@ static bool material_in_nodetree(bNodeTree *ntree, Material *mat) return 0; } -int material_in_material(Material *parmat, Material *mat) +bool material_in_material(Material *parmat, Material *mat) { if (parmat == mat) return 1; @@ -1196,7 +1197,7 @@ void material_drivers_update(Scene *scene, Material *ma, float ctime) ma->id.flag &= ~LIB_DOIT; } -int object_remove_material_slot(Object *ob) +bool object_remove_material_slot(Object *ob) { Material *mao, ***matarar; Object *obt; @@ -1204,14 +1205,14 @@ int object_remove_material_slot(Object *ob) short a, actcol; if (ob == NULL || ob->totcol == 0) { - return FALSE; + return false; } /* this should never happen and used to crash */ if (ob->actcol <= 0) { printf("%s: invalid material index %d, report a bug!\n", __func__, ob->actcol); BLI_assert(0); - return FALSE; + return false; } /* take a mesh/curve/mball as starting point, remove 1 index, @@ -1280,7 +1281,7 @@ int object_remove_material_slot(Object *ob) } } - return TRUE; + return true; } @@ -1532,7 +1533,7 @@ void free_matcopybuf(void) matcopybuf.ramp_spec = NULL; if (matcopybuf.nodetree) { - ntreeFreeTree_ex(matcopybuf.nodetree, FALSE); + ntreeFreeTree_ex(matcopybuf.nodetree, false); MEM_freeN(matcopybuf.nodetree); matcopybuf.nodetree = NULL; } @@ -1558,7 +1559,7 @@ void copy_matcopybuf(Material *ma) matcopybuf.mtex[a] = MEM_dupallocN(mtex); } } - matcopybuf.nodetree = ntreeCopyTree_ex(ma->nodetree, FALSE); + matcopybuf.nodetree = ntreeCopyTree_ex(ma->nodetree, false); matcopybuf.preview = NULL; BLI_listbase_clear(&matcopybuf.gpumaterial); matcopied = 1; @@ -1611,7 +1612,7 @@ void paste_matcopybuf(Material *ma) } } - ma->nodetree = ntreeCopyTree_ex(matcopybuf.nodetree, FALSE); + ma->nodetree = ntreeCopyTree_ex(matcopybuf.nodetree, false); } diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 39da0676f5e..9efd0dee19a 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -252,7 +252,7 @@ void BKE_mball_make_local(MetaBall *mb) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -269,12 +269,12 @@ void BKE_mball_make_local(MetaBall *mb) for (ob = G.main->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) { if (ob->data == mb) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &mb->id); extern_local_mball(mb); } @@ -356,7 +356,7 @@ void BKE_mball_texspace_calc(Object *ob) DispList *dl; BoundBox *bb; float *data, min[3], max[3] /*, loc[3], size[3] */; - int tot, do_it = FALSE; + int tot, do_it = false; if (ob->bb == NULL) ob->bb = MEM_callocN(sizeof(BoundBox), "mb boundbox"); bb = ob->bb; @@ -369,7 +369,7 @@ void BKE_mball_texspace_calc(Object *ob) dl = ob->curve_cache->disp.first; while (dl) { tot = dl->nr; - if (tot) do_it = TRUE; + if (tot) do_it = true; data = dl->verts; while (tot--) { /* Also weird... but longer. From utildefines. */ @@ -1111,11 +1111,11 @@ static int otherface(int edge, int face) static void makecubetable(void) { - static int is_done = FALSE; + static bool is_done = false; int i, e, c, done[12], pos[8]; if (is_done) return; - is_done = TRUE; + is_done = true; for (i = 0; i < 256; i++) { for (e = 0; e < 12; e++) done[e] = 0; diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index b7ebd5c013d..7d8d98a4573 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -526,7 +526,7 @@ Mesh *BKE_mesh_copy_ex(Main *bmain, Mesh *me) CustomData_copy(&me->fdata, &men->fdata, CD_MASK_MESH, CD_DUPLICATE, men->totface); } else { - mesh_tessface_clear_intern(men, FALSE); + mesh_tessface_clear_intern(men, false); } BKE_mesh_update_customdata_pointers(men, do_tessface); @@ -623,7 +623,7 @@ void BKE_mesh_make_local(Mesh *me) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -639,12 +639,12 @@ void BKE_mesh_make_local(Mesh *me) for (ob = bmain->object.first; ob && ELEM(0, is_lib, is_local); ob = ob->id.next) { if (me == ob->data) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &me->id); expand_local_mesh(me); } @@ -1126,7 +1126,7 @@ static void make_edges_mdata_extend(MEdge **r_alledge, int *r_totedge, /* --- */ for (ehi = BLI_edgehashIterator_new(eh); - BLI_edgehashIterator_isDone(ehi) == FALSE; + BLI_edgehashIterator_isDone(ehi) == false; BLI_edgehashIterator_step(ehi), ++medge, e_index++) { BLI_edgehashIterator_getKey(ehi, &medge->v1, &medge->v2); @@ -1596,19 +1596,19 @@ void BKE_mesh_to_curve_nurblist(DerivedMesh *dm, ListBase *nurblist, const int e /* each iteration find a polyline and add this as a nurbs poly spline */ ListBase polyline = {NULL, NULL}; /* store a list of VertLink's */ - int closed = FALSE; + bool closed = false; int totpoly = 0; MEdge *med_current = ((EdgeLink *)edges.last)->edge; unsigned int startVert = med_current->v1; unsigned int endVert = med_current->v2; - int ok = TRUE; + bool ok = true; appendPolyLineVert(&polyline, startVert); totpoly++; appendPolyLineVert(&polyline, endVert); totpoly++; BLI_freelinkN(&edges, edges.last); totedges--; while (ok) { /* while connected edges are found... */ - ok = FALSE; + ok = false; i = totedges; while (i) { EdgeLink *edl; @@ -1621,25 +1621,25 @@ void BKE_mesh_to_curve_nurblist(DerivedMesh *dm, ListBase *nurblist, const int e endVert = med->v2; appendPolyLineVert(&polyline, med->v2); totpoly++; BLI_freelinkN(&edges, edl); totedges--; - ok = TRUE; + ok = true; } else if (med->v2 == endVert) { endVert = med->v1; appendPolyLineVert(&polyline, endVert); totpoly++; BLI_freelinkN(&edges, edl); totedges--; - ok = TRUE; + ok = true; } else if (med->v1 == startVert) { startVert = med->v2; prependPolyLineVert(&polyline, startVert); totpoly++; BLI_freelinkN(&edges, edl); totedges--; - ok = TRUE; + ok = true; } else if (med->v2 == startVert) { startVert = med->v1; prependPolyLineVert(&polyline, startVert); totpoly++; BLI_freelinkN(&edges, edl); totedges--; - ok = TRUE; + ok = true; } } } @@ -1648,7 +1648,7 @@ void BKE_mesh_to_curve_nurblist(DerivedMesh *dm, ListBase *nurblist, const int e if (startVert == endVert) { BLI_freelinkN(&polyline, polyline.last); totpoly--; - closed = TRUE; + closed = true; } /* --- nurbs --- */ @@ -1920,7 +1920,7 @@ void BKE_mesh_tessface_ensure(Mesh *mesh) void BKE_mesh_tessface_clear(Mesh *mesh) { - mesh_tessface_clear_intern(mesh, TRUE); + mesh_tessface_clear_intern(mesh, true); } void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh) diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 7b56784b1dd..848483d2877 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -73,7 +73,7 @@ typedef struct SortPoly { int numverts; int loopstart; unsigned int index; - int invalid; /* Poly index. */ + bool invalid; /* Poly index. */ } SortPoly; static void edge_store_assign(uint32_t verts[2], const uint32_t v1, const uint32_t v2) @@ -256,7 +256,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, } for (i = 1; i < totvert; i++, mv++) { - int fix_normal = TRUE; + bool fix_normal = true; for (j = 0; j < 3; j++) { if (!finite(mv->co[j])) { @@ -265,25 +265,25 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (do_fixes) { zero_v3(mv->co); - verts_fixed = TRUE; + verts_fixed = true; } } if (mv->no[j] != 0) - fix_normal = FALSE; + fix_normal = false; } if (fix_normal) { PRINT_ERR("\tVertex %u: has zero normal, assuming Z-up normal\n", i); if (do_fixes) { mv->no[2] = SHRT_MAX; - verts_fixed = TRUE; + verts_fixed = true; } } } for (i = 0, me = medges; i < totedge; i++, me++) { - int remove = FALSE; + int remove = false; if (me->v1 == me->v2) { PRINT_ERR("\tEdge %u: has matching verts, both %u\n", i, me->v1); remove = do_fixes; @@ -303,7 +303,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, remove = do_fixes; } - if (remove == FALSE) { + if (remove == false) { BLI_edgehash_insert(edge_hash, me->v1, me->v2, SET_INT_IN_POINTER(i)); } else { @@ -312,7 +312,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, } if (mfaces && !mpolys) { -# define REMOVE_FACE_TAG(_mf) { _mf->v3 = 0; do_face_free = TRUE; } (void)0 +# define REMOVE_FACE_TAG(_mf) { _mf->v3 = 0; do_face_free = true; } (void)0 # define CHECK_FACE_VERT_INDEX(a, b) \ if (mf->a == mf->b) { \ PRINT_ERR(" face %u: verts invalid, " STRINGIFY(a) "/" STRINGIFY(b) " both %u\n", i, mf->a); \ @@ -322,7 +322,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (!BLI_edgehash_haskey(edge_hash, mf->a, mf->b)) { \ PRINT_ERR(" face %u: edge " STRINGIFY(a) "/" STRINGIFY(b) \ " (%u,%u) is missing edge data\n", i, mf->a, mf->b); \ - do_edge_recalc = TRUE; \ + do_edge_recalc = true; \ } (void)0 MFace *mf; @@ -336,7 +336,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, PRINT_ERR("No Polys, only tesselated Faces\n"); for (i = 0, mf = mfaces, sf = sort_faces; i < totface; i++, mf++) { - int remove = FALSE; + int remove = false; int fidx; unsigned int fv[4]; @@ -349,7 +349,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, } } while (fidx--); - if (remove == FALSE) { + if (remove == false) { if (mf->v4) { CHECK_FACE_VERT_INDEX(v1, v2); CHECK_FACE_VERT_INDEX(v1, v3); @@ -367,7 +367,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, CHECK_FACE_VERT_INDEX(v2, v3); } - if (remove == FALSE) { + if (remove == false) { if (totedge) { if (mf->v4) { CHECK_FACE_EDGE(v1, v2); @@ -411,7 +411,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, sf++; for (i = 1; i < totsortface; i++, sf++) { - int remove = FALSE; + int remove = false; /* on a valid mesh, code below will never run */ if (memcmp(sf->es, sf_prev->es, sizeof(sf_prev->es)) == 0) { @@ -475,18 +475,18 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, /* Invalid loop data. */ PRINT_ERR("\tPoly %u is invalid (loopstart: %u, totloop: %u)\n", sp->index, mp->loopstart, mp->totloop); - sp->invalid = TRUE; + sp->invalid = true; } else if (mp->loopstart + mp->totloop > totloop) { /* Invalid loop data. */ PRINT_ERR("\tPoly %u uses loops out of range (loopstart: %u, loopend: %u, max nbr of loops: %u)\n", sp->index, mp->loopstart, mp->loopstart + mp->totloop - 1, totloop - 1); - sp->invalid = TRUE; + sp->invalid = true; } else { /* Poly itself is valid, for now. */ int v1, v2; /* v1 is prev loop vert idx, v2 is current loop one. */ - sp->invalid = FALSE; + sp->invalid = false; sp->verts = v = MEM_mallocN(sizeof(int) * mp->totloop, "Vert idx of SortPoly"); sp->numverts = mp->totloop; sp->loopstart = mp->loopstart; @@ -496,7 +496,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (ml->v >= totvert) { /* Invalid vert idx. */ PRINT_ERR("\tLoop %u has invalid vert reference (%u)\n", sp->loopstart + j, ml->v); - sp->invalid = TRUE; + sp->invalid = true; } mverts[ml->v].flag |= ME_VERT_TMP_TAG; @@ -509,7 +509,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, for (j = 0; j < mp->totloop; j++, v++) { if ((mverts[*v].flag & ME_VERT_TMP_TAG) == 0) { PRINT_ERR("\tPoly %u has duplicate vert reference at corner (%u)\n", i, j); - sp->invalid = TRUE; + sp->invalid = true; } mverts[*v].flag &= ~ME_VERT_TMP_TAG; } @@ -526,9 +526,9 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, /* Edge not existing. */ PRINT_ERR("\tPoly %u needs missing edge (%u, %u)\n", sp->index, v1, v2); if (do_fixes) - do_edge_recalc = TRUE; + do_edge_recalc = true; else - sp->invalid = TRUE; + sp->invalid = true; } else if (ml->e >= totedge) { /* Invalid edge idx. @@ -541,7 +541,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, } else { PRINT_ERR("\tLoop %u has invalid edge reference (%u)\n", sp->loopstart + j, ml->e); - sp->invalid = TRUE; + sp->invalid = true; } } else { @@ -557,7 +557,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, } else { PRINT_ERR("\tPoly %u has invalid edge reference (%u)\n", sp->index, ml->e); - sp->invalid = TRUE; + sp->invalid = true; } } } @@ -576,7 +576,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (dlt > 1) { PRINT_ERR("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n", sp->index, *prev_v, dlt); - sp->invalid = TRUE; + sp->invalid = true; } prev_v = v; } @@ -584,7 +584,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (v - prev_v > 1) { /* Don't forget final verts! */ PRINT_ERR("\tPoly %u is invalid, it multi-uses vertex %u (%u times)\n", sp->index, *prev_v, (int)(v - prev_v)); - sp->invalid = TRUE; + sp->invalid = true; } } @@ -599,7 +599,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, for (i = 1; i < totpoly; i++, sp++) { int p1_nv = sp->numverts, p2_nv = prev_sp->numverts; int *p1_v = sp->verts, *p2_v = prev_sp->verts; - short p1_sub = TRUE, p2_sub = TRUE; + short p1_sub = true, p2_sub = true; if (sp->invalid) break; /* Test same polys. */ @@ -616,13 +616,13 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, while ((p1_nv && p2_nv) && (p1_sub || p2_sub)) { if (*p1_v < *p2_v) { if (p1_sub) - p1_sub = FALSE; + p1_sub = false; p1_nv--; p1_v++; } else if (*p2_v < *p1_v) { if (p2_sub) - p2_sub = FALSE; + p2_sub = false; p2_nv--; p2_v++; } @@ -635,23 +635,23 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, } } if (p1_nv && p1_sub) - p1_sub = FALSE; + p1_sub = false; else if (p2_nv && p2_sub) - p2_sub = FALSE; + p2_sub = false; if (p1_sub && p2_sub) { PRINT("\tPolys %u and %u use same vertices, considering poly %u as invalid.\n", prev_sp->index, sp->index, sp->index); - sp->invalid = TRUE; + sp->invalid = true; } /* XXX In fact, these might be valid? :/ */ else if (p1_sub) { PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", sp->index, prev_sp->index); - sp->invalid = TRUE; + sp->invalid = true; } else if (p2_sub) { PRINT("\t%u is a sub-poly of %u, considering it as invalid.\n", prev_sp->index, sp->index); - prev_sp->invalid = TRUE; + prev_sp->invalid = true; prev_sp = sp; /* sp is new reference poly. */ } #else @@ -670,7 +670,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, else { is_valid = false; } - sp->invalid = TRUE; + sp->invalid = true; } #endif else { @@ -755,14 +755,14 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, PRINT_ERR("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight); if (do_fixes) { dw->weight = 0.0f; - vert_weights_fixed = TRUE; + vert_weights_fixed = true; } } else if (dw->weight < 0.0f || dw->weight > 1.0f) { PRINT_ERR("\tVertex deform %u, group %d has weight: %f\n", i, dw->def_nr, dw->weight); if (do_fixes) { CLAMP(dw->weight, 0.0f, 1.0f); - vert_weights_fixed = TRUE; + vert_weights_fixed = true; } } @@ -776,7 +776,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, j--; dw = dv->dw + j; - vert_weights_fixed = TRUE; + vert_weights_fixed = true; } else { /* all freed */ break; @@ -812,7 +812,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (mesh && mesh->mselect) { MSelect *msel; - int free_msel = FALSE; + bool free_msel = false; for (i = 0, msel = mesh->mselect; i < mesh->totselect; i++, msel++) { int tot_elem = 0; @@ -820,7 +820,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (msel->index < 0) { PRINT_ERR("\tMesh select element %d type %d index is negative, " "resetting selection stack.\n", i, msel->type); - free_msel = TRUE; + free_msel = true; break; } @@ -840,7 +840,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, PRINT_ERR("\tMesh select element %d type %d index %d is larger than data array size %d, " "resetting selection stack.\n", i, msel->type, msel->index, tot_elem); - free_msel = TRUE; + free_msel = true; break; } } @@ -1095,12 +1095,12 @@ void BKE_mesh_strip_loose_polysloops(Mesh *me) int *new_idx = MEM_mallocN(sizeof(int) * me->totloop, __func__); for (a = b = 0, p = me->mpoly; a < me->totpoly; a++, p++) { - int invalid = FALSE; + bool invalid = false; int i = p->loopstart; int stop = i + p->totloop; if (stop > me->totloop || stop < i) { - invalid = TRUE; + invalid = true; } else { l = &me->mloop[i]; @@ -1108,7 +1108,7 @@ void BKE_mesh_strip_loose_polysloops(Mesh *me) /* If one of the poly's loops is invalid, the whole poly is invalid! */ for (; i--; l++) { if (l->e == INVALID_LOOP_EDGE_MARKER) { - invalid = TRUE; + invalid = true; break; } } @@ -1431,7 +1431,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select) med = CustomData_get_layer(&edata, CD_MEDGE); for (ehi = BLI_edgehashIterator_new(eh), i = 0; - BLI_edgehashIterator_isDone(ehi) == FALSE; + BLI_edgehashIterator_isDone(ehi) == false; BLI_edgehashIterator_step(ehi), ++i, ++med) { if (update && (med_orig = BLI_edgehashIterator_getValue(ehi))) { diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c index a9ff569e70a..8c79dee7a8b 100644 --- a/source/blender/blenkernel/intern/modifiers_bmesh.c +++ b/source/blender/blenkernel/intern/modifiers_bmesh.c @@ -79,7 +79,7 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm, const bool calc_face_normal) int cd_edge_bweight_offset; int cd_edge_crease_offset; - if (is_init == FALSE) { + if (is_init == false) { /* check if we have an origflag */ has_orig_hflag |= CustomData_has_layer(&bm->vdata, CD_ORIGINDEX) ? BM_VERT : 0; has_orig_hflag |= CustomData_has_layer(&bm->edata, CD_ORIGINDEX) ? BM_EDGE : 0; diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 81744af76f1..d4179be78ef 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -1191,7 +1191,7 @@ void BKE_movieclip_reload(MovieClip *clip) /* clear cache */ free_buffers(clip); - clip->tracking.stabilization.ok = FALSE; + clip->tracking.stabilization.ok = false; /* update clip source */ detect_clip_source(clip); @@ -1231,7 +1231,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip scopes->marker = NULL; scopes->track = NULL; - scopes->track_locked = TRUE; + scopes->track_locked = true; if (clip) { MovieTrackingTrack *act_track = BKE_tracking_track_get_active(&clip->tracking); @@ -1245,12 +1245,12 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip scopes->track = track; if (marker->flag & MARKER_DISABLED) { - scopes->track_disabled = TRUE; + scopes->track_disabled = true; } else { ImBuf *ibuf = BKE_movieclip_get_ibuf(clip, user); - scopes->track_disabled = FALSE; + scopes->track_disabled = false; if (ibuf && (ibuf->rect || ibuf->rect_float)) { ImBuf *search_ibuf; @@ -1296,7 +1296,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip if ((track->flag & TRACK_LOCKED) == 0) { float pat_min[2], pat_max[2]; - scopes->track_locked = FALSE; + scopes->track_locked = false; /* XXX: would work fine with non-transformed patterns, but would likely fail * with transformed patterns, but that would be easier to debug when @@ -1310,7 +1310,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip } scopes->framenr = user->framenr; - scopes->ok = TRUE; + scopes->ok = true; } static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, int proxy_render_size, bool undistorted, bool threaded) diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index cba905ad487..b6c87f286f0 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -699,7 +699,7 @@ void multiresModifier_del_levels(MultiresModifierData *mmd, Object *ob, int dire multires_set_tot_level(ob, mmd, lvl); } -static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lvl, int totlvl, int simple, int alloc_paint_mask) +static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int lvl, int totlvl, int simple, bool alloc_paint_mask) { MultiresModifierData mmd = {{NULL}}; MultiresFlags flags = MULTIRES_USE_LOCAL_MMD; @@ -1302,7 +1302,7 @@ void multires_set_space(DerivedMesh *dm, Object *ob, int from, int to) } totlvl = mmd->totlvl; - ccgdm = multires_dm_create_local(ob, dm, totlvl, totlvl, mmd->simple, FALSE); + ccgdm = multires_dm_create_local(ob, dm, totlvl, totlvl, mmd->simple, false); subsurf = subsurf_dm_create_local(ob, dm, totlvl, mmd->simple, mmd->flags & eMultiresModifierFlag_ControlEdges, mmd->flags & eMultiresModifierFlag_PlainUv, 0); diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index b2d698890ad..2122526988a 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1027,16 +1027,16 @@ void nodeFromView(bNode *node, float x, float y, float *rx, float *ry) } } -int nodeAttachNodeCheck(bNode *node, bNode *parent) +bool nodeAttachNodeCheck(bNode *node, bNode *parent) { bNode *parent_recurse; for (parent_recurse = node; parent_recurse; parent_recurse = parent_recurse->parent) { if (parent_recurse == parent) { - return TRUE; + return true; } } - return FALSE; + return false; } void nodeAttachNode(bNode *node, bNode *parent) @@ -1044,7 +1044,7 @@ void nodeAttachNode(bNode *node, bNode *parent) float locx, locy; BLI_assert(parent->type == NODE_FRAME); - BLI_assert(nodeAttachNodeCheck(parent, node) == FALSE); + BLI_assert(nodeAttachNodeCheck(parent, node) == false); nodeToView(node, 0.0f, 0.0f, &locx, &locy); @@ -1203,11 +1203,11 @@ static bNodeTree *ntreeCopyTree_internal(bNodeTree *ntree, Main *bmain, bool do_ bNodeTree *ntreeCopyTree_ex(bNodeTree *ntree, const bool do_id_user) { - return ntreeCopyTree_internal(ntree, G.main, do_id_user, TRUE, TRUE); + return ntreeCopyTree_internal(ntree, G.main, do_id_user, true, true); } bNodeTree *ntreeCopyTree(bNodeTree *ntree) { - return ntreeCopyTree_ex(ntree, TRUE); + return ntreeCopyTree_ex(ntree, true); } /* use when duplicating scenes */ @@ -1234,7 +1234,7 @@ void ntreeSwitchID_ex(bNodeTree *ntree, ID *id_from, ID *id_to, const bool do_id } void ntreeSwitchID(bNodeTree *ntree, ID *id_from, ID *id_to) { - ntreeSwitchID_ex(ntree, id_from, id_to, TRUE); + ntreeSwitchID_ex(ntree, id_from, id_to, true); } void ntreeUserIncrefID(bNodeTree *ntree) @@ -1265,7 +1265,7 @@ int BKE_node_preview_used(bNode *node) return (node->typeinfo->flag & NODE_PREVIEW) != 0; } -bNodePreview *BKE_node_preview_verify(bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, int create) +bNodePreview *BKE_node_preview_verify(bNodeInstanceHash *previews, bNodeInstanceKey key, int xsize, int ysize, bool create) { bNodePreview *preview; @@ -1779,7 +1779,7 @@ void ntreeFreeTree_ex(bNodeTree *ntree, const bool do_id_user) /* same as ntreeFreeTree_ex but always manage users */ void ntreeFreeTree(bNodeTree *ntree) { - ntreeFreeTree_ex(ntree, TRUE); + ntreeFreeTree_ex(ntree, true); } void ntreeFreeCache(bNodeTree *ntree) @@ -1876,7 +1876,7 @@ bNodeTree *ntreeFromID(ID *id) void ntreeMakeLocal(bNodeTree *ntree) { Main *bmain = G.main; - int lib = FALSE, local = FALSE; + bool lib = false, local = false; /* - only lib users: do nothing * - only local users: set flag @@ -1896,9 +1896,9 @@ void ntreeMakeLocal(bNodeTree *ntree) for (node = tntree->nodes.first; node; node = node->next) { if (node->id == (ID *)ntree) { if (owner_id->lib) - lib = TRUE; + lib = true; else - local = TRUE; + local = true; } } } FOREACH_NODETREE_END @@ -1971,7 +1971,7 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree) /* Make full copy. * Note: previews are not copied here. */ - ltree = ntreeCopyTree_internal(ntree, NULL, FALSE, FALSE, FALSE); + ltree = ntreeCopyTree_internal(ntree, NULL, false, false, false); ltree->flag |= NTREE_IS_LOCALIZED; for (node = ltree->nodes.first; node; node = node->next) { @@ -2028,7 +2028,7 @@ void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree) if (ntree->typeinfo->local_merge) ntree->typeinfo->local_merge(localtree, ntree); - ntreeFreeTree_ex(localtree, FALSE); + ntreeFreeTree_ex(localtree, false); MEM_freeN(localtree); } } @@ -2170,7 +2170,7 @@ static void ntree_interface_identifier_base(bNodeTree *ntree, char *base) { /* generate a valid RNA identifier */ sprintf(base, "NodeTreeInterface_%s", ntree->id.name + 2); - RNA_identifier_sanitize(base, FALSE); + RNA_identifier_sanitize(base, false); } /* check if the identifier is already in use */ @@ -2390,9 +2390,9 @@ bool nodeSetActiveID(bNodeTree *ntree, short idtype, ID *id) for (node = ntree->nodes.first; node; node = node->next) { if (node->id && GS(node->id->name) == idtype) { - if (id && ok == FALSE && node->id == id) { + if (id && ok == false && node->id == id) { node->flag |= NODE_ACTIVE_ID; - ok = TRUE; + ok = true; } else { node->flag &= ~NODE_ACTIVE_ID; @@ -2543,7 +2543,7 @@ void BKE_node_clipboard_clear(void) #endif } -/* return FALSE when one or more ID's are lost */ +/* return false when one or more ID's are lost */ bool BKE_node_clipboard_validate(void) { bool ok = true; @@ -2763,10 +2763,10 @@ bool BKE_node_instance_hash_tag_key(bNodeInstanceHash *hash, bNodeInstanceKey ke if (entry) { entry->tag = 1; - return TRUE; + return true; } else - return FALSE; + return false; } void BKE_node_instance_hash_remove_untagged(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp) @@ -2803,7 +2803,7 @@ static int node_get_deplist_recurs(bNodeTree *ntree, bNode *node, bNode ***nsort bNodeLink *link; int level = 0xFFF; - node->done = TRUE; + node->done = true; /* check linked nodes */ for (link = ntree->links.first; link; link = link->next) { @@ -2840,7 +2840,7 @@ void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, in /* first clear data */ for (node = ntree->nodes.first; node; node = node->next) { - node->done = FALSE; + node->done = false; (*totnodes)++; } if (*totnodes == 0) { @@ -2865,7 +2865,7 @@ static void ntree_update_node_level(bNodeTree *ntree) /* first clear tag */ for (node = ntree->nodes.first; node; node = node->next) { - node->done = FALSE; + node->done = false; } /* recursive check */ @@ -2937,7 +2937,7 @@ void ntreeUpdateTree(Main *bmain, bNodeTree *ntree) /* avoid reentrant updates, can be caused by RNA update callbacks */ if (ntree->is_updating) return; - ntree->is_updating = TRUE; + ntree->is_updating = true; if (ntree->update & (NTREE_UPDATE_LINKS | NTREE_UPDATE_NODES)) { /* set the bNodeSocket->link pointers */ @@ -2985,7 +2985,7 @@ void ntreeUpdateTree(Main *bmain, bNodeTree *ntree) } ntree->update = 0; - ntree->is_updating = FALSE; + ntree->is_updating = false; } void nodeUpdate(bNodeTree *ntree, bNode *node) @@ -2993,7 +2993,7 @@ void nodeUpdate(bNodeTree *ntree, bNode *node) /* avoid reentrant updates, can be caused by RNA update callbacks */ if (ntree->is_updating) return; - ntree->is_updating = TRUE; + ntree->is_updating = true; if (node->typeinfo->updatefunc) node->typeinfo->updatefunc(ntree, node); @@ -3003,7 +3003,7 @@ void nodeUpdate(bNodeTree *ntree, bNode *node) /* clear update flag */ node->update = 0; - ntree->is_updating = FALSE; + ntree->is_updating = false; } bool nodeUpdateID(bNodeTree *ntree, ID *id) @@ -3034,7 +3034,7 @@ bool nodeUpdateID(bNodeTree *ntree, ID *id) nodeUpdateInternalLinks(ntree, node); } - ntree->is_updating = FALSE; + ntree->is_updating = false; return changed; } @@ -3138,7 +3138,7 @@ static void node_type_base_defaults(bNodeType *ntype) /* allow this node for any tree type */ static int node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *UNUSED(ntree)) { - return TRUE; + return true; } /* use the basic poll function */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 6a0ed272189..23af5bdf7ba 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1189,7 +1189,7 @@ SoftBody *copy_softbody(SoftBody *sb, bool copy_caches) sbn = MEM_dupallocN(sb); - if (copy_caches == FALSE) { + if (copy_caches == false) { sbn->totspring = sbn->totpoint = 0; sbn->bpoint = NULL; sbn->bspring = NULL; @@ -1292,7 +1292,7 @@ static ParticleSystem *copy_particlesystem(ParticleSystem *psys) BLI_listbase_clear(&psysn->childcachebufs); psysn->renderdata = NULL; - psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches, FALSE); + psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches, false); /* XXX - from reading existing code this seems correct but intended usage of * pointcache should /w cloth should be added in 'ParticleSystem' - campbell */ @@ -1353,7 +1353,7 @@ void BKE_object_copy_particlesystems(Object *obn, Object *ob) void BKE_object_copy_softbody(Object *obn, Object *ob) { if (ob->soft) - obn->soft = copy_softbody(ob->soft, FALSE); + obn->soft = copy_softbody(ob->soft, false); } static void copy_object_pose(Object *obn, Object *ob) @@ -1444,7 +1444,7 @@ void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src) copy_v3_v3(ob_tar->size, ob_src->size); } -Object *BKE_object_copy_ex(Main *bmain, Object *ob, int copy_caches) +Object *BKE_object_copy_ex(Main *bmain, Object *ob, bool copy_caches) { Object *obn; ModifierData *md; @@ -1486,7 +1486,7 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, int copy_caches) BKE_pose_rebuild(obn, obn->data); } defgroup_copy_list(&obn->defbase, &ob->defbase); - BKE_copy_constraints(&obn->constraints, &ob->constraints, TRUE); + BKE_copy_constraints(&obn->constraints, &ob->constraints, true); obn->mode = 0; obn->sculpt = NULL; @@ -1532,7 +1532,7 @@ Object *BKE_object_copy_ex(Main *bmain, Object *ob, int copy_caches) /* copy objects, will re-initialize cached simulation data */ Object *BKE_object_copy(Object *ob) { - return BKE_object_copy_ex(G.main, ob, FALSE); + return BKE_object_copy_ex(G.main, ob, false); } static void extern_local_object(Object *ob) @@ -1555,7 +1555,7 @@ void BKE_object_make_local(Object *ob) Main *bmain = G.main; Scene *sce; Base *base; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -1573,12 +1573,12 @@ void BKE_object_make_local(Object *ob) else { for (sce = bmain->scene.first; sce && ELEM(0, is_lib, is_local); sce = sce->id.next) { if (BKE_scene_base_find(sce, ob)) { - if (sce->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (sce->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &ob->id); extern_local_object(ob); } @@ -1721,7 +1721,7 @@ void BKE_object_make_proxy(Object *ob, Object *target, Object *gob) mul_mat3_m4_v3(ob->obmat, tvec); sub_v3_v3(ob->obmat[3], tvec); } - BKE_object_apply_mat4(ob, ob->obmat, FALSE, TRUE); + BKE_object_apply_mat4(ob, ob->obmat, false, true); } else { BKE_object_transform_copy(ob, target); @@ -1949,7 +1949,7 @@ void BKE_object_to_mat3(Object *ob, float mat[3][3]) /* no parent */ BKE_object_scale_to_mat3(ob, smat); /* rot */ - BKE_object_rot_to_mat3(ob, rmat, TRUE); + BKE_object_rot_to_mat3(ob, rmat, true); mul_m3_m3m3(mat, rmat, smat); } @@ -2431,7 +2431,7 @@ void BKE_object_apply_mat4(Object *ob, float mat[4][4], const bool use_compat, c mul_m4_m4m4(diff_mat, parent_mat, ob->parentinv); invert_m4_m4(imat, diff_mat); mul_m4_m4m4(rmat, imat, mat); /* get the parent relative matrix */ - BKE_object_apply_mat4(ob, rmat, use_compat, FALSE); + BKE_object_apply_mat4(ob, rmat, use_compat, false); /* same as below, use rmat rather than mat */ mat4_to_loc_rot_size(ob->loc, rot, ob->size, rmat); @@ -2586,7 +2586,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { /* XXX pchan->bone may be NULL for duplicated bones, see duplicateEditBoneObjects() comment * (editarmature.c:2592)... Skip in this case too! */ - if (pchan->bone && !((use_hidden == FALSE) && (PBONE_VISIBLE(arm, pchan->bone) == FALSE))) { + if (pchan->bone && !((use_hidden == false) && (PBONE_VISIBLE(arm, pchan->bone) == false))) { mul_v3_m4v3(vec, ob->obmat, pchan->pose_head); minmax_v3v3_v3(min_r, max_r, vec); mul_v3_m4v3(vec, ob->obmat, pchan->pose_tail); @@ -3232,9 +3232,9 @@ static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, cons newkey = 1; } - if (newkey || from_mix == FALSE) { + if (newkey || from_mix == false) { /* create from mesh */ - kb = BKE_keyblock_add_ctime(key, name, FALSE); + kb = BKE_keyblock_add_ctime(key, name, false); BKE_key_convert_from_mesh(me, kb); } else { @@ -3243,7 +3243,7 @@ static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, cons float *data = BKE_key_evaluate_object(scene, ob, &totelem); /* create new block with prepared data */ - kb = BKE_keyblock_add_ctime(key, name, FALSE); + kb = BKE_keyblock_add_ctime(key, name, false); kb->data = data; kb->totelem = totelem; } @@ -3264,8 +3264,8 @@ static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, cons newkey = 1; } - if (newkey || from_mix == FALSE) { - kb = BKE_keyblock_add_ctime(key, name, FALSE); + if (newkey || from_mix == false) { + kb = BKE_keyblock_add_ctime(key, name, false); if (!newkey) { KeyBlock *basekb = (KeyBlock *)key->block.first; kb->data = MEM_dupallocN(basekb->data); @@ -3281,7 +3281,7 @@ static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, cons float *data = BKE_key_evaluate_object(scene, ob, &totelem); /* create new block with prepared data */ - kb = BKE_keyblock_add_ctime(key, name, FALSE); + kb = BKE_keyblock_add_ctime(key, name, false); kb->totelem = totelem; kb->data = data; } @@ -3303,9 +3303,9 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, con newkey = 1; } - if (newkey || from_mix == FALSE) { + if (newkey || from_mix == false) { /* create from curve */ - kb = BKE_keyblock_add_ctime(key, name, FALSE); + kb = BKE_keyblock_add_ctime(key, name, false); if (!newkey) { KeyBlock *basekb = (KeyBlock *)key->block.first; kb->data = MEM_dupallocN(basekb->data); @@ -3321,7 +3321,7 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, con float *data = BKE_key_evaluate_object(scene, ob, &totelem); /* create new block with prepared data */ - kb = BKE_keyblock_add_ctime(key, name, FALSE); + kb = BKE_keyblock_add_ctime(key, name, false); kb->totelem = totelem; kb->data = data; } diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c index f313c098f4b..e53bd26b9a2 100644 --- a/source/blender/blenkernel/intern/object_deform.c +++ b/source/blender/blenkernel/intern/object_deform.c @@ -144,16 +144,16 @@ bool *BKE_objdef_selected_get(Object *ob, int defbase_tot, int *r_dg_flags_sel_t for (i = 0, defgroup = ob->defbase.first; i < defbase_tot && defgroup; defgroup = defgroup->next, i++) { bPoseChannel *pchan = BKE_pose_channel_find_name(pose, defgroup->name); if (pchan && (pchan->bone->flag & BONE_SELECTED)) { - dg_selection[i] = TRUE; + dg_selection[i] = true; (*r_dg_flags_sel_tot) += 1; } else { - dg_selection[i] = FALSE; + dg_selection[i] = false; } } } else { - memset(dg_selection, FALSE, sizeof(*dg_selection) * defbase_tot); + memset(dg_selection, false, sizeof(*dg_selection) * defbase_tot); } return dg_selection; diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index 3458f149aa2..6f278ae1244 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -1003,7 +1003,7 @@ static void cache_filename(char *string, const char *path, const char *relbase, BLI_join_dirfile(cachepath, sizeof(cachepath), path, fname); - BKE_makepicstring_from_type(string, cachepath, relbase, frame, R_IMF_IMTYPE_OPENEXR, 1, TRUE); + BKE_makepicstring_from_type(string, cachepath, relbase, frame, R_IMF_IMTYPE_OPENEXR, true, true); } /* silly functions but useful to inline when the args do a lot of indirections */ diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index b120ec0d1f1..71504bb9fbe 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -253,7 +253,7 @@ void packAll(Main *bmain, ReportList *reports) } for (vfont = bmain->vfont.first; vfont; vfont = vfont->id.next) { - if (vfont->packedfile == NULL && vfont->id.lib == NULL && BKE_vfont_is_builtin(vfont) == FALSE) { + if (vfont->packedfile == NULL && vfont->id.lib == NULL && BKE_vfont_is_builtin(vfont) == false) { vfont->packedfile = newPackedFile(reports, vfont->name, bmain->name); tot ++; } @@ -303,8 +303,9 @@ static char *find_new_name(char *name) int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, int guimode) { - int file, number, remove_tmp = FALSE; + int file, number; int ret_value = RET_OK; + bool remove_tmp = false; char name[FILE_MAX]; char tempname[FILE_MAX]; /* void *data; */ @@ -319,7 +320,7 @@ int writePackedFile(ReportList *reports, const char *filename, PackedFile *pf, i BLI_snprintf(tempname, sizeof(tempname), "%s.%03d_", name, number); if (!BLI_exists(tempname)) { if (BLI_copy(name, tempname) == RET_OK) { - remove_tmp = TRUE; + remove_tmp = true; } break; } diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 4d84dd5fbb1..d7ae8e30698 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -348,7 +348,7 @@ bool paint_is_grid_face_hidden(const unsigned int *grid_hidden, BLI_BITMAP_GET(grid_hidden, (y + 1) * gridsize + x)); } -/* Return TRUE if all vertices in the face are visible, FALSE otherwise */ +/* Return true if all vertices in the face are visible, false otherwise */ bool paint_is_bmesh_face_hidden(BMFace *f) { BMLoop *l_iter; @@ -418,12 +418,12 @@ static void sculptsession_bm_to_me_update_data_only(Object *ob, bool reorder) } if (reorder) BM_log_mesh_elems_reorder(ss->bm, ss->bm_log); - BM_mesh_bm_to_me(ss->bm, ob->data, FALSE); + BM_mesh_bm_to_me(ss->bm, ob->data, false); } } } -void sculptsession_bm_to_me(Object *ob, int reorder) +void sculptsession_bm_to_me(Object *ob, bool reorder) { if (ob && ob->sculpt) { sculptsession_bm_to_me_update_data_only(ob, reorder); @@ -467,7 +467,7 @@ void free_sculptsession(Object *ob) DerivedMesh *dm = ob->derivedFinal; if (ss->bm) { - sculptsession_bm_to_me(ob, TRUE); + sculptsession_bm_to_me(ob, true); BM_mesh_free(ss->bm); } diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index fbad836f922..df7de5be6b6 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -843,7 +843,7 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot) if (data->elems) MEM_freeN(data->elems); - data->do_simplify = TRUE; + data->do_simplify = true; data->elems = elems; data->index_mf_to_mpoly = index_mf_to_mpoly; data->index_mp_to_orig = index_mp_to_orig; @@ -974,7 +974,7 @@ int psys_render_simplify_distribution(ParticleThreadContext *ctx, int tot) return newtot; } -int psys_render_simplify_params(ParticleSystem *psys, ChildParticle *cpa, float *params) +bool psys_render_simplify_params(ParticleSystem *psys, ChildParticle *cpa, float *params) { ParticleRenderData *data; ParticleRenderElem *elem; @@ -3710,7 +3710,7 @@ void BKE_particlesettings_make_local(ParticleSettings *part) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -3725,17 +3725,17 @@ void BKE_particlesettings_make_local(ParticleSettings *part) } /* test objects */ - for (ob = bmain->object.first; ob && ELEM(FALSE, is_lib, is_local); ob = ob->id.next) { + for (ob = bmain->object.first; ob && ELEM(false, is_lib, is_local); ob = ob->id.next) { ParticleSystem *psys = ob->particlesystem.first; for (; psys; psys = psys->next) { if (psys->part == part) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &part->id); expand_local_particlesettings(part); } @@ -4103,7 +4103,7 @@ static void do_child_modifiers(ParticleSimulationData *sim, ParticleTexture *pte } } /* get's hair (or keyed) particles state at the "path time" specified in state->time */ -void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *state, int vel) +void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *state, const bool vel) { PARTICLE_PSMD; ParticleSystem *psys = sim->psys; diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 5a81bbf01a8..119f7b0f939 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -1581,7 +1581,7 @@ void BKE_pbvh_raycast_project_ray_root (PBVH *bvh, bool original, float ray_star typedef struct { DMSetMaterial setMaterial; - int wireframe; + bool wireframe; } PBVHNodeDrawData; void BKE_pbvh_node_draw(PBVHNode *node, void *data_v) @@ -1678,7 +1678,7 @@ static void pbvh_node_check_diffuse_changed(PBVH *bvh, PBVHNode *node) } void BKE_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3], - DMSetMaterial setMaterial, int wireframe) + DMSetMaterial setMaterial, bool wireframe) { PBVHNodeDrawData draw_data = {setMaterial, wireframe}; PBVHNode **nodes; diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index 0ea554cf89d..7c4b687d412 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -225,7 +225,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, GHash *prim_bbc, int node_index) } /* Recursively split the node if it exceeds the leaf_limit */ -static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) +static bool pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) { GHash *prim_bbc; GHash *bm_faces; @@ -238,7 +238,7 @@ static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) bm_faces_size = BLI_ghash_size(bm_faces); if (bm_faces_size <= bvh->leaf_limit) { /* Node limit not exceeded */ - return FALSE; + return false; } /* For each BMFace, store the AABB and AABB centroid */ @@ -266,7 +266,7 @@ static int pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) BLI_ghash_free(prim_bbc, NULL, NULL); MEM_freeN(bbc_array); - return TRUE; + return true; } /**********************************************************************/ @@ -765,10 +765,10 @@ static void pbvh_bmesh_split_edge(EdgeQueueContext *eq_ctx, PBVH *bvh, BM_edge_kill(bvh->bm, e); } -static int pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *bvh, - BLI_Buffer *edge_loops) +static bool pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *bvh, + BLI_Buffer *edge_loops) { - int any_subdivided = FALSE; + bool any_subdivided = false; while (!BLI_heap_is_empty(eq_ctx->q->heap)) { BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap); @@ -796,7 +796,7 @@ static int pbvh_bmesh_subdivide_long_edges(EdgeQueueContext *eq_ctx, PBVH *bvh, if (BM_edge_calc_length_squared(e) <= eq_ctx->q->limit_len_squared) continue; - any_subdivided = TRUE; + any_subdivided = true; pbvh_bmesh_split_edge(eq_ctx, bvh, e, edge_loops); } @@ -940,14 +940,14 @@ static void pbvh_bmesh_collapse_edge(PBVH *bvh, BMEdge *e, BMVert *v1, BM_vert_kill(bvh->bm, v2); } -static int pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, - PBVH *bvh, - BLI_Buffer *edge_loops, - BLI_Buffer *deleted_faces) +static bool pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, + PBVH *bvh, + BLI_Buffer *edge_loops, + BLI_Buffer *deleted_faces) { float min_len_squared = bvh->bm_min_edge_len * bvh->bm_min_edge_len; GHash *deleted_verts; - int any_collapsed = FALSE; + bool any_collapsed = false; deleted_verts = BLI_ghash_ptr_new("deleted_verts"); @@ -982,7 +982,7 @@ static int pbvh_bmesh_collapse_short_edges(EdgeQueueContext *eq_ctx, if (BM_edge_calc_length_squared(e) >= min_len_squared) continue; - any_collapsed = TRUE; + any_collapsed = true; pbvh_bmesh_collapse_edge(bvh, e, v1, v2, deleted_verts, edge_loops, @@ -1523,7 +1523,7 @@ void pbvh_bmesh_verify(PBVH *bvh) void *nip = BLI_ghashIterator_getValue(&gh_iter); int ni = GET_INT_FROM_POINTER(nip); PBVHNode *n = &bvh->nodes[ni]; - int found; + bool found; /* Check that the vert's node is a leaf */ BLI_assert(n->flag & PBVH_Leaf); @@ -1538,7 +1538,7 @@ void pbvh_bmesh_verify(PBVH *bvh) * adjacent faces */ BM_ITER_ELEM (f, &bm_iter, v, BM_FACES_OF_VERT) { if (BLI_ghash_lookup(bvh->bm_face_to_node, f) == nip) { - found = TRUE; + found = true; break; } } diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index df6534946fd..20107aa41a8 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1409,7 +1409,7 @@ void BKE_ptcache_ids_from_object(ListBase *lb, Object *ob, Scene *scene, int dup if (scene && (duplis-- > 0) && (ob->transflag & OB_DUPLI)) { ListBase *lb_dupli_ob; /* don't update the dupli groups, we only want their pid's */ - if ((lb_dupli_ob = object_duplilist_ex(G.main->eval_ctx, scene, ob, FALSE))) { + if ((lb_dupli_ob = object_duplilist_ex(G.main->eval_ctx, scene, ob, false))) { DupliObject *dob; for (dob= lb_dupli_ob->first; dob; dob= dob->next) { if (dob->ob != ob) { /* avoids recursive loops with dupliframes: bug 22988 */ @@ -3039,7 +3039,7 @@ void BKE_ptcache_free_list(ListBase *ptcaches) } } -static PointCache *ptcache_copy(PointCache *cache, int copy_data) +static PointCache *ptcache_copy(PointCache *cache, bool copy_data) { PointCache *ncache; @@ -3047,7 +3047,7 @@ static PointCache *ptcache_copy(PointCache *cache, int copy_data) BLI_listbase_clear(&ncache->mem_cache); - if (copy_data == FALSE) { + if (copy_data == false) { ncache->cached_frames = NULL; /* flag is a mix of user settings and simulator/baking state */ @@ -3082,7 +3082,7 @@ static PointCache *ptcache_copy(PointCache *cache, int copy_data) } /* returns first point cache */ -PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old, int copy_data) +PointCache *BKE_ptcache_copy_list(ListBase *ptcaches_new, ListBase *ptcaches_old, bool copy_data) { PointCache *cache = ptcaches_old->first; @@ -3144,7 +3144,8 @@ static void ptcache_dt_to_str(char *str, double dtime) static void *ptcache_bake_thread(void *ptr) { - int use_timer = FALSE, sfra, efra; + bool use_timer = false; + int sfra, efra; double stime, ptime, ctime, fetd; char run[32], cur[32], etd[32]; @@ -3165,7 +3166,7 @@ static void *ptcache_bake_thread(void *ptr) fetd = (ctime-ptime)*(efra-*data->cfra_ptr)/data->step; if (use_timer || fetd > 60.0) { - use_timer = TRUE; + use_timer = true; ptcache_dt_to_str(cur, ctime-ptime); ptcache_dt_to_str(run, ctime-stime); @@ -3183,7 +3184,7 @@ static void *ptcache_bake_thread(void *ptr) printf("\nBake %s %s (%i frames simulated).\n", (data->break_operation ? "canceled after" : "finished in"), run, *data->cfra_ptr-sfra); } - data->thread_ended = TRUE; + data->thread_ended = true; return NULL; } @@ -3212,7 +3213,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker) thread_data.scene = baker->scene; thread_data.main = baker->main; - G.is_break = FALSE; + G.is_break = false; /* set caches to baking mode and figure out start frame */ if (pid) { @@ -3304,8 +3305,8 @@ void BKE_ptcache_bake(PTCacheBaker *baker) CFRA = startframe; scene->r.framelen = 1.0; - thread_data.break_operation = FALSE; - thread_data.thread_ended = FALSE; + thread_data.break_operation = false; + thread_data.thread_ended = false; old_progress = -1; WM_cursor_wait(1); @@ -3317,7 +3318,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker) BLI_init_threads(&threads, ptcache_bake_thread, 1); BLI_insert_thread(&threads, (void*)&thread_data); - while (thread_data.thread_ended == FALSE) { + while (thread_data.thread_ended == false) { if (bake) progress = (int)(100.0f * (float)(CFRA - startframe)/(float)(thread_data.endframe-startframe)); @@ -3335,7 +3336,7 @@ void BKE_ptcache_bake(PTCacheBaker *baker) /* NOTE: breaking baking should leave calculated frames in cache, not clear it */ if (blender_test_break() && !thread_data.break_operation) { - thread_data.break_operation = TRUE; + thread_data.break_operation = true; if (baker->progressend) baker->progressend(baker->progresscontext); WM_cursor_wait(1); diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index 3d0713f9514..90b5d8cf1a1 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -291,15 +291,15 @@ Report *BKE_reports_last_displayable(ReportList *reports) return NULL; } -int BKE_reports_contain(ReportList *reports, ReportType level) +bool BKE_reports_contain(ReportList *reports, ReportType level) { Report *report; if (reports != NULL) { for (report = reports->list.first; report; report = report->next) if (report->type >= level) - return TRUE; + return true; } - return FALSE; + return false; } bool BKE_report_write_file_fp(FILE *fp, ReportList *reports, const char *header) diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c index 4b4cb054337..3f92f5881e4 100644 --- a/source/blender/blenkernel/intern/rigidbody.c +++ b/source/blender/blenkernel/intern/rigidbody.c @@ -762,7 +762,7 @@ RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld *rbw) if (rbwn->constraints) id_us_plus(&rbwn->constraints->id); - rbwn->pointcache = BKE_ptcache_copy_list(&rbwn->ptcaches, &rbw->ptcaches, FALSE); + rbwn->pointcache = BKE_ptcache_copy_list(&rbwn->ptcaches, &rbw->ptcaches, false); rbwn->objects = NULL; rbwn->physics_world = NULL; @@ -1049,7 +1049,7 @@ static void rigidbody_update_sim_ob(Scene *scene, RigidBodyWorld *rbw, Object *o /* make transformed objects temporarily kinmatic so that they can be moved by the user during simulation */ if (ob->flag & SELECT && G.moving & G_TRANSFORM_OBJ) { - RB_body_set_kinematic_state(rbo->physics_object, TRUE); + RB_body_set_kinematic_state(rbo->physics_object, true); RB_body_set_mass(rbo->physics_object, 0.0f); } @@ -1275,7 +1275,7 @@ void BKE_rigidbody_aftertrans_update(Object *ob, float loc[3], float rot[3], flo if (rbo->physics_object) { /* allow passive objects to return to original transform */ if (rbo->type == RBO_TYPE_PASSIVE) - RB_body_set_kinematic_state(rbo->physics_object, TRUE); + RB_body_set_kinematic_state(rbo->physics_object, true); RB_body_set_loc_rot(rbo->physics_object, rbo->pos, rbo->orn); } // RB_TODO update rigid body physics object's loc/rot for dynamic objects here as well (needs to be done outside bullet's update loop) diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index e501010fc56..9aca3ac87b6 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1582,7 +1582,7 @@ void BKE_scene_update_tagged(EvaluationContext *eval_ctx, Main *bmain, Scene *sc /* notify editors and python about recalc */ BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_POST); - DAG_ids_check_recalc(bmain, scene, FALSE); + DAG_ids_check_recalc(bmain, scene, false); /* clear recalc flags */ DAG_ids_clear_recalc(bmain); @@ -1665,7 +1665,7 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain, BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_POST); BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_POST); - DAG_ids_check_recalc(bmain, sce, TRUE); + DAG_ids_check_recalc(bmain, sce, true); /* clear recalc flags */ DAG_ids_clear_recalc(bmain); diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index ab725ae04a9..f471580547c 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -261,7 +261,7 @@ void BKE_spacedata_draw_locks(int set) if (set) art->do_lock = art->lock; else - art->do_lock = FALSE; + art->do_lock = false; } } } diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 9e59ec8d8d5..b5d4c00dca6 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -2068,7 +2068,7 @@ static void do_glow_effect_byte(Sequence *seq, int render_size, float facf0, flo inbuf = MEM_mallocN(4 * sizeof(float) * x * y, "glow effect input"); outbuf = MEM_mallocN(4 * sizeof(float) * x * y, "glow effect output"); - IMB_buffer_float_from_byte(inbuf, rect1, IB_PROFILE_SRGB, IB_PROFILE_SRGB, FALSE, x, y, x, x); + IMB_buffer_float_from_byte(inbuf, rect1, IB_PROFILE_SRGB, IB_PROFILE_SRGB, false, x, y, x, x); IMB_buffer_float_premultiply(inbuf, x, y); RVIsolateHighlights_float(inbuf, outbuf, x, y, glow->fMini * 3.0f, glow->fBoost * facf0, glow->fClamp); @@ -2077,7 +2077,7 @@ static void do_glow_effect_byte(Sequence *seq, int render_size, float facf0, flo RVAddBitmaps_float(inbuf, outbuf, outbuf, x, y); IMB_buffer_float_unpremultiply(outbuf, x, y); - IMB_buffer_byte_from_float(out, outbuf, 4, 0.0f, IB_PROFILE_SRGB, IB_PROFILE_SRGB, FALSE, x, y, x, x); + IMB_buffer_byte_from_float(out, outbuf, 4, 0.0f, IB_PROFILE_SRGB, IB_PROFILE_SRGB, false, x, y, x, x); MEM_freeN(inbuf); MEM_freeN(outbuf); diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index dbb865aa8ce..e834c017ea0 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1580,7 +1580,7 @@ void BKE_sequencer_proxy_rebuild(SeqIndexBuildContext *context, short *stop, sho } *progress = (float) (cfra - seq->startdisp - seq->startstill) / (seq->enddisp - seq->endstill - seq->startdisp - seq->startstill); - *do_update = TRUE; + *do_update = true; if (*stop || G.is_break) break; @@ -2571,7 +2571,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq re = RE_NewRender(scene->id.name); BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay); - RE_BlenderFrame(re, context->bmain, scene, NULL, camera, scene->lay, frame, FALSE); + RE_BlenderFrame(re, context->bmain, scene, NULL, camera, scene->lay, frame, false); /* restore previous state after it was toggled on & off by RE_BlenderFrame */ G.is_rendering = is_rendering; diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 0035de0d825..275bd693518 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -197,7 +197,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc) /* * This function raycast a single vertex and updates the hit if the "hit" is considered valid. - * Returns TRUE if "hit" was updated. + * Returns true if "hit" was updated. * Opts control whether an hit is valid or not * Supported options are: * MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (front faces hits are ignored) diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 5e7f1983fe8..f993d74959d 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -232,7 +232,7 @@ static void smoke_pos_to_cell(SmokeDomainSettings *sds, float pos[3]) } /* set domain transformations and base resolution from object derivedmesh */ -static void smoke_set_domain_from_derivedmesh(SmokeDomainSettings *sds, Object *ob, DerivedMesh *dm, int init_resolution) +static void smoke_set_domain_from_derivedmesh(SmokeDomainSettings *sds, Object *ob, DerivedMesh *dm, bool init_resolution) { size_t i; float min[3] = {FLT_MAX, FLT_MAX, FLT_MAX}, max[3] = {-FLT_MAX, -FLT_MAX, -FLT_MAX}; @@ -317,7 +317,7 @@ static int smokeModifier_init(SmokeModifierData *smd, Object *ob, Scene *scene, SmokeDomainSettings *sds = smd->domain; int res[3]; /* set domain dimensions from derivedmesh */ - smoke_set_domain_from_derivedmesh(sds, ob, dm, TRUE); + smoke_set_domain_from_derivedmesh(sds, ob, dm, true); /* reset domain values */ zero_v3_int(sds->shift); zero_v3(sds->shift_f); @@ -2468,7 +2468,7 @@ static void step(Scene *scene, Object *ob, SmokeModifierData *smd, DerivedMesh * /* update object state */ invert_m4_m4(sds->imat, ob->obmat); copy_m4_m4(sds->obmat, ob->obmat); - smoke_set_domain_from_derivedmesh(sds, ob, domain_dm, (sds->flags & MOD_SMOKE_ADAPTIVE_DOMAIN)); + smoke_set_domain_from_derivedmesh(sds, ob, domain_dm, (sds->flags & MOD_SMOKE_ADAPTIVE_DOMAIN) != 0); /* use global gravity if enabled */ if (scene->physics_settings.flag & PHYS_GLOBAL_GRAVITY) { diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index fb5fc97fd46..a2fb66eb926 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1688,7 +1688,7 @@ static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow, else sb_threads[i].ifirst = 0; sb_threads[i].do_effector = do_effector; - sb_threads[i].do_deflector = FALSE;// 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; diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c index 332eef17ae7..08daa09cc85 100644 --- a/source/blender/blenkernel/intern/speaker.c +++ b/source/blender/blenkernel/intern/speaker.c @@ -74,7 +74,7 @@ void BKE_speaker_make_local(Speaker *spk) { Main *bmain = G.main; Object *ob; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -90,13 +90,13 @@ void BKE_speaker_make_local(Speaker *spk) ob = bmain->object.first; while (ob) { if (ob->data == spk) { - if (ob->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ob->id.lib) is_lib = true; + else is_local = true; } ob = ob->id.next; } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &spk->id); } else if (is_local && is_lib) { diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 4fc241b8ea5..946f92ff4d5 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1742,7 +1742,7 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes) if (ccgdm->pbvh && ccgdm->multires.mmd && !fast) { if (dm->numTessFaceData) { BKE_pbvh_draw(ccgdm->pbvh, partial_redraw_planes, NULL, - setMaterial, FALSE); + setMaterial, false); glShadeModel(GL_FLAT); } diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 1d2caaa0640..22267c93680 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -996,7 +996,8 @@ void txt_move_left(Text *text, const bool sel) void txt_move_right(Text *text, const bool sel) { TextLine **linep; - int *charp, do_tab = FALSE, i; + int *charp, i; + bool do_tab = false; if (!text) return; if (sel) txt_curs_sel(text, &linep, &charp); @@ -1013,10 +1014,10 @@ void txt_move_right(Text *text, const bool sel) // do nice right only if there are only spaces // spaces hardcoded in DNA_text_types.h if (text->flags & TXT_TABSTOSPACES && (*linep)->line[*charp] == ' ') { - do_tab = TRUE; + do_tab = true; for (i = 0; i < *charp; i++) if ((*linep)->line[i] != ' ') { - do_tab = FALSE; + do_tab = false; break; } } @@ -2577,7 +2578,7 @@ static void txt_convert_tab_to_spaces(Text *text) txt_insert_buf(text, sb); } -static int txt_add_char_intern(Text *text, unsigned int add, int replace_tabs) +static bool txt_add_char_intern(Text *text, unsigned int add, bool replace_tabs) { char *tmp, ch[BLI_UTF8_MAX]; size_t add_len; @@ -2620,12 +2621,12 @@ static int txt_add_char_intern(Text *text, unsigned int add, int replace_tabs) return 1; } -int txt_add_char(Text *text, unsigned int add) +bool txt_add_char(Text *text, unsigned int add) { - return txt_add_char_intern(text, add, text->flags & TXT_TABSTOSPACES); + return txt_add_char_intern(text, add, (text->flags & TXT_TABSTOSPACES) != 0); } -int txt_add_raw_char(Text *text, unsigned int add) +bool txt_add_raw_char(Text *text, unsigned int add) { return txt_add_char_intern(text, add, 0); } @@ -2636,7 +2637,7 @@ void txt_delete_selected(Text *text) txt_make_dirty(text); } -int txt_replace_char(Text *text, unsigned int add) +bool txt_replace_char(Text *text, unsigned int add) { unsigned int del; size_t del_size = 0, add_size; @@ -2709,7 +2710,7 @@ void txt_indent(Text *text) curc_old = text->curc; num = 0; - while (TRUE) { + while (true) { /* don't indent blank lines */ if (text->curl->len != 0) { @@ -2758,7 +2759,7 @@ void txt_unindent(Text *text) int num = 0; const char *remove = "\t"; int indentlen = 1; - int unindented_first = FALSE; + bool unindented_first = false; /* hardcoded: TXT_TABSIZE = 4 spaces: */ int spaceslen = TXT_TABSIZE; @@ -2773,11 +2774,12 @@ void txt_unindent(Text *text) indentlen = spaceslen; } - while (TRUE) { + while (true) { int i = 0; if (BLI_strncasecmp(text->curl->line, remove, indentlen) == 0) { - if (num == 0) unindented_first = TRUE; + if (num == 0) + unindented_first = true; while (i < text->curl->len) { text->curl->line[i] = text->curl->line[i + indentlen]; i++; @@ -2822,7 +2824,7 @@ void txt_comment(Text *text) if (!text->sell) return; // Need to change this need to check if only one line is selected to more than one num = 0; - while (TRUE) { + while (true) { tmp = MEM_mallocN(text->curl->len + 2, "textline_string"); text->curc = 0; @@ -2869,7 +2871,7 @@ void txt_uncomment(Text *text) if (!text->curl) return; if (!text->sell) return; - while (TRUE) { + while (true) { int i = 0; if (text->curl->line[i] == remove) { diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index d192ca71c12..d7248c521c4 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -789,7 +789,8 @@ void BKE_texture_make_local(Tex *tex) Lamp *la; Brush *br; ParticleSettings *pa; - int a, is_local = FALSE, is_lib = FALSE; + int a; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -808,8 +809,8 @@ void BKE_texture_make_local(Tex *tex) while (ma) { for (a = 0; a < MAX_MTEX; a++) { if (ma->mtex[a] && ma->mtex[a]->tex == tex) { - if (ma->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (ma->id.lib) is_lib = true; + else is_local = true; } } ma = ma->id.next; @@ -818,8 +819,8 @@ void BKE_texture_make_local(Tex *tex) while (la) { for (a = 0; a < MAX_MTEX; a++) { if (la->mtex[a] && la->mtex[a]->tex == tex) { - if (la->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (la->id.lib) is_lib = true; + else is_local = true; } } la = la->id.next; @@ -828,8 +829,8 @@ void BKE_texture_make_local(Tex *tex) while (wrld) { for (a = 0; a < MAX_MTEX; a++) { if (wrld->mtex[a] && wrld->mtex[a]->tex == tex) { - if (wrld->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (wrld->id.lib) is_lib = true; + else is_local = true; } } wrld = wrld->id.next; @@ -837,12 +838,12 @@ void BKE_texture_make_local(Tex *tex) br = bmain->brush.first; while (br) { if (br->mtex.tex == tex) { - if (br->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (br->id.lib) is_lib = true; + else is_local = true; } if (br->mask_mtex.tex == tex) { - if (br->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (br->id.lib) is_lib = true; + else is_local = true; } br = br->id.next; } @@ -850,14 +851,14 @@ void BKE_texture_make_local(Tex *tex) while (pa) { for (a = 0; a < MAX_MTEX; a++) { if (pa->mtex[a] && pa->mtex[a]->tex == tex) { - if (pa->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (pa->id.lib) is_lib = true; + else is_local = true; } } pa = pa->id.next; } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &tex->id); extern_local_texture(tex); } @@ -1034,7 +1035,7 @@ Tex *give_current_material_texture(Material *ma) return tex; } -int give_active_mtex(ID *id, MTex ***mtex_ar, short *act) +bool give_active_mtex(ID *id, MTex ***mtex_ar, short *act) { switch (GS(id->name)) { case ID_MA: @@ -1056,10 +1057,10 @@ int give_active_mtex(ID *id, MTex ***mtex_ar, short *act) default: *mtex_ar = NULL; if (act) *act = 0; - return FALSE; + return false; } - return TRUE; + return true; } void set_active_mtex(ID *id, short act) @@ -1307,7 +1308,7 @@ PointDensity *BKE_add_pointdensity(void) pd->falloff_curve->preset = CURVE_PRESET_LINE; pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE; curvemap_reset(pd->falloff_curve->cm, &pd->falloff_curve->clipr, pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE); - curvemapping_changed(pd->falloff_curve, FALSE); + curvemapping_changed(pd->falloff_curve, false); return pd; } diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 3d24bc55fff..a96960c0345 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2500,7 +2500,7 @@ void BKE_tracking_dopesheet_tag_update(MovieTracking *tracking) { MovieTrackingDopesheet *dopesheet = &tracking->dopesheet; - dopesheet->ok = FALSE; + dopesheet->ok = false; } /* Do dopesheet update, if update is not needed nothing will happen. */ @@ -2523,5 +2523,5 @@ void BKE_tracking_dopesheet_update(MovieTracking *tracking) /* frame coverage */ tracking_dopesheet_calc_coverage(tracking); - dopesheet->ok = TRUE; + dopesheet->ok = true; } diff --git a/source/blender/blenkernel/intern/tracking_solver.c b/source/blender/blenkernel/intern/tracking_solver.c index 5a28d8d264e..44a4c11ec92 100644 --- a/source/blender/blenkernel/intern/tracking_solver.c +++ b/source/blender/blenkernel/intern/tracking_solver.c @@ -456,7 +456,7 @@ static void reconstruct_update_solve_cb(void *customdata, double progress, const if (progressdata->progress) { *progressdata->progress = progress; - *progressdata->do_update = TRUE; + *progressdata->do_update = true; } BLI_snprintf(progressdata->stats_message, progressdata->message_size, "Solving camera | %s", message); diff --git a/source/blender/blenkernel/intern/tracking_stabilize.c b/source/blender/blenkernel/intern/tracking_stabilize.c index 567386733a3..f198f686b52 100644 --- a/source/blender/blenkernel/intern/tracking_stabilize.c +++ b/source/blender/blenkernel/intern/tracking_stabilize.c @@ -245,7 +245,7 @@ static float stabilization_calculate_autoscale_factor(MovieTracking *tracking, i stab->scale = 1.0f; } - stab->ok = TRUE; + stab->ok = true; return stab->scale; } @@ -289,7 +289,7 @@ void BKE_tracking_stabilization_data_get(MovieTracking *tracking, int framenr, i stabilization_calculate_data(tracking, framenr, width, height, firstmedian, median, translation, scale, angle); - stab->ok = TRUE; + stab->ok = true; } else { stabilization_calculate_data(tracking, framenr, width, height, firstmedian, median, diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 00c51f5b52d..6a05014385d 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -471,7 +471,7 @@ static const char *unit_find_str(const char *str, const char *substr) /* previous char cannot be a letter */ if (str_found == str || /* weak unicode support!, so "µm" won't match up be replaced by "m" - * since non ascii utf8 values will NEVER return TRUE */ + * since non ascii utf8 values will NEVER return true */ isalpha_or_utf8(*BLI_str_prev_char_utf8(str_found)) == 0) { /* next char cannot be alphanum */ diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 0104efb4892..5065c3ae04f 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -75,7 +75,7 @@ void BKE_world_free_ex(World *wrld, bool do_id_user) void BKE_world_free(World *wrld) { - BKE_world_free_ex(wrld, TRUE); + BKE_world_free_ex(wrld, true); } World *add_world(Main *bmain, const char *name) @@ -166,7 +166,7 @@ void BKE_world_make_local(World *wrld) { Main *bmain = G.main; Scene *sce; - int is_local = FALSE, is_lib = FALSE; + bool is_local = false, is_lib = false; /* - only lib users: do nothing * - only local users: set flag @@ -179,14 +179,14 @@ void BKE_world_make_local(World *wrld) return; } - for (sce = bmain->scene.first; sce && ELEM(FALSE, is_lib, is_local); sce = sce->id.next) { + for (sce = bmain->scene.first; sce && ELEM(false, is_lib, is_local); sce = sce->id.next) { if (sce->world == wrld) { - if (sce->id.lib) is_lib = TRUE; - else is_local = TRUE; + if (sce->id.lib) is_lib = true; + else is_local = true; } } - if (is_local && is_lib == FALSE) { + if (is_local && is_lib == false) { id_clear_lib_data(bmain, &wrld->id); } else if (is_local && is_lib) { diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 3ddbb9e45c4..fcfd4f9dd85 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1142,7 +1142,7 @@ int BKE_ffmpeg_append(RenderData *rd, int start_frame, int frame, int *pixels, i if (ffmpeg_autosplit) { if (avio_tell(outfile->pb) > FFMPEG_AUTOSPLIT_SIZE) { - end_ffmpeg_impl(TRUE); + end_ffmpeg_impl(true); ffmpeg_autosplit_count++; success &= start_ffmpeg_impl(rd, rectx, recty, reports); } @@ -1168,7 +1168,7 @@ static void end_ffmpeg_impl(int is_autosplit) #endif #ifdef WITH_AUDASPACE - if (is_autosplit == FALSE) { + if (is_autosplit == false) { if (audio_mixdown_device) { AUD_closeReadDevice(audio_mixdown_device); audio_mixdown_device = 0; @@ -1240,7 +1240,7 @@ static void end_ffmpeg_impl(int is_autosplit) void BKE_ffmpeg_end(void) { - end_ffmpeg_impl(FALSE); + end_ffmpeg_impl(false); } /* properties */ @@ -1609,17 +1609,17 @@ bool BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd) int codec = rd->ffcodecdata.codec; if (codec == AV_CODEC_ID_QTRLE) - return TRUE; + return true; if (codec == AV_CODEC_ID_PNG) - return TRUE; + return true; #ifdef FFMPEG_FFV1_ALPHA_SUPPORTED if (codec == AV_CODEC_ID_FFV1) - return TRUE; + return true; #endif - return FALSE; + return false; } #endif diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c index acbbcb0b043..746b99ffb52 100644 --- a/source/blender/blenkernel/intern/writeframeserver.c +++ b/source/blender/blenkernel/intern/writeframeserver.c @@ -252,7 +252,7 @@ static int handle_request(RenderData *rd, char *req) } if (strcmp(path, "/close.txt") == 0) { safe_puts(good_bye); - G.is_break = TRUE; /* Abort render */ + G.is_break = true; /* Abort render */ return -1; } return -1; diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index e3d9e40d272..7cfc8948baa 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -111,13 +111,13 @@ void mul_m3_fl(float R[3][3], float f); void mul_m4_fl(float R[4][4], float f); void mul_mat3_m4_fl(float R[4][4], float f); -int invert_m3_ex(float m[3][3], const float epsilon); -int invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon); +bool invert_m3_ex(float m[3][3], const float epsilon); +bool invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon); -int invert_m3(float R[3][3]); -int invert_m3_m3(float R[3][3], float A[3][3]); -int invert_m4(float R[4][4]); -int invert_m4_m4(float R[4][4], float A[4][4]); +bool invert_m3(float R[3][3]); +bool invert_m3_m3(float R[3][3], float A[3][3]); +bool invert_m4(float R[4][4]); +bool invert_m4_m4(float R[4][4], float A[4][4]); /* double ariphmetics */ void mul_m4_v4d(float M[4][4], double r[4]); diff --git a/source/blender/blenlib/BLI_stack.h b/source/blender/blenlib/BLI_stack.h index 9151e6ab93f..564ff513490 100644 --- a/source/blender/blenlib/BLI_stack.h +++ b/source/blender/blenlib/BLI_stack.h @@ -48,7 +48,7 @@ void BLI_stack_push(BLI_Stack *stack, void *src); * If stack is empty, 'dst' will not be modified. */ void BLI_stack_pop(BLI_Stack *stack, void *dst); -/* Returns TRUE if the stack is empty, FALSE otherwise */ +/* Returns true if the stack is empty, false otherwise */ int BLI_stack_empty(const BLI_Stack *stack); #endif diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h index b7a70a8cb38..8d9ed07668f 100644 --- a/source/blender/blenlib/BLI_sys_types.h +++ b/source/blender/blenlib/BLI_sys_types.h @@ -219,21 +219,6 @@ typedef bool _BLI_Bool; # define __bool_true_false_are_defined 1 #endif -/* remove this when we're ready to remove TRUE/FALSE completely */ -#ifdef WITH_BOOL_COMPAT -/* interim until all occurrences of these can be updated to stdbool */ -/* XXX Why not use the true/false velues here? */ -# ifndef FALSE -# define FALSE 0 -# endif - -# ifndef TRUE -# define TRUE 1 -# endif -#endif - - - #ifdef __cplusplus } #endif diff --git a/source/blender/blenlib/intern/BLI_args.c b/source/blender/blenlib/intern/BLI_args.c index fb35b55a935..8bd35f651b7 100644 --- a/source/blender/blenlib/intern/BLI_args.c +++ b/source/blender/blenlib/intern/BLI_args.c @@ -49,7 +49,7 @@ typedef struct bArgDoc { const char *short_arg; const char *long_arg; const char *documentation; - int done; + bool done; } bArgDoc; typedef struct bAKey { @@ -243,7 +243,7 @@ void BLI_argsPrintArgDoc(struct bArgs *ba, const char *arg) internalDocPrint(d); - d->done = TRUE; + d->done = true; } } diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 0effdf081a9..6fdfac2e1cb 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1275,7 +1275,7 @@ static void bfs_find_nearest(BVHNearestData *data, BVHNode *node) else { /* adjust heap size */ if ((heap_size >= max_heap_size) && - ADJUST_MEMORY(default_heap, (void **)&heap, heap_size + 1, &max_heap_size, sizeof(heap[0])) == FALSE) + ADJUST_MEMORY(default_heap, (void **)&heap, heap_size + 1, &max_heap_size, sizeof(heap[0])) == false) { printf("WARNING: bvh_find_nearest got out of memory\n"); diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 4702b384211..988979b5d0a 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -360,7 +360,7 @@ int BLI_copy(const char *file, const char *to) UTF16_ENCODE(file); UTF16_ENCODE(str); - err = !CopyFileW(file_16, str_16, FALSE); + err = !CopyFileW(file_16, str_16, false); UTF16_UN_ENCODE(str); UTF16_UN_ENCODE(file); diff --git a/source/blender/blenlib/intern/freetypefont.c b/source/blender/blenlib/intern/freetypefont.c index 4680cfc1add..79f009e8aa3 100644 --- a/source/blender/blenlib/intern/freetypefont.c +++ b/source/blender/blenlib/intern/freetypefont.c @@ -301,7 +301,7 @@ static VChar *objchr_to_ftvfontdata(VFont *vfont, FT_ULong charcode) } } else { - err = TRUE; + err = true; return NULL; } diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index cfcbd0bce72..4cbe1a76f58 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -601,10 +601,10 @@ float determinant_m3_array(float m[3][3]) m[2][0] * (m[0][1] * m[1][2] - m[0][2] * m[1][1])); } -int invert_m3_ex(float m[3][3], const float epsilon) +bool invert_m3_ex(float m[3][3], const float epsilon) { float tmp[3][3]; - int success; + bool success; success = invert_m3_m3_ex(tmp, m, epsilon); copy_m3_m3(m, tmp); @@ -612,10 +612,11 @@ int invert_m3_ex(float m[3][3], const float epsilon) return success; } -int invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon) +bool invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon) { float det; - int a, b, success; + int a, b; + bool success; BLI_assert(epsilon >= 0.0f); @@ -638,10 +639,10 @@ int invert_m3_m3_ex(float m1[3][3], float m2[3][3], const float epsilon) return success; } -int invert_m3(float m[3][3]) +bool invert_m3(float m[3][3]) { float tmp[3][3]; - int success; + bool success; success = invert_m3_m3(tmp, m); copy_m3_m3(m, tmp); @@ -649,10 +650,11 @@ int invert_m3(float m[3][3]) return success; } -int invert_m3_m3(float m1[3][3], float m2[3][3]) +bool invert_m3_m3(float m1[3][3], float m2[3][3]) { float det; - int a, b, success; + int a, b; + bool success; /* calc adjoint */ adjoint_m3_m3(m1, m2); @@ -674,10 +676,10 @@ int invert_m3_m3(float m1[3][3], float m2[3][3]) return success; } -int invert_m4(float m[4][4]) +bool invert_m4(float m[4][4]) { float tmp[4][4]; - int success; + bool success; success = invert_m4_m4(tmp, m); copy_m4_m4(m, tmp); @@ -688,13 +690,13 @@ int invert_m4(float m[4][4]) /* * invertmat - * computes the inverse of mat and puts it in inverse. Returns - * TRUE on success (i.e. can always find a pivot) and FALSE on failure. + * true on success (i.e. can always find a pivot) and false on failure. * Uses Gaussian Elimination with partial (maximal column) pivoting. * * Mark Segal - 1992 */ -int invert_m4_m4(float inverse[4][4], float mat[4][4]) +bool invert_m4_m4(float inverse[4][4], float mat[4][4]) { int i, j, k; double temp; diff --git a/source/blender/blenlib/intern/string_cursor_utf8.c b/source/blender/blenlib/intern/string_cursor_utf8.c index 57913af3703..09b7ecb2277 100644 --- a/source/blender/blenlib/intern/string_cursor_utf8.c +++ b/source/blender/blenlib/intern/string_cursor_utf8.c @@ -126,10 +126,10 @@ bool BLI_str_cursor_step_next_utf8(const char *str, size_t maxlen, int *pos) if ((*pos) > (int)maxlen) { (*pos) = (int)maxlen; } - return TRUE; + return true; } - return FALSE; + return false; } bool BLI_str_cursor_step_prev_utf8(const char *str, size_t UNUSED(maxlen), int *pos) @@ -139,11 +139,11 @@ bool BLI_str_cursor_step_prev_utf8(const char *str, size_t UNUSED(maxlen), int * const char *str_prev = BLI_str_find_prev_char_utf8(str, str_pos); if (str_prev) { (*pos) -= (str_pos - str_prev); - return TRUE; + return true; } } - return FALSE; + return false; } void BLI_str_cursor_step_utf8(const char *str, size_t maxlen, diff --git a/source/blender/blenlib/intern/uvproject.c b/source/blender/blenlib/intern/uvproject.c index 730ab01bfd2..cf6a6366e9a 100644 --- a/source/blender/blenlib/intern/uvproject.c +++ b/source/blender/blenlib/intern/uvproject.c @@ -58,7 +58,7 @@ void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo if (uci->do_pano) { float angle = atan2f(pv4[0], -pv4[2]) / ((float)M_PI * 2.0f); /* angle around the camera */ - if (uci->do_persp == FALSE) { + if (uci->do_persp == false) { target[0] = angle; /* no correct method here, just map to 0-1 */ target[1] = pv4[1] / uci->camsize; } @@ -74,7 +74,7 @@ void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo if (pv4[2] == 0.0f) pv4[2] = 0.00001f; /* don't allow div by 0 */ - if (uci->do_persp == FALSE) { + if (uci->do_persp == false) { target[0] = (pv4[0] / uci->camsize); target[1] = (pv4[1] / uci->camsize); } @@ -152,10 +152,10 @@ ProjCameraInfo *BLI_uvproject_camera_info(Object *ob, float(*rotmat)[4], float w /* normal projection */ if (rotmat) { copy_m4_m4(uci.rotmat, rotmat); - uci.do_rotmat = TRUE; + uci.do_rotmat = true; } else { - uci.do_rotmat = FALSE; + uci.do_rotmat = false; } /* also make aspect ratio adjustment factors */ diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c index 731536ff0df..e0cbe278ffb 100644 --- a/source/blender/blenlib/intern/voronoi.c +++ b/source/blender/blenlib/intern/voronoi.c @@ -58,9 +58,9 @@ typedef struct VoronoiEvent { typedef struct VoronoiParabola { struct VoronoiParabola *left, *right, *parent; VoronoiEvent *event; - int is_leaf; - float site[2]; VoronoiEdge *edge; + float site[2]; + bool is_leaf; } VoronoiParabola; typedef struct VoronoiProcess { @@ -118,7 +118,7 @@ static VoronoiParabola *voronoiParabola_new(void) { VoronoiParabola *parabola = MEM_callocN(sizeof(VoronoiParabola), "voronoi parabola"); - parabola->is_leaf = FALSE; + parabola->is_leaf = false; parabola->event = NULL; parabola->edge = NULL; parabola->parent = NULL; @@ -131,7 +131,7 @@ static VoronoiParabola *voronoiParabola_newSite(float site[2]) VoronoiParabola *parabola = MEM_callocN(sizeof(VoronoiParabola), "voronoi parabola site"); copy_v2_v2(parabola->site, site); - parabola->is_leaf = TRUE; + parabola->is_leaf = true; parabola->event = NULL; parabola->edge = NULL; parabola->parent = NULL; @@ -364,7 +364,7 @@ static void voronoi_addParabola(VoronoiProcess *process, float site[2]) float *fp = root->site; float s[2]; - root->is_leaf = FALSE; + root->is_leaf = false; voronoiParabola_setLeft(root, voronoiParabola_newSite(fp)); voronoiParabola_setRight(root, voronoiParabola_newSite(site)); @@ -399,7 +399,7 @@ static void voronoi_addParabola(VoronoiProcess *process, float site[2]) BLI_addtail(&process->edges, el); par->edge = er; - par->is_leaf = FALSE; + par->is_leaf = false; p0 = voronoiParabola_newSite(par->site); p1 = voronoiParabola_newSite(site); @@ -566,29 +566,29 @@ static int voronoi_getNextSideCoord(ListBase *edges, float coord[2], int dim, in int other_dim = dim ? 0 : 1; while (edge) { - int ok = FALSE; + bool ok = false; float co[2], cur_distance; if (fabsf(edge->start[other_dim] - coord[other_dim]) < VORONOI_EPS && len_squared_v2v2(coord, edge->start) > VORONOI_EPS) { copy_v2_v2(co, edge->start); - ok = TRUE; + ok = true; } if (fabsf(edge->end[other_dim] - coord[other_dim]) < VORONOI_EPS && len_squared_v2v2(coord, edge->end) > VORONOI_EPS) { copy_v2_v2(co, edge->end); - ok = TRUE; + ok = true; } if (ok) { if (dir > 0 && coord[dim] > co[dim]) { - ok = FALSE; + ok = false; } else if (dir < 0 && coord[dim] < co[dim]) { - ok = FALSE; + ok = false; } } @@ -693,7 +693,7 @@ void BLI_voronoi_compute(const VoronoiSite *sites, int sites_total, int width, i BLI_movelisttolist(edges, &process.edges); } -static int testVoronoiEdge(const float site[2], const float point[2], const VoronoiEdge *edge) +static bool testVoronoiEdge(const float site[2], const float point[2], const VoronoiEdge *edge) { float p[2]; @@ -701,11 +701,11 @@ static int testVoronoiEdge(const float site[2], const float point[2], const Voro if (len_squared_v2v2(p, edge->start) > VORONOI_EPS && len_squared_v2v2(p, edge->end) > VORONOI_EPS) { - return FALSE; + return false; } } - return TRUE; + return true; } static int voronoi_addTriangulationPoint(const float coord[2], const float color[3], @@ -787,16 +787,16 @@ void BLI_voronoi_triangulate(const VoronoiSite *sites, int sites_total, ListBase edge = boundary_edges.first; while (edge) { VoronoiEdge *test_edge = boundary_edges.first; - int ok_start = TRUE, ok_end = TRUE; + bool ok_start = true, ok_end = true; while (test_edge) { if (ok_start && !testVoronoiEdge(sites[i].co, edge->start, test_edge)) { - ok_start = FALSE; + ok_start = false; break; } if (ok_end && !testVoronoiEdge(sites[i].co, edge->end, test_edge)) { - ok_end = FALSE; + ok_end = false; break; } diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 7db33ff79be..65ded37eb7b 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -82,7 +82,7 @@ void RegisterBlendExtension(void) LONG lresult; HKEY hkey = 0; HKEY root = 0; - BOOL usr_mode = FALSE; + BOOL usr_mode = false; DWORD dwd = 0; char buffer[256]; @@ -103,7 +103,7 @@ void RegisterBlendExtension(void) lresult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Classes", 0, KEY_ALL_ACCESS, &root); if (lresult != ERROR_SUCCESS) { /* try HKCU on failure */ - usr_mode = TRUE; + usr_mode = true; lresult = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Classes", 0, KEY_ALL_ACCESS, &root); if (lresult != ERROR_SUCCESS) RegisterBlendExtension_Fail(0); @@ -157,7 +157,7 @@ void RegisterBlendExtension(void) ThumbHandlerDLL = "BlendThumb.dll"; #else IsWow64Process(GetCurrentProcess(), &IsWOW64); - if (IsWOW64 == TRUE) + if (IsWOW64 == true) ThumbHandlerDLL = "BlendThumb64.dll"; else ThumbHandlerDLL = "BlendThumb.dll"; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4ab3afcaa0c..13827f833e0 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2534,7 +2534,7 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) * the ntree interface sockets, which need to be redirected to new interface nodes. */ for (link = ntree->links.first; link; link = next_link) { - int free_link = FALSE; + bool free_link = false; next_link = link->next; if (link->fromnode == NULL) { @@ -2549,8 +2549,9 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) input_locy += link->tonode->locy; } } - else - free_link = TRUE; + else { + free_link = true; + } } if (link->tonode == NULL) { @@ -2565,8 +2566,9 @@ static void lib_verify_nodetree(Main *main, int UNUSED(open)) output_locy += link->fromnode->locy; } } - else - free_link = TRUE; + else { + free_link = true; + } } if (free_link) @@ -2626,7 +2628,7 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree) bNodeLink *link; ntree->init = 0; /* to set callbacks and force setting types */ - ntree->is_updating = FALSE; + ntree->is_updating = false; ntree->typeinfo= NULL; ntree->interface_type = NULL; @@ -5361,7 +5363,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) seq->strip = newdataadr(fd, seq->strip); if (seq->strip && seq->strip->done==0) { - seq->strip->done = TRUE; + seq->strip->done = true; if (ELEM4(seq->type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) { seq->strip->stripdata = newdataadr(fd, seq->strip->stripdata); @@ -5493,7 +5495,7 @@ static void direct_link_scene(FileData *fd, Scene *sce) rbw->effector_weights = BKE_add_effector_weights(NULL); /* link cache */ - direct_link_pointcache_list(fd, &rbw->ptcaches, &rbw->pointcache, FALSE); + direct_link_pointcache_list(fd, &rbw->ptcaches, &rbw->pointcache, false); /* make sure simulation starts from the beginning after loading file */ if (rbw->pointcache) { rbw->ltime = (float)rbw->pointcache->startframe; @@ -7654,7 +7656,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath) lib_link_all(fd, bfd->main); //do_versions_after_linking(fd, NULL, bfd->main); // XXX: not here (or even in this function at all)! this causes crashes on many files - Aligorith (July 04, 2010) - lib_verify_nodetree(bfd->main, TRUE); + lib_verify_nodetree(bfd->main, true); fix_relpaths_library(fd->relabase, bfd->main); /* make all relative paths, relative to the open blend file */ link_global(fd, bfd); /* as last */ @@ -8598,10 +8600,11 @@ void BLO_expand_main(void *fdhandle, Main *mainvar) ListBase *lbarray[MAX_LIBARRAY]; FileData *fd = fdhandle; ID *id; - int a, do_it = TRUE; + int a; + bool do_it = true; while (do_it) { - do_it = FALSE; + do_it = false; a = set_listbasepointers(mainvar, lbarray); while (a--) { @@ -8683,7 +8686,7 @@ void BLO_expand_main(void *fdhandle, Main *mainvar) break; } - do_it = TRUE; + do_it = true; id->flag -= LIB_NEED_EXPAND; } @@ -8723,27 +8726,27 @@ static void give_base_to_objects(Main *mainvar, Scene *sce, Library *lib, const * * (ob->id.flag & LIB_PRE_EXISTING)==0 means that this is a newly appended object - Campbell */ if (is_group_append==0 || (ob->id.flag & LIB_PRE_EXISTING)==0) { - int do_it = FALSE; + bool do_it = false; if (ob->id.us == 0) { - do_it = TRUE; + do_it = true; } else if (idcode==ID_GR) { - if (ob->id.us==1 && is_link==FALSE && ob->id.lib==lib) { + if (ob->id.us == 1 && is_link == false && ob->id.lib == lib) { if ((ob->flag & OB_FROMGROUP) && object_in_any_scene(mainvar, ob)==0) { - do_it = TRUE; + do_it = true; } } } else { /* when appending, make sure any indirectly loaded objects * get a base else they cant be accessed at all [#27437] */ - if (ob->id.us==1 && is_link==FALSE && ob->id.lib==lib) { + if (ob->id.us==1 && is_link == false && ob->id.lib == lib) { /* we may be appending from a scene where we already * have a linked object which is not in any scene [#27616] */ if ((ob->id.flag & LIB_PRE_EXISTING)==0) { if (object_in_any_scene(mainvar, ob)==0) { - do_it = TRUE; + do_it = true; } } } @@ -9012,7 +9015,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in mainl = NULL; /* blo_join_main free's mainl, cant use anymore */ lib_link_all(*fd, mainvar); - lib_verify_nodetree(mainvar, FALSE); + lib_verify_nodetree(mainvar, false); fix_relpaths_library(G.main->name, mainvar); /* make all relative paths, relative to the open blend file */ if (C) { @@ -9087,13 +9090,14 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) Main *mainl = mainlist->first; Main *mainptr; ListBase *lbarray[MAX_LIBARRAY]; - int a, do_it = TRUE; + int a; + bool do_it = true; /* expander now is callback function */ BLO_main_expander(expand_doit_library); while (do_it) { - do_it = FALSE; + do_it = false; /* test 1: read libdata */ mainptr= mainl->next; @@ -9180,7 +9184,7 @@ static void read_libraries(FileData *basefd, ListBase *mainlist) } } if (fd) { - do_it = TRUE; + do_it = true; a = set_listbasepointers(mainptr, lbarray); while (a--) { ID *id = lbarray[a]->first; diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index c276bd0876c..17600d1fcd1 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -1141,7 +1141,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) World *wo; Tex *tex; ParticleSettings *part; - int do_gravity = FALSE; + bool do_gravity = false; for (sce = main->scene.first; sce; sce = sce->id.next) if (sce->unit.scale_length == 0.0f) @@ -1197,7 +1197,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) sce->physics_settings.gravity[0] = sce->physics_settings.gravity[1] = 0.0f; sce->physics_settings.gravity[2] = -9.81f; sce->physics_settings.flag = PHYS_GLOBAL_GRAVITY; - do_gravity = TRUE; + do_gravity = true; } } @@ -2561,7 +2561,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) tex->pd->falloff_curve->preset = CURVE_PRESET_LINE; tex->pd->falloff_curve->cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE; curvemap_reset(tex->pd->falloff_curve->cm, &tex->pd->falloff_curve->clipr, tex->pd->falloff_curve->preset, CURVEMAP_SLOPE_POSITIVE); - curvemapping_changed(tex->pd->falloff_curve, FALSE); + curvemapping_changed(tex->pd->falloff_curve, false); } } } diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 43da85c2715..cf74ef068eb 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -1198,7 +1198,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) if (sl->spacetype == SPACE_CLIP) { SpaceClip *sclip = (SpaceClip *)sl; ARegion *ar; - int hide = FALSE; + bool hide = false; for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_PREVIEW) { @@ -1207,7 +1207,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) ar->v2d.flag &= ~V2D_IS_INITIALISED; ar->alignment = RGN_ALIGN_NONE; - hide = TRUE; + hide = true; } } } @@ -1530,7 +1530,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 19)) { Scene *scene; Image *ima; - int colormanagement_disabled = FALSE; + bool colormanagement_disabled = false; /* make scenes which are not using color management have got None as display device, * so they wouldn't perform linear-to-sRGB conversion on display @@ -1544,7 +1544,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) } - colormanagement_disabled = TRUE; + colormanagement_disabled = true; } } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index f724458c2ba..ffd1d6d1be1 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2229,7 +2229,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase) SEQ_BEGIN (ed, seq) { - if (seq->strip) seq->strip->done = FALSE; + if (seq->strip) seq->strip->done = false; writestruct(wd, DATA, "Sequence", 1, seq); } SEQ_END @@ -2275,7 +2275,7 @@ static void write_scenes(WriteData *wd, ListBase *scebase) else if (seq->type==SEQ_TYPE_MOVIE || seq->type==SEQ_TYPE_SOUND_RAM || seq->type == SEQ_TYPE_SOUND_HD) writestruct(wd, DATA, "StripElem", 1, strip->stripdata); - strip->done = TRUE; + strip->done = true; } write_sequence_modifiers(wd, &seq->modifiers); @@ -2625,7 +2625,8 @@ static void write_libraries(WriteData *wd, Main *main) { ListBase *lbarray[MAX_LIBARRAY]; ID *id; - int a, tot, foundone; + int a, tot; + bool found_one; for (; main; main= main->next) { @@ -2633,24 +2634,24 @@ static void write_libraries(WriteData *wd, Main *main) /* test: is lib being used */ if (main->curlib && main->curlib->packedfile) - foundone = TRUE; + found_one = true; else { - foundone = FALSE; + found_one = false; while (tot--) { for (id= lbarray[tot]->first; id; id= id->next) { if (id->us>0 && (id->flag & LIB_EXTERN)) { - foundone = TRUE; + found_one = true; break; } } - if (foundone) break; + if (found_one) break; } } /* to be able to restore quit.blend and temp saves, the packed blend has to be in undo buffers... */ /* XXX needs rethink, just like save UI in undo files now - would be nice to append things only for the] * quit.blend and temp saves */ - if (foundone) { + if (found_one) { writestruct(wd, ID_LI, "Library", 1, main->curlib); if (main->curlib->packedfile) { diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 4aa55d9324b..d781f9c3572 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -380,7 +380,7 @@ static BMFace *bev_create_ngon(BMesh *bm, BMVert **vert_arr, const int totv, interp_f = facerep; } if (interp_f) - BM_loop_interp_from_face(bm, l, interp_f, TRUE, TRUE); + BM_loop_interp_from_face(bm, l, interp_f, true, true); i++; } } @@ -504,7 +504,7 @@ static BMFace *bev_create_quad_straddle(BMesh *bm, BMVert *v1, BMVert *v2, BMVer else facerep = f2; if (facerep) - BM_loop_interp_from_face(bm, l, facerep, TRUE, TRUE); + BM_loop_interp_from_face(bm, l, facerep, true, true); } return f; } @@ -831,10 +831,10 @@ static void offset_in_two_planes(BevelParams *bp, EdgeHalf *e1, EdgeHalf *e2, Ed } } -/* Offset by e->offset in plane with normal plane_no, on left if left==TRUE, +/* Offset by e->offset in plane with normal plane_no, on left if left==true, * else on right. If no is NULL, choose an arbitrary plane different * from eh's direction. */ -static void offset_in_plane(EdgeHalf *e, const float plane_no[3], int left, float r[3]) +static void offset_in_plane(EdgeHalf *e, const float plane_no[3], bool left, float r[3]) { float dir[3], no[3], fdir[3]; BMVert *v; @@ -1007,8 +1007,8 @@ static int bev_ccw_test(BMEdge *a, BMEdge *b, BMFace *f) /* Fill matrix r_mat so that a point in the sheared parallelogram with corners * va, vmid, vb (and the 4th that is implied by it being a parallelogram) * is the result of transforming the unit square by multiplication with r_mat. - * If it can't be done because the parallelogram is degenerate, return FALSE - * else return TRUE. + * If it can't be done because the parallelogram is degenerate, return false + * else return true. * Method: * Find vo, the origin of the parallelogram with other three points va, vmid, vb. * Also find vd, which is in direction normal to parallelogram and 1 unit away @@ -1024,8 +1024,8 @@ static int bev_ccw_test(BMEdge *a, BMEdge *b, BMFace *f) * and B has the right side as columns - both extended into homogeneous coords. * So M = B*(Ainverse). Doing Ainverse by hand gives the code below. */ -static int make_unit_square_map(const float va[3], const float vmid[3], const float vb[3], - float r_mat[4][4]) +static bool make_unit_square_map(const float va[3], const float vmid[3], const float vb[3], + float r_mat[4][4]) { float vo[3], vd[3], vb_vmid[3], va_vmid[3], vddir[3]; @@ -1052,10 +1052,10 @@ static int make_unit_square_map(const float va[3], const float vmid[3], const fl sub_v3_v3(&r_mat[3][0], vmid); r_mat[3][3] = 1.0f; - return TRUE; + return true; } else - return FALSE; + return false; } /* Like make_unit_square_map, but this one makes a matrix that transforms the @@ -1406,7 +1406,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct) if (bv->edgecount == 2 && bv->selcount == 1) { /* special case: beveled edge meets non-beveled one at valence 2 vert */ no = e->fprev ? e->fprev->no : (e->fnext ? e->fnext->no : NULL); - offset_in_plane(e, no, TRUE, co); + offset_in_plane(e, no, true, co); if (construct) { v = add_new_bound_vert(mem_arena, vm, co); v->efirst = v->elast = v->ebev = e; @@ -1416,7 +1416,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct) adjust_bound_vert(e->leftv, co); } no = e->fnext ? e->fnext->no : (e->fprev ? e->fprev->no : NULL); - offset_in_plane(e, no, FALSE, co); + offset_in_plane(e, no, false, co); if (construct) { v = add_new_bound_vert(mem_arena, vm, co); v->efirst = v->elast = e; @@ -1706,7 +1706,7 @@ static BoundVert *pipe_test(BevVert *bv) for (e = &bv->edges[0]; e != &bv->edges[bv->edgecount]; e++) { if (e->fnext) { if (dot_v3v3(dir1, e->fnext->no) > BEVEL_EPSILON) - return FALSE; + return NULL; } } return v1; @@ -2623,7 +2623,7 @@ static void bevel_build_trifan(BMesh *bm, BevVert *bv) BMLoop *l_new; BMFace *f_new; BLI_assert(v_fan == l_fan->v); - f_new = BM_face_split(bm, f, l_fan, l_fan->next->next, &l_new, NULL, FALSE); + f_new = BM_face_split(bm, f, l_fan, l_fan->next->next, &l_new, NULL, false); if (f_new->len > f->len) { f = f_new; @@ -2668,7 +2668,7 @@ static void bevel_build_quadstrip(BMesh *bm, BevVert *bv) l_b = l_b->next; } else { - BM_face_split(bm, f, l_a, l_b, &l_new, NULL, FALSE); + BM_face_split(bm, f, l_a, l_b, &l_new, NULL, false); f = l_new->f; /* walk around the new face to get the next verts to split */ @@ -2918,11 +2918,11 @@ static BevVert *bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v) bme = e->e; BM_BEVEL_EDGE_TAG_ENABLE(bme); if (BM_elem_flag_test(bme, BM_ELEM_TAG) && !bp->vertex_only) { - e->is_bev = TRUE; + e->is_bev = true; e->seg = bp->seg; } else { - e->is_bev = FALSE; + e->is_bev = false; e->seg = 0; } e->is_rev = (bme->v2 == v); @@ -3083,7 +3083,7 @@ static bool bev_rebuild_polygon(BMesh *bm, BevelParams *bp, BMFace *f) BLI_array_append(vv, v->nv.v); } - do_rebuild = TRUE; + do_rebuild = true; } else { BLI_array_append(vv, l->v); diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index e65561cbf74..e2c36df564a 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -701,7 +701,7 @@ void ArmatureImporter::make_shape_keys() KeyBlock *kb; //insert basis key - kb = BKE_keyblock_add_ctime(key, "Basis", FALSE); + kb = BKE_keyblock_add_ctime(key, "Basis", false); BKE_key_convert_from_mesh(source_me, kb); //insert other shape keys @@ -715,7 +715,7 @@ void ArmatureImporter::make_shape_keys() me->key = key; std::string morph_name = *this->mesh_importer->get_geometry_name(me->id.name); - kb = BKE_keyblock_add_ctime(key, morph_name.c_str(), FALSE); + kb = BKE_keyblock_add_ctime(key, morph_name.c_str(), false); BKE_key_convert_from_mesh(me, kb); //apply weights diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index f5b81c6f6b0..d91689ff496 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -362,6 +362,6 @@ void bc_triangulate_mesh(Mesh *me) BM_mesh_bm_from_me(bm, me, true, false, 0); BM_mesh_triangulate(bm, quad_method, use_beauty, tag_only, NULL, NULL); - BM_mesh_bm_to_me(bm, me, FALSE); + BM_mesh_bm_to_me(bm, me, false); BM_mesh_free(bm); } diff --git a/source/blender/compositor/intern/COM_ExecutionSystemHelper.h b/source/blender/compositor/intern/COM_ExecutionSystemHelper.h index 002423c195c..ae9e75e0408 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystemHelper.h +++ b/source/blender/compositor/intern/COM_ExecutionSystemHelper.h @@ -92,7 +92,7 @@ public: * Find all Node Operations that needs to be executed. * @param rendering * the rendering parameter will tell what type of execution we are doing - * FALSE is editing, TRUE is rendering + * false is editing, true is rendering */ static void findOutputNodeOperations(vector<NodeOperation *> *result, vector<NodeOperation *>& operations, bool rendering); diff --git a/source/blender/compositor/intern/COM_compositor.cpp b/source/blender/compositor/intern/COM_compositor.cpp index 1c1dcf1c37d..99655c67a3f 100644 --- a/source/blender/compositor/intern/COM_compositor.cpp +++ b/source/blender/compositor/intern/COM_compositor.cpp @@ -36,7 +36,7 @@ extern "C" { #include "COM_MovieDistortionOperation.h" static ThreadMutex s_compositorMutex; -static bool is_compositorMutex_init = FALSE; +static bool is_compositorMutex_init = false; static void intern_freeCompositorCaches() { @@ -50,9 +50,9 @@ void COM_execute(RenderData *rd, Scene *scene, bNodeTree *editingtree, int rende /* initialize mutex, TODO this mutex init is actually not thread safe and * should be done somewhere as part of blender startup, all the other * initializations can be done lazily */ - if (is_compositorMutex_init == FALSE) { + if (is_compositorMutex_init == false) { BLI_mutex_init(&s_compositorMutex); - is_compositorMutex_init = TRUE; + is_compositorMutex_init = true; } BLI_mutex_lock(&s_compositorMutex); @@ -69,7 +69,7 @@ void COM_execute(RenderData *rd, Scene *scene, bNodeTree *editingtree, int rende * Reserved preview size is determined by render output for now. */ float aspect = rd->xsch > 0 ? (float)rd->ysch / (float)rd->xsch : 1.0f; - BKE_node_preview_init_tree(editingtree, COM_PREVIEW_SIZE, (int)(COM_PREVIEW_SIZE * aspect), FALSE); + BKE_node_preview_init_tree(editingtree, COM_PREVIEW_SIZE, (int)(COM_PREVIEW_SIZE * aspect), false); /* initialize workscheduler, will check if already done. TODO deinitialize somewhere */ bool use_opencl = (editingtree->flag & NTREE_COM_OPENCL) != 0; @@ -116,7 +116,7 @@ void COM_deinitialize() BLI_mutex_lock(&s_compositorMutex); intern_freeCompositorCaches(); WorkScheduler::deinitialize(); - is_compositorMutex_init = FALSE; + is_compositorMutex_init = false; BLI_mutex_unlock(&s_compositorMutex); BLI_mutex_end(&s_compositorMutex); } diff --git a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp index f656b7f4892..99a7c5b64c4 100644 --- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp @@ -251,7 +251,7 @@ static void convolve(float *dst, MemoryBuffer *in1, MemoryBuffer *in2) fRGB wt, *colp; int x, y, ch; int xbl, ybl, nxb, nyb, xbsz, ybsz; - int in2done = FALSE; + bool in2done = false; const unsigned int kernelWidth = in2->getWidth(); const unsigned int kernelHeight = in2->getHeight(); const unsigned int imageWidth = in1->getWidth(); @@ -358,7 +358,7 @@ static void convolve(float *dst, MemoryBuffer *in1, MemoryBuffer *in2) } } - in2done = TRUE; + in2done = true; } } diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp index 0a1587c6ffa..17b85847fcf 100644 --- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp @@ -148,7 +148,7 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri continue; } - pattern_ibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, marker, TRUE, FALSE); + pattern_ibuf = BKE_tracking_get_pattern_imbuf(ibuf, track, marker, true, false); zero_v3(site->color); diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.cpp b/source/blender/compositor/operations/COM_MapRangeOperation.cpp index 2e80d4f1ba3..7a89ba91b4c 100644 --- a/source/blender/compositor/operations/COM_MapRangeOperation.cpp +++ b/source/blender/compositor/operations/COM_MapRangeOperation.cpp @@ -31,7 +31,7 @@ MapRangeOperation::MapRangeOperation() : NodeOperation() this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_VALUE); this->m_inputOperation = NULL; - this->m_useClamp = FALSE; + this->m_useClamp = false; } void MapRangeOperation::initExecution() diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index 7ee2c111932..112b5912ad3 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -54,7 +54,7 @@ void MaskOperation::initExecution() BKE_maskrasterize_handle_init(this->m_rasterMaskHandles[0], this->m_mask, this->m_maskWidth, this->m_maskHeight, - TRUE, this->m_do_smooth, this->m_do_feather); + true, this->m_do_smooth, this->m_do_feather); } else { /* make a throw away copy of the mask */ @@ -88,7 +88,7 @@ void MaskOperation::initExecution() BKE_maskrasterize_handle_init(this->m_rasterMaskHandles[i], mask_temp, this->m_maskWidth, this->m_maskHeight, - TRUE, this->m_do_smooth, this->m_do_feather); + true, this->m_do_smooth, this->m_do_feather); frame_iter += frame_step; } diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index 094b2c4268a..75b36d7672a 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -141,8 +141,8 @@ void OutputSingleLayerOperation::deinitExecution() IMB_colormanagement_imbuf_for_write(ibuf, true, false, m_viewSettings, m_displaySettings, this->m_format); - BKE_makepicstring(filename, this->m_path, bmain->name, this->m_rd->cfra, this->m_format, - (this->m_rd->scemode & R_EXTENSION), true); + BKE_makepicstring(filename, this->m_path, bmain->name, this->m_rd->cfra, + this->m_format, (this->m_rd->scemode & R_EXTENSION) != 0, true); if (0 == BKE_imbuf_write(ibuf, filename, this->m_format)) printf("Cannot save Node File Output to %s\n", filename); @@ -212,7 +212,7 @@ void OutputOpenExrMultiLayerOperation::deinitExecution() void *exrhandle = IMB_exr_get_handle(); BKE_makepicstring_from_type(filename, this->m_path, bmain->name, this->m_rd->cfra, R_IMF_IMTYPE_MULTILAYER, - (this->m_rd->scemode & R_EXTENSION), true); + (this->m_rd->scemode & R_EXTENSION) != 0, true); BLI_make_existing_file(filename); for (unsigned int i = 0; i < this->m_layers.size(); ++i) { diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp index 2ea18f64aab..85c7f449fd5 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.cpp +++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp @@ -56,7 +56,7 @@ void PreviewOperation::verifyPreview(bNodeInstanceHash *previews, bNodeInstanceK /* Size (0, 0) ensures the preview rect is not allocated in advance, * this is set later in initExecution once the resolution is determined. */ - this->m_preview = BKE_node_preview_verify(previews, key, 0, 0, TRUE); + this->m_preview = BKE_node_preview_verify(previews, key, 0, 0, true); } void PreviewOperation::initExecution() diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 3f81bb35db5..44ac78ed358 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -3408,7 +3408,8 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi Scene *scene = CTX_data_scene(C); PointerRNA id_ptr, ptr; PropertyRNA *prop; - short flag = 0, done = FALSE; + short flag = 0; + bool done = false; float cfra; /* get current frame */ @@ -3446,7 +3447,8 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi Scene *scene = CTX_data_scene(C); PointerRNA id_ptr, ptr; PropertyRNA *prop; - short flag = 0, done = FALSE; + short flag = 0; + bool done = false; float cfra; /* get current frame */ diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index eb9881aa0b6..341e27a12bf 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -891,7 +891,7 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re { ListBase islands = {NULL, NULL}; Link *channel, *chanNext = NULL; - short done = FALSE; + bool done = false; /* don't waste effort on an empty list */ if (BLI_listbase_is_empty(list)) @@ -919,7 +919,7 @@ static bool rearrange_animchannel_islands(ListBase *list, AnimChanRearrangeFp re /* perform rearranging */ if (rearrange_func(&islands, island)) { island->flag |= REORDER_ISLAND_MOVED; - done = TRUE; + done = true; } } } @@ -2287,7 +2287,7 @@ static void ANIM_OT_channels_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } /* ******************* Rename Operator ***************************** */ @@ -2828,15 +2828,15 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf) /* click-select */ /* XXX for now, only leftmouse.... */ WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "children_only", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "children_only", true); /* rename */ WM_keymap_add_item(keymap, "ANIM_OT_channels_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); /* deselect all */ WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "invert", true); /* borderselect */ WM_keymap_add_item(keymap, "ANIM_OT_channels_select_border", BKEY, KM_PRESS, 0, 0); @@ -2859,9 +2859,9 @@ void ED_keymap_animchannels(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "ANIM_OT_channels_expand", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "all", FALSE); + RNA_boolean_set(kmi->ptr, "all", false); kmi = WM_keymap_add_item(keymap, "ANIM_OT_channels_collapse", PADMINUS, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "all", FALSE); + RNA_boolean_set(kmi->ptr, "all", false); /* rearranging */ RNA_enum_set(WM_keymap_add_item(keymap, "ANIM_OT_channels_move", PAGEUPKEY, KM_PRESS, 0, 0)->ptr, "direction", REARRANGE_ANIMCHAN_UP); diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 71e405a2209..c0543862265 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -249,7 +249,7 @@ static void animchan_sync_fcurve(bAnimContext *ac, bAnimListElem *ale, FCurve ** /* get strip name, and check if this strip is selected */ seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all["); - seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, FALSE); + seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, false); if (seq_name) MEM_freeN(seq_name); /* update selection status */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 9ec8b678f0b..6c28d05110f 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -921,7 +921,7 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id if (ed) { /* get strip name, and check if this strip is selected */ seq_name = BLI_str_quoted_substrN(fcu->rna_path, "sequences_all["); - seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, FALSE); + seq = BKE_sequence_get_by_name(ed->seqbasep, seq_name, false); if (seq_name) MEM_freeN(seq_name); } diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 49e136f6e95..9cba7d04c3e 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -1210,7 +1210,7 @@ static void MARKER_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } /* *********************** (de)select all ***************** */ @@ -1504,16 +1504,16 @@ void ED_keymap_marker(wmKeyConfig *keyconf) WM_keymap_verify_item(keymap, "MARKER_OT_duplicate", DKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_verify_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); #ifdef DURIAN_CAMERA_SWITCH kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "camera", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "camera", true); kmi = WM_keymap_add_item(keymap, "MARKER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "camera", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "camera", true); #else (void)kmi; #endif diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index cc2144c3617..072b4c4c201 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -66,25 +66,25 @@ static int change_frame_poll(bContext *C) ScrArea *sa = CTX_wm_area(C); /* XXX temp? prevent changes during render */ - if (G.is_rendering) return FALSE; + if (G.is_rendering) return false; /* although it's only included in keymaps for regions using ED_KEYMAP_ANIMATION, * this shouldn't show up in 3D editor (or others without 2D timeline view) via search */ if (sa) { if (ELEM5(sa->spacetype, SPACE_TIME, SPACE_ACTION, SPACE_NLA, SPACE_SEQ, SPACE_CLIP)) { - return TRUE; + return true; } else if (sa->spacetype == SPACE_IPO) { /* NOTE: Graph Editor has special version which does some extra stuff. * No need to show the generic error message for that case though! */ - return FALSE; + return false; } } CTX_wm_operator_poll_msg_set(C, "Expected an timeline/animation area to be active"); - return FALSE; + return false; } /* Set the new frame number */ diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index d96fa2ba853..808eb6656d3 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -163,13 +163,13 @@ FCurve *verify_driver_fcurve(ID *id, const char rna_path[], const int array_inde /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block */ -short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type) +int ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short flag, int type) { PointerRNA id_ptr, ptr; PropertyRNA *prop; FCurve *fcu; int array_index_max; - int done = FALSE; + int done_tot; /* validate pointer first - exit if failure */ RNA_id_pointer_create(id, &id_ptr); @@ -249,21 +249,21 @@ short ANIM_add_driver(ReportList *reports, ID *id, const char rna_path[], int ar } /* set the done status */ - done += (fcu != NULL); + done_tot += (fcu != NULL); } /* done */ - return done; + return done_tot; } /* Main Driver Management API calls: * Remove the driver for the specified property on the given ID block (if available) */ -short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag)) +bool ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { AnimData *adt; FCurve *fcu; - int success = 0; + bool success = false; /* we don't check the validity of the path here yet, but it should be ok... */ adt = BKE_animdata_from_id(id); @@ -282,7 +282,7 @@ short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_pat free_fcurve(fcu); /* done successfully */ - success |= 1; + success = true; } } else { @@ -295,7 +295,7 @@ short ANIM_remove_driver(ReportList *UNUSED(reports), ID *id, const char rna_pat BLI_remlink(&adt->drivers, fcu); free_fcurve(fcu); - success = 1; + success = true; } } } @@ -320,7 +320,7 @@ void free_anim_drivers_copybuf(void) } /* Checks if there is a driver in the copy/paste buffer */ -short ANIM_driver_can_paste(void) +bool ANIM_driver_can_paste(void) { return (channeldriver_copypaste_buf != NULL); } @@ -330,7 +330,7 @@ short ANIM_driver_can_paste(void) /* Main Driver Management API calls: * Make a copy of the driver for the specified property on the given ID block */ -short ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) +bool ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { PointerRNA id_ptr, ptr; PropertyRNA *prop; @@ -377,7 +377,7 @@ short ANIM_copy_driver(ReportList *reports, ID *id, const char rna_path[], int a * Add a new driver for the specified property on the given ID block or replace an existing one * with the driver + driver-curve data from the buffer */ -short ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) +bool ANIM_paste_driver(ReportList *reports, ID *id, const char rna_path[], int array_index, short UNUSED(flag)) { PointerRNA id_ptr, ptr; PropertyRNA *prop; @@ -501,7 +501,7 @@ static int add_driver_button_exec(bContext *C, wmOperator *op) { PointerRNA ptr = {{NULL}}; PropertyRNA *prop = NULL; - short success = 0; + int success = 0; int index; const bool all = RNA_boolean_get(op->ptr, "all"); diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 75ea133176c..48611633592 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -117,7 +117,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s RNA_pointer_create(id, &RNA_FModifierFunctionGenerator, fcm, &ptr); /* basic settings (backdrop + mode selector + some padding) */ - /* col = uiLayoutColumn(layout, TRUE); */ /* UNUSED */ + /* col = uiLayoutColumn(layout, true); */ /* UNUSED */ block = uiLayoutGetBlock(layout); uiBlockBeginAlign(block); but = uiDefButR(block, MENU, B_FMODIFIER_REDRAW, NULL, 0, 0, bwidth, UI_UNIT_Y, &ptr, "mode", -1, 0, 0, -1, -1, NULL); @@ -136,7 +136,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s int maxXWidth; /* draw polynomial order selector */ - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); block = uiLayoutGetBlock(row); but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0.5f * UI_UNIT_X, 0, bwidth, UI_UNIT_Y, &data->poly_order, 1, 100, 0, 0, @@ -155,7 +155,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s } /* draw controls for each coefficient and a + sign at end of row */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); block = uiLayoutGetBlock(row); cp = data->coefficients; @@ -183,7 +183,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s uiDefBut(block, LABEL, 1, "+", 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); /* next coefficient on a new row */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); block = uiLayoutGetBlock(row); } else { @@ -200,7 +200,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s unsigned int i; /* draw polynomial order selector */ - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); block = uiLayoutGetBlock(row); but = uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width - 1.5 * UI_UNIT_X, UI_UNIT_Y, &data->poly_order, 1, 100, 0, 0, @@ -209,7 +209,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s /* draw controls for each pair of coefficients */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); block = uiLayoutGetBlock(row); cp = data->coefficients; @@ -236,7 +236,7 @@ static void draw_modifier__generator(uiLayout *layout, ID *id, FModifier *fcm, s uiDefBut(block, LABEL, 1, ") \xc3\x97", 0, 0, 2 * UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); /* set up new row for the next pair of coefficients */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); block = uiLayoutGetBlock(row); } else @@ -259,11 +259,11 @@ static void draw_modifier__fn_generator(uiLayout *layout, ID *id, FModifier *fcm RNA_pointer_create(id, &RNA_FModifierFunctionGenerator, fcm, &ptr); /* add the settings */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); 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); @@ -284,16 +284,16 @@ static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, shor /* split into 2 columns * NOTE: the mode comboboxes shouldn't get labels, otherwise there isn't enough room */ - split = uiLayoutSplit(layout, 0.5f, FALSE); + split = uiLayoutSplit(layout, 0.5f, false); /* before range */ - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemL(col, IFACE_("Before:"), ICON_NONE); uiItemR(col, &ptr, "mode_before", 0, "", ICON_NONE); uiItemR(col, &ptr, "cycles_before", 0, NULL, ICON_NONE); /* after range */ - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemL(col, IFACE_("After:"), ICON_NONE); uiItemR(col, &ptr, "mode_after", 0, "", ICON_NONE); uiItemR(col, &ptr, "cycles_after", 0, NULL, ICON_NONE); @@ -314,16 +314,16 @@ static void draw_modifier__noise(uiLayout *layout, ID *id, FModifier *fcm, short uiItemR(layout, &ptr, "blend_type", 0, NULL, ICON_NONE); /* split into 2 columns */ - split = uiLayoutSplit(layout, 0.5f, FALSE); + split = uiLayoutSplit(layout, 0.5f, false); /* col 1 */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiItemR(col, &ptr, "scale", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "strength", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "offset", 0, NULL, ICON_NONE); /* col 2 */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiItemR(col, &ptr, "phase", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "depth", 0, NULL, ICON_NONE); } @@ -425,18 +425,18 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh RNA_pointer_create(id, &RNA_FModifierEnvelope, fcm, &ptr); /* general settings */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("Envelope:"), ICON_NONE); uiItemR(col, &ptr, "reference_value", 0, NULL, ICON_NONE); - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE); uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE); /* control points header */ /* TODO: move this control-point control stuff to using the new special widgets for lists * the current way is far too cramped */ - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); block = uiLayoutGetBlock(row); uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); @@ -448,7 +448,7 @@ static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, sh /* control points list */ for (i = 0, fed = env->data; i < env->totvert; i++, fed++) { /* get a new row to operate on */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); block = uiLayoutGetBlock(row); uiBlockBeginAlign(block); @@ -481,36 +481,36 @@ static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, shor /* row 1: minimum */ { - /* row = uiLayoutRow(layout, FALSE); */ /* UNUSED */ + /* row = uiLayoutRow(layout, false); */ /* UNUSED */ /* split into 2 columns */ - split = uiLayoutSplit(layout, 0.5f, FALSE); + split = uiLayoutSplit(layout, 0.5f, false); /* x-minimum */ - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemR(col, &ptr, "use_min_x", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "min_x", 0, NULL, ICON_NONE); /* y-minimum*/ - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemR(col, &ptr, "use_min_y", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "min_y", 0, NULL, ICON_NONE); } /* row 2: maximum */ { - /* row = uiLayoutRow(layout, FALSE); */ /* UNUSED */ + /* row = uiLayoutRow(layout, false); */ /* UNUSED */ /* split into 2 columns */ - split = uiLayoutSplit(layout, 0.5f, FALSE); + split = uiLayoutSplit(layout, 0.5f, false); /* x-minimum */ - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemR(col, &ptr, "use_max_x", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "max_x", 0, NULL, ICON_NONE); /* y-minimum*/ - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemR(col, &ptr, "use_max_y", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "max_y", 0, NULL, ICON_NONE); } @@ -528,23 +528,23 @@ static void draw_modifier__stepped(uiLayout *layout, ID *id, FModifier *fcm, sho RNA_pointer_create(id, &RNA_FModifierStepped, fcm, &ptr); /* block 1: "stepping" settings */ - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, &ptr, "frame_step", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "frame_offset", 0, NULL, ICON_NONE); /* block 2: start range settings */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, &ptr, "use_frame_start", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_start")); uiItemR(sub, &ptr, "frame_start", 0, NULL, ICON_NONE); /* block 3: end range settings */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, &ptr, "use_frame_end", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(&ptr, "use_frame_end")); uiItemR(sub, &ptr, "frame_end", 0, NULL, ICON_NONE); } @@ -568,11 +568,11 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifier /* get layout-row + UI-block for this */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); block = uiLayoutGetBlock(row); // err... /* left-align -------------------------------------------- */ - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); uiBlockSetEmboss(block, UI_EMBOSSN); @@ -590,7 +590,7 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifier uiItemL(sub, IFACE_("<Unknown Modifier>"), ICON_NONE); /* right-align ------------------------------------------- */ - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); @@ -652,28 +652,28 @@ void ANIM_uiTemplate_fmodifier_draw(uiLayout *layout, ID *id, ListBase *modifier box = uiLayoutBox(layout); /* restricted range ----------------------------------------------------- */ - col = uiLayoutColumn(box, TRUE); + col = uiLayoutColumn(box, true); /* top row: use restricted range */ - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &ptr, "use_restricted_range", 0, NULL, ICON_NONE); if (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT) { /* second row: settings */ - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &ptr, "frame_start", 0, IFACE_("Start"), ICON_NONE); uiItemR(row, &ptr, "frame_end", 0, IFACE_("End"), ICON_NONE); /* third row: blending influence */ - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &ptr, "blend_in", 0, IFACE_("In"), ICON_NONE); uiItemR(row, &ptr, "blend_out", 0, IFACE_("Out"), ICON_NONE); } /* influence -------------------------------------------------------------- */ - col = uiLayoutColumn(box, TRUE); + col = uiLayoutColumn(box, true); /* top row: use influence */ uiItemR(col, &ptr, "use_influence", 0, NULL, ICON_NONE); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index c2d8332b6fd..72402d498ba 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1367,7 +1367,7 @@ static int insert_key_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UN else { /* just call the exec() on the active keyingset */ RNA_enum_set(op->ptr, "type", 0); - RNA_boolean_set(op->ptr, "confirm_success", TRUE); + RNA_boolean_set(op->ptr, "confirm_success", true); return op->type->exec(C, op); } @@ -1511,7 +1511,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) FCurve *fcu, *fcn; for (fcu = act->curves.first; fcu; fcu = fcn) { - short can_delete = FALSE; + bool can_delete = false; fcn = fcu->next; @@ -1529,13 +1529,13 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) /* delete if bone is selected*/ if ((pchan) && (pchan->bone)) { if (pchan->bone->flag & BONE_SELECTED) - can_delete = TRUE; + can_delete = true; } } } else { /* object mode - all of Object's F-Curves are affected */ - can_delete = TRUE; + can_delete = true; } /* delete F-Curve completely */ @@ -1930,7 +1930,7 @@ bool fcurve_frame_has_keyframe(FCurve *fcu, float frame, short filter) /* Checks whether an Action has a keyframe for a given frame * Since we're only concerned whether a keyframe exists, we can simply loop until a match is found... */ -static short action_frame_has_keyframe(bAction *act, float frame, short filter) +static bool action_frame_has_keyframe(bAction *act, float frame, short filter) { FCurve *fcu; @@ -1958,7 +1958,7 @@ static short action_frame_has_keyframe(bAction *act, float frame, short filter) } /* Checks whether an Object has a keyframe for a given frame */ -static short object_frame_has_keyframe(Object *ob, float frame, short filter) +static bool object_frame_has_keyframe(Object *ob, float frame, short filter) { /* error checking */ if (ob == NULL) @@ -2016,7 +2016,7 @@ static short object_frame_has_keyframe(Object *ob, float frame, short filter) /* --------------- API ------------------- */ /* Checks whether a keyframe exists for the given ID-block one the given frame */ -short id_frame_has_keyframe(ID *id, float frame, short filter) +bool id_frame_has_keyframe(ID *id, float frame, short filter) { /* sanity checks */ if (id == NULL) @@ -2064,10 +2064,10 @@ bool ED_autokeyframe_object(bContext *C, Scene *scene, Object *ob, KeyingSet *ks ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); BLI_freelistN(&dsources); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -2090,7 +2090,7 @@ bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel * pchan->bone->flag &= ~BONE_UNKEYED; } - return TRUE; + return true; } else { /* add unkeyed tags */ @@ -2098,6 +2098,6 @@ bool ED_autokeyframe_pchan(bContext *C, Scene *scene, Object *ob, bPoseChannel * pchan->bone->flag |= BONE_UNKEYED; } - return FALSE; + return false; } } diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index 9d8fc708de6..3e7009337a8 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -783,7 +783,7 @@ EnumPropertyItem *ANIM_keying_sets_enum_itemf(bContext *C, PointerRNA *UNUSED(pt /* Polling API ----------------------------------------------- */ /* Check if KeyingSet can be used in the current context */ -short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) +bool ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) { if ((ks->flag & KEYINGSET_ABSOLUTE) == 0) { KeyingSetInfo *ksi = ANIM_keyingset_info_find_name(ks->typeinfo); @@ -797,7 +797,7 @@ short ANIM_keyingset_context_ok_poll(bContext *C, KeyingSet *ks) return (ksi->poll(ksi, C)); } - return 1; + return true; } /* Special 'Overrides' Iterator for Relative KeyingSets ------ */ diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 456dd802086..52a8137f27f 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -548,9 +548,9 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) for (ebone = arm->edbo->first; ((ebone) && (ebone != first)); ebone = ebone->next) { if (EBONE_VISIBLE(arm, ebone)) { /* we extrude per definition the tip */ - do_extrude = FALSE; + do_extrude = false; if (ebone->flag & (BONE_TIPSEL | BONE_SELECTED)) { - do_extrude = TRUE; + do_extrude = true; } else if (ebone->flag & BONE_ROOTSEL) { /* but, a bone with parent deselected we do the root... */ @@ -589,7 +589,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) totbone++; newbone = MEM_callocN(sizeof(EditBone), "extrudebone"); - if (do_extrude == TRUE) { + if (do_extrude == true) { copy_v3_v3(newbone->head, ebone->tail); copy_v3_v3(newbone->tail, newbone->head); newbone->parent = ebone; diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c index 63869f50c1b..e5e4ee9bf08 100644 --- a/source/blender/editors/armature/armature_edit.c +++ b/source/blender/editors/armature/armature_edit.c @@ -268,8 +268,8 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_edit_object(C); const short type = RNA_enum_get(op->ptr, "type"); - const short axis_only = RNA_boolean_get(op->ptr, "axis_only"); - const short axis_flip = RNA_boolean_get(op->ptr, "axis_flip"); + const bool axis_only = RNA_boolean_get(op->ptr, "axis_only"); + const bool axis_flip = RNA_boolean_get(op->ptr, "axis_flip"); float imat[3][3]; diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c index be23c285cf7..f3c23c1f202 100644 --- a/source/blender/editors/armature/armature_ops.c +++ b/source/blender/editors/armature/armature_ops.c @@ -179,7 +179,7 @@ void ED_operatormacros_armature(void) "Create new bones from the selected joints and move them", OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); - RNA_boolean_set(otmacro->ptr, "forked", FALSE); + RNA_boolean_set(otmacro->ptr, "forked", false); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); @@ -189,7 +189,7 @@ void ED_operatormacros_armature(void) "Create new bones from the selected joints and move them", OPTYPE_UNDO | OPTYPE_REGISTER); otmacro = WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude"); - RNA_boolean_set(otmacro->ptr, "forked", TRUE); + RNA_boolean_set(otmacro->ptr, "forked", true); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); } @@ -215,16 +215,16 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SKETCH_OT_gesture", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_stroke", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "snap", TRUE); + RNA_boolean_set(kmi->ptr, "snap", true); WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, 0, 0); kmi = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "snap", TRUE); + RNA_boolean_set(kmi->ptr, "snap", true); /* only set in editmode armature, by space_view3d listener */ kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "ARMATURE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_align", AKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); @@ -243,21 +243,21 @@ void ED_keymap_armature(wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "action", SEL_INVERT); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_mirror", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "ARMATURE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_add_item(keymap, "ARMATURE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "ARMATURE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); @@ -315,9 +315,9 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "POSE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); @@ -334,16 +334,16 @@ void ED_keymap_armature(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "flipped", FALSE); + RNA_boolean_set(kmi->ptr, "flipped", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "flipped", TRUE); + RNA_boolean_set(kmi->ptr, "flipped", true); #ifdef __APPLE__ WM_keymap_add_item(keymap, "POSE_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0); - RNA_boolean_set(kmi->ptr, "flipped", FALSE); + RNA_boolean_set(kmi->ptr, "flipped", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_paste", VKEY, KM_PRESS, KM_OSKEY | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "flipped", TRUE); + RNA_boolean_set(kmi->ptr, "flipped", true); #endif kmi = WM_keymap_add_item(keymap, "POSE_OT_select_all", AKEY, KM_PRESS, 0, 0); @@ -355,17 +355,17 @@ void ED_keymap_armature(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_PARENT); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "POSE_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "direction", BONE_SELECT_CHILD); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_add_item(keymap, "POSE_OT_select_linked", LKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "POSE_OT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index d51b27aefb8..e420e56fdb0 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -256,7 +256,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); } /* does bones and points */ diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c index e3059e113d6..560af2dbd0b 100644 --- a/source/blender/editors/armature/armature_skinning.c +++ b/source/blender/editors/armature/armature_skinning.c @@ -272,7 +272,7 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob, if (numbones == 0) return; - if (ED_vgroup_data_create(ob->data) == FALSE) + if (ED_vgroup_data_create(ob->data) == false) return; /* create an array of pointer to bones that are skinnable diff --git a/source/blender/editors/armature/editarmature_generate.c b/source/blender/editors/armature/editarmature_generate.c index 179e0a97c9d..4eb9e3ecc79 100644 --- a/source/blender/editors/armature/editarmature_generate.c +++ b/source/blender/editors/armature/editarmature_generate.c @@ -39,7 +39,7 @@ void setBoneRollFromNormal(EditBone *bone, const float no[3], float UNUSED(invma copy_v3_v3(normal, no); mul_m3_v3(tmat, normal); - bone->roll = ED_rollBoneToVector(bone, normal, FALSE); + bone->roll = ED_rollBoneToVector(bone, normal, false); } } diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index a0411f246c8..8f71f722525 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -159,11 +159,11 @@ static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float q if (angle_normalized_v3v3(x_axis, new_up_axis) < angle_normalized_v3v3(z_axis, new_up_axis)) { rotation_between_vecs_to_quat(qroll, new_up_axis, x_axis); /* set roll rotation quat */ - return ED_rollBoneToVector(bone, x_axis, FALSE); + return ED_rollBoneToVector(bone, x_axis, false); } else { rotation_between_vecs_to_quat(qroll, new_up_axis, z_axis); /* set roll rotation quat */ - return ED_rollBoneToVector(bone, z_axis, FALSE); + return ED_rollBoneToVector(bone, z_axis, false); } } @@ -208,7 +208,7 @@ static float rollBoneByQuatJoint(RigEdge *edge, RigEdge *previous, float qrot[4] /* real qroll between normal and up_axis */ rotation_between_vecs_to_quat(qroll, new_up_axis, normal); - return ED_rollBoneToVector(edge->bone, normal, FALSE); + return ED_rollBoneToVector(edge->bone, normal, false); } } @@ -219,7 +219,7 @@ float rollBoneByQuat(EditBone *bone, float old_up_axis[3], float qrot[4]) copy_v3_v3(new_up_axis, old_up_axis); mul_qt_v3(qrot, new_up_axis); - return ED_rollBoneToVector(bone, new_up_axis, FALSE); + return ED_rollBoneToVector(bone, new_up_axis, false); } /************************************ DESTRUCTORS ******************************************************/ @@ -1129,7 +1129,7 @@ static void RIG_removeUneededOffsets(RigGraph *rg) } } -static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bone, RigNode *starting_node, int selected) +static void RIG_arcFromBoneChain(RigGraph *rg, ListBase *list, EditBone *root_bone, RigNode *starting_node, bool selected) { EditBone *bone, *last_bone = root_bone; RigArc *arc = NULL; diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index bc47a673365..c2a54c6d9f8 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -635,8 +635,8 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource, bool use_topology = (me->editflag & ME_EDIT_MIRROR_TOPO) != 0; MVert *mvert = me->mvert; - int use_vert_sel = FALSE; - int use_face_sel = FALSE; + bool use_vert_sel = false; + bool use_face_sel = false; *err_str = NULL; @@ -662,9 +662,7 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource, if (use_vert_sel) { for (a = 0, mp = me->mpoly; a < me->totpoly; mp++, a++) { for (j = 0, ml = me->mloop + mp->loopstart; j < mp->totloop; j++, ml++) { - if (use_vert_sel) { - mask[ml->v] = (mvert[ml->v].flag & SELECT) != 0; - } + mask[ml->v] = (mvert[ml->v].flag & SELECT) != 0; } } } diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index d1c096e6cf5..b354facb9b3 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -424,7 +424,7 @@ static void pose_copy_menu(Scene *scene) /* copy constraints to tmpbase and apply 'local' tags before * appending to list of constraints for this channel */ - BKE_copy_constraints(&tmp_constraints, &pchanact->constraints, TRUE); + BKE_copy_constraints(&tmp_constraints, &pchanact->constraints, true); if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { bConstraint *con; @@ -536,7 +536,7 @@ static void pose_copy_menu(Scene *scene) /* copy constraints to tmpbase and apply 'local' tags before * appending to list of constraints for this channel */ - BKE_copy_constraints(&tmp_constraints, &const_copy, TRUE); + BKE_copy_constraints(&tmp_constraints, &const_copy, true); if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) { /* add proxy-local tags */ for (con = tmp_constraints.first; con; con = con->next) diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c index d2d48fce8e6..376c1bc0838 100644 --- a/source/blender/editors/armature/pose_group.c +++ b/source/blender/editors/armature/pose_group.c @@ -176,7 +176,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op) { Object *ob = ED_pose_object_from_context(C); bPose *pose; - short done = FALSE; + bool done = false; /* only continue if there's an object, and a pose there too */ if (ELEM(NULL, ob, ob->pose)) @@ -195,7 +195,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones) { pchan->agrp_index = pose->active_group; - done = TRUE; + done = true; } CTX_DATA_END; @@ -232,7 +232,7 @@ void POSE_OT_group_assign(wmOperatorType *ot) static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op)) { Object *ob = ED_pose_object_from_context(C); - short done = FALSE; + bool done = false; /* only continue if there's an object, and a pose there too */ if (ELEM(NULL, ob, ob->pose)) @@ -243,7 +243,7 @@ static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op)) { if (pchan->agrp_index) { pchan->agrp_index = 0; - done = TRUE; + done = true; } } CTX_DATA_END; @@ -438,7 +438,7 @@ void POSE_OT_group_sort(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static void pose_group_select(bContext *C, Object *ob, int select) +static void pose_group_select(bContext *C, Object *ob, bool select) { bPose *pose = ob->pose; diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index 4038200d0a0..a852f47ba4b 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -332,7 +332,7 @@ void POSE_OT_select_linked(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); } /* -------------------------------------- */ @@ -846,7 +846,7 @@ void POSE_OT_select_grouped(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); ot->prop = RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); } diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index ec49dad69b5..56cc5c5b1ee 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -1013,11 +1013,11 @@ static float pose_propagate_get_boneHoldEndFrame(Object *ob, tPChanFCurveLink *p } /* get reference value from F-Curve using RNA */ -static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) +static bool pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) { PointerRNA id_ptr, ptr; PropertyRNA *prop; - short found = FALSE; + bool found = false; /* base pointer is always the object -> id_ptr */ RNA_id_pointer_create(&ob->id, &id_ptr); @@ -1027,7 +1027,7 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) if (RNA_property_array_check(prop)) { /* array */ if (fcu->array_index < RNA_property_array_length(&ptr, prop)) { - found = TRUE; + found = true; switch (RNA_property_type(prop)) { case PROP_BOOLEAN: *value = (float)RNA_property_boolean_get_index(&ptr, prop, fcu->array_index); @@ -1039,14 +1039,14 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) *value = RNA_property_float_get_index(&ptr, prop, fcu->array_index); break; default: - found = FALSE; + found = false; break; } } } else { /* not an array */ - found = TRUE; + found = true; switch (RNA_property_type(prop)) { case PROP_BOOLEAN: *value = (float)RNA_property_boolean_get(&ptr, prop); @@ -1061,7 +1061,7 @@ static short pose_propagate_get_refVal(Object *ob, FCurve *fcu, float *value) *value = RNA_property_float_get(&ptr, prop); break; default: - found = FALSE; + found = false; break; } } diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index 5fba6554b8c..094af99776b 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -78,7 +78,7 @@ static void applyarmature_fix_boneparents(Scene *scene, Object *armob) /* apply current transform from parent (not yet destroyed), * then calculate new parent inverse matrix */ - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); BKE_object_workob_calc_parent(scene, ob, &workob); invert_m4_m4(ob->parentinv, workob.obmat); @@ -218,7 +218,7 @@ static int pose_visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) */ BKE_armature_mat_pose_to_bone(pchan, pchan->pose_mat, delta_mat); - BKE_pchan_apply_mat4(pchan, delta_mat, TRUE); + BKE_pchan_apply_mat4(pchan, delta_mat, true); } CTX_DATA_END; @@ -521,10 +521,10 @@ void POSE_OT_paste(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - prop = RNA_def_boolean(ot->srna, "flipped", FALSE, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose"); + prop = RNA_def_boolean(ot->srna, "flipped", false, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - RNA_def_boolean(ot->srna, "selected_mask", FALSE, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose"); + RNA_def_boolean(ot->srna, "selected_mask", false, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose"); } /* ********************************************** */ @@ -812,7 +812,7 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); float cframe = (float)CFRA; - const short only_select = RNA_boolean_get(op->ptr, "only_selected"); + const bool only_select = RNA_boolean_get(op->ptr, "only_selected"); if ((ob->adt) && (ob->adt->action)) { /* XXX: this is just like this to avoid contaminating anything else; @@ -879,5 +879,5 @@ void POSE_OT_user_transforms_clear(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "only_selected", TRUE, "Only Selected", "Only visible/selected bones"); + RNA_def_boolean(ot->srna, "only_selected", true, "Only Selected", "Only visible/selected bones"); } diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index e36b5c808dc..8cc6059e87b 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -1796,7 +1796,7 @@ int filterSmartReebGraph(ReebGraph *UNUSED(rg), float UNUSED(threshold)) static void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external) { - int done = TRUE; + bool done = true; calculateGraphLength(rg); @@ -1810,8 +1810,8 @@ static void filterGraph(ReebGraph *rg, short options, float threshold_internal, if (threshold_internal > 0 || threshold_external > 0) { /* filter until there's nothing more to do */ - while (done == 1) { - done = FALSE; /* no work done yet */ + while (done == true) { + done = false; /* no work done yet */ done = filterInternalExternalReebGraph(rg, threshold_internal, threshold_external); } diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c index 4f95bceddb3..f1b34182439 100644 --- a/source/blender/editors/curve/curve_ops.c +++ b/source/blender/editors/curve/curve_ops.c @@ -155,14 +155,14 @@ void ED_operatormacros_curve(void) WM_operatortype_macro_define(ot, "CURVE_OT_duplicate"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); - RNA_boolean_set(otmacro->ptr, "mirror", FALSE); + RNA_boolean_set(otmacro->ptr, "mirror", false); ot = WM_operatortype_append_macro("CURVE_OT_extrude_move", "Extrude Curve and Move", "Extrude curve and move result", OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "CURVE_OT_extrude"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); - RNA_boolean_set(otmacro->ptr, "mirror", FALSE); + RNA_boolean_set(otmacro->ptr, "mirror", false); } void ED_keymap_curve(wmKeyConfig *keyconf) @@ -225,7 +225,7 @@ void ED_keymap_curve(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "FONT_OT_line_break", RETKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "FONT_OT_text_insert", KM_TEXTINPUT, KM_ANY, KM_ANY, 0); // last! kmi = WM_keymap_add_item(keymap, "FONT_OT_text_insert", BACKSPACEKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "accent", TRUE); /* accented characters */ + RNA_boolean_set(kmi->ptr, "accent", true); /* accented characters */ /* only set in editmode curve, by space_view3d listener */ keymap = WM_keymap_find(keyconf, "Curve", 0, 0); @@ -248,9 +248,9 @@ void ED_keymap_curve(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "CURVE_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "CURVE_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); WM_keymap_add_item(keymap, "CURVE_OT_separate", PKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "CURVE_OT_split", YKEY, KM_PRESS, 0, 0); @@ -268,9 +268,9 @@ void ED_keymap_curve(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "CURVE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "CURVE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "CURVE_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0); @@ -282,5 +282,5 @@ void ED_keymap_curve(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_hook", HKEY, KM_PRESS, KM_CTRL, 0); ED_keymap_proportional_cycle(keyconf, keymap); - ED_keymap_proportional_editmode(keyconf, keymap, TRUE); + ED_keymap_proportional_editmode(keyconf, keymap, true); } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 7444f9e433b..9c0909b67f2 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -4133,11 +4133,11 @@ static bool is_u_selected(Nurb *nu, int u) bp = &nu->bp[u]; for (v = 0; v < nu->pntsv - 1; v++, bp += nu->pntsu) { if ((v != 0) && (bp->f1 & SELECT)) { - return TRUE; + return true; } } - return FALSE; + return false; } typedef struct NurbSort { @@ -7014,7 +7014,7 @@ static int match_texture_space_exec(bContext *C, wmOperator *UNUSED(op)) int a; if (object->curve_cache == NULL) { - BKE_displist_make_curveTypes(scene, object, FALSE); + BKE_displist_make_curveTypes(scene, object, false); } INIT_MINMAX(min, max); diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index b7b25b2fdec..5c067e80619 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -973,7 +973,7 @@ static EnumPropertyItem move_type_items[] = { {NEXT_PAGE, "NEXT_PAGE", 0, "Next Page", ""}, {0, NULL, 0, NULL, NULL}}; -static int move_cursor(bContext *C, int type, int select) +static int move_cursor(bContext *C, int type, const bool select) { Object *obedit = CTX_data_edit_object(C); Curve *cu = obedit->data; @@ -1083,7 +1083,7 @@ static int move_exec(bContext *C, wmOperator *op) { int type = RNA_enum_get(op->ptr, "type"); - return move_cursor(C, type, 0); + return move_cursor(C, type, false); } void FONT_OT_move(wmOperatorType *ot) @@ -1110,7 +1110,7 @@ static int move_select_exec(bContext *C, wmOperator *op) { int type = RNA_enum_get(op->ptr, "type"); - return move_cursor(C, type, 1); + return move_cursor(C, type, true); } void FONT_OT_move_select(wmOperatorType *ot) diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index c10f081b4fa..a4597b6bf6c 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -782,7 +782,7 @@ void draw_gpencil_view3d(Scene *scene, View3D *v3d, ARegion *ar, bool only3d) * deal with the camera border, otherwise map the coords to the camera border. */ if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) { rctf rectf; - ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, TRUE); /* no shift */ + ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, true); /* no shift */ offsx = iroundf(rectf.xmin); offsy = iroundf(rectf.ymin); diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 5f829a1cb27..481323992d0 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -134,14 +134,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* get layout-row + UI-block for header */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND); block = uiLayoutGetBlock(row); /* err... */ uiBlockSetEmboss(block, UI_EMBOSSN); /* left-align ............................... */ - sub = uiLayoutRow(row, FALSE); + sub = uiLayoutRow(row, false); /* active */ block = uiLayoutGetBlock(sub); @@ -172,7 +172,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* delete button (only if hidden but not locked!) */ if ((gpl->flag & GP_LAYER_HIDE) && !(gpl->flag & GP_LAYER_LOCKED)) { /* right-align ............................... */ - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); block = uiLayoutGetBlock(sub); /* XXX... err... */ @@ -216,7 +216,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* delete 'button' */ uiBlockSetEmboss(block, UI_EMBOSSN); /* right-align ............................... */ - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_RIGHT); block = uiLayoutGetBlock(sub); /* XXX... err... */ @@ -227,14 +227,14 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons /* new backdrop ----------------------------------- */ box = uiLayoutBox(layout); - split = uiLayoutSplit(box, 0.5f, FALSE); + split = uiLayoutSplit(box, 0.5f, false); /* draw settings ---------------------------------- */ /* left column ..................... */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); /* color */ - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiItemR(sub, &ptr, "color", 0, "", ICON_NONE); uiItemR(sub, &ptr, "alpha", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -247,10 +247,10 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons } /* right column ................... */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); /* onion-skinning */ - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiItemR(sub, &ptr, "use_onion_skinning", 0, NULL, ICON_NONE); uiItemR(sub, &ptr, "ghost_range_max", 0, IFACE_("Frames"), ICON_NONE); @@ -273,14 +273,14 @@ static void draw_gpencil_space_specials(const bContext *C, uiLayout *layout) uiLayout *col, *row; SpaceClip *sc = CTX_wm_space_clip(C); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); if (sc) { bScreen *screen = CTX_wm_screen(C); PointerRNA sc_ptr; RNA_pointer_create(&screen->id, &RNA_SpaceClipEditor, sc, &sc_ptr); - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &sc_ptr, "grease_pencil_source", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } } @@ -299,7 +299,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin RNA_id_pointer_create((ID *)gpd, &gpd_ptr); /* draw gpd settings first ------------------------------------- */ - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); /* current Grease Pencil block */ /* TODO: show some info about who owns this? */ @@ -307,7 +307,7 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin /* add new layer button - can be used even when no data, since it can add a new block too */ uiItemO(col, IFACE_("New Layer"), ICON_NONE, "GPENCIL_OT_layer_add"); - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemO(row, IFACE_("Delete Frame"), ICON_NONE, "GPENCIL_OT_active_frame_delete"); uiItemO(row, IFACE_("Convert"), ICON_NONE, "GPENCIL_OT_convert"); @@ -317,12 +317,12 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin /* draw each layer --------------------------------------------- */ for (gpl = gpd->layers.first; gpl; gpl = gpl->next) { - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); gp_drawui_layer(col, gpd, gpl, is_v3d); } /* draw gpd drawing settings first ------------------------------------- */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); /* label */ uiItemL(col, IFACE_("Drawing Settings:"), ICON_NONE); @@ -335,17 +335,17 @@ static void draw_gpencil_panel(bContext *C, uiLayout *layout, bGPdata *gpd, Poin } /* drawing space options */ - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "VIEW", NULL, ICON_NONE); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "CURSOR", NULL, ICON_NONE); if (sc == NULL) { - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiLayoutSetActive(row, v3d_stroke_opts); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "SURFACE", NULL, ICON_NONE); uiItemEnumR_string(row, &gpd_ptr, "draw_mode", "STROKE", NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiLayoutSetActive(row, v3d_stroke_opts == STROKE_OPTS_V3D_ON); uiItemR(row, &gpd_ptr, "use_stroke_endpoints", 0, NULL, ICON_NONE); } diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 94400682f9e..092951be3da 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -757,8 +757,8 @@ static void gp_stroke_path_animation(bContext *C, ReportList *reports, Curve *cu prop = RNA_struct_find_property(&ptr, "eval_time"); /* Ensure we have an F-Curve to add keyframes to */ - act = verify_adt_action((ID *)cu, TRUE); - fcu = verify_fcurve(act, NULL, &ptr, "eval_time", 0, TRUE); + act = verify_adt_action((ID *)cu, true); + fcu = verify_fcurve(act, NULL, &ptr, "eval_time", 0, true); if (G.debug & G_DEBUG) { printf("%s: tot len: %f\t\ttot time: %f\n", __func__, gtd->tot_dist, gtd->tot_time); @@ -1392,7 +1392,7 @@ static int gp_camera_view_subrect(bContext *C, rctf *subrect) /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { Scene *scene = CTX_data_scene(C); - ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, TRUE); /* no shift */ + ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, subrect, true); /* no shift */ return 1; } } @@ -1673,7 +1673,7 @@ static bool gp_convert_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) /* Never show this prop */ if (strcmp(prop_id, "use_timing_data") == 0) - return FALSE; + return false; if (link_strokes) { /* Only show when link_stroke is true */ @@ -1749,11 +1749,11 @@ void GPENCIL_OT_convert(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", prop_gpencil_convertmodes, 0, "Type", "Which type of curve to convert to"); - RNA_def_boolean(ot->srna, "use_normalize_weights", TRUE, "Normalize Weight", + RNA_def_boolean(ot->srna, "use_normalize_weights", true, "Normalize Weight", "Normalize weight (set from stroke width)"); RNA_def_float(ot->srna, "radius_multiplier", 1.0f, 0.0f, 1000.0f, "Radius Fac", "Multiplier for the points' radii (set from stroke width)", 0.0f, 10.0f); - RNA_def_boolean(ot->srna, "use_link_strokes", TRUE, "Link Strokes", + RNA_def_boolean(ot->srna, "use_link_strokes", true, "Link Strokes", "Whether to link strokes with zero-radius sections of curves"); prop = RNA_def_enum(ot->srna, "timing_mode", prop_gpencil_convert_timingmodes, GP_STROKECONVERT_TIMING_FULL, @@ -1764,7 +1764,7 @@ void GPENCIL_OT_convert(wmOperatorType *ot) "The duration of evaluation of the path control curve", 1, 1000); RNA_def_int(ot->srna, "start_frame", 1, 1, 100000, "Start Frame", "The start frame of the path control curve", 1, 100000); - RNA_def_boolean(ot->srna, "use_realtime", FALSE, "Realtime", + RNA_def_boolean(ot->srna, "use_realtime", false, "Realtime", "Whether the path control curve reproduces the drawing in realtime, starting from Start Frame"); prop = RNA_def_int(ot->srna, "end_frame", 250, 1, 100000, "End Frame", "The end frame of the path control curve (if Realtime is not set)", 1, 100000); @@ -1779,7 +1779,7 @@ void GPENCIL_OT_convert(wmOperatorType *ot) "Custom Gap mode: Random generator seed", 0, 100); /* Note: Internal use, this one will always be hidden by UI code... */ - prop = RNA_def_boolean(ot->srna, "use_timing_data", FALSE, "Has Valid Timing", + prop = RNA_def_boolean(ot->srna, "use_timing_data", false, "Has Valid Timing", "Whether the converted Grease Pencil layer has valid timing data (internal use)"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 05d56458a3f..65f205c2f2f 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -668,16 +668,16 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) if ((ED_view3d_autodist_depth(p->ar, mval, depth_margin, depth_arr + i) == 0) && (i && (ED_view3d_autodist_depth_seg(p->ar, mval, mval_prev, depth_margin + 1, depth_arr + i) == 0))) { - interp_depth = TRUE; + interp_depth = true; } else { - found_depth = TRUE; + found_depth = true; } copy_v2_v2_int(mval_prev, mval); } - if (found_depth == FALSE) { + if (found_depth == false) { /* eeh... not much we can do.. :/, ignore depth in this case, use the 3D cursor */ for (i = gpd->sbuffer_size - 1; i >= 0; i--) depth_arr[i] = 0.9999f; @@ -704,7 +704,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) for (i = first_valid + 1; i < last_valid; i++) depth_arr[i] = FLT_MAX; - interp_depth = TRUE; + interp_depth = true; } if (interp_depth) { @@ -886,11 +886,11 @@ static short gp_stroke_eraser_strokeinside(const int mval[2], const int UNUSED(m const float screen_co_b[2] = {x1, y1}; if (edge_inside_circle(mval_fl, rad, screen_co_a, screen_co_b)) { - return TRUE; + return true; } /* not inside */ - return FALSE; + return false; } static void gp_point_to_xy(ARegion *ar, View2D *v2d, rctf *subrect, bGPDstroke *gps, bGPDspoint *pt, @@ -1280,7 +1280,7 @@ static void gp_paint_initstroke(tGPsdata *p, short paintmode) /* for camera view set the subrect */ if (rv3d->persp == RV3D_CAMOB) { - ED_view3d_calc_camera_border(p->scene, p->ar, v3d, rv3d, &p->subrect_data, TRUE); /* no shift */ + ED_view3d_calc_camera_border(p->scene, p->ar, v3d, rv3d, &p->subrect_data, true); /* no shift */ p->subrect = &p->subrect_data; } } @@ -1438,7 +1438,7 @@ static void gpencil_draw_exit(bContext *C, wmOperator *op) /* check size of buffer before cleanup, to determine if anything happened here */ if (p->paintmode == GP_PAINTMODE_ERASER) { /* turn off radial brush cursor */ - gpencil_draw_toggle_eraser_cursor(C, p, FALSE); + gpencil_draw_toggle_eraser_cursor(C, p, false); /* if successful, store the new eraser size to be used again next time */ if (p->status == GP_STATUS_DONE) @@ -1758,7 +1758,7 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event /* if eraser is on, draw radial aid */ if (p->paintmode == GP_PAINTMODE_ERASER) { - gpencil_draw_toggle_eraser_cursor(C, p, TRUE); + gpencil_draw_toggle_eraser_cursor(C, p, true); } /* set cursor */ diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index a73b8821173..7543e170c9d 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -224,7 +224,7 @@ struct KeyingSet *ANIM_get_keyingset_for_autokeying(struct Scene *scene, const c struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free); /* Check if KeyingSet can be used in the current context */ -short ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks); +bool ANIM_keyingset_context_ok_poll(struct bContext *C, struct KeyingSet *ks); /* ************ Drivers ********************** */ @@ -244,28 +244,28 @@ struct FCurve *verify_driver_fcurve(struct ID *id, const char rna_path[], const /* -------- */ /* Returns whether there is a driver in the copy/paste buffer to paste */ -short ANIM_driver_can_paste(void); +bool ANIM_driver_can_paste(void); /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block */ -short ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type); +int ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type); /* Main Driver Management API calls: * Remove the driver for the specified property on the given ID block (if available) */ -short ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); +bool ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* Main Driver Management API calls: * Make a copy of the driver for the specified property on the given ID block */ -short ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); +bool ANIM_copy_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* Main Driver Management API calls: * Add a new driver for the specified property on the given ID block or replace an existing one * with the driver + driver-curve data from the buffer */ -short ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); +bool ANIM_paste_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag); /* ************ Auto-Keyframing ********************** */ /* Notes: @@ -305,7 +305,7 @@ bool fcurve_frame_has_keyframe(struct FCurve *fcu, float frame, short filter); * in case some detail of the implementation changes... * - frame: the value of this is quite often result of BKE_scene_frame_get() */ -short id_frame_has_keyframe(struct ID *id, float frame, short filter); +bool id_frame_has_keyframe(struct ID *id, float frame, short filter); /* filter flags for id_cfra_has_keyframe * diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 6c07e5eeec7..ebc97c58e24 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -166,7 +166,7 @@ bool EDBM_selectmode_disable(struct Scene *scene, struct BMEditMesh *em, const short selectmode_disable, const short selectmode_fallback); -void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const short select); +void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const bool select); void EDBM_select_toggle_all(struct BMEditMesh *em); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index d0200bbe01a..377bb7cebb1 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -329,7 +329,7 @@ bool ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); /* copy the camera to the view before starting a view transformation */ void ED_view3d_camera_lock_init_ex(struct View3D *v3d, struct RegionView3D *rv3d, const bool calc_dist); void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d); -/* copy the view to the camera, return TRUE if */ +/* copy the view to the camera, return true if */ bool ED_view3d_camera_lock_sync(struct View3D *v3d, struct RegionView3D *rv3d); void ED_view3D_lock_clear(struct View3D *v3d); diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index f50e4400b91..4d2ea0e64f4 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -184,76 +184,76 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) /* Export Options: */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemL(row, IFACE_("Export Data Options:"), ICON_MESH_DATA); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); split = uiLayoutSplit(row, 0.6f, UI_LAYOUT_ALIGN_RIGHT); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiItemR(col, imfptr, "apply_modifiers", 0, NULL, ICON_NONE); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiItemR(col, imfptr, "export_mesh_type_selection", 0, "", ICON_NONE); uiLayoutSetEnabled(col, RNA_boolean_get(imfptr, "apply_modifiers")); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "selected", 0, NULL, ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "include_children", 0, NULL, ICON_NONE); uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "include_armatures", 0, NULL, ICON_NONE); uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "include_shapekeys", 0, NULL, ICON_NONE); uiLayoutSetEnabled(row, RNA_boolean_get(imfptr, "selected")); /* Texture options */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemL(row, IFACE_("Texture Options:"), ICON_TEXTURE_DATA); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "active_uv_only", 0, NULL, ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "include_uv_textures", 0, NULL, ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "include_material_textures", 0, NULL, ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "use_texture_copies", 1, NULL, ICON_NONE); /* Armature options */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemL(row, IFACE_("Armature Options:"), ICON_ARMATURE_DATA); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "deform_bones_only", 0, NULL, ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "open_sim", 0, NULL, ICON_NONE); /* Collada options: */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemL(row, IFACE_("Collada Options:"), ICON_MODIFIER); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "triangulate", 0, NULL, ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "use_object_instantiation", 0, NULL, ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); split = uiLayoutSplit(row, 0.6f, UI_LAYOUT_ALIGN_RIGHT); uiItemL(split, IFACE_("Transformation Type"), ICON_NONE); uiItemR(split, imfptr, "export_transformation_type_selection", 0, "", ICON_NONE); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "sort_by_name", 0, NULL, ICON_NONE); } @@ -385,10 +385,10 @@ static void uiCollada_importSettings(uiLayout *layout, PointerRNA *imfptr) /* Import Options: */ box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemL(row, IFACE_("Import Data Options:"), ICON_MESH_DATA); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, imfptr, "import_units", 0, NULL, ICON_NONE); } diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index af4645e31ec..e27f36e5a4c 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -69,7 +69,7 @@ int ED_maskedit_poll(bContext *C) return ED_space_image_maskedit_poll(C); } } - return FALSE; + return false; } int ED_maskedit_mask_poll(bContext *C) @@ -85,7 +85,7 @@ int ED_maskedit_mask_poll(bContext *C) return ED_space_image_maskedit_mask_poll(C); } } - return FALSE; + return false; } /********************** registration *********************/ @@ -487,13 +487,13 @@ void ED_keymap_mask(wmKeyConfig *keyconf) /* selection */ kmi = WM_keymap_add_item(keymap, "MASK_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", false); kmi = WM_keymap_add_item(keymap, "MASK_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", true); kmi = WM_keymap_add_item(keymap, "MASK_OT_select_all", AKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); @@ -502,17 +502,17 @@ void ED_keymap_mask(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MASK_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "MASK_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "MASK_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); WM_keymap_add_item(keymap, "MASK_OT_select_border", BKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MASK_OT_select_circle", CKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "MASK_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "MASK_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); WM_keymap_add_item(keymap, "MASK_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MASK_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); @@ -520,16 +520,16 @@ void ED_keymap_mask(wmKeyConfig *keyconf) /* hide/reveal */ WM_keymap_add_item(keymap, "MASK_OT_hide_view_clear", HKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "MASK_OT_hide_view_set", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "MASK_OT_hide_view_set", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); /* select clip while in maker view, * this matches View3D functionality where you can select an * object while in editmode to allow vertex parenting */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); /* shape */ WM_keymap_add_item(keymap, "MASK_OT_cyclic_toggle", CKEY, KM_PRESS, KM_ALT, 0); @@ -571,19 +571,19 @@ void ED_operatormacros_mask(void) ot->description = "Add new vertex and slide it"; WM_operatortype_macro_define(ot, "MASK_OT_add_vertex"); otmacro = WM_operatortype_macro_define(ot, "MASK_OT_slide_point"); - RNA_boolean_set(otmacro->ptr, "is_new_point", TRUE); + RNA_boolean_set(otmacro->ptr, "is_new_point", true); ot = WM_operatortype_append_macro("MASK_OT_add_feather_vertex_slide", "Add Feather Vertex and Slide", "Add new vertex to feather and slide it", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Add new feather vertex and slide it"; WM_operatortype_macro_define(ot, "MASK_OT_add_feather_vertex"); otmacro = WM_operatortype_macro_define(ot, "MASK_OT_slide_point"); - RNA_boolean_set(otmacro->ptr, "slide_feather", TRUE); + RNA_boolean_set(otmacro->ptr, "slide_feather", true); ot = WM_operatortype_append_macro("MASK_OT_duplicate_move", "Add Duplicate", "Duplicate mask and move", OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "MASK_OT_duplicate"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); - RNA_boolean_set(otmacro->ptr, "mirror", FALSE); + RNA_boolean_set(otmacro->ptr, "mirror", false); } diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 438853a081d..c262f177252 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -1621,7 +1621,7 @@ static int mask_layer_move_poll(bContext *C) return mask->masklay_tot > 0; } - return FALSE; + return false; } static int mask_layer_move_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c index da5fdd37316..56eb8cf626b 100644 --- a/source/blender/editors/mask/mask_select.c +++ b/source/blender/editors/mask/mask_select.c @@ -482,7 +482,7 @@ void MASK_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } static bool do_lasso_select_mask(bContext *C, const int mcords[][2], short moves, short select) diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c index 99b2e1a13ef..26b97580b91 100644 --- a/source/blender/editors/mask/mask_shapekey.c +++ b/source/blender/editors/mask/mask_shapekey.c @@ -411,8 +411,8 @@ void MASK_OT_shape_key_rekey(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "location", TRUE, "Location", ""); - RNA_def_boolean(ot->srna, "feather", TRUE, "Feather", ""); + RNA_def_boolean(ot->srna, "location", true, "Location", ""); + RNA_def_boolean(ot->srna, "feather", true, "Feather", ""); } diff --git a/source/blender/editors/mesh/editmesh_path.c b/source/blender/editors/mesh/editmesh_path.c index 373c4efb34d..44d03da93a2 100644 --- a/source/blender/editors/mesh/editmesh_path.c +++ b/source/blender/editors/mesh/editmesh_path.c @@ -178,7 +178,7 @@ static bool edgetag_test_cb(BMEdge *e, void *user_data_v) case EDGE_MODE_TAG_FREESTYLE: { FreestyleEdge *fed = CustomData_bmesh_get(&bm->edata, e->head.data, CD_FREESTYLE_EDGE); - return (!fed) ? FALSE : (fed->flag & FREESTYLE_EDGE_MARK) ? true : false; + return (!fed) ? false : (fed->flag & FREESTYLE_EDGE_MARK) ? true : false; } #endif } diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 37b93c8c282..467b08c266c 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1885,7 +1885,7 @@ bool EDBM_selectmode_disable(Scene *scene, BMEditMesh *em, } } -void EDBM_deselect_by_material(BMEditMesh *em, const short index, const short select) +void EDBM_deselect_by_material(BMEditMesh *em, const short index, const bool select) { BMIter iter; BMFace *efa; @@ -2211,7 +2211,7 @@ static int edbm_select_face_by_sides_exec(bContext *C, wmOperator *op) BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { - int select; + bool select; switch (type) { case 0: diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c index 249e7361cc0..b7822200d98 100644 --- a/source/blender/editors/metaball/mball_ops.c +++ b/source/blender/editors/metaball/mball_ops.c @@ -81,9 +81,9 @@ void ED_keymap_metaball(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MBALL_OT_reveal_metaelems", HKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", DELKEY, KM_PRESS, 0, 0); @@ -97,6 +97,6 @@ void ED_keymap_metaball(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MBALL_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0); ED_keymap_proportional_cycle(keyconf, keymap); - ED_keymap_proportional_editmode(keyconf, keymap, TRUE); + ED_keymap_proportional_editmode(keyconf, keymap, true); } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 182a9f70968..e3041d97019 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -477,7 +477,7 @@ void OBJECT_OT_add(wmOperatorType *ot) RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", ""); - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Effector Operator ********************/ @@ -499,7 +499,7 @@ static int effector_add_exec(bContext *C, wmOperator *op) if (type == PFIELD_GUIDE) { Curve *cu; - ob = ED_object_add_type(C, OB_CURVE, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_CURVE, loc, rot, false, layer); if (!ob) return OPERATOR_CANCELLED; @@ -507,13 +507,13 @@ static int effector_add_exec(bContext *C, wmOperator *op) cu = ob->data; cu->flag |= CU_PATH | CU_3D; ED_object_editmode_enter(C, 0); - ED_object_new_primitive_matrix(C, ob, loc, rot, mat, FALSE); + ED_object_new_primitive_matrix(C, ob, loc, rot, mat, false); BLI_addtail(&cu->editnurb->nurbs, add_nurbs_primitive(C, ob, mat, CU_NURBS | CU_PRIM_PATH, 1)); if (!enter_editmode) ED_object_editmode_exit(C, EM_FREEDATA); } else { - ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer); if (!ob) return OPERATOR_CANCELLED; @@ -545,7 +545,7 @@ void OBJECT_OT_effector_add(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", ""); - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Camera Operator ********************/ @@ -560,12 +560,12 @@ static int object_camera_add_exec(bContext *C, wmOperator *op) float loc[3], rot[3]; /* force view align for cameras */ - RNA_boolean_set(op->ptr, "view_align", TRUE); + RNA_boolean_set(op->ptr, "view_align", true); if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_CAMERA, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_CAMERA, loc, rot, false, layer); if (v3d) { if (v3d->camera == NULL) @@ -594,7 +594,7 @@ void OBJECT_OT_camera_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); /* hide this for cameras, default */ prop = RNA_struct_type_find_property(ot->srna, "view_align"); @@ -619,7 +619,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if (obedit == NULL || obedit->type != OB_MBALL) { - obedit = ED_object_add_type(C, OB_MBALL, loc, rot, TRUE, layer); + obedit = ED_object_add_type(C, OB_MBALL, loc, rot, true, layer); newob = true; } else { @@ -659,7 +659,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", ""); ED_object_add_unit_props(ot); - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Text Operator ********************/ @@ -697,7 +697,7 @@ void OBJECT_OT_text_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Armature Operator ********************/ @@ -716,7 +716,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if ((obedit == NULL) || (obedit->type != OB_ARMATURE)) { - obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer); + obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, true, layer); ED_object_editmode_enter(C, 0); newob = true; } @@ -753,7 +753,7 @@ void OBJECT_OT_armature_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /********************* Add Empty Operator ********************/ @@ -768,7 +768,7 @@ static int object_empty_add_exec(bContext *C, wmOperator *op) if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer); BKE_object_empty_draw_type_set(ob, type); @@ -793,7 +793,7 @@ void OBJECT_OT_empty_add(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", object_empty_drawtype_items, 0, "Type", ""); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEvent *event) @@ -836,7 +836,7 @@ static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEv if (!ED_object_add_generic_get_opts(C, op, 'Z', NULL, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_EMPTY, NULL, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_EMPTY, NULL, rot, false, layer); /* add under the mouse */ ED_object_location_from_view(C, ob->loc); @@ -870,7 +870,7 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); prop = RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Image name to assign"); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } /********************* Add Lamp Operator ********************/ @@ -900,7 +900,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_LAMP, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_LAMP, loc, rot, false, layer); la = (Lamp *)ob->data; la->type = type; @@ -909,7 +909,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) if (BKE_scene_use_new_shading_nodes(scene)) { ED_node_shader_default(C, &la->id); - la->use_nodes = TRUE; + la->use_nodes = true; } return OPERATOR_FINISHED; @@ -934,7 +934,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); RNA_def_property_translation_context(ot->prop, BLF_I18NCONTEXT_ID_LAMP); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } /********************* Add Group Instance Operator ********************/ @@ -967,7 +967,7 @@ static int group_instance_add_exec(bContext *C, wmOperator *op) if (group) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - Object *ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); + Object *ob = ED_object_add_type(C, OB_EMPTY, loc, rot, false, layer); rename_id(&ob->id, group->id.name + 2); ob->dup_group = group; ob->transflag |= OB_DUPLIGROUP; @@ -1004,7 +1004,7 @@ void OBJECT_OT_group_instance_add(wmOperatorType *ot) RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME - 2, "Name", "Group name to add"); ot->prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", ""); RNA_def_enum_funcs(ot->prop, RNA_group_itemf); - ED_object_add_generic_props(ot, FALSE); + ED_object_add_generic_props(ot, false); } /********************* Add Speaker Operator ********************/ @@ -1019,7 +1019,7 @@ static int object_speaker_add_exec(bContext *C, wmOperator *op) if (!ED_object_add_generic_get_opts(C, op, 'Z', loc, rot, NULL, &layer, NULL)) return OPERATOR_CANCELLED; - ob = ED_object_add_type(C, OB_SPEAKER, loc, rot, FALSE, layer); + ob = ED_object_add_type(C, OB_SPEAKER, loc, rot, false, layer); /* to make it easier to start using this immediately in NLA, a default sound clip is created * ready to be moved around to retime the sound and/or make new sound clips @@ -1059,7 +1059,7 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - ED_object_add_generic_props(ot, TRUE); + ED_object_add_generic_props(ot, true); } /**************************** Delete Object *************************/ @@ -1093,7 +1093,7 @@ static int object_delete_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win; - const short use_global = RNA_boolean_get(op->ptr, "use_global"); + const bool use_global = RNA_boolean_get(op->ptr, "use_global"); bool changed = false; if (CTX_data_edit_object(C)) @@ -1310,7 +1310,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, ob->lay = base->lay; copy_m4_m4(ob->obmat, dob->mat); - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); if (dupli_gh) BLI_ghash_insert(dupli_gh, dob, ob); @@ -1358,7 +1358,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, /* note, this may be the parent of other objects, but it should * still work out ok */ - BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE); + BKE_object_apply_mat4(ob_dst, dob->mat, false, true); /* to set ob_dst->orig and in case theres any other discrepicies */ DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB); @@ -1377,7 +1377,7 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base, /* similer to the code above, see comments */ invert_m4_m4(ob_dst->parentinv, dob->mat); - BKE_object_apply_mat4(ob_dst, dob->mat, FALSE, TRUE); + BKE_object_apply_mat4(ob_dst, dob->mat, false, true); DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB); } } @@ -1465,7 +1465,7 @@ static void convert_ensure_curve_cache(Main *bmain, Scene *scene, Object *ob) * redo we might end up with an object which isn't evaluated yet. */ if (ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) { - BKE_displist_make_curveTypes(scene, ob, FALSE); + BKE_displist_make_curveTypes(scene, ob, false); } else if (ob->type == OB_MBALL) { BKE_displist_make_mball(bmain->eval_ctx, scene, ob); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 1f022c922e8..5a8d1d081f8 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -548,7 +548,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op) WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */ WM_jobs_callbacks(wm_job, multiresbake_startjob, NULL, NULL, NULL); - G.is_break = FALSE; + G.is_break = false; WM_jobs_start(CTX_wm_manager(C), wm_job); WM_cursor_wait(0); @@ -721,7 +721,7 @@ static void bake_startjob(void *bkv, short *stop, short *do_update, float *progr bkr->progress = progress; RE_test_break_cb(bkr->re, NULL, thread_break); - G.is_break = FALSE; /* blender_test_break uses this global */ + G.is_break = false; /* blender_test_break uses this global */ RE_Database_Baking(bkr->re, bmain, scene, scene->lay, scene->r.bake_mode, bkr->actob); @@ -751,7 +751,7 @@ static void bake_freejob(void *bkv) BKE_report(bkr->reports, RPT_WARNING, "Circular reference in texture stack"); MEM_freeN(bkr); - G.is_rendering = FALSE; + G.is_rendering = false; } /* catch esc */ @@ -807,8 +807,8 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, const wmEvent WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */ WM_jobs_callbacks(wm_job, bake_startjob, NULL, bake_update, NULL); - G.is_break = FALSE; - G.is_rendering = TRUE; + G.is_break = false; + G.is_rendering = true; WM_jobs_start(CTX_wm_manager(C), wm_job); @@ -848,7 +848,7 @@ static int bake_image_exec(bContext *C, wmOperator *op) bkr.reports = op->reports; RE_test_break_cb(bkr.re, NULL, thread_break); - G.is_break = FALSE; /* blender_test_break uses this global */ + G.is_break = false; /* blender_test_break uses this global */ RE_Database_Baking(bkr.re, bmain, scene, scene->lay, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT : NULL); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 1e7e543ccb8..9b79b2e93da 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1400,7 +1400,7 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op) { /* if we're not handling the object we're copying from, copy all constraints over */ if (pchan != chan) { - BKE_copy_constraints(&chan->constraints, &pchan->constraints, TRUE); + BKE_copy_constraints(&chan->constraints, &pchan->constraints, true); /* update flags (need to add here, not just copy) */ chan->constflag |= pchan->constflag; } @@ -1440,7 +1440,7 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op)) { /* if we're not handling the object we're copying from, copy all constraints over */ if (obact != ob) { - BKE_copy_constraints(&ob->constraints, &obact->constraints, TRUE); + BKE_copy_constraints(&ob->constraints, &obact->constraints, true); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 201ce460f88..7ae54a1a803 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -990,7 +990,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) } else if (event == 22) { /* Copy the constraint channels over */ - BKE_copy_constraints(&base->object->constraints, &ob->constraints, TRUE); + BKE_copy_constraints(&base->object->constraints, &ob->constraints, true); do_depgraph_update = true; } @@ -998,7 +998,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) base->object->softflag = ob->softflag; if (base->object->soft) sbFree(base->object->soft); - base->object->soft = copy_softbody(ob->soft, FALSE); + base->object->soft = copy_softbody(ob->soft, false); if (!modifiers_findByType(base->object, eModifierType_Softbody)) { BLI_addhead(&base->object->modifiers, modifier_new(eModifierType_Softbody)); @@ -1439,7 +1439,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d) for (base = FIRSTBASE; base; base = base->next) { if (TESTBASELIB(v3d, base)) { ob = base->object; - done = FALSE; + done = false; for (a = 1; a <= ob->totcol; a++) { ma = give_current_material(ob, a); @@ -1469,7 +1469,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, View3D *v3d) if (x > y) ob->size[0] = ob->size[1] * x / y; else ob->size[1] = ob->size[0] * y / x; - done = TRUE; + done = true; DAG_id_tag_update(&ob->id, OB_RECALC_OB); BKE_image_release_ibuf(tex->ima, ibuf, NULL); diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 5e7572e3681..e67381a1d43 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -152,7 +152,7 @@ static void select_editbmesh_hook(Object *ob, HookModifierData *hmd) BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) { if (nr == hmd->indexar[index]) { - BM_vert_select_set(em->bm, eve, TRUE); + BM_vert_select_set(em->bm, eve, true); if (index < hmd->totindex - 1) index++; } @@ -474,7 +474,7 @@ static int add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *ob if (!ok) { BKE_report(reports, RPT_ERROR, "Requires selected vertices or active vertex group"); - return FALSE; + return false; } if (mode == OBJECT_ADDHOOK_NEWOB && !ob) { @@ -533,7 +533,7 @@ static int add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *ob DAG_relations_tag_update(bmain); - return TRUE; + return true; } static int object_add_hook_selob_exec(bContext *C, wmOperator *op) @@ -587,7 +587,7 @@ void OBJECT_OT_hook_add_selob(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "use_bone", FALSE, "Active Bone", + RNA_def_boolean(ot->srna, "use_bone", false, "Active Bone", "Assign the hook to the hook objects active bone"); } diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c index 196e912e74e..2af2ca3b0e9 100644 --- a/source/blender/editors/object/object_lattice.c +++ b/source/blender/editors/object/object_lattice.c @@ -886,7 +886,7 @@ bool mouse_lattice(bContext *C, const int mval[2], bool extend, bool deselect, b view3d_set_viewcontext(C, &vc); lt = ((Lattice *)vc.obedit->data)->editlatt->latt; - bp = findnearestLattvert(&vc, mval, TRUE); + bp = findnearestLattvert(&vc, mval, true); if (bp) { if (extend) { diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 327e840a873..234273de9b9 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -175,8 +175,8 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc return new_md; } -/* Return TRUE if the object has a modifier of type 'type' other than - * the modifier pointed to be 'exclude', otherwise returns FALSE. */ +/* Return true if the object has a modifier of type 'type' other than + * the modifier pointed to be 'exclude', otherwise returns false. */ static bool object_has_modifier(const Object *ob, const ModifierData *exclude, ModifierType type) { @@ -184,19 +184,19 @@ static bool object_has_modifier(const Object *ob, const ModifierData *exclude, for (md = ob->modifiers.first; md; md = md->next) { if ((md != exclude) && (md->type == type)) - return TRUE; + return true; } - return FALSE; + return false; } /* If the object data of 'orig_ob' has other users, run 'callback' on * each of them. * - * If include_orig is TRUE, the callback will run on 'orig_ob' too. + * If include_orig is true, the callback will run on 'orig_ob' too. * - * If the callback ever returns TRUE, iteration will stop and the - * function value will be TRUE. Otherwise the function returns FALSE. + * If the callback ever returns true, iteration will stop and the + * function value will be true. Otherwise the function returns false. */ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig, bool (*callback)(Object *ob, void *callback_data), @@ -220,7 +220,7 @@ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig, (ob->data == orig_ob->data)) { if (callback(ob, callback_data)) - return TRUE; + return true; totfound++; } @@ -230,7 +230,7 @@ bool ED_object_iter_other(Main *bmain, Object *orig_ob, const bool include_orig, return callback(orig_ob, callback_data); } - return FALSE; + return false; } static bool object_has_modifier_cb(Object *ob, void *data) @@ -254,16 +254,16 @@ bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } - return FALSE; + return false; } -/* Return TRUE if no modifier of type 'type' other than 'exclude' */ +/* Return true if no modifier of type 'type' other than 'exclude' */ static bool object_modifier_safe_to_delete(Main *bmain, Object *ob, ModifierData *exclude, ModifierType type) { return (!object_has_modifier(ob, exclude, type) && - !ED_object_iter_other(bmain, ob, FALSE, + !ED_object_iter_other(bmain, ob, false, object_has_modifier_cb, &type)); } @@ -678,7 +678,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi } else if ((ob->mode & OB_MODE_SCULPT) && (find_multires_modifier_before(scene, md)) && - (modifier_isSameTopology(md) == FALSE)) + (modifier_isSameTopology(md) == false)) { BKE_report(reports, RPT_ERROR, "Constructive modifier cannot be applied to multi-res data in sculpt mode"); return 0; @@ -834,18 +834,18 @@ static int edit_modifier_invoke_properties(bContext *C, wmOperator *op) ModifierData *md; if (RNA_struct_property_is_set(op->ptr, "modifier")) { - return TRUE; + return true; } else { PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier); if (ptr.data) { md = ptr.data; RNA_string_set(op->ptr, "modifier", md->name); - return TRUE; + return true; } } - return FALSE; + return false; } static ModifierData *edit_modifier_property_get(wmOperator *op, Object *ob, int type) @@ -1134,7 +1134,7 @@ static int multires_higher_levels_delete_exec(bContext *C, wmOperator *op) multiresModifier_del_levels(mmd, ob, 1); - ED_object_iter_other(CTX_data_main(C), ob, TRUE, + ED_object_iter_other(CTX_data_main(C), ob, true, ED_object_multires_update_totlevels_cb, &mmd->totlvl); @@ -1178,7 +1178,7 @@ static int multires_subdivide_exec(bContext *C, wmOperator *op) multiresModifier_subdivide(mmd, ob, 0, mmd->simple); - ED_object_iter_other(CTX_data_main(C), ob, TRUE, + ED_object_iter_other(CTX_data_main(C), ob, true, ED_object_multires_update_totlevels_cb, &mmd->totlvl); @@ -1974,7 +1974,7 @@ static void init_ocean_modifier_bake(struct Ocean *oc, struct OceanModifierData if (!omd || !oc) return; - do_heightfield = TRUE; + do_heightfield = true; do_chop = (omd->chop_amount > 0); do_normals = (omd->flag & MOD_OCEAN_GENERATE_NORMALS); do_jacobian = (omd->flag & MOD_OCEAN_GENERATE_FOAM); @@ -2023,7 +2023,7 @@ static void oceanbake_update(void *customdata, float progress, int *cancel) if (oceanbake_breakjob(oj)) *cancel = 1; - *(oj->do_update) = TRUE; + *(oj->do_update) = true; *(oj->progress) = progress; } @@ -2035,11 +2035,11 @@ static void oceanbake_startjob(void *customdata, short *stop, short *do_update, oj->do_update = do_update; oj->progress = progress; - G.is_break = FALSE; /* XXX shared with render - replace with job 'stop' switch */ + G.is_break = false; /* XXX shared with render - replace with job 'stop' switch */ BKE_bake_ocean(oj->ocean, oj->och, oceanbake_update, (void *)oj); - *do_update = TRUE; + *do_update = true; *stop = 0; } @@ -2053,7 +2053,7 @@ static void oceanbake_endjob(void *customdata) } oj->omd->oceancache = oj->och; - oj->omd->cached = TRUE; + oj->omd->cached = true; } static int ocean_bake_exec(bContext *C, wmOperator *op) @@ -2120,7 +2120,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op) BKE_bake_ocean(ocean, och); omd->oceancache = och; - omd->cached = TRUE; + omd->cached = true; scene->r.cfra = cfra; @@ -2174,7 +2174,7 @@ void OBJECT_OT_ocean_bake(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; edit_modifier_properties(ot); - RNA_def_boolean(ot->srna, "free", FALSE, "Free", "Free the bake, rather than generating it"); + RNA_def_boolean(ot->srna, "free", false, "Free", "Free the bake, rather than generating it"); } /************************ LaplacianDeform bind operator *********************/ diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index eee811abeee..5f93f4b5deb 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -268,7 +268,7 @@ void ED_operatormacros_object(void) "Duplicate selected objects and move them", OPTYPE_UNDO | OPTYPE_REGISTER); if (ot) { otmacro = WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate"); - RNA_boolean_set(otmacro->ptr, "linked", TRUE); + RNA_boolean_set(otmacro->ptr, "linked", true); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF); } @@ -293,19 +293,19 @@ void ED_keymap_object(wmKeyConfig *keyconf) /* Note: this keymap works disregarding mode */ kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_EDIT); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_POSE); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", VKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_VERTEX_PAINT); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_WEIGHT_PAINT); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); WM_keymap_add_item(keymap, "OBJECT_OT_origin_set", CKEY, KM_PRESS, KM_ALT | KM_SHIFT | KM_CTRL, 0); @@ -331,19 +331,19 @@ void ED_keymap_object(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "PARENT"); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, 0, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_select_hierarchy", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set_identifier(kmi->ptr, "direction", "CHILD"); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_verify_item(keymap, "OBJECT_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_verify_item(keymap, "OBJECT_OT_parent_no_inverse_set", PKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); @@ -361,10 +361,10 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_clear", HKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_view_set", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); /* same as above but for rendering */ WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_clear", HKEY, KM_PRESS, KM_ALT | KM_CTRL, 0); @@ -373,21 +373,21 @@ void ED_keymap_object(wmKeyConfig *keyconf) /* conflicts, removing */ #if 0 kmi = WM_keymap_add_item(keymap, "OBJECT_OT_hide_render_set", HKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0) - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); #endif WM_keymap_add_item(keymap, "OBJECT_OT_move_to_layer", MKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "use_global", FALSE); + RNA_boolean_set(kmi->ptr, "use_global", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "use_global", TRUE); + RNA_boolean_set(kmi->ptr, "use_global", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "use_global", FALSE); + RNA_boolean_set(kmi->ptr, "use_global", false); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "use_global", TRUE); + RNA_boolean_set(kmi->ptr, "use_global", true); WM_keymap_add_menu(keymap, "INFO_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0); @@ -445,7 +445,7 @@ void ED_keymap_object(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_hook", HKEY, KM_PRESS, KM_CTRL, 0); ED_keymap_proportional_cycle(keyconf, keymap); - ED_keymap_proportional_editmode(keyconf, keymap, FALSE); + ED_keymap_proportional_editmode(keyconf, keymap, false); } void ED_keymap_proportional_cycle(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyMap *keymap) diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index c1adabf0a94..7e138639cea 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -450,7 +450,7 @@ static void object_remove_parent_deform_modifiers(Object *ob, const Object *par) /* assume that we only need to remove the first instance of matching deform modifier here */ for (md = ob->modifiers.first; md; md = mdn) { - short free = FALSE; + bool free = false; mdn = md->next; @@ -458,19 +458,19 @@ static void object_remove_parent_deform_modifiers(Object *ob, const Object *par) if ((md->type == eModifierType_Armature) && (par->type == OB_ARMATURE)) { ArmatureModifierData *amd = (ArmatureModifierData *)md; if (amd->object == par) { - free = TRUE; + free = true; } } else if ((md->type == eModifierType_Lattice) && (par->type == OB_LATTICE)) { LatticeModifierData *lmd = (LatticeModifierData *)md; if (lmd->object == par) { - free = TRUE; + free = true; } } else if ((md->type == eModifierType_Curve) && (par->type == OB_CURVE)) { CurveModifierData *cmd = (CurveModifierData *)md; if (cmd->object == par) { - free = TRUE; + free = true; } } @@ -502,7 +502,7 @@ void ED_object_parent_clear(Object *ob, int type) { /* remove parent, and apply the parented transform result as object's local transforms */ ob->parent = NULL; - BKE_object_apply_mat4(ob, ob->obmat, TRUE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, true, false); break; } case CLEAR_PARENT_INVERSE: @@ -650,7 +650,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object if (keep_transform) { /* was removed because of bug [#23577], * but this can be handy in some cases too [#32616], so make optional */ - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); } /* set the parent (except for follow-path constraint option) */ @@ -750,7 +750,7 @@ int ED_object_parent_set(ReportList *reports, Main *bmain, Scene *scene, Object } else if (pararm && (ob->type == OB_MESH) && (par->type == OB_ARMATURE)) { if (partype == PAR_ARMATURE_NAME) - create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_NAME, FALSE); + create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_NAME, false); else if (partype == PAR_ARMATURE_ENVELOPE) create_vgroups_from_armature(reports, scene, ob, par, ARM_GROUPS_ENVELOPE, xmirror); else if (partype == PAR_ARMATURE_AUTO) { @@ -871,7 +871,7 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE); uiLayout *layout = uiPupMenuLayout(pup); - wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_parent_set", TRUE); + wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_parent_set", true); PointerRNA opptr; #if 0 @@ -879,12 +879,12 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent #else opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "type", PAR_OBJECT); - RNA_boolean_set(&opptr, "keep_transform", FALSE); + RNA_boolean_set(&opptr, "keep_transform", false); opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object (Keep Transform)"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "type", PAR_OBJECT); - RNA_boolean_set(&opptr, "keep_transform", TRUE); + RNA_boolean_set(&opptr, "keep_transform", true); #endif /* ob becomes parent, make the associated menus */ if (ob->type == OB_ARMATURE) { @@ -960,9 +960,9 @@ void OBJECT_OT_parent_set(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", ""); - RNA_def_boolean(ot->srna, "xmirror", FALSE, "X Mirror", + RNA_def_boolean(ot->srna, "xmirror", false, "X Mirror", "Apply weights symmetrically along X axis, for Envelope/Automatic vertex groups creation"); - RNA_def_boolean(ot->srna, "keep_transform", FALSE, "Keep Transform", + RNA_def_boolean(ot->srna, "keep_transform", false, "Keep Transform", "Apply transformation before parenting"); } @@ -1134,7 +1134,7 @@ static int object_track_clear_exec(bContext *C, wmOperator *op) } if (type == 1) - BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE); + BKE_object_apply_mat4(ob, ob->obmat, true, true); } CTX_DATA_END; @@ -1320,7 +1320,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); unsigned int lay, local; - /* bool is_lamp = FALSE; */ /* UNUSED */ + /* bool is_lamp = false; */ /* UNUSED */ lay = move_to_layer_init(C, op); lay &= 0xFFFFFF; @@ -1337,7 +1337,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) base->object->lay = lay; base->object->flag &= ~SELECT; base->flag &= ~SELECT; - /* if (base->object->type == OB_LAMP) is_lamp = TRUE; */ + /* if (base->object->type == OB_LAMP) is_lamp = true; */ } CTX_DATA_END; } @@ -1350,7 +1350,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) local = base->lay & 0xFF000000; base->lay = lay + local; base->object->lay = lay; - /* if (base->object->type == OB_LAMP) is_lamp = TRUE; */ + /* if (base->object->type == OB_LAMP) is_lamp = true; */ } CTX_DATA_END; } @@ -1549,13 +1549,13 @@ static int make_links_data_exec(bContext *C, wmOperator *op) DAG_id_tag_update(&ob_dst->id, 0); break; case MAKE_LINKS_ANIMDATA: - BKE_copy_animdata_id((ID *)ob_dst, (ID *)ob_src, FALSE); + BKE_copy_animdata_id((ID *)ob_dst, (ID *)ob_src, false); if (ob_dst->data && ob_src->data) { if (obdata_id->lib) { is_lib = true; break; } - BKE_copy_animdata_id((ID *)ob_dst->data, (ID *)ob_src->data, FALSE); + BKE_copy_animdata_id((ID *)ob_dst->data, (ID *)ob_src->data, false); } DAG_id_tag_update(&ob_dst->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); break; @@ -1572,7 +1572,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op) BKE_group_object_add(group_node->link, ob_dst, scene, base_dst); } else { - is_cycle = TRUE; + is_cycle = true; } } break; @@ -2289,7 +2289,7 @@ static int make_single_user_exec(bContext *C, wmOperator *op) #if 0 /* can't do this separate from materials */ if (RNA_boolean_get(op->ptr, "texture")) - single_mat_users(scene, flag, TRUE); + single_mat_users(scene, flag, true); #endif if (RNA_boolean_get(op->ptr, "animation")) single_object_action_users(scene, flag); diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index a1f447fbf50..41ca4bf50e7 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -183,7 +183,7 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); ot->prop = RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", ""); } @@ -398,7 +398,7 @@ void ED_object_select_linked_by_id(bContext *C, ID *id) changed = object_select_all_by_obdata(C, id); } else if (idtype == ID_MA) { - changed = object_select_all_by_material_texture(C, FALSE, (Material *)id, NULL); + changed = object_select_all_by_material_texture(C, false, (Material *)id, NULL); } else if (idtype == ID_LI) { changed = object_select_all_by_library(C, (Library *) id); @@ -447,12 +447,12 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) else if (nr == OBJECT_SELECT_LINKED_MATERIAL || nr == OBJECT_SELECT_LINKED_TEXTURE) { Material *mat = NULL; Tex *tex = NULL; - int use_texture = FALSE; + bool use_texture = false; mat = give_current_material(ob, ob->actcol); if (mat == NULL) return OPERATOR_CANCELLED; if (nr == OBJECT_SELECT_LINKED_TEXTURE) { - use_texture = TRUE; + use_texture = true; if (mat->mtex[(int)mat->texact]) tex = mat->mtex[(int)mat->texact]->tex; if (tex == NULL) return OPERATOR_CANCELLED; @@ -509,7 +509,7 @@ void OBJECT_OT_select_linked(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); ot->prop = RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", ""); } @@ -885,7 +885,7 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); ot->prop = RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", ""); } @@ -951,7 +951,7 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot) /* properties */ RNA_def_enum(ot->srna, "match", match_items, 0, "Match", ""); - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20); } diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 1682cde9f16..b0d3d363c45 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -368,7 +368,7 @@ static void ignore_parent_tx(Main *bmain, Scene *scene, Object *ob) /* a change was made, adjust the children to compensate */ for (ob_child = bmain->object.first; ob_child; ob_child = ob_child->id.next) { if (ob_child->parent == ob) { - BKE_object_apply_mat4(ob_child, ob_child->obmat, TRUE, FALSE); + BKE_object_apply_mat4(ob_child, ob_child->obmat, true, false); BKE_object_workob_calc_parent(scene, ob_child, &workob); invert_m4_m4(ob_child->parentinv, workob.obmat); } @@ -442,7 +442,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo float tmat[3][3], timat[3][3]; /* simple rotation matrix */ - BKE_object_rot_to_mat3(ob, rsmat, TRUE); + BKE_object_rot_to_mat3(ob, rsmat, true); /* correct for scale, note mul_m3_m3m3 has swapped args! */ BKE_object_scale_to_mat3(ob, tmat); @@ -613,7 +613,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { BKE_object_where_is_calc(scene, ob); - BKE_object_apply_mat4(ob, ob->obmat, TRUE, TRUE); + BKE_object_apply_mat4(ob, ob->obmat, true, true); BKE_object_where_is_calc(scene, ob); /* update for any children that may get moved */ @@ -818,7 +818,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) float min[3], max[3]; /* only bounds support */ INIT_MINMAX(min, max); - BKE_object_minmax_dupli(scene, ob, min, max, TRUE); + BKE_object_minmax_dupli(scene, ob, min, max, true); mid_v3_v3v3(cent, min, max); invert_m4_m4(ob->imat, ob->obmat); mul_m4_v3(ob->imat, cent); @@ -828,7 +828,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; ob->dup_group->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } } } @@ -849,7 +849,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; me->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } else if (ELEM(ob->type, OB_CURVE, OB_SURF)) { Curve *cu = ob->data; @@ -867,7 +867,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; cu->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { @@ -900,7 +900,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; cu->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } } else if (ob->type == OB_ARMATURE) { @@ -921,7 +921,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; arm->id.flag |= LIB_DOIT; - /* do_inverse_offset = TRUE; */ /* docenter_armature() handles this */ + /* do_inverse_offset = true; */ /* docenter_armature() handles this */ BKE_object_where_is_calc(scene, ob); BKE_pose_where_is(scene, ob); /* needed for bone parents */ @@ -944,7 +944,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; mb->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; if (obedit) { if (centermode == GEOMETRY_TO_ORIGIN) { @@ -965,7 +965,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) tot_change++; lt->id.flag |= LIB_DOIT; - do_inverse_offset = TRUE; + do_inverse_offset = true; } /* offset other selected objects */ diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 568802dd7a0..637af5d6536 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -381,7 +381,7 @@ static int dynamicPaint_initBake(struct bContext *C, struct wmOperator *op) /* Set state to baking and init surface */ canvas->error[0] = '\0'; canvas->flags |= MOD_DPAINT_BAKING; - G.is_break = FALSE; /* reset blender_test_break*/ + G.is_break = false; /* reset blender_test_break*/ /* Bake Dynamic Paint */ status = dynamicPaint_bakeImageSequence(C, surface, ob); diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 5a43ca110fe..f835d08032b 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3888,7 +3888,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, const wmEvent *e RNA_collection_add(op->ptr, "stroke", &itemptr); RNA_float_set_array(&itemptr, "mouse", mouse); - RNA_boolean_set(&itemptr, "pen_flip", event->shift != FALSE); // XXX hardcoded + RNA_boolean_set(&itemptr, "pen_flip", event->shift != false); // XXX hardcoded /* apply */ brush_edit_apply(C, op, &itemptr); @@ -4266,7 +4266,7 @@ int PE_minmax(Scene *scene, float min[3], float max[3]) } if (!ok) { - BKE_object_minmax(ob, min, max, TRUE); + BKE_object_minmax(ob, min, max, true); ok= 1; } diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 8090cf4fefd..25bc2aeed07 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -623,7 +623,7 @@ void PARTICLE_OT_disconnect_hair(wmOperatorType *ot) RNA_def_boolean(ot->srna, "all", 0, "All hair", "Disconnect all hair systems from the emitter mesh"); } -static int connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) +static bool connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) { ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys); ParticleData *pa; @@ -642,7 +642,7 @@ static int connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) float v[4][3], vec[3]; if (!psys || !psys->part || psys->part->type != PART_HAIR || !psmd->dm) - return FALSE; + return false; edit= psys->edit; point= edit ? edit->points : NULL; @@ -730,7 +730,7 @@ static int connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) PE_update_object(scene, ob, 0); - return TRUE; + return true; } static int connect_hair_exec(bContext *C, wmOperator *op) @@ -740,7 +740,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op) PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem); ParticleSystem *psys= NULL; const bool all = RNA_boolean_get(op->ptr, "all"); - int any_connected = FALSE; + bool any_connected = false; if (!ob) return OPERATOR_CANCELLED; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index cab4ed6e8b5..cf228fcffb5 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -753,7 +753,7 @@ static void fluidbake_updatejob(void *customdata, float progress) { FluidBakeJob *fb= (FluidBakeJob *)customdata; - *(fb->do_update) = TRUE; + *(fb->do_update) = true; *(fb->progress) = progress; } @@ -765,10 +765,10 @@ static void fluidbake_startjob(void *customdata, short *stop, short *do_update, fb->do_update = do_update; fb->progress = progress; - G.is_break = FALSE; /* XXX shared with render - replace with job 'stop' switch */ + G.is_break = false; /* XXX shared with render - replace with job 'stop' switch */ elbeemSimulate(); - *do_update = TRUE; + *do_update = true; *stop = 0; } @@ -1133,7 +1133,7 @@ static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID)) return OPERATOR_CANCELLED; - if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), TRUE)) + if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), true)) return OPERATOR_CANCELLED; return OPERATOR_FINISHED; @@ -1141,7 +1141,7 @@ static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( static int fluid_bake_exec(bContext *C, wmOperator *op) { - if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), FALSE)) + if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), false)) return OPERATOR_CANCELLED; return OPERATOR_FINISHED; diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c index 444c87ded34..48cc51ffb55 100644 --- a/source/blender/editors/physics/physics_ops.c +++ b/source/blender/editors/physics/physics_ops.c @@ -121,21 +121,21 @@ static void keymap_particle(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "PARTICLE_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "PARTICLE_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); kmi = WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, KM_ANY, 0); - RNA_boolean_set(kmi->ptr, "release_confirm", TRUE); + RNA_boolean_set(kmi->ptr, "release_confirm", true); WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "PARTICLE_OT_brush_edit", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); @@ -153,7 +153,7 @@ static void keymap_particle(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "PARTICLE_OT_weight_set", KKEY, KM_PRESS, KM_SHIFT, 0); ED_keymap_proportional_cycle(keyconf, keymap); - ED_keymap_proportional_editmode(keyconf, keymap, FALSE); + ED_keymap_proportional_editmode(keyconf, keymap, false); } /******************************* boids *************************************/ diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c index 515ac330cc9..422b2525725 100644 --- a/source/blender/editors/physics/physics_pointcache.c +++ b/source/blender/editors/physics/physics_pointcache.c @@ -61,7 +61,7 @@ static int cache_break_test(void *UNUSED(cbd)) { - return (G.is_break == TRUE); + return (G.is_break == true); } static int ptcache_bake_all_poll(bContext *C) { diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 9531c7793d3..064f6ca3d1e 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -104,7 +104,7 @@ typedef struct RenderJob { struct Object *camera_override; int lay_override; bool v3d_override; - short anim, write_still; + bool anim, write_still; Image *image; ImageUser iuser; bool image_outdated; @@ -304,7 +304,7 @@ static int screen_render_exec(bContext *C, wmOperator *op) re = RE_NewRender(scene->id.name); lay_override = (v3d && v3d->lay != scene->lay) ? v3d->lay : 0; - G.is_break = FALSE; + G.is_break = false; RE_test_break_cb(re, NULL, render_break); ima = BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); @@ -444,7 +444,7 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs) RE_ReleaseResult(rj->re); /* make jobs timer to send notifier */ - *(rj->do_update) = TRUE; + *(rj->do_update) = true; } @@ -456,7 +456,7 @@ static void render_progress_update(void *rjv, float progress) *rj->progress = progress; /* make jobs timer to send notifier */ - *(rj->do_update) = TRUE; + *(rj->do_update) = true; } } @@ -534,7 +534,7 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec /* update entire render */ rj->image_outdated = false; BKE_image_signal(ima, NULL, IMA_SIGNAL_COLORMANAGE); - *(rj->do_update) = TRUE; + *(rj->do_update) = true; return; } @@ -560,7 +560,7 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec } /* make jobs timer to send notifier */ - *(rj->do_update) = TRUE; + *(rj->do_update) = true; } BKE_image_release_ibuf(ima, ibuf, lock); } @@ -640,7 +640,7 @@ static void render_endjob(void *rjv) } /* XXX render stability hack */ - G.is_rendering = FALSE; + G.is_rendering = false; WM_main_add_notifier(NC_SCENE | ND_RENDER_RESULT, NULL); /* Partial render result will always update display buffer @@ -945,7 +945,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even RE_progress_cb(re, rj, render_progress_update); rj->re = re; - G.is_break = FALSE; + G.is_break = false; /* store actual owner of job, so modal operator could check for it, * the reason of this is that active scene could change when rendering @@ -961,7 +961,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, const wmEvent *even /* we set G.is_rendering here already instead of only in the job, this ensure * main loop or other scene updates are disabled in time, since they may * have started before the job thread */ - G.is_rendering = TRUE; + G.is_rendering = true; /* add modal handler for ESC */ WM_event_add_modal_handler(C, op); @@ -1095,7 +1095,7 @@ static void render_view3d_display_update(void *rpv, RenderResult *UNUSED(rr), vo { RenderPreview *rp = rpv; - *(rp->do_update) = TRUE; + *(rp->do_update) = true; } static void render_view3d_renderinfo_cb(void *rjp, RenderStats *rs) @@ -1110,7 +1110,7 @@ static void render_view3d_renderinfo_cb(void *rjp, RenderStats *rs) make_renderinfo_string(rs, rp->scene, false, rp->engine->text); /* make jobs timer to send notifier */ - *(rp->do_update) = TRUE; + *(rp->do_update) = true; } } @@ -1133,7 +1133,7 @@ static void render_view3d_startjob(void *customdata, short *stop, short *do_upda //printf("ma %d res %d view %d db %d\n", update_flag & PR_UPDATE_MATERIAL, update_flag & PR_UPDATE_RENDERSIZE, update_flag & PR_UPDATE_VIEW, update_flag & PR_UPDATE_DATABASE); - G.is_break = FALSE; + G.is_break = false; if (false == render_view3d_get_rects(rp->ar, rp->v3d, rp->rv3d, &viewplane, rp->engine, &clipsta, &clipend, &pixsize, &orth)) return; diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index dba44bacd03..242ba1f1d67 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -247,7 +247,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender) /* shouldnt suddenly give errors mid-render but possible */ char err_out[256] = "unknown"; ImBuf *ibuf_view = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey, - IB_rect, OB_SOLID, FALSE, TRUE, + IB_rect, OB_SOLID, false, true, (draw_sky) ? R_ADDSKY : R_ALPHAPREMUL, err_out); camera = scene->camera; @@ -308,8 +308,9 @@ static void screen_opengl_render_apply(OGLRender *oglrender) IMB_color_to_bw(ibuf); } - BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, FALSE); - ok = BKE_imbuf_write_as(ibuf, name, &scene->r.im_format, TRUE); /* no need to stamp here */ + BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, + &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, false); + ok = BKE_imbuf_write_as(ibuf, name, &scene->r.im_format, true); /* no need to stamp here */ if (ok) printf("OpenGL Render written to '%s'\n", name); else printf("OpenGL Render failed to write '%s'\n", name); } @@ -348,7 +349,7 @@ static bool screen_opengl_render_init(bContext *C, wmOperator *op) /* ensure we have a 3d view */ if (!ED_view3d_context_activate(C)) { - RNA_boolean_set(op->ptr, "view_context", FALSE); + RNA_boolean_set(op->ptr, "view_context", false); is_view_context = false; } @@ -532,7 +533,8 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) is_movie = BKE_imtype_is_movie(scene->r.im_format.imtype); if (!is_movie) { - BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, TRUE); + BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, + &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, true); if ((scene->r.mode & R_NO_OVERWRITE) && BLI_exists(name)) { BKE_reportf(op->reports, RPT_INFO, "Skipping existing frame \"%s\"", name); @@ -569,7 +571,7 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) ibuf = BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock); if (ibuf) { - int needs_free = FALSE; + bool needs_free = false; ibuf_save = ibuf; @@ -577,7 +579,7 @@ static bool screen_opengl_render_anim_step(bContext *C, wmOperator *op) ibuf_save = IMB_colormanagement_imbuf_for_write(ibuf, true, true, &scene->view_settings, &scene->display_settings, &scene->r.im_format); - needs_free = TRUE; + needs_free = true; } /* color -> grayscale */ diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 482c855f067..fdb9b5c04ed 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -392,8 +392,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre sce->lay = 1 << mat->pr_type; if (mat->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ - BKE_node_preview_init_tree(mat->nodetree, sp->sizex, sp->sizey, TRUE); - BKE_node_preview_init_tree(origmat->nodetree, sp->sizex, sp->sizey, TRUE); + BKE_node_preview_init_tree(mat->nodetree, sp->sizex, sp->sizey, true); + BKE_node_preview_init_tree(origmat->nodetree, sp->sizex, sp->sizey, true); } } } @@ -456,8 +456,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre if (tex && tex->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ - BKE_node_preview_init_tree(origtex->nodetree, sp->sizex, sp->sizey, TRUE); - BKE_node_preview_init_tree(tex->nodetree, sp->sizex, sp->sizey, TRUE); + BKE_node_preview_init_tree(origtex->nodetree, sp->sizex, sp->sizey, true); + BKE_node_preview_init_tree(tex->nodetree, sp->sizex, sp->sizey, true); } } else if (id_type == ID_LA) { @@ -493,8 +493,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre if (la && la->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ - BKE_node_preview_init_tree(origla->nodetree, sp->sizex, sp->sizey, TRUE); - BKE_node_preview_init_tree(la->nodetree, sp->sizex, sp->sizey, TRUE); + BKE_node_preview_init_tree(origla->nodetree, sp->sizex, sp->sizey, true); + BKE_node_preview_init_tree(la->nodetree, sp->sizex, sp->sizey, true); } } else if (id_type == ID_WO) { @@ -511,8 +511,8 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre if (wrld && wrld->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ - BKE_node_preview_init_tree(wrld->nodetree, sp->sizex, sp->sizey, TRUE); - BKE_node_preview_init_tree(origwrld->nodetree, sp->sizex, sp->sizey, TRUE); + BKE_node_preview_init_tree(wrld->nodetree, sp->sizex, sp->sizey, true); + BKE_node_preview_init_tree(origwrld->nodetree, sp->sizex, sp->sizey, true); } } @@ -629,7 +629,7 @@ static void shader_preview_update(void *spv, RenderResult *UNUSED(rr), volatile { ShaderPreview *sp = spv; - *(sp->do_update) = TRUE; + *(sp->do_update) = true; } /* called by renderer, checks job value */ @@ -790,7 +790,7 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd else shader_preview_render(sp, sp->id, 0, 0); - *do_update = TRUE; + *do_update = true; } static void shader_preview_free(void *customdata) @@ -807,9 +807,9 @@ static void shader_preview_free(void *customdata) /* get rid of copied material */ BLI_remlink(&pr_main->mat, sp->matcopy); - BKE_material_free_ex(sp->matcopy, FALSE); + BKE_material_free_ex(sp->matcopy, false); - properties = IDP_GetProperties((ID *)sp->matcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->matcopy, false); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -825,7 +825,7 @@ static void shader_preview_free(void *customdata) BLI_remlink(&pr_main->tex, sp->texcopy); BKE_texture_free(sp->texcopy); - properties = IDP_GetProperties((ID *)sp->texcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->texcopy, false); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -839,9 +839,9 @@ static void shader_preview_free(void *customdata) /* get rid of copied world */ BLI_remlink(&pr_main->world, sp->worldcopy); - BKE_world_free_ex(sp->worldcopy, TRUE); /* [#32865] - we need to unlink the texture copies, unlike for materials */ + BKE_world_free_ex(sp->worldcopy, true); /* [#32865] - we need to unlink the texture copies, unlike for materials */ - properties = IDP_GetProperties((ID *)sp->worldcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->worldcopy, false); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -857,7 +857,7 @@ static void shader_preview_free(void *customdata) BLI_remlink(&pr_main->lamp, sp->lampcopy); BKE_lamp_free(sp->lampcopy); - properties = IDP_GetProperties((ID *)sp->lampcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->lampcopy, false); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -959,7 +959,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect); - *do_update = TRUE; + *do_update = true; BKE_image_release_ibuf(ima, ibuf, NULL); } @@ -975,7 +975,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat icon_copy_rect(br->icon_imbuf, sp->sizex, sp->sizey, sp->pr_rect); - *do_update = TRUE; + *do_update = true; } else { /* re-use shader job */ diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index c691c2ca0b2..3906b3d0c10 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -229,7 +229,7 @@ void OBJECT_OT_material_slot_assign(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; } -static int material_slot_de_select(bContext *C, int select) +static int material_slot_de_select(bContext *C, bool select) { Object *ob = ED_object_context(C); @@ -295,7 +295,7 @@ static int material_slot_de_select(bContext *C, int select) static int material_slot_select_exec(bContext *C, wmOperator *UNUSED(op)) { - return material_slot_de_select(C, 1); + return material_slot_de_select(C, true); } void OBJECT_OT_material_slot_select(wmOperatorType *ot) @@ -314,7 +314,7 @@ void OBJECT_OT_material_slot_select(wmOperatorType *ot) static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op)) { - return material_slot_de_select(C, 0); + return material_slot_de_select(C, false); } void OBJECT_OT_material_slot_deselect(wmOperatorType *ot) @@ -392,7 +392,7 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op)) if (BKE_scene_use_new_shading_nodes(scene)) { ED_node_shader_default(C, &ma->id); - ma->use_nodes = TRUE; + ma->use_nodes = true; } } @@ -496,7 +496,7 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op)) if (BKE_scene_use_new_shading_nodes(scene)) { ED_node_shader_default(C, &wo->id); - wo->use_nodes = TRUE; + wo->use_nodes = true; } } @@ -743,7 +743,7 @@ static int freestyle_active_lineset_poll(bContext *C) SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay); if (!srl) { - return FALSE; + return false; } return BKE_freestyle_lineset_get_active(&srl->freestyleConfig) != NULL; diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index 5f74bf6576a..81eb11d7138 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -81,7 +81,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated) bContext *C; wmWindowManager *wm; wmWindow *win; - static int recursive_check = FALSE; + static bool recursive_check = false; /* don't do this render engine update if we're updating the scene from * other threads doing e.g. rendering or baking jobs */ @@ -92,7 +92,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated) if (recursive_check) return; - recursive_check = TRUE; + recursive_check = true; C = CTX_create(); CTX_data_main_set(C, bmain); @@ -140,7 +140,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated) CTX_free(C); - recursive_check = FALSE; + recursive_check = false; } void ED_render_engine_area_exit(ScrArea *sa) @@ -275,7 +275,7 @@ static void material_changed(Main *bmain, Material *ma) Material *parent; Object *ob; Scene *scene; - int texture_draw = FALSE; + int texture_draw = false; /* icons */ BKE_icon_changed(BKE_icon_getid(&ma->id)); @@ -302,7 +302,7 @@ static void material_changed(Main *bmain, Material *ma) /* find if we have a scene with textured display */ for (scene = bmain->scene.first; scene; scene = scene->id.next) { if (scene->customdata_mask & CD_MASK_MTFACE) { - texture_draw = TRUE; + texture_draw = true; break; } } @@ -351,11 +351,11 @@ static void lamp_changed(Main *bmain, Lamp *la) static int material_uses_texture(Material *ma, Tex *tex) { if (mtex_use_tex(ma->mtex, MAX_MTEX, tex)) - return TRUE; + return true; else if (ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex)) - return TRUE; + return true; - return FALSE; + return false; } static void texture_changed(Main *bmain, Tex *tex) @@ -366,7 +366,7 @@ static void texture_changed(Main *bmain, Tex *tex) Scene *scene; Object *ob; bNode *node; - int texture_draw = FALSE; + int texture_draw = false; /* icons */ BKE_icon_changed(BKE_icon_getid(&tex->id)); @@ -424,7 +424,7 @@ static void texture_changed(Main *bmain, Tex *tex) } if (scene->customdata_mask & CD_MASK_MTFACE) - texture_draw = TRUE; + texture_draw = true; } /* find textured objects */ diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index c1cd17465cf..80ce74f3c5b 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -305,7 +305,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), const wm /* determine if render already shows */ if (sa) { /* but don't close it when rendering */ - if (G.is_rendering == FALSE) { + if (G.is_rendering == false) { SpaceImage *sima = sa->spacedata.first; if (sima->flag & SI_PREVSPACE) { diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 70378046b02..f62166d33b0 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -151,7 +151,7 @@ void ED_area_do_refresh(bContext *C, ScrArea *sa) if (sa->type && sa->type->refresh) { sa->type->refresh(C, sa); } - sa->do_refresh = FALSE; + sa->do_refresh = false; } /** @@ -526,7 +526,7 @@ void ED_area_tag_redraw_regiontype(ScrArea *sa, int regiontype) void ED_area_tag_refresh(ScrArea *sa) { if (sa) - sa->do_refresh = TRUE; + sa->do_refresh = true; } /* *************************************************************** */ @@ -1332,7 +1332,7 @@ void ED_region_init(bContext *C, ARegion *ar) } /* for quick toggle, can skip fades */ -void region_toggle_hidden(bContext *C, ARegion *ar, int do_fade) +void region_toggle_hidden(bContext *C, ARegion *ar, bool do_fade) { ScrArea *sa = CTX_wm_area(C); @@ -1359,7 +1359,7 @@ void ED_region_toggle_hidden(bContext *C, ARegion *ar) /* sa2 to sa1, we swap spaces for fullscreen to keep all allocated data */ /* area vertices were set */ -void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space) +void area_copy_data(ScrArea *sa1, ScrArea *sa2, const bool swap_space) { SpaceType *st; ARegion *ar; diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 23ead971cd3..b10f521d25d 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -468,7 +468,7 @@ bScreen *ED_screen_add(wmWindow *win, Scene *scene, const char *name) sc = BKE_libblock_alloc(G.main, ID_SCR, name); sc->scene = scene; - sc->do_refresh = TRUE; + sc->do_refresh = true; sc->redraws_flag = TIME_ALL_3D_WIN | TIME_ALL_ANIM_WIN; sc->winid = win->winid; @@ -1099,18 +1099,18 @@ void ED_screen_do_listen(bContext *C, wmNotifier *note) switch (note->category) { case NC_WM: if (note->data == ND_FILEREAD) - win->screen->do_draw = TRUE; + win->screen->do_draw = true; break; case NC_WINDOW: - win->screen->do_draw = TRUE; + win->screen->do_draw = true; break; case NC_SCREEN: if (note->action == NA_EDITED) - win->screen->do_draw = win->screen->do_refresh = TRUE; + win->screen->do_draw = win->screen->do_refresh = true; break; case NC_SCENE: if (note->data == ND_MODE) - region_cursor_set(win, note->swinid, TRUE); + region_cursor_set(win, note->swinid, true); break; } } @@ -1185,7 +1185,7 @@ void ED_screen_draw(wmWindow *win) glDisable(GL_BLEND); } - win->screen->do_draw = FALSE; + win->screen->do_draw = false; } /* helper call for below, dpi changes headers */ @@ -1240,7 +1240,7 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win) if (G.debug & G_DEBUG_EVENTS) { printf("%s: set screen\n", __func__); } - win->screen->do_refresh = FALSE; + win->screen->do_refresh = false; win->screen->context = ed_screen_context; } @@ -1415,11 +1415,11 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event) if (oldswin != scr->subwinactive) { for (sa = scr->areabase.first; sa; sa = sa->next) { - int do_draw = FALSE; + bool do_draw = false; for (ar = sa->regionbase.first; ar; ar = ar->next) if (ar->swinid == oldswin || ar->swinid == scr->subwinactive) - do_draw = TRUE; + do_draw = true; if (do_draw) { for (ar = sa->regionbase.first; ar; ar = ar->next) @@ -1436,7 +1436,7 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event) else { /* notifier invokes freeing the buttons... causing a bit too much redraws */ if (oldswin != scr->subwinactive) { - region_cursor_set(win, scr->subwinactive, TRUE); + region_cursor_set(win, scr->subwinactive, true); /* this used to be a notifier, but needs to be done immediate * because it can undo setting the right button as active due @@ -1444,7 +1444,7 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event) uiFreeActiveButtons(C, win->screen); } else - region_cursor_set(win, scr->subwinactive, FALSE); + region_cursor_set(win, scr->subwinactive, false); } } } @@ -1563,7 +1563,7 @@ void ED_screen_set(bContext *C, bScreen *sc) * have different layers visible in 3D viewpots. This is possible * because of view3d.lock_camera_and_layers option. */ - DAG_on_visible_update(bmain, FALSE); + DAG_on_visible_update(bmain, false); } } @@ -1697,7 +1697,7 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene) CTX_data_scene_set(C, scene); BKE_scene_set_background(bmain, scene); - DAG_on_visible_update(bmain, FALSE); + DAG_on_visible_update(bmain, false); ED_render_engine_changed(bmain); ED_update_for_newframe(bmain, scene, 1); diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index 8a76c52d985..b279ddab42f 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -38,8 +38,8 @@ struct Scene; #define AZONESPOT (0.6f * U.widget_unit) /* area.c */ -void area_copy_data(ScrArea *sa1, ScrArea *sa2, int swap_space); -void region_toggle_hidden(bContext *C, ARegion *ar, int do_fade); +void area_copy_data(ScrArea *sa1, ScrArea *sa2, const bool swap_space); +void region_toggle_hidden(bContext *C, ARegion *ar, const bool do_fade); /* screen_edit.c */ ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index f5c2c9e5fcb..915ed7679f4 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -193,10 +193,10 @@ int ED_operator_view3d_active(bContext *C) int ED_operator_region_view3d_active(bContext *C) { if (CTX_wm_region_view3d(C)) - return TRUE; + return true; CTX_wm_operator_poll_msg_set(C, "expected a view3d region"); - return FALSE; + return false; } /* generic for any view2d which uses anim_ops */ @@ -205,7 +205,7 @@ int ED_operator_animview_active(bContext *C) if (ED_operator_areaactive(C)) { SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C); if (sl && (ELEM5(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_IPO, SPACE_TIME))) - return TRUE; + return true; } CTX_wm_operator_poll_msg_set(C, "expected a timeline/animation area to be active"); @@ -453,10 +453,10 @@ int ED_operator_uvmap(bContext *C) } if (em && (em->bm->totface)) { - return TRUE; + return true; } - return FALSE; + return false; } int ED_operator_editsurfcurve(bContext *C) @@ -552,7 +552,7 @@ int ED_operator_mask(bContext *C) } } - return FALSE; + return false; } /* *************************** action zone operator ************************** */ @@ -662,7 +662,7 @@ static void actionzone_apply(bContext *C, wmOperator *op, int type) event.type = EVT_ACTIONZONE_REGION; event.val = 0; event.customdata = op->customdata; - event.customdatafree = TRUE; + event.customdatafree = true; op->customdata = NULL; wm_event_add(win, &event); @@ -1625,7 +1625,7 @@ static int area_split_modal(bContext *C, wmOperator *op, const wmEvent *event) } } - CTX_wm_window(C)->screen->do_draw = TRUE; + CTX_wm_window(C)->screen->do_draw = true; } @@ -2123,20 +2123,20 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op) if (CFRA != (int)ak->cfra) { /* this changes the frame, so set the frame and we're done */ CFRA = (int)ak->cfra; - done = TRUE; + done = true; } else { /* make this the new starting point for the search */ cfra = ak->cfra; } } - } while ((ak != NULL) && (done == FALSE)); + } while ((ak != NULL) && (done == false)); /* free temp stuff */ BLI_dlrbTree_free(&keys); /* any success? */ - if (done == FALSE) { + if (done == false) { BKE_report(op->reports, RPT_INFO, "No more keyframes to jump to in this direction"); return OPERATOR_CANCELLED; @@ -2162,7 +2162,7 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "next", TRUE, "Next Keyframe", ""); + RNA_def_boolean(ot->srna, "next", true, "Next Keyframe", ""); } /* ************** jump to marker operator ***************************** */ @@ -2222,7 +2222,7 @@ static void SCREEN_OT_marker_jump(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "next", TRUE, "Next Marker", ""); + RNA_def_boolean(ot->srna, "next", true, "Next Marker", ""); } /* ************** switch screen operator ***************************** */ @@ -3238,7 +3238,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv else sync = (scene->flag & SCE_FRAME_DROP); if ((scene->audio.flag & AUDIO_SYNC) && - (sad->flag & ANIMPLAY_FLAG_REVERSE) == FALSE && + (sad->flag & ANIMPLAY_FLAG_REVERSE) == false && finite(time = sound_sync_scene(scene))) { scene->r.cfra = (double)time * FPS + 0.5; @@ -3473,7 +3473,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot) ot->poll = ED_operator_screenactive; - RNA_def_boolean(ot->srna, "restore_frame", TRUE, "Restore Frame", "Restore the frame when animation was initialized"); + RNA_def_boolean(ot->srna, "restore_frame", true, "Restore Frame", "Restore the frame when animation was initialized"); } /* ************** border select operator (template) ***************************** */ @@ -4052,10 +4052,10 @@ void ED_keymap_screen(wmKeyConfig *keyconf) /* render */ kmi = WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "use_viewport", TRUE); + RNA_boolean_set(kmi->ptr, "use_viewport", true); kmi = WM_keymap_add_item(keymap, "RENDER_OT_render", F12KEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "animation", TRUE); - RNA_boolean_set(kmi->ptr, "use_viewport", TRUE); + RNA_boolean_set(kmi->ptr, "animation", true); + RNA_boolean_set(kmi->ptr, "use_viewport", true); WM_keymap_add_item(keymap, "RENDER_OT_view_cancel", ESCKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "RENDER_OT_view_show", F11KEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "RENDER_OT_play_rendered_anim", F11KEY, KM_PRESS, KM_CTRL, 0); @@ -4079,27 +4079,27 @@ void ED_keymap_screen(wmKeyConfig *keyconf) RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELDOWNMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", 1); RNA_int_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_offset", WHEELUPMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "delta", -1); - RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", FALSE); + RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "end", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", false); kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", UPARROWKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "next", TRUE); + RNA_boolean_set(kmi->ptr, "next", true); kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", DOWNARROWKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "next", FALSE); + RNA_boolean_set(kmi->ptr, "next", false); kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIALAST, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "next", TRUE); + RNA_boolean_set(kmi->ptr, "next", true); kmi = WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", MEDIAFIRST, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "next", FALSE); + RNA_boolean_set(kmi->ptr, "next", false); /* play (forward and backwards) */ WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0)->ptr, "reverse", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0)->ptr, "reverse", true); WM_keymap_add_item(keymap, "SCREEN_OT_animation_cancel", ESCKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", MEDIAPLAY, KM_PRESS, 0, 0); @@ -4109,11 +4109,11 @@ void ED_keymap_screen(wmKeyConfig *keyconf) #if 0 /* XXX: disabled for restoring later... bad implementation */ keymap = WM_keymap_find(keyconf, "Frames", 0, 0); kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE); + RNA_boolean_set(kmi->ptr, "cycle_speed", true); kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", LEFTARROWKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "reverse", TRUE); - RNA_boolean_set(kmi->ptr, "cycle_speed", TRUE); + RNA_boolean_set(kmi->ptr, "reverse", true); + RNA_boolean_set(kmi->ptr, "cycle_speed", true); WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", DOWNARROWKEY, KM_PRESS, KM_ALT, 0); #endif diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 0153d609adb..c5ca5ab921f 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -138,11 +138,11 @@ static int screenshot_data_create(bContext *C, wmOperator *op) op->customdata = scd; - return TRUE; + return true; } else { op->customdata = NULL; - return FALSE; + return false; } } @@ -257,7 +257,7 @@ static void screenshot_draw(bContext *UNUSED(C), wmOperator *op) /* image template */ RNA_pointer_create(NULL, &RNA_ImageFormatSettings, &scd->im_format, &ptr); - uiTemplateImageSettings(layout, &ptr, FALSE); + uiTemplateImageSettings(layout, &ptr, false); /* main draw call */ RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); @@ -356,7 +356,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float sj->stop = stop; sj->do_update = do_update; - *do_update = TRUE; /* wait for opengl rect */ + *do_update = true; /* wait for opengl rect */ while (*stop == 0) { @@ -378,7 +378,8 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float char name[FILE_MAX]; int ok; - BKE_makepicstring(name, rd.pic, sj->bmain->name, rd.cfra, &rd.im_format, rd.scemode & R_EXTENSION, TRUE); + BKE_makepicstring(name, rd.pic, sj->bmain->name, rd.cfra, + &rd.im_format, (rd.scemode & R_EXTENSION) != 0, true); ibuf->rect = sj->dumprect; ok = BKE_imbuf_write(ibuf, name, &rd.im_format); @@ -400,7 +401,7 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float MEM_freeN(sj->dumprect); sj->dumprect = NULL; - *do_update = TRUE; + *do_update = true; rd.cfra++; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 434aaaf8835..4cf59a575b9 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -808,13 +808,13 @@ void ED_space_image_paint_update(wmWindowManager *wm, ToolSettings *settings) wmWindow *win; ScrArea *sa; ImagePaintSettings *imapaint = &settings->imapaint; - int enabled = FALSE; + int enabled = false; for (win = wm->windows.first; win; win = win->next) for (sa = win->screen->areabase.first; sa; sa = sa->next) if (sa->spacetype == SPACE_IMAGE) if (((SpaceImage *)sa->spacedata.first)->mode == SI_MODE_PAINT) - enabled = TRUE; + enabled = true; if (enabled) { BKE_paint_init(&imapaint->paint, PAINT_CURSOR_TEXTURE_PAINT); diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 488e00e16ee..c6de5749274 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -661,7 +661,7 @@ static int project_paint_occlude_ptv_clip(const ProjPaintState *ps, const MFace if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); - if (!ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) { + if (!ED_view3d_clipping_test(ps->rv3d, wco, true)) { return 1; } @@ -2017,9 +2017,9 @@ static void project_bucket_clip_face( return; } - doubles = TRUE; - while (doubles == TRUE) { - doubles = FALSE; + doubles = true; + while (doubles == true) { + doubles = false; for (i = 1; i < (*tot); i++) { if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_PIXEL_TOLERANCE && fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_PIXEL_TOLERANCE) @@ -2029,7 +2029,7 @@ static void project_bucket_clip_face( isectVCosSS[j - 1][0] = isectVCosSS[j][0]; isectVCosSS[j - 1][1] = isectVCosSS[j][1]; } - doubles = TRUE; /* keep looking for more doubles */ + doubles = true; /* keep looking for more doubles */ (*tot)--; } } @@ -2308,8 +2308,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesnt work, * could check the poly direction but better to do this */ - if ((do_backfacecull == TRUE && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) || - (do_backfacecull == FALSE && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot))) + if ((do_backfacecull == true && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) || + (do_backfacecull == false && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot))) { has_x_isect = has_isect = 1; @@ -2321,7 +2321,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* a pity we need to get the worldspace pixel location here */ if (do_clip || do_3d_mapping) { interp_v3_v3v3v3(wco, ps->dm_mvert[(*(&mf->v1 + i1))].co, ps->dm_mvert[(*(&mf->v1 + i2))].co, ps->dm_mvert[(*(&mf->v1 + i3))].co, w); - if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) { + if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, true)) { continue; /* Watch out that no code below this needs to run */ } } @@ -2329,7 +2329,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* Is this UV visible from the view? - raytrace */ /* project_paint_PickFace is less complex, use for testing */ //if (project_paint_PickFace(ps, pixelScreenCo, w, &side) == face_index) { - if ((ps->do_occlude == FALSE) || + if ((ps->do_occlude == false) || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { mask = project_paint_uvpixel_mask(ps, face_index, side, w); @@ -2507,7 +2507,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i pixelScreenCo[2] = pixelScreenCo[2] / pixelScreenCo[3]; /* Use the depth for bucket point occlusion */ } - if ((ps->do_occlude == FALSE) || + if ((ps->do_occlude == false) || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { /* Only bother calculating the weights if we intersect */ @@ -2547,7 +2547,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); - if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) { + if (do_clip && ED_view3d_clipping_test(ps->rv3d, wco, true)) { continue; /* Watch out that no code below this needs to run */ } } @@ -2842,20 +2842,20 @@ static void project_paint_begin(ProjPaintState *ps) if (ps->source == PROJ_SRC_IMAGE_CAM) { /* using render mesh, assume only camera was rendered from */ ps->dm = mesh_create_derived_render(ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE); - ps->dm_release = TRUE; + ps->dm_release = true; } else if (ps->ob->derivedFinal && CustomData_has_layer(&ps->ob->derivedFinal->faceData, CD_MTFACE) && (ps->do_face_sel == false || CustomData_has_layer(&ps->ob->derivedFinal->polyData, CD_ORIGINDEX))) { ps->dm = ps->ob->derivedFinal; - ps->dm_release = FALSE; + ps->dm_release = false; } else { ps->dm = mesh_get_derived_final( ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE | (ps->do_face_sel ? CD_ORIGINDEX : 0)); - ps->dm_release = TRUE; + ps->dm_release = true; } if (!CustomData_has_layer(&ps->dm->faceData, CD_MTFACE) ) { @@ -2900,7 +2900,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->dm_mtface_clone = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); if (ps->dm_mtface_clone == NULL || ps->dm_mtface_clone == ps->dm_mtface) { - ps->do_layer_clone = FALSE; + ps->do_layer_clone = false; ps->dm_mtface_clone = NULL; } } @@ -2912,7 +2912,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->dm_mtface_stencil = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); if (ps->dm_mtface_stencil == NULL || ps->dm_mtface_stencil == ps->dm_mtface) { - ps->do_layer_stencil = FALSE; + ps->do_layer_stencil = false; ps->dm_mtface_stencil = NULL; } } @@ -3698,7 +3698,7 @@ static void do_projectpaint_soften_f(ProjPaintState *ps, ProjPixel *projPixel, f float co_ofs[2]; float rgba_tmp[4]; sub_v2_v2v2(co_ofs, projPixel->projCoSS, proj_pixel_soften_v2[i]); - if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, TRUE)) { + if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, true)) { add_v4_v4(rgba, rgba_tmp); accum_tot++; } @@ -3729,7 +3729,7 @@ static void do_projectpaint_soften(ProjPaintState *ps, ProjPixel *projPixel, flo float co_ofs[2]; float rgba_tmp[4]; sub_v2_v2v2(co_ofs, projPixel->projCoSS, proj_pixel_soften_v2[i]); - if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, TRUE)) { + if (project_paint_PickColor(ps, co_ofs, rgba_tmp, NULL, true)) { add_v4_v4(rgba, rgba_tmp); accum_tot++; } @@ -4263,7 +4263,7 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps, int ps->normal_angle_range = ps->normal_angle - ps->normal_angle_inner; if (ps->normal_angle_range <= 0.0f) - ps->do_mask_normal = FALSE; /* no need to do blending */ + ps->do_mask_normal = false; /* no need to do blending */ return; } @@ -4486,7 +4486,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) if (w > maxsize) w = maxsize; if (h > maxsize) h = maxsize; - ibuf = ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, FALSE, R_ALPHAPREMUL, err_out); + ibuf = ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, false, R_ALPHAPREMUL, err_out); if (!ibuf) { /* Mostly happens when OpenGL offscreen buffer was failed to create, */ /* but could be other reasons. Should be handled in the future. nazgul */ diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index eec666426b6..71a548d2f21 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -1165,11 +1165,11 @@ void ED_keymap_paint(wmKeyConfig *keyconf) /* multires switch */ kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0); RNA_int_set(kmi->ptr, "level", 1); - RNA_boolean_set(kmi->ptr, "relative", TRUE); + RNA_boolean_set(kmi->ptr, "relative", true); kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEDOWNKEY, KM_PRESS, 0, 0); RNA_int_set(kmi->ptr, "level", -1); - RNA_boolean_set(kmi->ptr, "relative", TRUE); + RNA_boolean_set(kmi->ptr, "relative", true); ed_keymap_paint_brush_switch(keymap, "sculpt"); ed_keymap_paint_brush_size(keymap, "tool_settings.sculpt.brush.size"); @@ -1273,9 +1273,9 @@ void ED_keymap_paint(wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "action", SEL_INVERT); WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0); /* Image/Texture Paint mode */ @@ -1314,9 +1314,9 @@ void ED_keymap_paint(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_all", IKEY, KM_PRESS, KM_CTRL, 0); RNA_enum_set(kmi->ptr, "action", SEL_INVERT); kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "PAINT_OT_face_select_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "PAINT_OT_face_select_reveal", HKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "PAINT_OT_face_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index f96f0edf672..15f21cc44c8 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -257,7 +257,7 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode, paint_calculate_rake_rotation(ups, mouse); } - stroke->brush_init = TRUE; + stroke->brush_init = true; } diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 4f9ca4c2675..5364ac6e26a 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -473,7 +473,7 @@ void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) static int face_select_all_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); - paintface_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE); + paintface_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), true); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; } @@ -497,7 +497,7 @@ void PAINT_OT_face_select_all(wmOperatorType *ot) static int vert_select_all_exec(bContext *C, wmOperator *op) { Object *ob = CTX_data_active_object(C); - paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE); + paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), true); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; } @@ -528,7 +528,7 @@ static int vert_select_ungrouped_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - paintvert_select_ungrouped(ob, RNA_boolean_get(op->ptr, "extend"), TRUE); + paintvert_select_ungrouped(ob, RNA_boolean_get(op->ptr, "extend"), true); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index e058f924a7b..d90f9a80b37 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -91,12 +91,12 @@ static bool vertex_paint_use_fast_update_check(Object *ob) } } - return FALSE; + return false; } /* if the polygons from the mesh and the 'derivedFinal' match * we can assume that no modifiers are applied and that its worth adding tessellated faces - * so 'vertex_paint_use_fast_update_check()' returns TRUE */ + * so 'vertex_paint_use_fast_update_check()' returns true */ static bool vertex_paint_use_tessface_check(Object *ob, Mesh *me) { DerivedMesh *dm = ob->derivedFinal; @@ -105,7 +105,7 @@ static bool vertex_paint_use_tessface_check(Object *ob, Mesh *me) return (me->mpoly == CustomData_get_layer(&dm->polyData, CD_MPOLY)); } - return FALSE; + return false; } static void update_tessface_data(Object *ob, Mesh *me) @@ -226,7 +226,7 @@ static void do_shared_vertex_tesscol(Mesh *me, bool *mfacetag) mface = me->mface; mcol = (char *)me->mcol; for (a = me->totface; a > 0; a--, mface++, mcol += 16) { - if ((use_face_sel == FALSE) || (mface->flag & ME_FACE_SEL)) { + if ((use_face_sel == false) || (mface->flag & ME_FACE_SEL)) { scol = scolmain + 4 * mface->v1; scol[0]++; scol[1] += mcol[1]; scol[2] += mcol[2]; scol[3] += mcol[3]; scol = scolmain + 4 * mface->v2; @@ -255,7 +255,7 @@ static void do_shared_vertex_tesscol(Mesh *me, bool *mfacetag) mcol = (char *)me->mcol; mftag = mfacetag; for (a = me->totface; a > 0; a--, mface++, mcol += 16, mftag += 4) { - if ((use_face_sel == FALSE) || (mface->flag & ME_FACE_SEL)) { + if ((use_face_sel == false) || (mface->flag & ME_FACE_SEL)) { if (mftag[0]) { scol = scolmain + 4 * mface->v1; mcol[1] = scol[1]; mcol[2] = scol[2]; mcol[3] = scol[3]; @@ -297,7 +297,7 @@ static void do_shared_vertexcol(Mesh *me, bool *mlooptag, bool *mfacetag, const scol = MEM_callocN(sizeof(int) * me->totvert * 5, "scol"); for (i = 0, mp = me->mpoly; i < me->totpoly; i++, mp++) { - if ((use_face_sel == FALSE) || (mp->flag & ME_FACE_SEL)) { + if ((use_face_sel == false) || (mp->flag & ME_FACE_SEL)) { MLoop *ml = me->mloop + mp->loopstart; MLoopCol *lcol = me->mloopcol + mp->loopstart; for (j = 0; j < mp->totloop; j++, ml++, lcol++) { @@ -320,7 +320,7 @@ static void do_shared_vertexcol(Mesh *me, bool *mlooptag, bool *mfacetag, const } for (i = 0, mp = me->mpoly; i < me->totpoly; i++, mp++) { - if ((use_face_sel == FALSE) || (mp->flag & ME_FACE_SEL)) { + if ((use_face_sel == false) || (mp->flag & ME_FACE_SEL)) { MLoop *ml = me->mloop + mp->loopstart; MLoopCol *lcol = me->mloopcol + mp->loopstart; for (j = 0; j < mp->totloop; j++, ml++, lcol++) { @@ -1055,13 +1055,13 @@ static float wpaint_blend(VPaint *wp, float weight, float weight_prev, weight = wpaint_blend_tool(tool, weight, paintval, alpha); /* delay clamping until the end so multi-paint can function when the active group is at the limits */ - if (do_multipaint_totsel == FALSE) { + if (do_multipaint_totsel == false) { CLAMP(weight, 0.0f, 1.0f); } /* if no spray, clip result with orig weight & orig alpha */ if ((wp->flag & VP_SPRAY) == 0) { - if (do_multipaint_totsel == FALSE) { + if (do_multipaint_totsel == false) { float testw = wpaint_blend_tool(tool, weight_prev, paintval, brush_alpha_value); CLAMP(testw, 0.0f, 1.0f); @@ -1102,7 +1102,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, const wmEvent *even ED_view3d_init_mats_rv3d(vc.obact, vc.rv3d); if (use_vert_sel) { - if (ED_mesh_pick_vert(C, vc.obact, event->mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, TRUE)) { + if (ED_mesh_pick_vert(C, vc.obact, event->mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, true)) { v_idx_best = index; } } @@ -1153,16 +1153,16 @@ void PAINT_OT_weight_sample(wmOperatorType *ot) } /* samples cursor location, and gives menu with vertex groups to activate */ -static int weight_paint_sample_enum_itemf__helper(const MDeformVert *dvert, const int defbase_tot, int *groups) +static bool weight_paint_sample_enum_itemf__helper(const MDeformVert *dvert, const int defbase_tot, int *groups) { /* this func fills in used vgroup's */ - int found = FALSE; + bool found = false; int i = dvert->totweight; MDeformWeight *dw; for (dw = dvert->dw; i > 0; dw++, i--) { if (dw->def_nr < defbase_tot) { - groups[dw->def_nr] = TRUE; - found = TRUE; + groups[dw->def_nr] = true; + found = true; } } return found; @@ -1182,7 +1182,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA const int defbase_tot = BLI_countlist(&vc.obact->defbase); const int use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; int *groups = MEM_callocN(defbase_tot * sizeof(int), "groups"); - int found = FALSE; + bool found = false; unsigned int index; int mval[2] = {win->eventstate->x - vc.ar->winrct.xmin, @@ -1192,7 +1192,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA ED_view3d_init_mats_rv3d(vc.obact, vc.rv3d); if (use_vert_sel) { - if (ED_mesh_pick_vert(C, vc.obact, mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, TRUE)) { + if (ED_mesh_pick_vert(C, vc.obact, mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, true)) { MDeformVert *dvert = &me->dvert[index]; found |= weight_paint_sample_enum_itemf__helper(dvert, defbase_tot, groups); } @@ -1209,7 +1209,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA } } - if (found == FALSE) { + if (found == false) { MEM_freeN(groups); } else { @@ -1387,11 +1387,11 @@ static bool has_locked_group(MDeformVert *dvert, const int defbase_tot, for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) { if (dw->def_nr < defbase_tot) { if (bone_groups[dw->def_nr] && lock_flags[dw->def_nr] && dw->weight > 0.0f) { - return TRUE; + return true; } } } - return FALSE; + return false; } static bool has_locked_group_selected(int defbase_tot, const bool *defbase_sel, const bool *lock_flags) @@ -1412,14 +1412,14 @@ static bool has_unselected_unlocked_bone_group(int defbase_tot, bool *defbase_se { int i; if (defbase_tot == selected) { - return FALSE; + return false; } for (i = 0; i < defbase_tot; i++) { if (vgroup_validmap[i] && !defbase_sel[i] && !lock_flags[i]) { - return TRUE; + return true; } } - return FALSE; + return false; } #endif @@ -1488,7 +1488,7 @@ static float redistribute_change(MDeformVert *ndv, const int defbase_tot, if (change_status[ndw->def_nr] == change_me) { oldval = ndw->weight; /* if auto normalize is active, don't worry about upper bounds */ - if (do_auto_normalize == FALSE && ndw->weight + change > 1) { + if (do_auto_normalize == false && ndw->weight + change > 1) { totchange -= 1.0f - ndw->weight; ndw->weight = 1.0f; /* stop the changes to this group */ @@ -1707,7 +1707,7 @@ typedef struct WeightPaintInfo { } WeightPaintInfo; /* fresh start to make multi-paint and locking modular */ -/* returns TRUE if it thinks you need to reset the weights due to +/* returns true if it thinks you need to reset the weights due to * normalizing while multi-painting * * note: this assumes dw->def_nr range has been checked by the caller @@ -1753,19 +1753,19 @@ static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi, if (neww > oldw) { if (tdw->weight <= oldw) { MEM_freeN(dv_test.dw); - return TRUE; + return true; } } else { if (tdw->weight >= oldw) { MEM_freeN(dv_test.dw); - return TRUE; + return true; } } } } MEM_freeN(dv_test.dw); - return FALSE; + return false; } /* within the current dvert index, get the dw that is selected and has a weight @@ -1875,11 +1875,11 @@ static void do_weight_paint_vertex( /* If there are no locks or multipaint, * then there is no need to run the more complicated checks */ - if ((do_multipaint_totsel == FALSE) && - (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == FALSE)) + if ((do_multipaint_totsel == false) && + (wpi->lock_flags == NULL || has_locked_group(dv, wpi->defbase_tot, wpi->vgroup_validmap, wpi->lock_flags) == false)) { dw->weight = wpaint_blend(wp, dw->weight, dw_prev->weight, alpha, paintweight, - wpi->brush_alpha_value, wpi->do_flip, FALSE); + wpi->brush_alpha_value, wpi->do_flip, false); /* WATCH IT: take care of the ordering of applying mirror -> normalize, * can give wrong results [#26193], least confusing if normalize is done last */ @@ -2149,11 +2149,11 @@ static bool wpaint_ensure_data(bContext *C, wmOperator *op) Mesh *me = BKE_mesh_from_object(ob); if (scene->obedit) { - return FALSE; + return false; } if (me == NULL || me->totpoly == 0) { - return FALSE; + return false; } /* if nothing was added yet, we make dverts and a vertex deform group */ @@ -2191,10 +2191,10 @@ static bool wpaint_ensure_data(bContext *C, wmOperator *op) /* ensure we don't try paint onto an invalid group */ if (ob->actdef <= 0) { BKE_report(op->reports, RPT_WARNING, "No active vertex group for painting, aborting"); - return FALSE; + return false; } - return TRUE; + return true; } static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UNUSED(mouse[2])) @@ -2209,8 +2209,8 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UN float mat[4][4], imat[4][4]; - if (wpaint_ensure_data(C, op) == FALSE) { - return FALSE; + if (wpaint_ensure_data(C, op) == false) { + return false; } { @@ -2219,7 +2219,7 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UN bDeformGroup *dg = BLI_findlink(&ob->defbase, (ob->actdef - 1)); if (dg->flag & DG_LOCK_WEIGHT) { BKE_report(op->reports, RPT_WARNING, "Active group is locked, aborting"); - return FALSE; + return false; } } @@ -2256,7 +2256,7 @@ static bool wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UN wpd->vgroup_mirror = wpaint_mirror_vgroup_ensure(ob, wpd->vgroup_active); } - return TRUE; + return true; } static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr) @@ -2611,7 +2611,7 @@ static int weight_paint_set_exec(bContext *C, wmOperator *op) Brush *brush = BKE_paint_brush(&ts->wpaint->paint); float vgroup_weight = BKE_brush_weight_get(scene, brush); - if (wpaint_ensure_data(C, op) == FALSE) { + if (wpaint_ensure_data(C, op) == false) { return OPERATOR_CANCELLED; } @@ -2823,11 +2823,11 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f * if not we can skip face map trickyness */ if (vertex_paint_use_fast_update_check(ob)) { vpaint_build_poly_facemap(vpd, me); - vpd->use_fast_update = TRUE; + vpd->use_fast_update = true; /* printf("Fast update!\n");*/ } else { - vpd->use_fast_update = FALSE; + vpd->use_fast_update = false; /* printf("No fast update!\n");*/ } @@ -3024,7 +3024,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P ED_region_tag_redraw(vc->ar); - if (vpd->use_fast_update == FALSE) { + if (vpd->use_fast_update == false) { /* recalculate modifier stack to get new colors, slow, * avoid this if we can! */ DAG_id_tag_update(ob->data, 0); @@ -3206,7 +3206,7 @@ static void gradientVert__mapFunc(void *userData, int index, const float co[3], DMGradient_userData *grad_data = userData; Mesh *me = grad_data->me; - if (grad_data->use_select == FALSE || (me->mvert[index].flag & SELECT)) { + if (grad_data->use_select == false || (me->mvert[index].flag & SELECT)) { DMGradient_vertStore *vs = &grad_data->vert_cache[index]; /* run first pass only, could be split into its own mapFunc @@ -3356,7 +3356,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op) vert_cache = gesture->userdata; } else { - if (wpaint_ensure_data(C, op) == FALSE) { + if (wpaint_ensure_data(C, op) == false) { return OPERATOR_CANCELLED; } @@ -3404,7 +3404,7 @@ static int paint_weight_gradient_invoke(bContext *C, wmOperator *op, const wmEve { int ret; - if (wpaint_ensure_data(C, op) == FALSE) { + if (wpaint_ensure_data(C, op) == false) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 441ce0f29b6..15a1cfdbdd3 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -1723,7 +1723,7 @@ static void smooth(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, static void do_smooth_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; - smooth(sd, ob, nodes, totnode, ss->cache->bstrength, FALSE); + smooth(sd, ob, nodes, totnode, ss->cache->bstrength, false); } static void do_mask_brush_draw(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) @@ -1768,7 +1768,7 @@ static void do_mask_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) do_mask_brush_draw(sd, ob, nodes, totnode); break; case BRUSH_MASK_SMOOTH: - smooth(sd, ob, nodes, totnode, ss->cache->bstrength, TRUE); + smooth(sd, ob, nodes, totnode, ss->cache->bstrength, true); break; } } @@ -3243,10 +3243,10 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) brush->autosmooth_factor > 0) { if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) { - smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure), FALSE); + smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure), false); } else { - smooth(sd, ob, nodes, totnode, brush->autosmooth_factor, FALSE); + smooth(sd, ob, nodes, totnode, brush->autosmooth_factor, false); } } @@ -4239,7 +4239,7 @@ static void sculpt_stroke_modifiers_check(const bContext *C, Object *ob) Brush *brush = BKE_paint_brush(&sd->paint); sculpt_update_mesh_elements(CTX_data_scene(C), sd, ob, - sculpt_any_smooth_mode(brush, ss->cache, 0), FALSE); + sculpt_any_smooth_mode(brush, ss->cache, 0), false); } } @@ -4263,17 +4263,17 @@ static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float *tmin) if (BKE_pbvh_node_get_tmin(node) < *tmin) { SculptRaycastData *srd = data_v; float (*origco)[3] = NULL; - int use_origco = FALSE; + bool use_origco = false; if (srd->original && srd->ss->cache) { if (BKE_pbvh_type(srd->ss->pbvh) == PBVH_BMESH) { - use_origco = TRUE; + use_origco = true; } else { /* intersect with coordinates from before we started stroke */ SculptUndoNode *unode = sculpt_undo_get_node(node); origco = (unode) ? unode->co : NULL; - use_origco = origco ? TRUE : FALSE; + use_origco = origco ? true : false; } } @@ -4394,10 +4394,10 @@ static int sculpt_brush_stroke_init(bContext *C, wmOperator *op) Brush *brush = BKE_paint_brush(&sd->paint); int mode = RNA_enum_get(op->ptr, "mode"); int is_smooth = 0; - int need_mask = FALSE; + int need_mask = false; if (brush->sculpt_tool == SCULPT_TOOL_MASK) { - need_mask = TRUE; + need_mask = true; } view3d_operator_needs_opengl(C); @@ -4554,7 +4554,7 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *UNUSED(st if (ss->modifiers_active) sculpt_flush_stroke_deform(sd, ob); - ss->cache->first_time = FALSE; + ss->cache->first_time = false; /* Cleanup */ sculpt_flush_update(C); @@ -4801,7 +4801,7 @@ void sculpt_update_after_dynamic_topology_toggle(bContext *C) Sculpt *sd = scene->toolsettings->sculpt; /* Create the PBVH */ - sculpt_update_mesh_elements(scene, sd, ob, FALSE, FALSE); + sculpt_update_mesh_elements(scene, sd, ob, false, false); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } @@ -4878,7 +4878,7 @@ void sculpt_dynamic_topology_disable(bContext *C, BKE_mesh_update_customdata_pointers(me, false); } else { - sculptsession_bm_to_me(ob, TRUE); + sculptsession_bm_to_me(ob, true); } /* Clear data */ @@ -5046,7 +5046,7 @@ static void sculpt_init_session(Scene *scene, Object *ob) { ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session"); - sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, FALSE); + sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, false); } int ED_sculpt_mask_layers_ensure(Object *ob, MultiresModifierData *mmd) diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 03321cd1a85..5adef17c6ad 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -114,7 +114,7 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo if (kb) { ob->shapenr = BLI_findindex(&key->block, kb) + 1; - sculpt_update_mesh_elements(scene, sd, ob, 0, FALSE); + sculpt_update_mesh_elements(scene, sd, ob, 0, false); WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob); } else { @@ -273,11 +273,11 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C, { if (unode->applied) { BM_log_undo(ss->bm, ss->bm_log); - unode->applied = FALSE; + unode->applied = false; } else { BM_log_redo(ss->bm, ss->bm_log); - unode->applied = TRUE; + unode->applied = true; } if (unode->type == SCULPT_UNDO_MASK) { @@ -330,7 +330,7 @@ static void sculpt_undo_bmesh_restore_begin(bContext *C, { if (unode->applied) { sculpt_dynamic_topology_disable(C, unode); - unode->applied = FALSE; + unode->applied = false; } else { sculpt_undo_bmesh_enable(ob, unode); @@ -338,7 +338,7 @@ static void sculpt_undo_bmesh_restore_begin(bContext *C, /* Restore the mesh from the first log entry */ BM_log_redo(ss->bm, ss->bm_log); - unode->applied = TRUE; + unode->applied = true; } } @@ -353,19 +353,19 @@ static void sculpt_undo_bmesh_restore_end(bContext *C, /* Restore the mesh from the last log entry */ BM_log_undo(ss->bm, ss->bm_log); - unode->applied = FALSE; + unode->applied = false; } else { /* Disable dynamic topology sculpting */ sculpt_dynamic_topology_disable(C, NULL); - unode->applied = TRUE; + unode->applied = true; } } /* Handle all dynamic-topology updates * - * Returns TRUE if this was a dynamic-topology undo step, otherwise - * returns FALSE to indicate the non-dyntopo code should run. */ + * Returns true if this was a dynamic-topology undo step, otherwise + * returns false to indicate the non-dyntopo code should run. */ static int sculpt_undo_bmesh_restore(bContext *C, SculptUndoNode *unode, Object *ob, @@ -374,21 +374,21 @@ static int sculpt_undo_bmesh_restore(bContext *C, switch (unode->type) { case SCULPT_UNDO_DYNTOPO_BEGIN: sculpt_undo_bmesh_restore_begin(C, unode, ob, ss); - return TRUE; + return true; case SCULPT_UNDO_DYNTOPO_END: sculpt_undo_bmesh_restore_end(C, unode, ob, ss); - return TRUE; + return true; default: if (ss->bm_log) { sculpt_undo_bmesh_restore_generic(C, unode, ob, ss); - return TRUE; + return true; } break; } - return FALSE; + return false; } static void sculpt_undo_restore(bContext *C, ListBase *lb) @@ -399,15 +399,15 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) DerivedMesh *dm; SculptSession *ss = ob->sculpt; SculptUndoNode *unode; - int update = FALSE, rebuild = FALSE; - int need_mask = FALSE; + int update = false, rebuild = false; + int need_mask = false; for (unode = lb->first; unode; unode = unode->next) { if (strcmp(unode->idname, ob->id.name) == 0) { if (unode->type == SCULPT_UNDO_MASK) { /* is possible that we can't do the mask undo (below) * because of the vertex count */ - need_mask = TRUE; + need_mask = true; break; } } @@ -442,15 +442,15 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) switch (unode->type) { case SCULPT_UNDO_COORDS: if (sculpt_undo_restore_coords(C, dm, unode)) - update = TRUE; + update = true; break; case SCULPT_UNDO_HIDDEN: if (sculpt_undo_restore_hidden(C, dm, unode)) - rebuild = TRUE; + rebuild = true; break; case SCULPT_UNDO_MASK: if (sculpt_undo_restore_mask(C, dm, unode)) - update = TRUE; + update = true; break; case SCULPT_UNDO_DYNTOPO_BEGIN: @@ -713,7 +713,7 @@ static SculptUndoNode *sculpt_undo_bmesh_push(Object *ob, BLI_strncpy(unode->idname, ob->id.name, sizeof(unode->idname)); unode->type = type; - unode->applied = TRUE; + unode->applied = true; if (type == SCULPT_UNDO_DYNTOPO_END) { unode->bm_entry = BM_log_entry_add(ss->bm_log); diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 88891c9f05c..71a6c775774 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -187,8 +187,8 @@ static void SOUND_OT_open(wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); - RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory"); - RNA_def_boolean(ot->srna, "mono", FALSE, "Mono", "Mixdown the sound to mono"); + RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory"); + RNA_def_boolean(ot->srna, "mono", false, "Mono", "Mixdown the sound to mono"); } static void SOUND_OT_open_mono(wmOperatorType *ot) @@ -209,8 +209,8 @@ static void SOUND_OT_open_mono(wmOperatorType *ot) /* properties */ WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); - RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory"); - RNA_def_boolean(ot->srna, "mono", TRUE, "Mono", "Mixdown the sound to mono"); + RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory"); + RNA_def_boolean(ot->srna, "mono", true, "Mono", "Mixdown the sound to mono"); } /* ******************************************************* */ @@ -430,10 +430,10 @@ static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op) return check; RNA_property_string_set(op->ptr, prop, filepath); - return TRUE; + return true; } - return FALSE; + return false; } #endif // WITH_AUDASPACE diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 4c2cb16bdd1..6e040371037 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -285,7 +285,7 @@ static bool get_keyframe_extents(bAnimContext *ac, float *min, float *max, const float tmin, tmax; /* get range and apply necessary scaling before processing */ - if (calc_fcurve_range(fcu, &tmin, &tmax, onlySel, TRUE)) { + if (calc_fcurve_range(fcu, &tmin, &tmax, onlySel, true)) { if (adt) { tmin = BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP); @@ -335,7 +335,7 @@ static int actkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) scene = ac.scene; /* set the range directly */ - get_keyframe_extents(&ac, &min, &max, FALSE); + get_keyframe_extents(&ac, &min, &max, false); scene->r.flag |= SCER_PRV_RANGE; scene->r.psfra = iroundf(min); scene->r.pefra = iroundf(max); diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c index bc1a4fa4069..b93728a7b3e 100644 --- a/source/blender/editors/space_action/action_ops.c +++ b/source/blender/editors/space_action/action_ops.c @@ -111,61 +111,61 @@ static void action_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap) /* action_select.c - selection tools */ /* click-select: keyframe (replace) */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "column", FALSE); - RNA_boolean_set(kmi->ptr, "channel", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "column", false); + RNA_boolean_set(kmi->ptr, "channel", false); /* click-select: all on same frame (replace) */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "column", TRUE); - RNA_boolean_set(kmi->ptr, "channel", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "column", true); + RNA_boolean_set(kmi->ptr, "channel", false); /* click-select: keyframe (add) */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "column", FALSE); - RNA_boolean_set(kmi->ptr, "channel", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "column", false); + RNA_boolean_set(kmi->ptr, "channel", false); /* click-select: all on same frame (add) */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "column", TRUE); - RNA_boolean_set(kmi->ptr, "channel", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "column", true); + RNA_boolean_set(kmi->ptr, "channel", false); /* click-select: all on same channel (replace) */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "column", FALSE); - RNA_boolean_set(kmi->ptr, "channel", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "column", false); + RNA_boolean_set(kmi->ptr, "channel", true); /* click-select: all on same channel (add) */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "column", FALSE); - RNA_boolean_set(kmi->ptr, "channel", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "column", false); + RNA_boolean_set(kmi->ptr, "channel", true); /* click-select: left/right */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_LEFT); kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", ACTKEYS_LRSEL_RIGHT); /* deselect all */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "invert", FALSE); + RNA_boolean_set(kmi->ptr, "invert", false); kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "invert", TRUE); + RNA_boolean_set(kmi->ptr, "invert", true); /* borderselect */ kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "axis_range", FALSE); + RNA_boolean_set(kmi->ptr, "axis_range", false); kmi = WM_keymap_add_item(keymap, "ACTION_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", TRUE); + RNA_boolean_set(kmi->ptr, "axis_range", true); /* column select */ RNA_enum_set(WM_keymap_add_item(keymap, "ACTION_OT_select_column", KKEY, KM_PRESS, 0, 0)->ptr, "mode", ACTKEYS_COLUMNSEL_KEYS); diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index c256dbb3b59..14cc38ed296 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -369,7 +369,7 @@ void ACTION_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); } diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index 4718f5dbbdd..f1b3cb42251 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -1002,7 +1002,7 @@ void buttons_context_draw(const bContext *C, uiLayout *layout) if (!path) return; - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT); block = uiLayoutGetBlock(row); diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index 50bb8a0e061..6c228d52a96 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -130,18 +130,18 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c if (clip) { uiLayout *col; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); block = uiLayoutGetBlock(row); uiDefBut(block, LABEL, 0, IFACE_("File Path:"), 0, 19, 145, 19, NULL, 0, 0, 0, 0, ""); - row = uiLayoutRow(layout, FALSE); - split = uiLayoutSplit(row, 0.0f, FALSE); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(layout, false); + split = uiLayoutSplit(row, 0.0f, false); + row = uiLayoutRow(split, true); uiItemR(row, &clipptr, "filepath", 0, "", ICON_NONE); uiItemO(row, "", ICON_FILE_REFRESH, "clip.reload"); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiTemplateColorspaceSettings(col, &clipptr, "colorspace_settings"); } } @@ -412,7 +412,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P BKE_movieclip_get_size(clip, user, &width, &height); if (track->flag & TRACK_LOCKED) { - uiLayoutSetActive(layout, FALSE); + uiLayoutSetActive(layout, false); block = uiLayoutAbsoluteBlock(layout); uiDefBut(block, LABEL, 0, IFACE_("Track is locked"), 0, 0, UI_UNIT_X * 15.0f, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); @@ -450,7 +450,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P uiDefButBitI(block, OPTIONN, MARKER_DISABLED, B_MARKER_FLAG, IFACE_("Enabled"), 0.5 * UI_UNIT_X, 9.5 * UI_UNIT_Y, 7.25 * UI_UNIT_X, UI_UNIT_Y, &cb->marker_flag, 0, 0, 0, 0, tip); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetActive(col, (cb->marker_flag & MARKER_DISABLED) == 0); block = uiLayoutAbsoluteBlock(col); @@ -523,7 +523,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, const cha clip = (MovieClip *)clipptr.data; user = userptr->data; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); ibuf = BKE_movieclip_get_ibuf_flag(clip, user, clip->flag, MOVIECLIP_CACHE_SKIP); diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c index 8cd096a2438..58ae0d14e4d 100644 --- a/source/blender/editors/space_clip/clip_dopesheet_ops.c +++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c @@ -71,7 +71,7 @@ static int space_clip_dopesheet_poll(bContext *C) } } - return FALSE; + return false; } /********************** select channel operator *********************/ @@ -83,7 +83,7 @@ static int dopesheet_select_channel_poll(bContext *C) if (sc && sc->clip) return sc->view == SC_VIEW_DOPESHEET; - return FALSE; + return false; } static int dopesheet_select_channel_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 42b4051d7ff..f3938c2aebe 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -83,9 +83,9 @@ int ED_space_clip_poll(bContext *C) SpaceClip *sc = CTX_wm_space_clip(C); if (sc && sc->clip) - return TRUE; + return true; - return FALSE; + return false; } int ED_space_clip_view_clip_poll(bContext *C) @@ -96,7 +96,7 @@ int ED_space_clip_view_clip_poll(bContext *C) return sc->view == SC_VIEW_CLIP; } - return FALSE; + return false; } int ED_space_clip_tracking_poll(bContext *C) @@ -106,7 +106,7 @@ int ED_space_clip_tracking_poll(bContext *C) if (sc && sc->clip) return ED_space_clip_check_show_trackedit(sc); - return FALSE; + return false; } int ED_space_clip_maskedit_poll(bContext *C) @@ -117,7 +117,7 @@ int ED_space_clip_maskedit_poll(bContext *C) return ED_space_clip_check_show_maskedit(sc); } - return FALSE; + return false; } int ED_space_clip_maskedit_mask_poll(bContext *C) @@ -132,7 +132,7 @@ int ED_space_clip_maskedit_mask_poll(bContext *C) } } - return FALSE; + return false; } /* ******** common editing functions ******** */ @@ -316,7 +316,7 @@ void ED_clip_update_frame(const Main *mainp, int cfra) if (sa->spacetype == SPACE_CLIP) { SpaceClip *sc = sa->spacedata.first; - sc->scopes.ok = FALSE; + sc->scopes.ok = false; BKE_movieclip_user_set_frame(&sc->user, cfra); } diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index b0de9dda6cd..2aaf064ef53 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -69,7 +69,7 @@ static int ED_space_clip_graph_poll(bContext *C) return sc->view == SC_VIEW_GRAPH; } - return FALSE; + return false; } static int clip_graph_knots_poll(bContext *C) @@ -79,7 +79,7 @@ static int clip_graph_knots_poll(bContext *C) return (sc->flag & SC_SHOW_GRAPH_TRACKS_MOTION) != 0; } - return FALSE; + return false; } typedef struct { @@ -410,7 +410,7 @@ void CLIP_OT_graph_select_border(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } /********************** select all operator *********************/ diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index d9a2ccbe70e..2b425e23183 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1030,7 +1030,7 @@ static void do_movie_proxy(void *pjv, int *UNUSED(build_sizes), int UNUSED(build if (*stop || G.is_break) break; - *do_update = TRUE; + *do_update = true; *progress = ((float) cfra - sfra) / (efra - sfra); } @@ -1523,5 +1523,5 @@ void ED_operatormacros_clip(void) OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "CLIP_OT_add_marker"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_boolean_set(otmacro->ptr, "release_confirm", TRUE); + RNA_boolean_set(otmacro->ptr, "release_confirm", true); } diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c index 42300f88a4f..55b78219770 100644 --- a/source/blender/editors/space_clip/clip_toolbar.c +++ b/source/blender/editors/space_clip/clip_toolbar.c @@ -239,7 +239,7 @@ static void clip_panel_operator_redo(const bContext *C, Panel *pa) uiBlock *block = uiLayoutGetBlock(pa->layout); if (!WM_operator_check_ui_enabled(C, op->type->name)) - uiLayoutSetEnabled(pa->layout, FALSE); + uiLayoutSetEnabled(pa->layout, false); /* note, blockfunc is a default but->func, use Handle func to allow button callbacks too */ uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, op); diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index bedd576a65e..fd994d5e1b3 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -256,7 +256,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, MovieTrackingTrack *track) WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, clip); if (update_stab) { - tracking->stabilization.ok = FALSE; + tracking->stabilization.ok = false; WM_event_add_notifier(C, NC_MOVIECLIP | ND_DISPLAY, clip); } diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 0ee05cac0b9..ad425d21612 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -213,7 +213,7 @@ static void clip_scopes_tag_refresh(ScrArea *sa) return; } - sc->scopes.ok = FALSE; + sc->scopes.ok = false; } static void clip_scopes_check_gpencil_change(ScrArea *sa) @@ -233,7 +233,7 @@ static void clip_stabilization_tag_refresh(ScrArea *sa) if (clip) { MovieTrackingStabilization *stab = &clip->tracking.stabilization; - stab->ok = FALSE; + stab->ok = false; } } @@ -336,7 +336,7 @@ static SpaceLink *clip_duplicate(SpaceLink *sl) /* clear or remove stuff from old */ scn->scopes.track_search = NULL; scn->scopes.track_preview = NULL; - scn->scopes.ok = FALSE; + scn->scopes.ok = false; return (SpaceLink *)scn; } @@ -564,17 +564,17 @@ static void clip_keymap(struct wmKeyConfig *keyconf) /* 2d tracking */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", LEFTARROWKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "backwards", TRUE); - RNA_boolean_set(kmi->ptr, "sequence", FALSE); + RNA_boolean_set(kmi->ptr, "backwards", true); + RNA_boolean_set(kmi->ptr, "sequence", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "backwards", FALSE); - RNA_boolean_set(kmi->ptr, "sequence", FALSE); + RNA_boolean_set(kmi->ptr, "backwards", false); + RNA_boolean_set(kmi->ptr, "sequence", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "backwards", FALSE); - RNA_boolean_set(kmi->ptr, "sequence", TRUE); + RNA_boolean_set(kmi->ptr, "backwards", false); + RNA_boolean_set(kmi->ptr, "sequence", true); kmi = WM_keymap_add_item(keymap, "CLIP_OT_track_markers", TKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "backwards", TRUE); - RNA_boolean_set(kmi->ptr, "sequence", TRUE); + RNA_boolean_set(kmi->ptr, "backwards", true); + RNA_boolean_set(kmi->ptr, "sequence", true); /* mode */ kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", TABKEY, KM_PRESS, 0, 0); @@ -627,7 +627,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "CLIP_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "CLIP_OT_view_all", FKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "fit_view", TRUE); + RNA_boolean_set(kmi->ptr, "fit_view", true); WM_keymap_add_item(keymap, "CLIP_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); @@ -652,9 +652,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf) /* selection */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_all", AKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); @@ -664,9 +664,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "CLIP_MT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); /* marker */ WM_keymap_add_item(keymap, "CLIP_OT_add_marker_slide", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); @@ -690,10 +690,10 @@ static void clip_keymap(struct wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "action", 1); /* unlock */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "CLIP_OT_hide_tracks_clear", HKEY, KM_PRESS, KM_ALT, 0); @@ -727,13 +727,13 @@ static void clip_keymap(struct wmKeyConfig *keyconf) /* clean-up */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0); RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED); - RNA_boolean_set(kmi->ptr, "clear_active", FALSE); + RNA_boolean_set(kmi->ptr, "clear_active", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO); - RNA_boolean_set(kmi->ptr, "clear_active", FALSE); + RNA_boolean_set(kmi->ptr, "clear_active", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL); - RNA_boolean_set(kmi->ptr, "clear_active", FALSE); + RNA_boolean_set(kmi->ptr, "clear_active", false); /* Cursor */ WM_keymap_add_item(keymap, "CLIP_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0); @@ -764,9 +764,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf) /* selection */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_select_all_markers", AKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); @@ -793,13 +793,13 @@ static void clip_keymap(struct wmKeyConfig *keyconf) /* clean-up */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT, 0); RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_REMAINED); - RNA_boolean_set(kmi->ptr, "clear_active", TRUE); + RNA_boolean_set(kmi->ptr, "clear_active", true); kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_UPTO); - RNA_boolean_set(kmi->ptr, "clear_active", TRUE); + RNA_boolean_set(kmi->ptr, "clear_active", true); kmi = WM_keymap_add_item(keymap, "CLIP_OT_clear_track_path", TKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "action", TRACK_CLEAR_ALL); - RNA_boolean_set(kmi->ptr, "clear_active", TRUE); + RNA_boolean_set(kmi->ptr, "clear_active", true); /* tracks */ kmi = WM_keymap_add_item(keymap, "CLIP_OT_graph_disable_markers", DKEY, KM_PRESS, KM_SHIFT, 0); @@ -812,7 +812,7 @@ static void clip_keymap(struct wmKeyConfig *keyconf) keymap = WM_keymap_find(keyconf, "Clip Dopesheet Editor", SPACE_CLIP, 0); kmi = WM_keymap_add_item(keymap, "CLIP_OT_dopesheet_select_channel", ACTIONMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); /* toggle */ + RNA_boolean_set(kmi->ptr, "extend", true); /* toggle */ WM_keymap_add_item(keymap, "CLIP_OT_dopesheet_view_all", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "CLIP_OT_dopesheet_view_all", NDOF_BUTTON_FIT, KM_PRESS, 0, 0); @@ -827,20 +827,20 @@ static int clip_context(const bContext *C, const char *member, bContextDataResul if (CTX_data_dir(member)) { CTX_data_dir_set(result, clip_context_dir); - return TRUE; + return true; } else if (CTX_data_equals(member, "edit_movieclip")) { if (sc->clip) CTX_data_id_pointer_set(result, &sc->clip->id); - return TRUE; + return true; } else if (CTX_data_equals(member, "edit_mask")) { if (sc->mask_info.mask) CTX_data_id_pointer_set(result, &sc->mask_info.mask->id); - return TRUE; + return true; } - return FALSE; + return false; } /* dropboxes */ @@ -848,9 +848,9 @@ static int clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUS { if (drag->type == WM_DRAG_PATH) if (ELEM4(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */ - return TRUE; + return true; - return FALSE; + return false; } static void clip_drop_copy(wmDrag *drag, wmDropBox *drop) diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 22878d3a0cd..c59b6b8c8a1 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1280,7 +1280,7 @@ static void track_markers_startjob(void *tmv, short *stop, short *do_update, flo else if (!BKE_tracking_context_step(tmj->context)) break; - *do_update = TRUE; + *do_update = true; *progress = (float)(framenr - tmj->sfra) / (tmj->efra - tmj->sfra); if (tmj->backwards) @@ -2011,7 +2011,7 @@ static int set_orientation_poll(bContext *C) MovieTrackingObject *tracking_object = BKE_tracking_object_get_active(tracking); if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { - return TRUE; + return true; } else { return OBACT != NULL; @@ -2019,7 +2019,7 @@ static int set_orientation_poll(bContext *C) } } - return FALSE; + return false; } static int count_selected_bundles(bContext *C) @@ -2650,7 +2650,7 @@ static int set_solution_scale_poll(bContext *C) } } - return FALSE; + return false; } static int set_solution_scale_exec(bContext *C, wmOperator *op) @@ -2706,7 +2706,7 @@ static int apply_solution_scale_poll(bContext *C) } } - return FALSE; + return false; } static int apply_solution_scale_exec(bContext *C, wmOperator *op) @@ -3306,7 +3306,7 @@ static int stabilize_2d_poll(bContext *C) return tracking_object->flag & TRACKING_OBJECT_CAMERA; } - return FALSE; + return false; } static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op)) diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c index b60d4473ab5..ec3b10a008c 100644 --- a/source/blender/editors/space_clip/tracking_select.c +++ b/source/blender/editors/space_clip/tracking_select.c @@ -382,7 +382,7 @@ static int select_poll(bContext *C) return sc->clip && sc->view == SC_VIEW_CLIP; } - return FALSE; + return false; } static int select_exec(bContext *C, wmOperator *op) @@ -553,7 +553,7 @@ void CLIP_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } /********************** lasso select operator *********************/ diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 36144a074e3..213d9d79132 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -554,7 +554,7 @@ static int console_delete_exec(bContext *C, wmOperator *op) int stride; const short type = RNA_enum_get(op->ptr, "type"); - int done = FALSE; + int done = false; if (ci->len == 0) { return OPERATOR_CANCELLED; @@ -573,7 +573,7 @@ static int console_delete_exec(bContext *C, wmOperator *op) memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - (ci->cursor + stride)) + 1); ci->len -= stride; BLI_assert(ci->len >= 0); - done = TRUE; + done = true; } } break; @@ -590,7 +590,7 @@ static int console_delete_exec(bContext *C, wmOperator *op) memmove(ci->line + ci->cursor, ci->line + ci->cursor + stride, (ci->len - (ci->cursor + stride)) + 1); ci->len -= stride; BLI_assert(ci->len >= 0); - done = TRUE; + done = true; } } break; @@ -1063,7 +1063,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, const wmEven sel_prev[0] = sc->sel_start; sel_prev[1] = sc->sel_end; - console_cursor_set_to_pos(sc, ar, scu, mval, TRUE); + console_cursor_set_to_pos(sc, ar, scu, mval, true); /* only redraw if the selection changed */ if (sel_prev[0] != sc->sel_start || sel_prev[1] != sc->sel_end) { diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index c4cbab4f230..247fb997055 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -280,25 +280,25 @@ static void console_keymap(struct wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", FALSE); + RNA_boolean_set(kmi->ptr, "reverse", false); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", TRUE); + RNA_boolean_set(kmi->ptr, "reverse", true); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", FALSE); + RNA_boolean_set(kmi->ptr, "reverse", false); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", TRUE); + RNA_boolean_set(kmi->ptr, "reverse", true); RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_CHAR); RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_CHAR); - RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", FALSE); + RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", UPARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "CONSOLE_OT_history_cycle", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "reverse", false); #if 0 RNA_enum_set(WM_keymap_add_item(keymap, "CONSOLE_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 4a298e183e6..9c11fc712c8 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -171,7 +171,7 @@ static FileSelect file_select_do(bContext *C, int selected_idx, short do_diropen params->active_file = selected_idx; if (S_ISDIR(file->type)) { - if (do_diropen == FALSE) { + if (do_diropen == false) { params->file[0] = '\0'; retval = FILE_SELECT_DIR; } @@ -287,7 +287,7 @@ static int file_border_select_exec(bContext *C, wmOperator *op) BLI_rcti_isect(&(ar->v2d.mask), &rect, &rect); - ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, FALSE, FALSE); + ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, false, false); if (FILE_SELECT_DIR == ret) { WM_event_add_notifier(C, NC_SPACE | ND_SPACE_FILE_LIST, NULL); } @@ -363,11 +363,11 @@ void FILE_OT_select(wmOperatorType *ot) ot->poll = ED_operator_file_active; /* properties */ - prop = RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + prop = RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_boolean(ot->srna, "fill", FALSE, "Fill", "Select everything beginning with the last selection"); + prop = RNA_def_boolean(ot->srna, "fill", false, "Fill", "Select everything beginning with the last selection"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_boolean(ot->srna, "open", TRUE, "Open", "Open a directory when selecting it"); + prop = RNA_def_boolean(ot->srna, "open", true, "Open", "Open a directory when selecting it"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } @@ -773,13 +773,13 @@ bool file_draw_check_exists(SpaceFile *sfile) char filepath[FILE_MAX]; BLI_join_dirfile(filepath, sizeof(filepath), sfile->params->dir, sfile->params->file); if (BLI_is_file(filepath)) { - return TRUE; + return true; } } } } - return FALSE; + return false; } /* sends events now, so things get handled on windowqueue level */ diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index 4b81b726dcf..cb07db75a91 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -86,12 +86,12 @@ static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory cat uiLayoutSetAlignment(pa->layout, UI_LAYOUT_ALIGN_LEFT); block = uiLayoutGetBlock(pa->layout); box = uiLayoutBox(pa->layout); - col = uiLayoutColumn(box, TRUE); + col = uiLayoutColumn(box, true); for (i = 0; i < nentries; ++i) { char dir[FILE_MAX]; char temp[FILE_MAX]; - uiLayout *layout = uiLayoutRow(col, FALSE); + uiLayout *layout = uiLayoutRow(col, false); char *entry; entry = fsmenu_get_entry(fsmenu, category, i); @@ -157,7 +157,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa) uiLayout *row; if (sfile) { - row = uiLayoutRow(pa->layout, FALSE); + row = uiLayoutRow(pa->layout, false); uiItemO(row, IFACE_("Add"), ICON_ZOOMIN, "file.bookmark_add"); uiItemL(row, NULL, ICON_NONE); @@ -178,7 +178,7 @@ static void file_panel_recent(const bContext *C, Panel *pa) if (sfile) { if (!(U.uiflag & USER_HIDE_RECENT)) { - row = uiLayoutRow(pa->layout, FALSE); + row = uiLayoutRow(pa->layout, false); uiItemO(row, IFACE_("Reset"), ICON_X, "file.reset_recent"); uiItemL(row, NULL, ICON_NONE); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index a7995dd8a90..15d177011c4 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -393,7 +393,7 @@ void filelist_init_icons(void) ImBuf *bbuf; ImBuf *ibuf; - BLI_assert(G.background == FALSE); + BLI_assert(G.background == false); #ifdef WITH_HEADLESS bbuf = NULL; @@ -421,7 +421,7 @@ void filelist_free_icons(void) { int i; - BLI_assert(G.background == FALSE); + BLI_assert(G.background == false); for (i = 0; i < SPECIAL_IMG_MAX; ++i) { IMB_freeImBuf(gSpecialFileImages[i]); @@ -624,7 +624,7 @@ ImBuf *filelist_getimage(struct FileList *filelist, int index) ImBuf *ibuf = NULL; int fidx = 0; - BLI_assert(G.background == FALSE); + BLI_assert(G.background == false); if ((index < 0) || (index >= filelist->numfiltered)) { return NULL; @@ -641,7 +641,7 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index) struct direntry *file = NULL; int fidx = 0; - BLI_assert(G.background == FALSE); + BLI_assert(G.background == false); if ((index < 0) || (index >= filelist->numfiltered)) { return NULL; @@ -1333,7 +1333,7 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float limg->flags |= MOVIEFILE_ICON; } } - *do_update = TRUE; + *do_update = true; PIL_sleep_ms(10); limg = limg->next; } @@ -1353,7 +1353,7 @@ static void thumbnails_update(void *tjv) tj->filelist->filelist[limg->index].flags &= ~MOVIEFILE; tj->filelist->filelist[limg->index].flags |= MOVIEFILE_ICON; } - limg->done = TRUE; + limg->done = true; } limg = limg->next; } diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index e00d0f34dd9..19947a9ffc9 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -124,7 +124,7 @@ short ED_fileselect_set_params(SpaceFile *sfile) else params->type = FILE_SPECIAL; - if (is_filepath && RNA_struct_property_is_set_ex(op->ptr, "filepath", FALSE)) { + if (is_filepath && RNA_struct_property_is_set_ex(op->ptr, "filepath", false)) { char name[FILE_MAX]; RNA_string_get(op->ptr, "filepath", name); if (params->type == FILE_LOADLIB) { @@ -136,12 +136,12 @@ short ED_fileselect_set_params(SpaceFile *sfile) } } else { - if (is_directory && RNA_struct_property_is_set_ex(op->ptr, "directory", FALSE)) { + if (is_directory && RNA_struct_property_is_set_ex(op->ptr, "directory", false)) { RNA_string_get(op->ptr, "directory", params->dir); sfile->params->file[0] = '\0'; } - if (is_filename && RNA_struct_property_is_set_ex(op->ptr, "filename", FALSE)) { + if (is_filename && RNA_struct_property_is_set_ex(op->ptr, "filename", false)) { RNA_string_get(op->ptr, "filename", params->file); } } @@ -151,7 +151,7 @@ short ED_fileselect_set_params(SpaceFile *sfile) BLI_path_abs(params->dir, G.main->name); } - if (is_directory == TRUE && is_filename == FALSE && is_filepath == FALSE && is_files == FALSE) { + if (is_directory == true && is_filename == false && is_filepath == false && is_files == false) { params->flag |= FILE_DIRSEL_ONLY; } else { @@ -228,7 +228,7 @@ short ED_fileselect_set_params(SpaceFile *sfile) } if (is_relative_path) { - if (!RNA_struct_property_is_set_ex(op->ptr, "relative_path", FALSE)) { + if (!RNA_struct_property_is_set_ex(op->ptr, "relative_path", false)) { RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); } } @@ -267,7 +267,7 @@ short ED_fileselect_set_params(SpaceFile *sfile) /* switching thumbnails needs to recalc layout [#28809] */ if (sfile->layout) { - sfile->layout->dirty = TRUE; + sfile->layout->dirty = true; } return 1; @@ -498,9 +498,9 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar) if (sfile->layout == NULL) { sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout"); - sfile->layout->dirty = TRUE; + sfile->layout->dirty = true; } - else if (sfile->layout->dirty == FALSE) { + else if (sfile->layout->dirty == false) { return; } @@ -574,7 +574,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar) layout->width = sfile->layout->columns * (layout->tile_w + 2 * layout->tile_border_x) + layout->tile_border_x * 2; layout->flag = FILE_LAYOUT_HOR; } - layout->dirty = FALSE; + layout->dirty = false; } FileLayout *ED_fileselect_get_layout(struct SpaceFile *sfile, ARegion *ar) diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c index 201abf6934a..f6bc6f70f36 100644 --- a/source/blender/editors/space_file/fsmenu.c +++ b/source/blender/editors/space_file/fsmenu.c @@ -542,7 +542,7 @@ void fsmenu_refresh_system_category(struct FSMenu *fsmenu) fsmenu_set_category(fsmenu, FS_CATEGORY_SYSTEM_BOOKMARKS, NULL); /* Add all entries to system category */ - fsmenu_read_system(fsmenu, TRUE); + fsmenu_read_system(fsmenu, true); } void fsmenu_free(void) diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 4c4b9fc79f0..c04f4a5627e 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -152,7 +152,7 @@ static void file_init(wmWindowManager *UNUSED(wm), ScrArea *sa) /* refresh system directory list */ fsmenu_refresh_system_category(fsmenu_get()); - if (sfile->layout) sfile->layout->dirty = TRUE; + if (sfile->layout) sfile->layout->dirty = true; } static void file_exit(wmWindowManager *wm, ScrArea *sa) @@ -250,7 +250,7 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa)) BLI_strncpy(sfile->params->renameedit, sfile->params->renamefile, sizeof(sfile->params->renameedit)); params->renamefile[0] = '\0'; } - if (sfile->layout) sfile->layout->dirty = TRUE; + if (sfile->layout) sfile->layout->dirty = true; } @@ -417,26 +417,26 @@ static void file_keymap(struct wmKeyConfig *keyconf) /* keys for main area */ keymap = WM_keymap_find(keyconf, "File Browser Main", SPACE_FILE, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0); - RNA_boolean_set(kmi->ptr, "need_active", TRUE); + RNA_boolean_set(kmi->ptr, "need_active", true); /* left mouse selects and opens */ WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, 0, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "FILE_OT_select", LEFTMOUSE, KM_CLICK, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "fill", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "fill", true); /* right mouse selects without opening */ kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, 0, 0); - RNA_boolean_set(kmi->ptr, "open", FALSE); + RNA_boolean_set(kmi->ptr, "open", false); kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "open", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "open", false); kmi = WM_keymap_add_item(keymap, "FILE_OT_select", RIGHTMOUSE, KM_CLICK, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "fill", TRUE); - RNA_boolean_set(kmi->ptr, "open", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "fill", true); + RNA_boolean_set(kmi->ptr, "open", false); /* front and back mouse folder navigation */ WM_keymap_add_item(keymap, "FILE_OT_previous", BUTTON4MOUSE, KM_CLICK, 0, 0); @@ -639,7 +639,7 @@ void ED_file_init(void) { ED_file_read_bookmarks(); - if (G.background == FALSE) { + if (G.background == false) { filelist_init_icons(); } @@ -650,7 +650,7 @@ void ED_file_exit(void) { fsmenu_free(); - if (G.background == FALSE) { + if (G.background == false) { filelist_free_icons(); } } @@ -661,7 +661,7 @@ void ED_file_read_bookmarks(void) fsmenu_free(); - fsmenu_read_system(fsmenu_get(), TRUE); + fsmenu_read_system(fsmenu_get(), true); if (cfgdir) { char name[FILE_MAX]; diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 437e3bef0d4..df2da0e78ed 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -122,20 +122,20 @@ static void graph_panel_view(const bContext *C, Panel *pa) RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr); /* 2D-Cursor */ - col = uiLayoutColumn(pa->layout, FALSE); + col = uiLayoutColumn(pa->layout, false); uiItemR(col, &spaceptr, "show_cursor", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor")); uiItemO(sub, IFACE_("Cursor from Selection"), ICON_NONE, "GRAPH_OT_frame_jump"); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor")); - row = uiLayoutSplit(sub, 0.7f, TRUE); + row = uiLayoutSplit(sub, 0.7f, true); uiItemR(row, &sceneptr, "frame_current", 0, IFACE_("Cursor X"), ICON_NONE); uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_CFRA); - row = uiLayoutSplit(sub, 0.7f, TRUE); + row = uiLayoutSplit(sub, 0.7f, true); uiItemR(row, &spaceptr, "cursor_position_y", 0, IFACE_("Cursor Y"), ICON_NONE); uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_VALUE); } @@ -165,24 +165,24 @@ static void graph_panel_properties(const bContext *C, Panel *pa) /* user-friendly 'name' for F-Curve */ /* TODO: only show the path if this is invalid? */ - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); icon = getname_anim_fcurve(name, ale->id, fcu); uiItemL(col, name, icon); /* RNA-Path Editing - only really should be enabled when things aren't working */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED) != 0); uiItemR(col, &fcu_ptr, "data_path", 0, "", ICON_RNA); uiItemR(col, &fcu_ptr, "array_index", 0, NULL, ICON_NONE); /* color settings */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("Display Color:"), ICON_NONE); - row = uiLayoutRow(col, TRUE); + row = uiLayoutRow(col, true); uiItemR(row, &fcu_ptr, "color_mode", 0, "", ICON_NONE); - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiLayoutSetEnabled(sub, (fcu->color_mode == FCURVE_COLOR_CUSTOM)); uiItemR(sub, &fcu_ptr, "color", 0, "", ICON_NONE); @@ -289,7 +289,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) } /* interpolation */ - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE); /* easing type */ @@ -315,7 +315,7 @@ static void graph_panel_key_properties(const bContext *C, Panel *pa) * - we use the button-versions of the calls so that we can attach special update handlers * and unit conversion magic that cannot be achieved using a purely RNA-approach */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); /* keyframe itself */ { uiItemL(col, IFACE_("Key:"), ICON_NONE); @@ -466,7 +466,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr); /* Target ID */ - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiLayoutSetRedAlert(row, ((dtar->flag & DTAR_FLAG_INVALID) && !dtar->id)); uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", IFACE_("Prop:")); @@ -478,7 +478,7 @@ static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVa RNA_id_pointer_create(dtar->id, &root_ptr); /* rna path */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, IFACE_("Path")); } @@ -499,7 +499,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar * RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr); /* Bone 1 */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Bone 1:")); @@ -510,7 +510,7 @@ static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar * uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA); } - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Bone 2:")); @@ -537,7 +537,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar * RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr); /* Bone 1 */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone 1:")); @@ -551,7 +551,7 @@ static void graph_panel_driverVar__locDiff(uiLayout *layout, ID *id, DriverVar * uiLayoutSetRedAlert(col, false); /* we can clear it again now - it's only needed when creating the ID/Bone fields */ uiItemR(col, &dtar_ptr, "transform_space", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar2->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Ob/Bone 2:")); @@ -578,7 +578,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr); /* properties */ - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */ uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone:")); @@ -589,7 +589,7 @@ static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA); } - sub = uiLayoutColumn(layout, TRUE); + sub = uiLayoutColumn(layout, true); uiItemR(sub, &dtar_ptr, "transform_type", 0, NULL, ICON_NONE); uiItemR(sub, &dtar_ptr, "transform_space", 0, IFACE_("Space"), ICON_NONE); } @@ -617,7 +617,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) uiBlockSetHandleFunc(block, do_graph_region_driver_buttons, NULL); /* general actions - management */ - col = uiLayoutColumn(pa->layout, FALSE); + col = uiLayoutColumn(pa->layout, false); block = uiLayoutGetBlock(col); but = uiDefIconTextBut(block, BUT, B_IPO_DEPCHANGE, ICON_FILE_REFRESH, IFACE_("Update Dependencies"), 0, 0, 10 * UI_UNIT_X, 22, @@ -634,7 +634,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) /* driver-level settings - type, expressions, and errors */ RNA_pointer_create(ale->id, &RNA_Driver, driver, &driver_ptr); - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); block = uiLayoutGetBlock(col); uiItemR(col, &driver_ptr, "type", 0, NULL, ICON_NONE); @@ -688,13 +688,13 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) } } - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); /* debug setting */ uiItemR(col, &driver_ptr, "show_debug_info", 0, NULL, ICON_NONE); /* value of driver */ if (driver->flag & DRIVER_FLAG_SHOWDEBUG) { - uiLayout *row = uiLayoutRow(col, TRUE); + uiLayout *row = uiLayoutRow(col, true); char valBuf[32]; uiItemL(row, IFACE_("Driver Value:"), ICON_NONE); @@ -704,7 +704,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) } /* add driver variables */ - col = uiLayoutColumn(pa->layout, FALSE); + col = uiLayoutColumn(pa->layout, false); block = uiLayoutGetBlock(col); but = uiDefIconTextBut(block, BUT, B_IPO_DEPCHANGE, ICON_ZOOMIN, IFACE_("Add Variable"), 0, 0, 10 * UI_UNIT_X, UI_UNIT_Y, @@ -718,14 +718,14 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) uiLayout *box, *row; /* sub-layout column for this variable's settings */ - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); /* header panel */ box = uiLayoutBox(col); /* first row context info for driver */ RNA_pointer_create(ale->id, &RNA_DriverVariable, dvar, &dvar_ptr); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); block = uiLayoutGetBlock(row); /* variable name */ uiItemR(row, &dvar_ptr, "name", 0, "", ICON_NONE); @@ -738,7 +738,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) uiBlockSetEmboss(block, UI_EMBOSS); /* variable type */ - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, &dvar_ptr, "type", 0, "", ICON_NONE); /* variable type settings */ @@ -764,7 +764,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa) char valBuf[32]; box = uiLayoutBox(col); - row = uiLayoutRow(box, TRUE); + row = uiLayoutRow(box, true); uiItemL(row, IFACE_("Value:"), ICON_NONE); if ((dvar->type == DVAR_TYPE_ROT_DIFF) || @@ -816,7 +816,7 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) /* 'add modifier' button at top of panel */ { - row = uiLayoutRow(pa->layout, FALSE); + row = uiLayoutRow(pa->layout, false); block = uiLayoutGetBlock(row); /* this is an operator button which calls a 'add modifier' operator... @@ -826,14 +826,14 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa) 0.5 * UI_UNIT_X, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y, TIP_("Adds a new F-Curve Modifier for the active F-Curve")); /* copy/paste (as sub-row)*/ - row = uiLayoutRow(row, TRUE); + row = uiLayoutRow(row, true); uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy"); uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste"); } /* draw each modifier */ for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) { - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm); } diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 491309e5a07..e2b04476d46 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -1033,7 +1033,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid glScalef(1.0f, unit_scale, 1.0f); if (fcu->bezt) { - int do_handles = draw_fcurve_handles_check(sipo, fcu); + bool do_handles = draw_fcurve_handles_check(sipo, fcu); if (do_handles) { /* only draw handles/vertices on keyframes */ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 0fa6edd0011..c2053c15f95 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -85,7 +85,7 @@ /* Get the min/max keyframes*/ /* note: it should return total boundbox, filter for selection only can be argument... */ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, - const short do_sel_only, const short include_handles) + const bool do_sel_only, const bool include_handles) { Scene *scene = ac->scene; @@ -105,7 +105,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, floa /* check if any channels to set range with */ if (anim_data.first) { - short foundBounds = FALSE; + bool foundBounds = false; /* go through channels, finding max extents */ for (ale = anim_data.first; ale; ale = ale->next) { @@ -135,7 +135,7 @@ void get_graph_keyframe_extents(bAnimContext *ac, float *xmin, float *xmax, floa if ((ymin) && (tymin < *ymin)) *ymin = tymin; if ((ymax) && (tymax > *ymax)) *ymax = tymax; - foundBounds = TRUE; + foundBounds = true; } } @@ -187,7 +187,7 @@ static int graphkeys_previewrange_exec(bContext *C, wmOperator *UNUSED(op)) scene = ac.scene; /* set the range directly */ - get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, FALSE, FALSE); + get_graph_keyframe_extents(&ac, &min, &max, NULL, NULL, false, false); scene->r.flag |= SCER_PRV_RANGE; scene->r.psfra = iroundf(min); scene->r.pefra = iroundf(max); @@ -216,7 +216,7 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot) /* ****************** View-All Operator ****************** */ -static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles, +static int graphkeys_viewall(bContext *C, const bool do_sel_only, const bool include_handles, const int smooth_viewtx) { bAnimContext ac; @@ -243,7 +243,7 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i static int graphkeys_viewall_exec(bContext *C, wmOperator *op) { - const short include_handles = RNA_boolean_get(op->ptr, "include_handles"); + const bool include_handles = RNA_boolean_get(op->ptr, "include_handles"); const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); /* whole range */ @@ -252,7 +252,7 @@ static int graphkeys_viewall_exec(bContext *C, wmOperator *op) static int graphkeys_view_selected_exec(bContext *C, wmOperator *op) { - const short include_handles = RNA_boolean_get(op->ptr, "include_handles"); + const bool include_handles = RNA_boolean_get(op->ptr, "include_handles"); const int smooth_viewtx = WM_operator_smooth_viewtx_get(op); /* only selected */ @@ -274,7 +274,7 @@ void GRAPH_OT_view_all(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - ot->prop = RNA_def_boolean(ot->srna, "include_handles", TRUE, "Include Handles", + ot->prop = RNA_def_boolean(ot->srna, "include_handles", true, "Include Handles", "Include handles of keyframes when calculating extents"); } @@ -293,7 +293,7 @@ void GRAPH_OT_view_selected(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - ot->prop = RNA_def_boolean(ot->srna, "include_handles", TRUE, "Include Handles", + ot->prop = RNA_def_boolean(ot->srna, "include_handles", true, "Include Handles", "Include handles of keyframes when calculating extents"); } diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index fe1378679d8..408c78d194e 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -88,7 +88,7 @@ enum eGraphKeys_ColumnSelect_Mode { /* graph_edit.c */ void get_graph_keyframe_extents(struct bAnimContext *ac, float *xmin, float *xmax, float *ymin, float *ymax, - const short do_selected, const short include_handles); + const bool do_selected, const bool include_handles); void GRAPH_OT_previewrange_set(struct wmOperatorType *ot); void GRAPH_OT_view_all(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index 1041c885697..907bcc3154b 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -282,70 +282,70 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap) /* graph_select.c - selection tools */ /* click-select: keyframe (replace) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select: all keyframes on same frame (replace) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", true); /* click-select: keyframe (add) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select: all keyframes on same frame (add) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_ALT | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "curves", FALSE); - RNA_boolean_set(kmi->ptr, "column", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "curves", false); + RNA_boolean_set(kmi->ptr, "column", true); /* click-select: all keyframes in same curve (replace) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "curves", TRUE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "curves", true); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select: all keyframes in same curve (add) */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_clickselect", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "curves", TRUE); - RNA_boolean_set(kmi->ptr, "column", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "curves", true); + RNA_boolean_set(kmi->ptr, "column", false); /* click-select left/right */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_LEFT); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", GRAPHKEYS_LRSEL_RIGHT); /* deselect all */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "invert", FALSE); + RNA_boolean_set(kmi->ptr, "invert", false); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "invert", TRUE); + RNA_boolean_set(kmi->ptr, "invert", true); /* borderselect */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "axis_range", FALSE); - RNA_boolean_set(kmi->ptr, "include_handles", FALSE); + RNA_boolean_set(kmi->ptr, "axis_range", false); + RNA_boolean_set(kmi->ptr, "include_handles", false); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", TRUE); - RNA_boolean_set(kmi->ptr, "include_handles", FALSE); + RNA_boolean_set(kmi->ptr, "axis_range", true); + RNA_boolean_set(kmi->ptr, "include_handles", false); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "axis_range", FALSE); - RNA_boolean_set(kmi->ptr, "include_handles", TRUE); + RNA_boolean_set(kmi->ptr, "axis_range", false); + RNA_boolean_set(kmi->ptr, "include_handles", true); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_border", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", TRUE); - RNA_boolean_set(kmi->ptr, "include_handles", TRUE); + RNA_boolean_set(kmi->ptr, "axis_range", true); + RNA_boolean_set(kmi->ptr, "include_handles", true); kmi = WM_keymap_add_item(keymap, "GRAPH_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "deselect", false); @@ -411,7 +411,7 @@ static void graphedit_keymap_keyframes(wmKeyConfig *keyconf, wmKeyMap *keymap) /* F-Modifiers */ kmi = WM_keymap_add_item(keymap, "GRAPH_OT_fmodifier_add", MKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "only_active", FALSE); + RNA_boolean_set(kmi->ptr, "only_active", false); /* animation module */ /* channels list diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 342a2d18b99..23bc8e94ef8 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -164,9 +164,9 @@ static int graphkeys_deselectall_exec(bContext *C, wmOperator *op) /* 'standard' behavior - check if selected, then apply relevant selection */ if (RNA_boolean_get(op->ptr, "invert")) - deselect_graph_keys(&ac, 0, SELECT_INVERT, TRUE); + deselect_graph_keys(&ac, 0, SELECT_INVERT, true); else - deselect_graph_keys(&ac, 1, SELECT_ADD, TRUE); + deselect_graph_keys(&ac, 1, SELECT_ADD, true); /* restore active F-Curve... */ if (ale_active) { @@ -334,7 +334,7 @@ static int graphkeys_borderselect_exec(bContext *C, wmOperator *op) /* clear all selection if not extending selection */ extend = RNA_boolean_get(op->ptr, "extend"); if (!extend) - deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE); + deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true); /* get select mode * - 'gesture_mode' from the operator specifies how to select @@ -395,7 +395,7 @@ void GRAPH_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER /*|OPTYPE_UNDO*/; /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); ot->prop = RNA_def_boolean(ot->srna, "axis_range", 0, "Axis Range", ""); RNA_def_boolean(ot->srna, "include_handles", 0, "Include Handles", "Are handles tested individually against the selection criteria"); @@ -424,7 +424,7 @@ static int graphkeys_lassoselect_exec(bContext *C, wmOperator *op) /* clear all selection if not extending selection */ extend = RNA_boolean_get(op->ptr, "extend"); if (!extend) - deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, TRUE); + deselect_graph_keys(&ac, 1, SELECT_SUBTRACT, true); if (!RNA_boolean_get(op->ptr, "deselect")) selectmode = SELECT_ADD; @@ -867,7 +867,7 @@ static void graphkeys_select_leftright(bAnimContext *ac, short leftright, short /* - deselect all other keyframes, so that just the newly selected remain * - channels aren't deselected, since we don't re-select any as a consequence */ - deselect_graph_keys(ac, 0, SELECT_SUBTRACT, FALSE); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT, false); } /* set callbacks and editing data */ @@ -1234,7 +1234,7 @@ static void mouse_graph_keys(bAnimContext *ac, const int mval[2], short select_m select_mode = SELECT_ADD; /* deselect all other keyframes (+ F-Curves too) */ - deselect_graph_keys(ac, 0, SELECT_SUBTRACT, TRUE); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT, true); /* deselect other channels too, but only only do this if * selection of channel when the visibility of keyframes @@ -1371,7 +1371,7 @@ static void graphkeys_mselect_column(bAnimContext *ac, const int mval[2], short /* - deselect all other keyframes, so that just the newly selected remain * - channels aren't deselected, since we don't re-select any as a consequence */ - deselect_graph_keys(ac, 0, SELECT_SUBTRACT, FALSE); + deselect_graph_keys(ac, 0, SELECT_SUBTRACT, false); } /* initialize keyframe editing data */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 2aac3133b7b..bfc1bcbcba0 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -256,7 +256,7 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) graph_draw_curves(&ac, sipo, ar, grid, 1); /* XXX the slow way to set tot rect... but for nice sliders needed (ton) */ - get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, FALSE, TRUE); + get_graph_keyframe_extents(&ac, &v2d->tot.xmin, &v2d->tot.xmax, &v2d->tot.ymin, &v2d->tot.ymax, false, true); /* extra offset so that these items are visible */ v2d->tot.xmin -= 10.0f; v2d->tot.xmax += 10.0f; diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index f88cdaf6713..97a8e9b59d0 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -179,7 +179,7 @@ void image_preview_event(int event) ntreeCompositTagGenerators(G.scene->nodetree); - G.is_break = FALSE; + G.is_break = false; G.scene->nodetree->timecursor = set_timecursor; G.scene->nodetree->test_break = blender_test_break; @@ -509,7 +509,7 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image const char *fake_name; const char *display_name; - uiLayoutRow(layout, TRUE); + uiLayoutRow(layout, true); /* layer menu is 1/3 larger than pass */ wmenu1 = (2 * w) / 5; @@ -561,7 +561,7 @@ static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, uiBut *but; const float dpi_fac = UI_DPI_FAC; - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); if (rr == NULL || iuser == NULL) return; @@ -706,13 +706,13 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char uiItemR(layout, &imaptr, "source", 0, NULL, ICON_NONE); if (ima->source != IMA_SRC_GENERATED) { - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); if (ima->packedfile) uiItemO(row, "", ICON_PACKAGE, "image.unpack"); else uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack"); - row = uiLayoutRow(row, TRUE); + row = uiLayoutRow(row, true); uiLayoutSetEnabled(row, ima->packedfile == NULL); uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE); uiItemO(row, "", ICON_FILE_REFRESH, "image.reload"); @@ -742,7 +742,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char } } - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiTemplateColorspaceSettings(col, &imaptr, "colorspace_settings"); uiItemR(col, &imaptr, "use_view_as_render", 0, NULL, ICON_NONE); @@ -761,29 +761,29 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char } if (has_alpha) { - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, &imaptr, "use_alpha", 0, NULL, ICON_NONE); uiItemR(col, &imaptr, "alpha_mode", 0, "Alpha", ICON_NONE); } uiItemS(layout); - split = uiLayoutSplit(layout, 0.0f, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); /* XXX Why only display fields_per_frame only for video image types? * And why allow fields for non-video image types at all??? */ if (BKE_image_is_animated(ima)) { - uiLayout *subsplit = uiLayoutSplit(col, 0.0f, FALSE); - uiLayout *subcol = uiLayoutColumn(subsplit, FALSE); + uiLayout *subsplit = uiLayoutSplit(col, 0.0f, false); + uiLayout *subcol = uiLayoutColumn(subsplit, false); uiItemR(subcol, &imaptr, "use_fields", 0, NULL, ICON_NONE); - subcol = uiLayoutColumn(subsplit, FALSE); + subcol = uiLayoutColumn(subsplit, false); uiLayoutSetActive(subcol, RNA_boolean_get(&imaptr, "use_fields")); uiItemR(subcol, userptr, "fields_per_frame", 0, IFACE_("Fields"), ICON_NONE); } else uiItemR(col, &imaptr, "use_fields", 0, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "use_fields")); uiItemR(row, &imaptr, "field_order", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } @@ -792,24 +792,24 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char if (BKE_image_is_animated(ima)) { uiItemS(layout); - split = uiLayoutSplit(layout, 0.0f, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); BLI_snprintf(str, sizeof(str), IFACE_("(%d) Frames"), iuser->framenr); uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE); uiItemR(col, userptr, "frame_start", 0, IFACE_("Start"), ICON_NONE); uiItemR(col, userptr, "frame_offset", 0, NULL, ICON_NONE); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiItemO(col, NULL, ICON_NONE, "IMAGE_OT_match_movie_length"); uiItemR(col, userptr, "use_auto_refresh", 0, NULL, ICON_NONE); uiItemR(col, userptr, "use_cyclic", 0, NULL, ICON_NONE); } else if (ima->source == IMA_SRC_GENERATED) { - split = uiLayoutSplit(layout, 0.0f, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemR(col, &imaptr, "generated_width", 0, "X", ICON_NONE); uiItemR(col, &imaptr, "generated_height", 0, "Y", ICON_NONE); @@ -839,14 +839,14 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man const bool is_render_out = (id && GS(id->name) == ID_SCE); uiLayout *col, *row, *split, *sub; - int show_preview = FALSE; + int show_preview = false; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); - split = uiLayoutSplit(col, 0.5f, FALSE); + split = uiLayoutSplit(col, 0.5f, false); uiItemR(split, imfptr, "file_format", 0, "", ICON_NONE); - sub = uiLayoutRow(split, FALSE); + sub = uiLayoutRow(split, false); uiItemR(sub, imfptr, "color_mode", UI_ITEM_R_EXPAND, IFACE_("Color"), ICON_NONE); /* only display depth setting if multiple depths can be used */ @@ -859,7 +859,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man R_IMF_CHAN_DEPTH_24, R_IMF_CHAN_DEPTH_32)) == 0) { - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemL(row, IFACE_("Color Depth:"), ICON_NONE); uiItemR(row, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE); @@ -877,20 +877,20 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE); } - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); if (BKE_imtype_supports_zbuf(imf->imtype)) { uiItemR(row, imfptr, "use_zbuffer", 0, NULL, ICON_NONE); } if (is_render_out && (imf->imtype == R_IMF_IMTYPE_OPENEXR)) { - show_preview = TRUE; + show_preview = true; uiItemR(row, imfptr, "use_preview", 0, NULL, ICON_NONE); } if (imf->imtype == R_IMF_IMTYPE_JP2) { uiItemR(col, imfptr, "jpeg2k_codec", 0, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, imfptr, "use_jpeg2k_cinema_preset", 0, NULL, ICON_NONE); uiItemR(row, imfptr, "use_jpeg2k_cinema_48", 0, NULL, ICON_NONE); @@ -920,7 +920,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man prop = RNA_struct_find_property(imfptr, "display_settings"); display_settings_ptr = RNA_property_pointer_get(imfptr, prop); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemL(col, IFACE_("Color Management"), ICON_NONE); uiItemR(col, &display_settings_ptr, "display_device", 0, NULL, ICON_NONE); diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index 9b9c13a1d4f..deabcfa85f4 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -345,7 +345,7 @@ bool ED_space_image_check_show_maskedit(Scene *scene, SpaceImage *sima) /* check editmode - this is reserved for UV editing */ Object *ob = OBACT; if (ob && ob->mode & OB_MODE_EDIT && ED_space_image_show_uvedit(sima, ob)) { - return FALSE; + return false; } return (sima->mode == SI_MODE_MASK); @@ -360,7 +360,7 @@ int ED_space_image_maskedit_poll(bContext *C) return ED_space_image_check_show_maskedit(scene, sima); } - return FALSE; + return false; } int ED_space_image_maskedit_mask_poll(bContext *C) @@ -370,6 +370,6 @@ int ED_space_image_maskedit_mask_poll(bContext *C) return sima->mask_info.mask != NULL; } - return FALSE; + return false; } diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 90e308ecfa2..93cb1acaa8b 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -156,7 +156,7 @@ static int space_image_file_exists_poll(bContext *C) SpaceImage *sima = CTX_wm_space_image(C); ImBuf *ibuf; void *lock; - int ret = FALSE; + int ret = false; char name[FILE_MAX]; ibuf = ED_space_image_acquire_buffer(sima, &lock); @@ -164,14 +164,14 @@ static int space_image_file_exists_poll(bContext *C) BLI_strncpy(name, ibuf->name, FILE_MAX); BLI_path_abs(name, bmain->name); - if (BLI_exists(name) == FALSE) { + if (BLI_exists(name) == false) { CTX_wm_operator_poll_msg_set(C, "image file not found"); } else if (!BLI_file_is_writable(name)) { CTX_wm_operator_poll_msg_set(C, "image path can't be written to"); } else { - ret = TRUE; + ret = true; } } ED_space_image_release_buffer(sima, ibuf, lock); @@ -223,16 +223,16 @@ static int image_sample_poll(bContext *C) if (obedit) { if (ED_space_image_show_uvedit(sima, obedit) && (toolsettings->use_uv_sculpt)) - return FALSE; + return false; } else if (sima->mode != SI_MODE_VIEW) { - return FALSE; + return false; } return space_image_main_area_poll(C); } else { - return FALSE; + return false; } } /********************** view pan operator *********************/ @@ -1459,11 +1459,11 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI if (ibuf) { ImBuf *colormanaged_ibuf; const char *relbase = ID_BLEND_PATH(CTX_data_main(C), &ima->id); - const short relative = (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path")); - const short save_copy = (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy")); + const bool relative = (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path")); + const bool save_copy = (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy")); const bool save_as_render = (RNA_struct_find_property(op->ptr, "save_as_render") && RNA_boolean_get(op->ptr, "save_as_render")); ImageFormatData *imf = &simopts->im_format; - short ok = FALSE; + bool ok = false; /* old global to ensure a 2nd save goes to same dir */ BLI_strncpy(G.ima, simopts->filepath, sizeof(G.ima)); @@ -1494,7 +1494,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI RenderResult *rr = BKE_image_acquire_renderresult(scene, ima); if (rr) { RE_WriteRenderResult(op->reports, rr, simopts->filepath, simopts->im_format.exr_codec); - ok = TRUE; + ok = true; } else { BKE_report(op->reports, RPT_ERROR, "Did not write, no Multilayer Image"); @@ -1503,7 +1503,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI } else { if (BKE_imbuf_write_as(colormanaged_ibuf, simopts->filepath, &simopts->im_format, save_copy)) { - ok = TRUE; + ok = true; } } @@ -1593,7 +1593,7 @@ static int image_save_as_exec(bContext *C, wmOperator *op) save_image_options_from_op(&simopts, op); - save_image_doit(C, sima, op, &simopts, TRUE); + save_image_doit(C, sima, op, &simopts, true); image_save_as_free(op); return OPERATOR_FINISHED; @@ -1625,7 +1625,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS /* enable save_copy by default for render results */ if (ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE) && !RNA_struct_property_is_set(op->ptr, "copy")) { - RNA_boolean_set(op->ptr, "copy", TRUE); + RNA_boolean_set(op->ptr, "copy", true); } RNA_boolean_set(op->ptr, "save_as_render", save_as_render); @@ -1663,7 +1663,7 @@ static void image_save_as_draw(bContext *UNUSED(C), wmOperator *op) /* image template */ RNA_pointer_create(NULL, &RNA_ImageFormatSettings, imf, &ptr); - uiTemplateImageSettings(layout, &ptr, FALSE); + uiTemplateImageSettings(layout, &ptr, false); /* main draw call */ RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); @@ -1680,12 +1680,12 @@ static int image_save_as_poll(bContext *C) if (ima->source == IMA_SRC_VIEWER) { CTX_wm_operator_poll_msg_set(C, "can't save image while rendering"); - return FALSE; + return false; } } - return TRUE; + return true; } - return FALSE; + return false; } void IMAGE_OT_save_as(wmOperatorType *ot) @@ -1730,7 +1730,7 @@ static int image_save_exec(bContext *C, wmOperator *op) save_image_options_from_op(&simopts, op); if (BLI_exists(simopts.filepath) && BLI_file_is_writable(simopts.filepath)) { - save_image_doit(C, sima, op, &simopts, FALSE); + save_image_doit(C, sima, op, &simopts, false); } else { BKE_reportf(op->reports, RPT_ERROR, "Cannot save image, path '%s' is not writable", simopts.filepath); @@ -2018,10 +2018,10 @@ static int image_invert_exec(bContext *C, wmOperator *op) bool support_undo = ((sima != NULL) && (sima->mode == SI_MODE_PAINT)); /* flags indicate if this channel should be inverted */ - const short r = RNA_boolean_get(op->ptr, "invert_r"); - const short g = RNA_boolean_get(op->ptr, "invert_g"); - const short b = RNA_boolean_get(op->ptr, "invert_b"); - const short a = RNA_boolean_get(op->ptr, "invert_a"); + const bool r = RNA_boolean_get(op->ptr, "invert_r"); + const bool g = RNA_boolean_get(op->ptr, "invert_g"); + const bool b = RNA_boolean_get(op->ptr, "invert_b"); + const bool a = RNA_boolean_get(op->ptr, "invert_a"); int i; @@ -2330,7 +2330,7 @@ bool ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], flo if (ibuf == NULL) { ED_space_image_release_buffer(sima, ibuf, lock); - return FALSE; + return false; } UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &fx, &fy); @@ -2346,12 +2346,12 @@ bool ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], flo if (ibuf->rect_float) { fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); linearrgb_to_srgb_v3_v3(r_col, fp); - ret = TRUE; + ret = true; } else if (ibuf->rect) { cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); rgb_uchar_to_float(r_col, cp); - ret = TRUE; + ret = true; } } @@ -2397,7 +2397,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event info->zp = NULL; info->zfp = NULL; - info->use_default_view = (image->flag & IMA_VIEW_AS_RENDER) ? FALSE : TRUE; + info->use_default_view = (image->flag & IMA_VIEW_AS_RENDER) ? false : true; if (ibuf->rect) { cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); @@ -2417,7 +2417,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event copy_v4_v4(info->linearcol, info->colf); IMB_colormanagement_colorspace_to_scene_linear_v4(info->linearcol, false, ibuf->rect_colorspace); - info->color_manage = TRUE; + info->color_manage = true; } if (ibuf->rect_float) { fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); @@ -2430,7 +2430,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event copy_v4_v4(info->linearcol, info->colf); - info->color_manage = TRUE; + info->color_manage = true; } if (ibuf->zbuf) { @@ -2827,7 +2827,7 @@ static int image_cycle_render_slot_exec(bContext *C, wmOperator *op) { Image *ima = CTX_data_edit_image(C); int a, slot, cur = ima->render_slot; - const short use_reverse = RNA_boolean_get(op->ptr, "reverse"); + const bool use_reverse = RNA_boolean_get(op->ptr, "reverse"); for (a = 1; a < IMA_MAX_RENDER_SLOT; a++) { slot = (cur + (use_reverse ? -a : a)) % IMA_MAX_RENDER_SLOT; diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 14fd486c546..1224ade8337 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -153,10 +153,10 @@ static SpaceLink *image_new(const bContext *UNUSED(C)) simage = MEM_callocN(sizeof(SpaceImage), "initimage"); simage->spacetype = SPACE_IMAGE; simage->zoom = 1.0f; - simage->lock = TRUE; + simage->lock = true; simage->flag = SI_SHOW_GPENCIL | SI_USE_ALPHA; - simage->iuser.ok = TRUE; + simage->iuser.ok = true; simage->iuser.fie_ima = 2; simage->iuser.frames = 100; @@ -274,14 +274,14 @@ static void image_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "IMAGE_OT_toolshelf", TKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, 0, 0); - RNA_boolean_set(WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, KM_ALT, 0)->ptr, "reverse", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "IMAGE_OT_cycle_render_slot", JKEY, KM_PRESS, KM_ALT, 0)->ptr, "reverse", true); keymap = WM_keymap_find(keyconf, "Image", SPACE_IMAGE, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "IMAGE_OT_view_all", FKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "fit_view", TRUE); + RNA_boolean_set(kmi->ptr, "fit_view", true); WM_keymap_add_item(keymap, "IMAGE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "IMAGE_OT_view_pan", MIDDLEMOUSE, KM_PRESS, 0, 0); @@ -319,7 +319,7 @@ static void image_keymap(struct wmKeyConfig *keyconf) /* toggle editmode is handy to have while UV unwrapping */ kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_EDIT); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); + RNA_boolean_set(kmi->ptr, "toggle", true); /* fast switch to render slots */ for (i = 0; i < MAX2(IMA_MAX_RENDER_SLOT, 9); i++) { @@ -395,8 +395,8 @@ static void image_refresh(const bContext *C, ScrArea *sa) else if (obedit && obedit->type == OB_MESH) { Mesh *me = (Mesh *)obedit->data; struct BMEditMesh *em = me->edit_btmesh; - int sloppy = TRUE; /* partially selected face is ok */ - int selected = !(scene->toolsettings->uv_flag & UV_SYNC_SELECTION); /* only selected active face? */ + bool sloppy = true; /* partially selected face is ok */ + bool selected = !(scene->toolsettings->uv_flag & UV_SYNC_SELECTION); /* only selected active face? */ if (BKE_scene_use_new_shading_nodes(scene)) { /* new shading system does not alter image */ @@ -550,7 +550,7 @@ static int image_context(const bContext *C, const char *member, bContextDataResu if (mask) { CTX_data_id_pointer_set(result, &mask->id); } - return TRUE; + return true; } return 0; } @@ -697,7 +697,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) if (sima->flag & SI_SHOW_GPENCIL) { /* Grease Pencil too (in addition to UV's) */ - draw_image_grease_pencil((bContext *)C, TRUE); + draw_image_grease_pencil((bContext *)C, true); } /* sample line */ @@ -707,7 +707,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) if (sima->flag & SI_SHOW_GPENCIL) { /* draw Grease Pencil - screen space only */ - draw_image_grease_pencil((bContext *)C, FALSE); + draw_image_grease_pencil((bContext *)C, false); } if (mask) { @@ -736,7 +736,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) sima->mask_info.overlay_mode, width, height, aspx, aspy, - TRUE, FALSE, + true, false, NULL, C); ED_mask_draw_frames(mask, ar, CFRA, mask->sfra, mask->efra); diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c index 6647a8ee946..575f44b61a9 100644 --- a/source/blender/editors/space_info/info_draw.c +++ b/source/blender/editors/space_info/info_draw.c @@ -149,10 +149,10 @@ static int report_textview_begin(TextViewContext *tvc) tvc->iter_char = 0; report_textview_init__internal(tvc); - return TRUE; + return true; } else { - return FALSE; + return false; } #else return (tvc->iter != NULL); @@ -178,10 +178,10 @@ static int report_textview_step(TextViewContext *tvc) tvc->iter_char = 0; /* reset start */ report_textview_init__internal(tvc); - return TRUE; + return true; } else { - return FALSE; + return false; } } else { @@ -189,7 +189,7 @@ static int report_textview_step(TextViewContext *tvc) tvc->iter_char = tvc->iter_char_next + 1; report_textview_init__internal(tvc); - return TRUE; + return true; } } diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index 827e4427ca0..2135166abe9 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -319,7 +319,7 @@ void INFO_OT_select_border(wmOperatorType *ot) /* ot->flag = OPTYPE_REGISTER; */ /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c index 0d4246144da..5fe3c57a4c8 100644 --- a/source/blender/editors/space_logic/logic_ops.c +++ b/source/blender/editors/space_logic/logic_ops.c @@ -228,9 +228,9 @@ static int logicbricks_move_property_get(wmOperator *op) int type = RNA_enum_get(op->ptr, "direction"); if (type == 1) - return TRUE; + return true; else - return FALSE; + return false; } /* ************* Add/Remove Sensor Operator ************* */ diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index d6de4307ca8..746adb238b8 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -598,9 +598,9 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf /* BUTS_XXX_STATE are similar to BUTS_XXX_LINK for selecting the object */ if (scavisflag & (BUTS_SENS_LINK|BUTS_CONT_LINK|BUTS_ACT_LINK|BUTS_SENS_STATE|BUTS_ACT_STATE)) { - do_it = TRUE; + do_it = true; while (do_it) { - do_it = FALSE; + do_it = false; ob= bmain->object.first; while (ob) { @@ -613,7 +613,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf if (sens->links[a]) { obt= (Object *)sens->links[a]->mynew; if (obt && (obt->scavisflag & OB_VIS_CONT)) { - do_it = TRUE; + do_it = true; ob->scavisflag |= OB_VIS_SENS; break; } @@ -632,7 +632,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf if (cont->links[a]) { obt= (Object *)cont->links[a]->mynew; if (obt && (obt->scavisflag & OB_VIS_ACT)) { - do_it = TRUE; + do_it = true; ob->scavisflag |= OB_VIS_CONT; break; } @@ -651,7 +651,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf if (sens->links[a]) { obt= (Object *)sens->links[a]->mynew; if (obt && (obt->scavisflag & OB_VIS_CONT)==0) { - do_it = TRUE; + do_it = true; obt->scavisflag |= OB_VIS_CONT; } } @@ -668,7 +668,7 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf if (cont->links[a]) { obt= (Object *)cont->links[a]->mynew; if (obt && (obt->scavisflag & OB_VIS_ACT)==0) { - do_it = TRUE; + do_it = true; obt->scavisflag |= OB_VIS_ACT; } } @@ -943,7 +943,7 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo bSensor *sens= (bSensor *)ptr->data; box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE); if (RNA_boolean_get(ptr, "show_expanded")) { @@ -955,13 +955,13 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo uiItemL(row, sens->name, ICON_NONE); } - sub = uiLayoutRow(row, FALSE); + sub = uiLayoutRow(row, false); uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_sensors_active_states") && RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin"))); uiItemR(sub, ptr, "pin", UI_ITEM_R_NO_BG, "", ICON_NONE); if (RNA_boolean_get(ptr, "show_expanded")==0) { - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiItemEnumO(sub, "LOGIC_OT_sensor_move", "", ICON_TRIA_UP, "direction", 1); // up uiItemEnumO(sub, "LOGIC_OT_sensor_move", "", ICON_TRIA_DOWN, "direction", 2); // down } @@ -974,18 +974,18 @@ static void draw_sensor_internal_header(uiLayout *layout, PointerRNA *ptr) uiLayout *box, *split, *sub, *row; box = uiLayoutBox(layout); - split = uiLayoutSplit(box, 0.45f, FALSE); + split = uiLayoutSplit(box, 0.45f, false); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiItemR(row, ptr, "use_pulse_true_level", 0, "", ICON_DOTSUP); uiItemR(row, ptr, "use_pulse_false_level", 0, "", ICON_DOTSDOWN); - sub = uiLayoutRow(row, FALSE); + sub = uiLayoutRow(row, false); uiLayoutSetActive(sub, (RNA_boolean_get(ptr, "use_pulse_true_level") || RNA_boolean_get(ptr, "use_pulse_false_level"))); uiItemR(sub, ptr, "frequency", 0, IFACE_("Freq"), ICON_NONE); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiItemR(row, ptr, "use_level", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(row, ptr, "use_tap", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); @@ -1026,7 +1026,7 @@ static void draw_sensor_armature(uiLayout *layout, PointerRNA *ptr) if (RNA_property_collection_lookup_string(&pose_ptr, bones_prop, as->posechannel, &pchan_ptr)) uiItemPointerR(layout, ptr, "constraint", &pchan_ptr, "constraints", NULL, ICON_CONSTRAINT_BONE); } - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "test_type", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "test_type") != SENS_ARM_STATE_CHANGED) uiItemR(row, ptr, "value", 0, NULL, ICON_NONE); @@ -1039,8 +1039,8 @@ static void draw_sensor_collision(uiLayout *layout, PointerRNA *ptr, bContext *C RNA_main_pointer_create(CTX_data_main(C), &main_ptr); - split = uiLayoutSplit(layout, 0.3f, FALSE); - row = uiLayoutRow(split, TRUE); + split = uiLayoutSplit(layout, 0.3f, false); + row = uiLayoutRow(split, true); uiItemR(row, ptr, "use_pulse", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(row, ptr, "use_material", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); @@ -1058,7 +1058,7 @@ static void draw_sensor_delay(uiLayout *layout, PointerRNA *ptr) { uiLayout *row; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "delay", 0, NULL, ICON_NONE); uiItemR(row, ptr, "duration", 0, NULL, ICON_NONE); @@ -1076,30 +1076,30 @@ static void draw_sensor_joystick(uiLayout *layout, PointerRNA *ptr) case SENS_JOY_BUTTON: uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE); + col = uiLayoutColumn(layout, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == false); uiItemR(col, ptr, "button_number", 0, NULL, ICON_NONE); break; case SENS_JOY_AXIS: - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "axis_number", 0, NULL, ICON_NONE); uiItemR(row, ptr, "axis_threshold", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE); + col = uiLayoutColumn(layout, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == false); uiItemR(col, ptr, "axis_direction", 0, NULL, ICON_NONE); break; case SENS_JOY_HAT: uiItemR(layout, ptr, "hat_number", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "use_all_events", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == FALSE); + col = uiLayoutColumn(layout, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_events") == false); uiItemR(col, ptr, "hat_direction", 0, NULL, ICON_NONE); break; case SENS_JOY_AXIS_SINGLE: - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "single_axis_number", 0, NULL, ICON_NONE); uiItemR(row, ptr, "axis_threshold", 0, NULL, ICON_NONE); break; @@ -1112,21 +1112,21 @@ static void draw_sensor_keyboard(uiLayout *layout, PointerRNA *ptr) PointerRNA settings_ptr; uiLayout *row, *col; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemL(row, CTX_IFACE_(BLF_I18NCONTEXT_ID_WINDOWMANAGER, "Key:"), ICON_NONE); - col = uiLayoutColumn(row, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == FALSE); + col = uiLayoutColumn(row, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == false); uiItemR(col, ptr, "key", UI_ITEM_R_EVENT, "", ICON_NONE); - col = uiLayoutColumn(row, FALSE); + col = uiLayoutColumn(row, false); uiItemR(col, ptr, "use_all_keys", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == FALSE); - row = uiLayoutRow(col, FALSE); + col = uiLayoutColumn(layout, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_all_keys") == false); + row = uiLayoutRow(col, false); uiItemL(row, IFACE_("First Modifier:"), ICON_NONE); uiItemR(row, ptr, "modifier_key_1", UI_ITEM_R_EVENT, "", ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemL(row, IFACE_("Second Modifier:"), ICON_NONE); uiItemR(row, ptr, "modifier_key_2", UI_ITEM_R_EVENT, "", ICON_NONE); @@ -1144,7 +1144,7 @@ static void draw_sensor_mouse(uiLayout *layout, PointerRNA *ptr) { uiLayout *split; - split = uiLayoutSplit(layout, 0.8f, FALSE); + split = uiLayoutSplit(layout, 0.8f, false); uiItemR(split, ptr, "mouse_event", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "mouse_event") == BL_SENS_MOUSE_MOUSEOVER_ANY) @@ -1157,7 +1157,7 @@ static void draw_sensor_near(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "property", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "distance", 0, NULL, ICON_NONE); uiItemR(row, ptr, "reset_distance", 0, NULL, ICON_NONE); } @@ -1175,7 +1175,7 @@ static void draw_sensor_property(uiLayout *layout, PointerRNA *ptr) switch (RNA_enum_get(ptr, "evaluation_type")) { case SENS_PROP_INTERVAL: - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "value_min", 0, NULL, ICON_NONE); uiItemR(row, ptr, "value_max", 0, NULL, ICON_NONE); break; @@ -1197,7 +1197,7 @@ static void draw_sensor_radar(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "property", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "axis", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "angle", 0, NULL, ICON_NONE); uiItemR(row, ptr, "distance", 0, NULL, ICON_NONE); } @@ -1213,7 +1213,7 @@ static void draw_sensor_ray(uiLayout *layout, PointerRNA *ptr, bContext *C) PointerRNA main_ptr; RNA_main_pointer_create(CTX_data_main(C), &main_ptr); - split = uiLayoutSplit(layout, 0.3f, FALSE); + split = uiLayoutSplit(layout, 0.3f, false); uiItemR(split, ptr, "ray_type", 0, "", ICON_NONE); switch (RNA_enum_get(ptr, "ray_type")) { case SENS_RAY_PROPERTY: @@ -1224,9 +1224,9 @@ static void draw_sensor_ray(uiLayout *layout, PointerRNA *ptr, bContext *C) break; } - split = uiLayoutSplit(layout, 0.3, FALSE); + split = uiLayoutSplit(layout, 0.3, false); uiItemR(split, ptr, "axis", 0, "", ICON_NONE); - row = uiLayoutRow(split, FALSE); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "range", 0, NULL, ICON_NONE); uiItemR(row, ptr, "use_x_ray", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); } @@ -1298,7 +1298,7 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i BLI_snprintf(state, sizeof(state), "%d", RNA_int_get(ptr, "states")); box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE); if (RNA_boolean_get(ptr, "show_expanded")) { @@ -1316,7 +1316,7 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr, int xco, i uiItemR(row, ptr, "use_priority", 0, "", ICON_NONE); if (RNA_boolean_get(ptr, "show_expanded")==0) { - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiItemEnumO(sub, "LOGIC_OT_controller_move", "", ICON_TRIA_UP, "direction", 1); // up uiItemEnumO(sub, "LOGIC_OT_controller_move", "", ICON_TRIA_DOWN, "direction", 2); // down } @@ -1332,13 +1332,13 @@ static void draw_controller_python(uiLayout *layout, PointerRNA *ptr) { uiLayout *split, *sub; - split = uiLayoutSplit(layout, 0.3, TRUE); + split = uiLayoutSplit(layout, 0.3, true); uiItemR(split, ptr, "mode", 0, "", ICON_NONE); if (RNA_enum_get(ptr, "mode") == CONT_PY_SCRIPT) { uiItemR(split, ptr, "text", 0, "", ICON_NONE); } else { - sub = uiLayoutSplit(split, 0.8f, FALSE); + sub = uiLayoutSplit(split, 0.8f, false); uiItemR(sub, ptr, "module", 0, "", ICON_NONE); uiItemR(sub, ptr, "use_debug", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); } @@ -1389,7 +1389,7 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA * bActuator *act= (bActuator *)ptr->data; box = uiLayoutBox(layout); - row = uiLayoutRow(box, FALSE); + row = uiLayoutRow(box, false); uiItemR(row, ptr, "show_expanded", UI_ITEM_R_NO_BG, "", ICON_NONE); if (RNA_boolean_get(ptr, "show_expanded")) { @@ -1401,13 +1401,13 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA * uiItemL(row, act->name, ICON_NONE); } - sub = uiLayoutRow(row, FALSE); + sub = uiLayoutRow(row, false); uiLayoutSetActive(sub, ((RNA_boolean_get(logic_ptr, "show_actuators_active_states") && RNA_boolean_get(ptr, "show_expanded")) || RNA_boolean_get(ptr, "pin"))); uiItemR(sub, ptr, "pin", UI_ITEM_R_NO_BG, "", ICON_NONE); if (RNA_boolean_get(ptr, "show_expanded")==0) { - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiItemEnumO(sub, "LOGIC_OT_actuator_move", "", ICON_TRIA_UP, "direction", 1); // up uiItemEnumO(sub, "LOGIC_OT_actuator_move", "", ICON_TRIA_DOWN, "direction", 2); // down } @@ -1422,22 +1422,22 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr) RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "play_mode", 0, "", ICON_NONE); - sub = uiLayoutRow(row, TRUE); + sub = uiLayoutRow(row, true); uiItemR(sub, ptr, "use_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(sub, ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - row = uiLayoutColumn(sub, FALSE); + row = uiLayoutColumn(sub, false); uiLayoutSetActive(row, (RNA_boolean_get(ptr, "use_additive") || RNA_boolean_get(ptr, "use_force"))); uiItemR(row, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "action", 0, "", ICON_NONE); uiItemR(row, ptr, "use_continue_last_frame", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); if ((RNA_enum_get(ptr, "play_mode") == ACT_ACTION_FROM_PROP)) uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE); @@ -1448,11 +1448,11 @@ static void draw_actuator_action(uiLayout *layout, PointerRNA *ptr) uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "frame_blend_in", 0, NULL, ICON_NONE); uiItemR(row, ptr, "priority", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "layer", 0, NULL, ICON_NONE); uiItemR(row, ptr, "layer_weight", 0, NULL, ICON_NONE); uiItemR(row, ptr, "blend_mode", 0, "", ICON_NONE); @@ -1541,11 +1541,11 @@ static void draw_actuator_camera(uiLayout *layout, PointerRNA *ptr) uiLayout *row; uiItemR(layout, ptr, "object", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "height", 0, NULL, ICON_NONE); uiItemR(row, ptr, "axis", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "min", 0, NULL, ICON_NONE); uiItemR(row, ptr, "max", 0, NULL, ICON_NONE); @@ -1564,7 +1564,7 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext case ACT_CONST_TYPE_LOC: uiItemR(layout, ptr, "limit", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "limit_min", 0, NULL, ICON_NONE); uiItemR(row, ptr, "limit_max", 0, NULL, ICON_NONE); @@ -1572,36 +1572,36 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext break; case ACT_CONST_TYPE_DIST: - split = uiLayoutSplit(layout, 0.8, FALSE); + split = uiLayoutSplit(layout, 0.8, false); uiItemR(split, ptr, "direction", 0, NULL, ICON_NONE); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiItemR(row, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(row, ptr, "use_normal", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); - col = uiLayoutColumn(row, TRUE); + row = uiLayoutRow(layout, false); + col = uiLayoutColumn(row, true); uiItemL(col, IFACE_("Range:"), ICON_NONE); uiItemR(col, ptr, "range", 0, "", ICON_NONE); - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); uiItemR(col, ptr, "use_force_distance", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - sub = uiLayoutColumn(col, FALSE); - uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_force_distance") == TRUE); + sub = uiLayoutColumn(col, false); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_force_distance") == true); uiItemR(sub, ptr, "distance", 0, "", ICON_NONE); uiItemR(layout, ptr, "damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.15f, FALSE); + split = uiLayoutSplit(layout, 0.15f, false); uiItemR(split, ptr, "use_material_detect", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); if (RNA_boolean_get(ptr, "use_material_detect")) uiItemPointerR(split, ptr, "material", &main_ptr, "materials", NULL, ICON_MATERIAL_DATA); else uiItemR(split, ptr, "property", 0, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.15, FALSE); + split = uiLayoutSplit(layout, 0.15, false); uiItemR(split, ptr, "use_persistent", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiItemR(row, ptr, "time", 0, NULL, ICON_NONE); uiItemR(row, ptr, "damping_rotation", UI_ITEM_R_SLIDER, NULL, ICON_NONE); break; @@ -1609,43 +1609,43 @@ static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr, bContext case ACT_CONST_TYPE_ORI: uiItemR(layout, ptr, "direction_axis_pos", 0, NULL, ICON_NONE); - row=uiLayoutRow(layout, TRUE); + row=uiLayoutRow(layout, true); uiItemR(row, ptr, "damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(row, ptr, "time", 0, NULL, ICON_NONE); - row=uiLayoutRow(layout, FALSE); + row=uiLayoutRow(layout, false); uiItemR(row, ptr, "rotation_max", 0, NULL, ICON_NONE); - row=uiLayoutRow(layout, TRUE); + row=uiLayoutRow(layout, true); uiItemR(row, ptr, "angle_min", 0, NULL, ICON_NONE); uiItemR(row, ptr, "angle_max", 0, NULL, ICON_NONE); break; case ACT_CONST_TYPE_FH: - split = uiLayoutSplit(layout, 0.75, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.75, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "fh_damping", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(row, ptr, "fh_height", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_fh_paralel_axis", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "direction_axis", 0, NULL, ICON_NONE); - split = uiLayoutSplit(row, 0.9f, FALSE); + split = uiLayoutSplit(row, 0.9f, false); uiItemR(split, ptr, "fh_force", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_fh_normal", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.15, FALSE); + split = uiLayoutSplit(layout, 0.15, false); uiItemR(split, ptr, "use_material_detect", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); if (RNA_boolean_get(ptr, "use_material_detect")) uiItemPointerR(split, ptr, "material", &main_ptr, "materials", NULL, ICON_MATERIAL_DATA); else uiItemR(split, ptr, "property", 0, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.15, FALSE); + split = uiLayoutSplit(layout, 0.15, false); uiItemR(split, ptr, "use_persistent", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - row = uiLayoutRow(split, FALSE); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "time", 0, NULL, ICON_NONE); uiItemR(row, ptr, "damping_rotation", UI_ITEM_R_SLIDER, NULL, ICON_NONE); break; @@ -1660,17 +1660,17 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr) switch (RNA_enum_get(ptr, "mode")) { case ACT_EDOB_ADD_OBJECT: - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "object", 0, NULL, ICON_NONE); uiItemR(row, ptr, "time", 0, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "linear_velocity", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "angular_velocity", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_angular_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); break; @@ -1681,16 +1681,16 @@ static void draw_actuator_edit_object(uiLayout *layout, PointerRNA *ptr) uiItemL(layout, IFACE_("Mode only available for mesh objects"), ICON_NONE); break; } - split = uiLayoutSplit(layout, 0.6, FALSE); + split = uiLayoutSplit(layout, 0.6, false); uiItemR(split, ptr, "mesh", 0, NULL, ICON_NONE); - row = uiLayoutRow(split, FALSE); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "use_replace_display_mesh", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(row, ptr, "use_replace_physics_mesh", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); break; case ACT_EDOB_TRACK_TO: - split = uiLayoutSplit(layout, 0.5, FALSE); + split = uiLayoutSplit(layout, 0.5, false); uiItemR(split, ptr, "track_object", 0, NULL, ICON_NONE); - sub = uiLayoutSplit(split, 0.7f, FALSE); + sub = uiLayoutSplit(split, 0.7f, false); uiItemR(sub, ptr, "time", 0, NULL, ICON_NONE); uiItemR(sub, ptr, "use_3d_tracking", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); break; @@ -1717,9 +1717,9 @@ static void draw_actuator_filter_2d(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "glsl_shader", 0, NULL, ICON_NONE); break; case ACT_2DFILTER_MOTIONBLUR: - split=uiLayoutSplit(layout, 0.75f, TRUE); - row = uiLayoutRow(split, FALSE); - uiLayoutSetActive(row, RNA_boolean_get(ptr, "use_motion_blur") == TRUE); + split=uiLayoutSplit(layout, 0.75f, true); + row = uiLayoutRow(split, false); + uiLayoutSetActive(row, RNA_boolean_get(ptr, "use_motion_blur") == true); uiItemR(row, ptr, "motion_blur_factor", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_motion_blur", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); break; @@ -1750,7 +1750,7 @@ static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr, bContext *C uiItemPointerR(layout, ptr, "to_property", &main_ptr, "objects", NULL, ICON_OBJECT_DATA); uiItemR(layout, ptr, "subject", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "body_type", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "body_type") == ACT_MESG_MESG) @@ -1774,37 +1774,37 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) switch (RNA_enum_get(ptr, "mode")) { case ACT_OBJECT_NORMAL: - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "offset_location", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_location", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "offset_rotation", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_rotation", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); if (ELEM3(physics_type, OB_BODY_TYPE_DYNAMIC, OB_BODY_TYPE_RIGID, OB_BODY_TYPE_SOFT)) { uiItemL(layout, IFACE_("Dynamic Object Settings:"), ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "force", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "torque", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_torque", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "linear_velocity", 0, NULL, ICON_NONE); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiItemR(row, ptr, "use_local_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(row, ptr, "use_add_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "angular_velocity", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_angular_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); @@ -1814,30 +1814,30 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) case ACT_OBJECT_SERVO: uiItemR(layout, ptr, "reference_object", 0, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "linear_velocity", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_linear_velocity", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); - col = uiLayoutColumn(row, FALSE); + row = uiLayoutRow(layout, false); + col = uiLayoutColumn(row, false); uiItemR(col, ptr, "use_servo_limit_x", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); - uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_x") == TRUE); + sub = uiLayoutColumn(col, true); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_x") == true); uiItemR(sub, ptr, "force_max_x", 0, NULL, ICON_NONE); uiItemR(sub, ptr, "force_min_x", 0, NULL, ICON_NONE); - col = uiLayoutColumn(row, FALSE); + col = uiLayoutColumn(row, false); uiItemR(col, ptr, "use_servo_limit_y", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); - uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_y") == TRUE); + sub = uiLayoutColumn(col, true); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_y") == true); uiItemR(sub, ptr, "force_max_y", 0, NULL, ICON_NONE); uiItemR(sub, ptr, "force_min_y", 0, NULL, ICON_NONE); - col = uiLayoutColumn(row, FALSE); + col = uiLayoutColumn(row, false); uiItemR(col, ptr, "use_servo_limit_z", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); - uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_z") == TRUE); + sub = uiLayoutColumn(col, true); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_servo_limit_z") == true); uiItemR(sub, ptr, "force_max_z", 0, NULL, ICON_NONE); uiItemR(sub, ptr, "force_min_z", 0, NULL, ICON_NONE); @@ -1845,27 +1845,27 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) //Layout designers willing to help on that, please compare with 2.49 ui // (since the old code is going to be deleted ... soon) - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "proportional_coefficient", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "integral_coefficient", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "derivate_coefficient", UI_ITEM_R_SLIDER, NULL, ICON_NONE); break; case ACT_OBJECT_CHARACTER: - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "offset_location", 0, NULL, ICON_NONE); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiItemR(row, ptr, "use_local_location", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(row, ptr, "use_add_character_location", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); uiItemR(row, ptr, "offset_rotation", 0, NULL, ICON_NONE); uiItemR(split, ptr, "use_local_rotation", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); - split = uiLayoutSplit(layout, 0.9, FALSE); - row = uiLayoutRow(split, FALSE); - split = uiLayoutSplit(row, 0.7, FALSE); + split = uiLayoutSplit(layout, 0.9, false); + row = uiLayoutRow(split, false); + split = uiLayoutSplit(row, 0.7, false); uiItemL(split, "", ICON_NONE); /*Just use this for some spacing */ uiItemR(split, ptr, "use_character_jump", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); break; @@ -1881,10 +1881,10 @@ static void draw_actuator_parent(uiLayout *layout, PointerRNA *ptr) if (RNA_enum_get(ptr, "mode") == ACT_PARENT_SET) { uiItemR(layout, ptr, "object", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "use_compound", 0, NULL, ICON_NONE); - sub = uiLayoutRow(row, FALSE); - uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_compound") == TRUE); + sub = uiLayoutRow(row, false); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_compound") == true); uiItemR(sub, ptr, "use_ghost", 0, NULL, ICON_NONE); } } @@ -1914,15 +1914,15 @@ static void draw_actuator_property(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "value", 0, NULL, ICON_NONE); break; case ACT_PROP_COPY: - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "object", 0, NULL, ICON_NONE); if (ob_from) { RNA_pointer_create((ID *)ob_from, &RNA_GameObjectSettings, ob_from, &obj_settings_ptr); uiItemPointerR(row, ptr, "object_property", &obj_settings_ptr, "properties", NULL, ICON_NONE); } else { - sub = uiLayoutRow(row, FALSE); - uiLayoutSetActive(sub, FALSE); + sub = uiLayoutRow(row, false); + uiLayoutSetActive(sub, false); uiItemR(sub, ptr, "object_property", 0, NULL, ICON_NONE); } break; @@ -1938,15 +1938,15 @@ static void draw_actuator_random(uiLayout *layout, PointerRNA *ptr) ob = (Object *)ptr->id.data; RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "seed", 0, NULL, ICON_NONE); uiItemR(row, ptr, "distribution", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); switch (RNA_enum_get(ptr, "distribution")) { case ACT_RANDOM_BOOL_CONST: @@ -2023,12 +2023,12 @@ static void draw_actuator_shape_action(uiLayout *layout, PointerRNA *ptr) RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "mode", 0, "", ICON_NONE); uiItemR(row, ptr, "action", 0, "", ICON_NONE); uiItemR(row, ptr, "use_continue_last_frame", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); if ((RNA_enum_get(ptr, "mode") == ACT_ACTION_FROM_PROP)) uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE); @@ -2037,11 +2037,11 @@ static void draw_actuator_shape_action(uiLayout *layout, PointerRNA *ptr) uiItemR(row, ptr, "frame_end", 0, NULL, ICON_NONE); } - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "frame_blend_in", 0, NULL, ICON_NONE); uiItemR(row, ptr, "priority", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemPointerR(row, ptr, "frame_property", &settings_ptr, "properties", NULL, ICON_NONE); #ifdef __NLA_ACTION_BY_MOTION_ACTUATOR @@ -2060,28 +2060,28 @@ static void draw_actuator_sound(uiLayout *layout, PointerRNA *ptr, bContext *C) } uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "volume", 0, NULL, ICON_NONE); uiItemR(row, ptr, "pitch", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "use_sound_3d", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_sound_3d") == TRUE); + col = uiLayoutColumn(layout, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_sound_3d") == true); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "gain_3d_min", 0, NULL, ICON_NONE); uiItemR(row, ptr, "gain_3d_max", 0, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "distance_3d_reference", 0, NULL, ICON_NONE); uiItemR(row, ptr, "distance_3d_max", 0, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "rolloff_factor_3d", 0, NULL, ICON_NONE); uiItemR(row, ptr, "cone_outer_gain_3d", 0, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "cone_outer_angle_3d", 0, NULL, ICON_NONE); uiItemR(row, ptr, "cone_inner_angle_3d", 0, NULL, ICON_NONE); } @@ -2093,7 +2093,7 @@ static void draw_actuator_state(uiLayout *layout, PointerRNA *ptr) PointerRNA settings_ptr; RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); - split = uiLayoutSplit(layout, 0.35, FALSE); + split = uiLayoutSplit(layout, 0.35, false); uiItemR(split, ptr, "operation", 0, NULL, ICON_NONE); uiTemplateLayers(split, ptr, "states", &settings_ptr, "used_states", 0); @@ -2102,7 +2102,7 @@ static void draw_actuator_state(uiLayout *layout, PointerRNA *ptr) static void draw_actuator_visibility(uiLayout *layout, PointerRNA *ptr) { uiLayout *row; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "use_visible", 0, NULL, ICON_NONE); uiItemR(row, ptr, "use_occlusion", 0, NULL, ICON_NONE); @@ -2118,37 +2118,37 @@ static void draw_actuator_steering(uiLayout *layout, PointerRNA *ptr) uiItemR(layout, ptr, "target", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "navmesh", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "distance", 0, NULL, ICON_NONE); uiItemR(row, ptr, "velocity", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "acceleration", 0, NULL, ICON_NONE); uiItemR(row, ptr, "turn_speed", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); - col = uiLayoutColumn(row, FALSE); + row = uiLayoutRow(layout, false); + col = uiLayoutColumn(row, false); uiItemR(col, ptr, "facing", 0, NULL, ICON_NONE); - col = uiLayoutColumn(row, FALSE); + col = uiLayoutColumn(row, false); uiItemR(col, ptr, "facing_axis", 0, NULL, ICON_NONE); if (!RNA_boolean_get(ptr, "facing")) { - uiLayoutSetActive(col, FALSE); + uiLayoutSetActive(col, false); } - col = uiLayoutColumn(row, FALSE); + col = uiLayoutColumn(row, false); uiItemR(col, ptr, "normal_up", 0, NULL, ICON_NONE); if (!RNA_pointer_get(ptr, "navmesh").data) { - uiLayoutSetActive(col, FALSE); + uiLayoutSetActive(col, false); } - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "self_terminated", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING) { uiItemR(row, ptr, "update_period", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); } - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "show_visualization", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "mode") != ACT_STEERING_PATHFOLLOWING) { - uiLayoutSetActive(row, FALSE); + uiLayoutSetActive(row, false); } } @@ -2286,7 +2286,7 @@ void logic_buttons(bContext *C, ARegion *ar) xco= 21 * U.widget_unit; yco= - U.widget_unit / 2; width= 15 * U.widget_unit; layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, 0, UI_GetStyle()); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiDefBlockBut(block, controller_menu, NULL, IFACE_("Controllers"), xco - U.widget_unit / 2, yco, width, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */ @@ -2311,10 +2311,10 @@ void logic_buttons(bContext *C, ARegion *ar) RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr); - split = uiLayoutSplit(layout, 0.05f, FALSE); + split = uiLayoutSplit(layout, 0.05f, false); uiItemR(split, &settings_ptr, "show_state_panel", UI_ITEM_R_NO_BG, "", ICON_DISCLOSURE_TRI_RIGHT); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide controllers")); RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr); @@ -2324,21 +2324,21 @@ void logic_buttons(bContext *C, ARegion *ar) if (RNA_boolean_get(&settings_ptr, "show_state_panel")) { box = uiLayoutBox(layout); - split = uiLayoutSplit(box, 0.2f, FALSE); + split = uiLayoutSplit(box, 0.2f, false); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiItemL(col, IFACE_("Visible"), ICON_NONE); uiItemL(col, IFACE_("Initial"), ICON_NONE); - subsplit = uiLayoutSplit(split, 0.85f, FALSE); - col = uiLayoutColumn(subsplit, FALSE); - row = uiLayoutRow(col, FALSE); - uiLayoutSetActive(row, RNA_boolean_get(&settings_ptr, "use_all_states") == FALSE); + subsplit = uiLayoutSplit(split, 0.85f, false); + col = uiLayoutColumn(subsplit, false); + row = uiLayoutRow(col, false); + uiLayoutSetActive(row, RNA_boolean_get(&settings_ptr, "use_all_states") == false); uiTemplateGameStates(row, &settings_ptr, "states_visible", &settings_ptr, "used_states", 0); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiTemplateGameStates(row, &settings_ptr, "states_initial", &settings_ptr, "used_states", 0); - col = uiLayoutColumn(subsplit, FALSE); + col = uiLayoutColumn(subsplit, false); uiItemR(col, &settings_ptr, "use_all_states", UI_ITEM_R_TOGGLE, NULL, ICON_NONE); uiItemR(col, &settings_ptr, "show_debug_state", 0, "", ICON_NONE); } @@ -2357,18 +2357,18 @@ void logic_buttons(bContext *C, ARegion *ar) continue; /* use two nested splits to align inlinks/links properly */ - split = uiLayoutSplit(layout, 0.05f, FALSE); + split = uiLayoutSplit(layout, 0.05f, false); /* put inlink button to the left */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_LEFT); uiDefIconBut(block, INLINK, 0, ICON_INLINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, cont, LINK_CONTROLLER, 0, 0, 0, ""); - //col = uiLayoutColumn(split, TRUE); + //col = uiLayoutColumn(split, true); /* nested split for middle and right columns */ - subsplit = uiLayoutSplit(split, 0.95f, FALSE); + subsplit = uiLayoutSplit(split, 0.95f, false); - col = uiLayoutColumn(subsplit, TRUE); + col = uiLayoutColumn(subsplit, true); uiLayoutSetContextPointer(col, "controller", &ptr); /* should make UI template for controller header.. function will do for now */ @@ -2380,7 +2380,7 @@ void logic_buttons(bContext *C, ARegion *ar) /* put link button to the right */ - col = uiLayoutColumn(subsplit, FALSE); + col = uiLayoutColumn(subsplit, false); uiLayoutSetAlignment(col, UI_LAYOUT_ALIGN_LEFT); but = uiDefIconBut(block, LINK, 0, ICON_LINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); uiSetButLink(but, NULL, (void ***)&(cont->links), &cont->totlinks, LINK_CONTROLLER, LINK_ACTUATOR); @@ -2393,7 +2393,7 @@ void logic_buttons(bContext *C, ARegion *ar) xco= U.widget_unit / 2; yco= -U.widget_unit / 2; width= 17 * U.widget_unit; layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, 0, UI_GetStyle()); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiDefBlockBut(block, sensor_menu, NULL, IFACE_("Sensors"), xco - U.widget_unit / 2, yco, 15 * U.widget_unit, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */ @@ -2411,7 +2411,7 @@ void logic_buttons(bContext *C, ARegion *ar) /* only draw the sensor common header if "use_visible" */ if ((ob->scavisflag & OB_VIS_SENS) == 0) continue; - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide sensors")); RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr); @@ -2437,8 +2437,8 @@ void logic_buttons(bContext *C, ARegion *ar) /* make as visible, for move operator */ sens->flag |= SENS_VISIBLE; - split = uiLayoutSplit(layout, 0.95f, FALSE); - col = uiLayoutColumn(split, TRUE); + split = uiLayoutSplit(layout, 0.95f, false); + col = uiLayoutColumn(split, true); uiLayoutSetContextPointer(col, "sensor", &ptr); /* should make UI template for sensor header.. function will do for now */ @@ -2448,7 +2448,7 @@ void logic_buttons(bContext *C, ARegion *ar) draw_brick_sensor(col, &ptr, C); /* put link button to the right */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); /* use old-school uiButtons for links for now */ but = uiDefIconBut(block, LINK, 0, ICON_LINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); uiSetButLink(but, NULL, (void ***)&(sens->links), &sens->totlinks, LINK_SENSOR, LINK_CONTROLLER); @@ -2462,7 +2462,7 @@ void logic_buttons(bContext *C, ARegion *ar) xco= 40 * U.widget_unit; yco= -U.widget_unit / 2; width= 17 * U.widget_unit; layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, 0, UI_GetStyle()); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiDefBlockBut(block, actuator_menu, NULL, IFACE_("Actuators"), xco - U.widget_unit / 2, yco, 15 * U.widget_unit, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */ @@ -2482,7 +2482,7 @@ void logic_buttons(bContext *C, ARegion *ar) continue; } - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name + 2, (short)(xco - U.widget_unit / 2), yco, (short)(width - 1.5f * U.widget_unit), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, TIP_("Object name, click to show/hide actuators")); RNA_pointer_create((ID *)ob, &RNA_Object, ob, &object_ptr); @@ -2509,13 +2509,13 @@ void logic_buttons(bContext *C, ARegion *ar) /* make as visible, for move operator */ act->flag |= ACT_VISIBLE; - split = uiLayoutSplit(layout, 0.05f, FALSE); + split = uiLayoutSplit(layout, 0.05f, false); /* put inlink button to the left */ - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiDefIconBut(block, INLINK, 0, ICON_INLINK, 0, 0, UI_UNIT_X, UI_UNIT_Y, act, LINK_ACTUATOR, 0, 0, 0, ""); - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiLayoutSetContextPointer(col, "actuator", &ptr); /* should make UI template for actuator header.. function will do for now */ diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c index ce7d537a518..0c4f08c9199 100644 --- a/source/blender/editors/space_nla/nla_buttons.c +++ b/source/blender/editors/space_nla/nla_buttons.c @@ -269,7 +269,7 @@ static void nla_panel_animdata(const bContext *C, Panel *pa) RNA_id_pointer_create(id, &id_ptr); /* ID-block name > AnimData */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT); uiItemL(row, id->name + 2, RNA_struct_ui_icon(id_ptr.type)); /* id-block (src) */ @@ -281,19 +281,19 @@ static void nla_panel_animdata(const bContext *C, Panel *pa) /* Active Action Properties ------------------------------------- */ /* action */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiTemplateID(row, (bContext *)C, &adt_ptr, "action", "ACTION_OT_new", NULL, NULL /*"ACTION_OT_unlink"*/); // XXX: need to make these operators /* extrapolation */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, ICON_NONE); /* blending */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, ICON_NONE); /* influence */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &adt_ptr, "action_influence", 0, NULL, ICON_NONE); } @@ -313,7 +313,7 @@ static void nla_panel_track(const bContext *C, Panel *pa) uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL); /* Info - Active NLA-Context:Track ---------------------- */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &nlt_ptr, "name", 0, NULL, ICON_NLA); } @@ -334,12 +334,12 @@ static void nla_panel_properties(const bContext *C, Panel *pa) /* Strip Properties ------------------------------------- */ /* strip type */ - row = uiLayoutColumn(layout, TRUE); + row = uiLayoutColumn(layout, true); uiItemR(row, &strip_ptr, "name", 0, NULL, ICON_NLA); // XXX icon? uiItemR(row, &strip_ptr, "type", 0, NULL, ICON_NONE); /* strip extents */ - column = uiLayoutColumn(layout, TRUE); + column = uiLayoutColumn(layout, true); uiItemL(column, IFACE_("Strip Extents:"), ICON_NONE); uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NONE); uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NONE); @@ -353,27 +353,27 @@ static void nla_panel_properties(const bContext *C, Panel *pa) /* only show if allowed to... */ if (showEvalProps) { /* extrapolation */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE); /* blending */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE); /* blend in/out + autoblending * - blend in/out can only be set when autoblending is off */ - column = uiLayoutColumn(layout, TRUE); - uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == FALSE); + column = uiLayoutColumn(layout, true); + uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false); uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE); // XXX as toggle? - sub = uiLayoutColumn(column, TRUE); - uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == FALSE); + sub = uiLayoutColumn(column, true); + uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == false); uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE); uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE); /* settings */ - column = uiLayoutColumn(layout, TRUE); + column = uiLayoutColumn(layout, true); uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time"))); uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE); uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NONE); @@ -399,24 +399,24 @@ static void nla_panel_actclip(const bContext *C, Panel *pa) /* Strip Properties ------------------------------------- */ /* action pointer */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION); /* action extents */ // XXX custom names were used here (to avoid the prefixes)... probably not necessary in future? - column = uiLayoutColumn(layout, TRUE); + column = uiLayoutColumn(layout, true); uiItemL(column, IFACE_("Action Extents:"), ICON_NONE); uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Start Frame"), ICON_NONE); uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End Frame"), ICON_NONE); // XXX: this layout may actually be too abstract and confusing, and may be better using standard column layout - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, &strip_ptr, "use_sync_length", 0, IFACE_("Sync Length"), ICON_NONE); uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length"); /* action usage */ - column = uiLayoutColumn(layout, TRUE); - uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == FALSE); + column = uiLayoutColumn(layout, true); + uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false); uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE); uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE); uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE); @@ -437,19 +437,19 @@ static void nla_panel_evaluation(const bContext *C, Panel *pa) block = uiLayoutGetBlock(layout); uiBlockSetHandleFunc(block, do_nla_region_buttons, NULL); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence")); uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); - sub = uiLayoutRow(col, FALSE); + col = uiLayoutColumn(layout, true); + sub = uiLayoutRow(col, false); uiItemR(sub, &strip_ptr, "use_animated_time", 0, NULL, ICON_NONE); uiItemR(sub, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE); - sub = uiLayoutRow(col, FALSE); + sub = uiLayoutRow(col, false); uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_time")); uiItemR(sub, &strip_ptr, "strip_time", 0, NULL, ICON_NONE); } @@ -473,7 +473,7 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa) /* 'add modifier' button at top of panel */ { - row = uiLayoutRow(pa->layout, FALSE); + row = uiLayoutRow(pa->layout, false); block = uiLayoutGetBlock(row); // XXX for now, this will be a operator button which calls a temporary 'add modifier' operator @@ -482,14 +482,14 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa) TIP_("Adds a new F-Modifier for the active NLA Strip")); /* copy/paste (as sub-row)*/ - row = uiLayoutRow(row, TRUE); + row = uiLayoutRow(row, true); uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy"); uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste"); } /* draw each modifier */ for (fcm = strip->modifiers.first; fcm; fcm = fcm->next) { - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.id.data, &strip->modifiers, fcm); } diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 9f83bc80314..cf01ebd6976 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -656,7 +656,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View BLI_strncpy(name, act ? act->id.name + 2 : "<No Action>", sizeof(name)); /* draw manually still */ - do_draw = TRUE; + do_draw = true; break; } default: /* handled by standard channel-drawing API */ diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index f54ceeeb702..80b1918ff8e 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -342,13 +342,13 @@ static int nlaedit_viewall(bContext *C, const short onlySel) static int nlaedit_viewall_exec(bContext *C, wmOperator *UNUSED(op)) { /* whole range */ - return nlaedit_viewall(C, FALSE); + return nlaedit_viewall(C, false); } static int nlaedit_viewsel_exec(bContext *C, wmOperator *UNUSED(op)) { /* only selected */ - return nlaedit_viewall(C, TRUE); + return nlaedit_viewall(C, true); } void NLA_OT_view_all(wmOperatorType *ot) @@ -527,7 +527,7 @@ static int nlaedit_add_transition_exec(bContext *C, wmOperator *op) bAnimListElem *ale; int filter; - int done = FALSE; + int done = false; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -846,7 +846,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) bAnimListElem *ale; int filter; - short done = FALSE; + bool done = false; /* get editor data */ if (ANIM_animdata_get_context(C, &ac) == 0) @@ -889,7 +889,7 @@ static int nlaedit_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) /* auto-name newly created strip */ BKE_nlastrip_validate_name(adt, nstrip); - done++; + done = true; } } } diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c index 7a7431b22b3..0a010ffb819 100644 --- a/source/blender/editors/space_nla/nla_ops.c +++ b/source/blender/editors/space_nla/nla_ops.c @@ -178,16 +178,16 @@ static void nla_keymap_channels(wmKeyMap *keymap) /* click-select */ // XXX for now, only leftmouse.... kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "NLA_OT_channels_click", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); /* channel operations ------------------------------------------------------------ */ /* add tracks */ kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "above_selected", FALSE); + RNA_boolean_set(kmi->ptr, "above_selected", false); kmi = WM_keymap_add_item(keymap, "NLA_OT_tracks_add", AKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "above_selected", TRUE); + RNA_boolean_set(kmi->ptr, "above_selected", true); /* delete tracks */ WM_keymap_add_item(keymap, "NLA_OT_tracks_delete", XKEY, KM_PRESS, 0, 0); @@ -201,38 +201,38 @@ static void nla_keymap_main(wmKeyConfig *keyconf, wmKeyMap *keymap) /* selection ------------------------------------------------ */ /* click select */ kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "NLA_OT_click_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); /* select left/right */ kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_TEST); kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", LEFTBRACKETKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_LEFT); kmi = WM_keymap_add_item(keymap, "NLA_OT_select_leftright", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); RNA_enum_set(kmi->ptr, "mode", NLAEDIT_LRSEL_RIGHT); /* deselect all */ /* TODO: uniformize with other select_all ops? */ kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", AKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "invert", FALSE); + RNA_boolean_set(kmi->ptr, "invert", false); kmi = WM_keymap_add_item(keymap, "NLA_OT_select_all_toggle", IKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "invert", TRUE); + RNA_boolean_set(kmi->ptr, "invert", true); /* borderselect */ kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "axis_range", FALSE); + RNA_boolean_set(kmi->ptr, "axis_range", false); kmi = WM_keymap_add_item(keymap, "NLA_OT_select_border", BKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "axis_range", TRUE); + RNA_boolean_set(kmi->ptr, "axis_range", true); /* view ---------------------------------------------------- */ /* auto-set range */ diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index d534eefb0a1..5e3ac42d865 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -148,7 +148,7 @@ static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr uiLayout *col; RNA_pointer_create(ptr->id.data, &RNA_NodeSocket, output, &sockptr); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiTemplateColorPicker(col, &sockptr, "default_value", 1, 0, 0, 0); uiItemR(col, &sockptr, "default_value", UI_ITEM_R_SLIDER, "", ICON_NONE); } @@ -159,8 +159,8 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA bNodeTree *ntree = (bNodeTree *)ptr->id.data; - col = uiLayoutColumn(layout, FALSE); - row = uiLayoutRow(col, TRUE); + col = uiLayoutColumn(layout, false); + row = uiLayoutRow(col, true); uiItemR(row, ptr, "blend_type", 0, "", ICON_NONE); if (ELEM(ntree->type, NTREE_COMPOSIT, NTREE_TEXTURE)) uiItemR(row, ptr, "use_alpha", 0, "", ICON_IMAGE_RGB_ALPHA); @@ -185,7 +185,7 @@ static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *pt uiTemplateCurveMapping(layout, ptr, "curve", 's', 0, 0); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "frame_start", 0, IFACE_("Sta"), ICON_NONE); uiItemR(row, ptr, "frame_end", 0, IFACE_("End"), ICON_NONE); } @@ -425,7 +425,7 @@ static void node_draw_frame(const bContext *C, ARegion *ar, SpaceNode *snode, float alpha; /* skip if out of view */ - if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == FALSE) { + if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == false) { uiEndBlock(C, node->block); node->block = NULL; return; @@ -646,7 +646,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr, if (!imaptr->data) return; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, imaptr, "source", 0, "", ICON_NONE); @@ -665,7 +665,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr, } if (ELEM(source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) { - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "frame_duration", 0, NULL, ICON_NONE); uiItemR(col, ptr, "frame_start", 0, NULL, ICON_NONE); uiItemR(col, ptr, "frame_offset", 0, NULL, ICON_NONE); @@ -673,7 +673,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr, uiItemR(col, ptr, "use_auto_refresh", 0, NULL, ICON_NONE); } - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); if (RNA_enum_get(imaptr, "type") == IMA_TYPE_MULTILAYER) uiItemR(col, ptr, "layer", 0, NULL, ICON_NONE); @@ -688,7 +688,7 @@ static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA if (!node->id) return; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "use_diffuse", 0, NULL, ICON_NONE); uiItemR(col, ptr, "use_specular", 0, NULL, ICON_NONE); uiItemR(col, ptr, "invert_normal", 0, NULL, ICON_NONE); @@ -700,31 +700,31 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), Poin uiItemR(layout, ptr, "vector_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); uiItemL(col, IFACE_("Location:"), ICON_NONE); uiItemR(col, ptr, "translation", 0, "", ICON_NONE); - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); uiItemL(col, IFACE_("Rotation:"), ICON_NONE); uiItemR(col, ptr, "rotation", 0, "", ICON_NONE); - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); uiItemL(col, IFACE_("Scale:"), ICON_NONE); uiItemR(col, ptr, "scale", 0, "", ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); uiItemR(col, ptr, "use_min", 0, IFACE_("Min"), ICON_NONE); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min")); uiItemR(sub, ptr, "min", 0, "", ICON_NONE); - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); uiItemR(col, ptr, "use_max", 0, IFACE_("Max"), ICON_NONE); - sub = uiLayoutColumn(col, TRUE); + sub = uiLayoutColumn(col, true); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max")); uiItemR(sub, ptr, "max", 0, "", ICON_NONE); } @@ -746,7 +746,7 @@ static void node_shader_buts_geometry(uiLayout *layout, bContext *C, PointerRNA PointerRNA obptr = CTX_data_pointer_get(C, "active_object"); uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) { PointerRNA dataptr = RNA_pointer_get(&obptr, "data"); @@ -839,11 +839,11 @@ static void node_shader_buts_tex_brick(uiLayout *layout, bContext *UNUSED(C), Po { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "offset", UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE); uiItemR(col, ptr, "offset_frequency", 0, IFACE_("Frequency"), ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "squash", 0, IFACE_("Squash"), ICON_NONE); uiItemR(col, ptr, "squash_frequency", 0, IFACE_("Frequency"), ICON_NONE); } @@ -893,11 +893,11 @@ static void node_shader_buts_tangent(uiLayout *layout, bContext *C, PointerRNA * { uiLayout *split, *row; - split = uiLayoutSplit(layout, 0.0f, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); uiItemR(split, ptr, "direction_type", 0, "", 0); - row = uiLayoutRow(split, FALSE); + row = uiLayoutRow(split, false); if (RNA_enum_get(ptr, "direction_type") == SHD_TANGENT_UVMAP) { PointerRNA obptr = CTX_data_pointer_get(C, "active_object"); @@ -958,10 +958,10 @@ static void node_shader_buts_script(uiLayout *layout, bContext *UNUSED(C), Point { uiLayout *row; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "mode", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); if (RNA_enum_get(ptr, "mode") == NODE_SCRIPT_INTERNAL) uiItemR(row, ptr, "script", 0, "", ICON_NONE); @@ -1150,8 +1150,8 @@ static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, Point if (!node->id) return; - col = uiLayoutColumn(layout, FALSE); - row = uiLayoutRow(col, TRUE); + col = uiLayoutColumn(layout, false); + row = uiLayoutRow(col, true); uiItemR(row, ptr, "layer", 0, "", ICON_NONE); prop = RNA_struct_find_property(ptr, "layer"); @@ -1175,7 +1175,7 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), Point int reference; int filter; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); filter = RNA_enum_get(ptr, "filter_type"); reference = RNA_boolean_get(ptr, "use_variable_size"); @@ -1192,15 +1192,15 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), Point if (RNA_boolean_get(ptr, "use_relative")) { uiItemL(col, IFACE_("Aspect Correction"), ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "aspect_correction", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "factor_x", 0, IFACE_("X"), ICON_NONE); uiItemR(col, ptr, "factor_y", 0, IFACE_("Y"), ICON_NONE); } else { - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "size_x", 0, IFACE_("X"), ICON_NONE); uiItemR(col, ptr, "size_y", 0, IFACE_("Y"), ICON_NONE); } @@ -1213,14 +1213,14 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext *UNUSED(C), Poin uiItemR(layout, ptr, "iterations", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "use_wrap", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("Center:"), ICON_NONE); uiItemR(col, ptr, "center_x", 0, IFACE_("X"), ICON_NONE); uiItemR(col, ptr, "center_y", 0, IFACE_("Y"), ICON_NONE); uiItemS(layout); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "distance", 0, NULL, ICON_NONE); uiItemR(col, ptr, "angle", 0, NULL, ICON_NONE); @@ -1234,7 +1234,7 @@ static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *UNUSED( { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "iterations", 0, NULL, ICON_NONE); uiItemR(col, ptr, "sigma_color", 0, NULL, ICON_NONE); uiItemR(col, ptr, "sigma_space", 0, NULL, ICON_NONE); @@ -1244,29 +1244,29 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA { uiLayout *sub, *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemL(col, IFACE_("Bokeh Type:"), ICON_NONE); uiItemR(col, ptr, "bokeh", 0, "", ICON_NONE); uiItemR(col, ptr, "angle", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "use_gamma_correction", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer") == TRUE); + col = uiLayoutColumn(layout, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer") == true); uiItemR(col, ptr, "f_stop", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "blur_max", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "threshold", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "use_preview", 0, NULL, ICON_NONE); uiTemplateID(layout, C, ptr, "scene", NULL, NULL, NULL); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "use_zbuffer", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, FALSE); - uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer") == FALSE); + sub = uiLayoutColumn(col, false); + uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer") == false); uiItemR(sub, ptr, "z_scale", 0, NULL, ICON_NONE); } @@ -1305,7 +1305,7 @@ static void node_composit_buts_tonemap(uiLayout *layout, bContext *UNUSED(C), Po { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "tonemap_type", 0, "", ICON_NONE); if (RNA_enum_get(ptr, "tonemap_type") == 0) { uiItemR(col, ptr, "key", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -1324,11 +1324,11 @@ static void node_composit_buts_lensdist(uiLayout *layout, bContext *UNUSED(C), P { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "use_projector", 0, NULL, ICON_NONE); - col = uiLayoutColumn(col, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector") == FALSE); + col = uiLayoutColumn(col, false); + uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector") == false); uiItemR(col, ptr, "use_jitter", 0, NULL, ICON_NONE); uiItemR(col, ptr, "use_fit", 0, NULL, ICON_NONE); } @@ -1337,11 +1337,11 @@ static void node_composit_buts_vecblur(uiLayout *layout, bContext *UNUSED(C), Po { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "samples", 0, NULL, ICON_NONE); uiItemR(col, ptr, "factor", 0, IFACE_("Blur"), ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("Speed:"), ICON_NONE); uiItemR(col, ptr, "speed_min", 0, IFACE_("Min"), ICON_NONE); uiItemR(col, ptr, "speed_max", 0, IFACE_("Max"), ICON_NONE); @@ -1366,7 +1366,7 @@ static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), Point uiItemR(layout, ptr, "use_crop_size", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "relative", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); if (RNA_boolean_get(ptr, "relative")) { uiItemR(col, ptr, "rel_min_x", 0, IFACE_("Left"), ICON_NONE); uiItemR(col, ptr, "rel_max_x", 0, IFACE_("Right"), ICON_NONE); @@ -1385,8 +1385,8 @@ static void node_composit_buts_splitviewer(uiLayout *layout, bContext *UNUSED(C) { uiLayout *row, *col; - col = uiLayoutColumn(layout, FALSE); - row = uiLayoutRow(col, FALSE); + col = uiLayoutColumn(layout, false); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "axis", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiItemR(col, ptr, "factor", 0, NULL, ICON_NONE); } @@ -1395,7 +1395,7 @@ static void node_composit_buts_double_edge_mask(uiLayout *layout, bContext *UNUS { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemL(col, IFACE_("Inner Edge:"), ICON_NONE); uiItemR(col, ptr, "inner_mode", 0, "", ICON_NONE); @@ -1407,7 +1407,7 @@ static void node_composit_buts_map_range(uiLayout *layout, bContext *UNUSED(C), { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "use_clamp", 0, NULL, ICON_NONE); } @@ -1415,19 +1415,19 @@ static void node_composit_buts_map_value(uiLayout *layout, bContext *UNUSED(C), { uiLayout *sub, *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "offset", 0, NULL, ICON_NONE); uiItemR(col, ptr, "size", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "use_min", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, FALSE); + sub = uiLayoutColumn(col, false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min")); uiItemR(sub, ptr, "min", 0, "", ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "use_max", 0, NULL, ICON_NONE); - sub = uiLayoutColumn(col, FALSE); + sub = uiLayoutColumn(col, false); uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max")); uiItemR(sub, ptr, "max", 0, "", ICON_NONE); } @@ -1436,7 +1436,7 @@ static void node_composit_buts_alphaover(uiLayout *layout, bContext *UNUSED(C), { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "use_premultiply", 0, NULL, ICON_NONE); uiItemR(col, ptr, "premul", 0, NULL, ICON_NONE); } @@ -1445,7 +1445,7 @@ static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), P { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "use_alpha", 0, NULL, ICON_NONE); uiItemR(col, ptr, "use_antialias_z", 0, NULL, ICON_NONE); } @@ -1455,7 +1455,7 @@ static void node_composit_buts_hue_sat(uiLayout *layout, bContext *UNUSED(C), Po { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "color_hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "color_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -1484,7 +1484,7 @@ static void node_composit_buts_despeckle(uiLayout *layout, bContext *UNUSED(C), { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "threshold", 0, NULL, ICON_NONE); uiItemR(col, ptr, "threshold_neighbor", 0, NULL, ICON_NONE); } @@ -1493,7 +1493,7 @@ static void node_composit_buts_diff_matte(uiLayout *layout, bContext *UNUSED(C), { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, ICON_NONE); } @@ -1502,10 +1502,10 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED { uiLayout *col, *row; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(layout, IFACE_("Color Space:"), ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiItemR(col, ptr, "tolerance", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -1517,21 +1517,21 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C) uiLayout *row, *col; uiItemL(layout, IFACE_("Despill Channel:"), ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "limit_method") == 0) { uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } uiItemR(col, ptr, "ratio", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "use_unspill", 0, NULL, ICON_NONE); - if (RNA_boolean_get(ptr, "use_unspill") == TRUE) { + if (RNA_boolean_get(ptr, "use_unspill") == true) { uiItemR(col, ptr, "unspill_red", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "unspill_green", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "unspill_blue", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -1542,11 +1542,11 @@ static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *UNUSED(C { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "tolerance", 0, NULL, ICON_NONE); uiItemR(col, ptr, "threshold", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); /*uiItemR(col, ptr, "lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE); Removed for now */ uiItemR(col, ptr, "gain", UI_ITEM_R_SLIDER, NULL, ICON_NONE); /*uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, NULL, ICON_NONE); Removed for now*/ @@ -1556,7 +1556,7 @@ static void node_composit_buts_color_matte(uiLayout *layout, bContext *UNUSED(C) { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "color_hue", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "color_saturation", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -1567,20 +1567,20 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED( uiLayout *col, *row; uiItemL(layout, IFACE_("Color Space:"), ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "color_space", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemL(col, IFACE_("Key Channel:"), ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "matte_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "limit_method", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "limit_method") == 0) { uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "limit_channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } @@ -1592,7 +1592,7 @@ static void node_composit_buts_luma_matte(uiLayout *layout, bContext *UNUSED(C), { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "limit_max", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(col, ptr, "limit_min", UI_ITEM_R_SLIDER, NULL, ICON_NONE); } @@ -1628,14 +1628,14 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi int multilayer = (RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER); node_composit_buts_file_output(layout, C, ptr); - uiTemplateImageSettings(layout, &imfptr, FALSE); + uiTemplateImageSettings(layout, &imfptr, false); uiItemS(layout); uiItemO(layout, IFACE_("Add Input"), ICON_ZOOMIN, "NODE_OT_output_file_add_socket"); - row = uiLayoutRow(layout, FALSE); - col = uiLayoutColumn(row, TRUE); + row = uiLayoutRow(layout, false); + col = uiLayoutColumn(row, true); active_index = RNA_int_get(ptr, "active_input_index"); /* using different collection properties if multilayer format is enabled */ @@ -1654,7 +1654,7 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi /* XXX collection lookup does not return the ID part of the pointer, setting this manually here */ active_input_ptr.id.data = ptr->id.data; - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); op_ptr = uiItemFullO(col, "NODE_OT_output_file_move_active_socket", "", ICON_TRIA_UP, NULL, WM_OP_INVOKE_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&op_ptr, "direction", 1); @@ -1664,19 +1664,19 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi if (active_input_ptr.data) { if (multilayer) { - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("Layer:"), ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &active_input_ptr, "name", 0, "", ICON_NONE); uiItemFullO(row, "NODE_OT_output_file_remove_active_socket", "", ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY); } else { - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("File Subpath:"), ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &active_input_ptr, "path", 0, "", ICON_NONE); uiItemFullO(row, "NODE_OT_output_file_remove_active_socket", "", ICON_X, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_R_ICON_ONLY); @@ -1684,13 +1684,13 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi /* format details for individual files */ imfptr = RNA_pointer_get(&active_input_ptr, "format"); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemL(col, IFACE_("Format:"), ICON_NONE); uiItemR(col, &active_input_ptr, "use_node_format", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, FALSE); - uiLayoutSetActive(col, RNA_boolean_get(&active_input_ptr, "use_node_format") == FALSE); - uiTemplateImageSettings(col, &imfptr, FALSE); + col = uiLayoutColumn(layout, false); + uiLayoutSetActive(col, RNA_boolean_get(&active_input_ptr, "use_node_format") == false); + uiTemplateImageSettings(col, &imfptr, false); } } } @@ -1702,7 +1702,7 @@ static void node_composit_buts_scale(uiLayout *layout, bContext *UNUSED(C), Poin if (RNA_enum_get(ptr, "space") == CMP_SCALE_RENDERPERCENT) { uiLayout *row; uiItemR(layout, ptr, "frame_method", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "offset_x", 0, "X", ICON_NONE); uiItemR(row, ptr, "offset_y", 0, "Y", ICON_NONE); } @@ -1717,7 +1717,7 @@ static void node_composit_buts_invert(uiLayout *layout, bContext *UNUSED(C), Poi { uiLayout *col; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, ptr, "invert_rgb", 0, NULL, ICON_NONE); uiItemR(col, ptr, "invert_alpha", 0, NULL, ICON_NONE); } @@ -1740,39 +1740,39 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C if (RNA_enum_get(ptr, "correction_method") == 0) { - split = uiLayoutSplit(layout, 0.0f, FALSE); - col = uiLayoutColumn(split, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); + col = uiLayoutColumn(split, false); uiTemplateColorPicker(col, ptr, "lift", 1, 1, 0, 1); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "lift", 0, NULL, ICON_NONE); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiTemplateColorPicker(col, ptr, "gamma", 1, 1, 1, 1); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "gamma", 0, NULL, ICON_NONE); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiTemplateColorPicker(col, ptr, "gain", 1, 1, 1, 1); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "gain", 0, NULL, ICON_NONE); } else { - split = uiLayoutSplit(layout, 0.0f, FALSE); - col = uiLayoutColumn(split, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); + col = uiLayoutColumn(split, false); uiTemplateColorPicker(col, ptr, "offset", 1, 1, 0, 1); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "offset", 0, NULL, ICON_NONE); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiTemplateColorPicker(col, ptr, "power", 1, 1, 0, 1); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "power", 0, NULL, ICON_NONE); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); uiTemplateColorPicker(col, ptr, "slope", 1, 1, 0, 1); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, ptr, "slope", 0, NULL, ICON_NONE); } @@ -1885,12 +1885,12 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE { uiLayout *row; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "red", 0, NULL, ICON_NONE); uiItemR(row, ptr, "green", 0, NULL, ICON_NONE); uiItemR(row, ptr, "blue", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemL(row, "", ICON_NONE); uiItemL(row, IFACE_("Saturation"), ICON_NONE); uiItemL(row, IFACE_("Contrast"), ICON_NONE); @@ -1898,7 +1898,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE uiItemL(row, IFACE_("Gain"), ICON_NONE); uiItemL(row, IFACE_("Lift"), ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemL(row, IFACE_("Master"), ICON_NONE); uiItemR(row, ptr, "master_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "master_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE); @@ -1906,7 +1906,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE uiItemR(row, ptr, "master_gain", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "master_lift", UI_ITEM_R_SLIDER, "", ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemL(row, IFACE_("Highlights"), ICON_NONE); uiItemR(row, ptr, "highlights_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "highlights_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE); @@ -1914,7 +1914,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE uiItemR(row, ptr, "highlights_gain", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "highlights_lift", UI_ITEM_R_SLIDER, "", ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemL(row, IFACE_("Midtones"), ICON_NONE); uiItemR(row, ptr, "midtones_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "midtones_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE); @@ -1922,7 +1922,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE uiItemR(row, ptr, "midtones_gain", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "midtones_lift", UI_ITEM_R_SLIDER, "", ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemL(row, IFACE_("Shadows"), ICON_NONE); uiItemR(row, ptr, "shadows_saturation", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "shadows_contrast", UI_ITEM_R_SLIDER, "", ICON_NONE); @@ -1930,7 +1930,7 @@ static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSE uiItemR(row, ptr, "shadows_gain", UI_ITEM_R_SLIDER, "", ICON_NONE); uiItemR(row, ptr, "shadows_lift", UI_ITEM_R_SLIDER, "", ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "midtones_start", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(row, ptr, "midtones_end", UI_ITEM_R_SLIDER, NULL, ICON_NONE); } @@ -1939,7 +1939,7 @@ static void node_composit_buts_colorcorrection_ex(uiLayout *layout, bContext *UN { uiLayout *row; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "red", 0, NULL, ICON_NONE); uiItemR(row, ptr, "green", 0, NULL, ICON_NONE); uiItemR(row, ptr, "blue", 0, NULL, ICON_NONE); @@ -1974,7 +1974,7 @@ static void node_composit_buts_colorcorrection_ex(uiLayout *layout, bContext *UN uiItemR(row, ptr, "midtones_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(row, ptr, "shadows_lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); uiItemR(row, ptr, "midtones_start", 0, NULL, ICON_NONE); uiItemR(row, ptr, "midtones_end", 0, NULL, ICON_NONE); } @@ -1988,11 +1988,11 @@ static void node_composit_buts_boxmask(uiLayout *layout, bContext *UNUSED(C), Po { uiLayout *row; - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "x", 0, NULL, ICON_NONE); uiItemR(row, ptr, "y", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(row, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -2116,10 +2116,10 @@ static void node_composit_backdrop_ellipsemask(SpaceNode *snode, ImBuf *backdrop static void node_composit_buts_ellipsemask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) { uiLayout *row; - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "x", 0, NULL, ICON_NONE); uiItemR(row, ptr, "y", 0, NULL, ICON_NONE); - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE); uiItemR(row, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE); @@ -2144,7 +2144,7 @@ static void node_composit_buts_viewer_ex(uiLayout *layout, bContext *UNUSED(C), uiItemR(layout, ptr, "use_alpha", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "tile_order", 0, NULL, ICON_NONE); if (RNA_enum_get(ptr, "tile_order") == 0) { - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "center_x", 0, NULL, ICON_NONE); uiItemR(col, ptr, "center_y", 0, NULL, ICON_NONE); } @@ -2185,7 +2185,7 @@ static void node_composit_buts_keyingscreen(uiLayout *layout, bContext *C, Point RNA_pointer_create(&clip->id, &RNA_MovieTracking, &clip->tracking, &tracking_ptr); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA); } } @@ -2224,7 +2224,7 @@ static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRN RNA_pointer_create(&clip->id, &RNA_MovieTracking, tracking, &tracking_ptr); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA); object = BKE_tracking_object_get_named(tracking, data->tracking_object); @@ -2263,7 +2263,7 @@ static void node_composit_buts_planetrackdeform(uiLayout *layout, bContext *C, P RNA_pointer_create(&clip->id, &RNA_MovieTracking, tracking, &tracking_ptr); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA); object = BKE_tracking_object_get_named(tracking, data->tracking_object); @@ -2517,11 +2517,11 @@ static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), Poin { uiLayout *col; - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "offset", UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE); uiItemR(col, ptr, "offset_frequency", 0, IFACE_("Frequency"), ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); uiItemR(col, ptr, "squash", 0, IFACE_("Squash"), ICON_NONE); uiItemR(col, ptr, "squash_frequency", 0, IFACE_("Frequency"), ICON_NONE); } @@ -2536,23 +2536,23 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe RNA_pointer_create(id, &RNA_Texture, tex, &tex_ptr); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); switch (tex->type) { case TEX_BLEND: uiItemR(col, &tex_ptr, "progression", 0, "", ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "use_flip_axis", UI_ITEM_R_EXPAND, NULL, ICON_NONE); break; case TEX_MARBLE: - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "marble_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "noise_basis", 0, "", ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "noise_basis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE); break; @@ -2561,9 +2561,9 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe break; case TEX_STUCCI: - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "stucci_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE); break; @@ -2571,18 +2571,18 @@ static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), Pointe case TEX_WOOD: uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE); uiItemR(col, &tex_ptr, "wood_type", 0, "", ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "noise_basis_2", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiLayoutSetActive(row, !(ELEM(tex->stype, TEX_BAND, TEX_RING))); uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); break; case TEX_CLOUDS: uiItemR(col, &tex_ptr, "noise_basis", 0, "", ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "cloud_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row = uiLayoutRow(col, FALSE); + row = uiLayoutRow(col, false); uiItemR(row, &tex_ptr, "noise_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiItemR(col, &tex_ptr, "noise_depth", UI_ITEM_R_EXPAND, IFACE_("Depth"), ICON_NONE); break; @@ -2833,7 +2833,7 @@ static void node_file_output_socket_draw(bContext *C, uiLayout *layout, PointerR PointerRNA inputptr, imfptr; int imtype; - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); imfptr = RNA_pointer_get(node_ptr, "format"); imtype = RNA_enum_get(&imfptr, "file_format"); @@ -3414,7 +3414,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) /* new connection */ if (!link->fromsock || !link->tosock) { th_col1 = TH_ACTIVE; - do_triple = TRUE; + do_triple = true; } else { /* going to give issues once... */ @@ -3435,8 +3435,8 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) if (link->tonode && link->tonode->flag & SELECT) th_col2 = TH_EDGE_SELECT; } - do_shaded = TRUE; - do_triple = TRUE; + do_shaded = true; + do_triple = true; } else { th_col1 = TH_REDALERT; diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index 428495542c2..02e6f9b69f3 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -82,7 +82,7 @@ bNode *node_add_node(const bContext *C, const char *idname, int type, float locx /* generics */ node->locx = locx; node->locy = locy + 60.0f; /* arbitrary... so its visible, (0,0) is top of node */ - nodeSetSelected(node, TRUE); + nodeSetSelected(node, true); node->locx = locx; node->locy = locy + 60.0f; diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index 035287c0411..ebff840dc9f 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -87,7 +87,7 @@ static void node_sockets_panel(const bContext *C, Panel *pa) for (sock = node->inputs.first; sock; sock = sock->next) { BLI_snprintf(name, sizeof(name), "%s:", sock->name); - split = uiLayoutSplit(layout, 0.35f, FALSE); + split = uiLayoutSplit(layout, 0.35f, false); uiItemL(split, name, ICON_NONE); uiTemplateNodeLink(split, ntree, node, sock); } @@ -107,20 +107,20 @@ static bool node_tree_find_active_socket(bNodeTree *ntree, bNodeSocket **r_sock, if (sock->flag & SELECT) { *r_sock = sock; *r_in_out = SOCK_IN; - return TRUE; + return true; } } for (sock = ntree->outputs.first; sock; sock = sock->next) { if (sock->flag & SELECT) { *r_sock = sock; *r_in_out = SOCK_OUT; - return TRUE; + return true; } } *r_sock = NULL; *r_in_out = 0; - return FALSE; + return false; } static void node_tree_interface_panel(const bContext *C, Panel *pa) @@ -140,31 +140,31 @@ static void node_tree_interface_panel(const bContext *C, Panel *pa) node_tree_find_active_socket(ntree, &sock, &in_out); RNA_pointer_create((ID *)ntree, &RNA_NodeSocketInterface, sock, &sockptr); - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); - split = uiLayoutRow(row, TRUE); - col = uiLayoutColumn(split, TRUE); + split = uiLayoutRow(row, true); + col = uiLayoutColumn(split, true); uiItemL(col, IFACE_("Inputs:"), ICON_NONE); uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "inputs", &ptr, "inputs", &ptr, "active_input", 0, 0, 0, 0); opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "in_out", SOCK_IN); - col = uiLayoutColumn(split, TRUE); + col = uiLayoutColumn(split, true); uiItemL(col, IFACE_("Outputs:"), ICON_NONE); uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "outputs", &ptr, "outputs", &ptr, "active_output", 0, 0, 0, 0); opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "in_out", SOCK_OUT); - col = uiLayoutColumn(row, TRUE); + col = uiLayoutColumn(row, true); opptr = uiItemFullO(col, "NODE_OT_tree_socket_move", "", ICON_TRIA_UP, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "direction", 1); opptr = uiItemFullO(col, "NODE_OT_tree_socket_move", "", ICON_TRIA_DOWN, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "direction", 2); if (sock) { - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &sockptr, "name", 0, NULL, ICON_NONE); uiItemO(row, "", ICON_X, "NODE_OT_tree_socket_remove"); diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 632bf1d3b14..f3d02c179ff 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -765,7 +765,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN nodeSynchronizeID(node, false); /* skip if out of view */ - if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == FALSE) { + if (BLI_rctf_isect(&node->totr, &ar->v2d.cur, NULL) == false) { uiEndBlock(C, node->block); node->block = NULL; return; @@ -1340,7 +1340,7 @@ void drawnodespace(const bContext *C, ARegion *ar) if (snode->flag & SNODE_SHOW_GPENCIL) { /* draw grease-pencil ('canvas' strokes) */ - draw_gpencil_view2d(C, TRUE); + draw_gpencil_view2d(C, true); } } else { @@ -1359,7 +1359,7 @@ void drawnodespace(const bContext *C, ARegion *ar) if (snode->treepath.last) { if (snode->flag & SNODE_SHOW_GPENCIL) { /* draw grease-pencil (screen strokes, and also paintbuffer) */ - draw_gpencil_view2d(C, FALSE); + draw_gpencil_view2d(C, false); } } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 3ca87f7cd00..ac0834cd635 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -176,8 +176,8 @@ static void compo_statsdrawjob(void *cjv, char *UNUSED(str)) { CompoJob *cj = cjv; - *(cj->do_update) = TRUE; - cj->need_sync = TRUE; + *(cj->do_update) = true; + cj->need_sync = true; } /* called by compo, wmJob sends notifier */ @@ -185,7 +185,7 @@ static void compo_redrawjob(void *cjv) { CompoJob *cj = cjv; - *(cj->do_update) = TRUE; + *(cj->do_update) = true; } static void compo_freejob(void *cjv) @@ -219,7 +219,7 @@ static void compo_updatejob(void *cjv) /* was used by old compositor system only */ ntreeLocalSync(cj->localtree, cj->ntree); - cj->need_sync = FALSE; + cj->need_sync = false; } WM_main_add_notifier(NC_SCENE | ND_COMPO_RESULT, NULL); @@ -240,7 +240,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update, float *prog bNodeTree *ntree = cj->localtree; Scene *scene = cj->scene; - if (scene->use_nodes == FALSE) + if (scene->use_nodes == false) return; cj->stop = stop; @@ -259,7 +259,7 @@ static void compo_startjob(void *cjv, short *stop, short *do_update, float *prog // XXX BIF_store_spare(); /* 1 is do_previews */ - ntreeCompositExecTree(cj->scene, ntree, &cj->scene->r, FALSE, TRUE, &scene->view_settings, &scene->display_settings); + ntreeCompositExecTree(cj->scene, ntree, &cj->scene->r, false, true, &scene->view_settings, &scene->display_settings); ntree->test_break = NULL; ntree->stats_draw = NULL; @@ -285,7 +285,7 @@ void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene } #ifdef USE_ESC_COMPO - G.is_break = FALSE; + G.is_break = false; #endif wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene_owner, "Compositing", @@ -619,7 +619,7 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node) if (node->type != NODE_GROUP) { const bool was_output = (node->flag & NODE_DO_OUTPUT) != 0; - int do_update = 0; + bool do_update = false; /* generic node group output: set node as active output */ if (node->type == NODE_GROUP_OUTPUT) { @@ -1205,9 +1205,9 @@ static int node_duplicate_exec(bContext *C, wmOperator *op) /* has been set during copy above */ newnode = node->new_node; - nodeSetSelected(node, FALSE); + nodeSetSelected(node, false); node->flag &= ~NODE_ACTIVE; - nodeSetSelected(newnode, TRUE); + nodeSetSelected(newnode, true); } /* make sure we don't copy new nodes again! */ @@ -1248,11 +1248,11 @@ bool ED_node_select_check(ListBase *lb) for (node = lb->first; node; node = node->next) { if (node->flag & NODE_SELECT) { - return TRUE; + return true; } } - return FALSE; + return false; } /* ******************************** */ @@ -2012,15 +2012,15 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op) } /* only warn */ - if (is_clipboard_valid == FALSE) { + if (is_clipboard_valid == false) { BKE_report(op->reports, RPT_WARNING, "Some nodes references could not be restored, will be left empty"); } /* make sure all clipboard nodes would be valid in the target tree */ - all_nodes_valid = TRUE; + all_nodes_valid = true; for (node = clipboard_nodes_lb->first; node; node = node->next) { if (!node->typeinfo->poll_instance(node, ntree)) { - all_nodes_valid = FALSE; + all_nodes_valid = false; BKE_reportf(op->reports, RPT_ERROR, "Cannot add node %s into node tree %s", node->name, ntree->id.name + 2); } } @@ -2048,7 +2048,7 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op) id_us_plus(node->id); /* pasted nodes are selected */ - nodeSetSelected(new_node, TRUE); + nodeSetSelected(new_node, true); } /* reparent copied nodes */ @@ -2317,10 +2317,10 @@ static int node_shader_script_update_poll(bContext *C) /* recursively check for script nodes in groups using this text and update */ static int node_shader_script_update_text_recursive(RenderEngine *engine, RenderEngineType *type, bNodeTree *ntree, Text *text) { - int found = FALSE; + int found = false; bNode *node; - ntree->done = TRUE; + ntree->done = true; /* update each script that is using this text datablock */ for (node = ntree->nodes.first; node; node = node->next) { @@ -2331,7 +2331,7 @@ static int node_shader_script_update_text_recursive(RenderEngine *engine, Render } else if (node->type == SH_NODE_SCRIPT && node->id == &text->id) { type->update_script_node(engine, ntree, node); - found = TRUE; + found = true; } } @@ -2348,7 +2348,7 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op) bNode *node = NULL; RenderEngine *engine; RenderEngineType *type; - int found = FALSE; + int found = false; /* setup render engine */ type = RE_engines_find(scene->r.engine); @@ -2369,7 +2369,7 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op) /* update single node */ type->update_script_node(engine, ntree, node); - found = TRUE; + found = true; } else { /* update all nodes using text datablock */ @@ -2379,7 +2379,7 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op) /* clear flags for recursion check */ FOREACH_NODETREE(bmain, ntree, id) { if (ntree->type == NTREE_SHADER) - ntree->done = FALSE; + ntree->done = false; } FOREACH_NODETREE_END FOREACH_NODETREE(bmain, ntree, id) { @@ -2514,5 +2514,5 @@ void NODE_OT_viewer_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index 20e6900a268..05348acfae7 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -179,7 +179,7 @@ void NODE_OT_group_edit(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "exit", FALSE, "Exit", ""); + RNA_def_boolean(ot->srna, "exit", false, "Exit", ""); } /* ******************** Ungroup operator ********************** */ @@ -203,7 +203,7 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode) * - ngroup (i.e. the source NodeTree) is left unscathed * - temp copy. don't change ID usercount */ - wgroup = ntreeCopyTree_ex(ngroup, FALSE); + wgroup = ntreeCopyTree_ex(ngroup, false); /* Add the nodes into the ntree */ for (node = wgroup->nodes.first; node; node = nextnode) { @@ -401,7 +401,7 @@ static int node_group_separate_selected(bNodeTree *ntree, bNodeTree *ngroup, flo /* deselect all nodes in the target tree */ for (node = ntree->nodes.first; node; node = node->next) - nodeSetSelected(node, FALSE); + nodeSetSelected(node, false); /* clear new pointers, set in nodeCopyNode */ for (node = ngroup->nodes.first; node; node = node->next) @@ -415,7 +415,7 @@ static int node_group_separate_selected(bNodeTree *ntree, bNodeTree *ngroup, flo /* ignore interface nodes */ if (ELEM(node->type, NODE_GROUP_INPUT, NODE_GROUP_OUTPUT)) { - nodeSetSelected(node, FALSE); + nodeSetSelected(node, false); continue; } @@ -684,7 +684,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, ListBase anim_basepaths = {NULL, NULL}; float min[2], max[2], center[2]; int totselect; - int expose_all = FALSE; + int expose_all = false; bNode *input_node, *output_node; /* XXX rough guess, not nice but we don't have access to UI constants here ... */ @@ -693,7 +693,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, /* deselect all nodes in the target tree */ for (node = ngroup->nodes.first; node; node = node->next) - nodeSetSelected(node, FALSE); + nodeSetSelected(node, false); totselect = node_get_selected_minmax(ntree, gnode, min, max); add_v2_v2v2(center, min, max); @@ -701,7 +701,7 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, /* auto-add interface for "solo" nodes */ if (totselect == 1) - expose_all = TRUE; + expose_all = true; /* move nodes over */ for (node = ntree->nodes.first; node; node = nextn) { @@ -831,10 +831,10 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, if (node_group_make_use_node(node, gnode)) { for (sock = node->inputs.first; sock; sock = sock->next) { bNodeSocket *iosock, *input_sock; - int skip = FALSE; + int skip = false; for (link = ngroup->links.first; link; link = link->next) { if (link->tosock == sock) { - skip = TRUE; + skip = true; break; } } @@ -852,10 +852,10 @@ static void node_group_make_insert_selected(const bContext *C, bNodeTree *ntree, for (sock = node->outputs.first; sock; sock = sock->next) { bNodeSocket *iosock, *output_sock; - int skip = FALSE; + int skip = false; for (link = ngroup->links.first; link; link = link->next) if (link->fromsock == sock) - skip = TRUE; + skip = true; if (skip) continue; diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index dcc72afa362..ac541ef6a28 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -143,7 +143,7 @@ void ED_operatormacros_node(void) "Move nodes and attach to frame", OPTYPE_UNDO | OPTYPE_REGISTER); mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_boolean_set(mot->ptr, "release_confirm", TRUE); + RNA_boolean_set(mot->ptr, "release_confirm", true); WM_operatortype_macro_define(ot, "NODE_OT_attach"); ot = WM_operatortype_append_macro("NODE_OT_detach_translate_attach", "Detach and Move", @@ -151,7 +151,7 @@ void ED_operatormacros_node(void) OPTYPE_UNDO | OPTYPE_REGISTER); WM_operatortype_macro_define(ot, "NODE_OT_detach"); mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); - RNA_boolean_set(mot->ptr, "release_confirm", TRUE); + RNA_boolean_set(mot->ptr, "release_confirm", true); WM_operatortype_macro_define(ot, "NODE_OT_attach"); ot = WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", @@ -165,7 +165,7 @@ void ED_operatormacros_node(void) "Duplicate selected nodes keeping input links and move them", OPTYPE_UNDO | OPTYPE_REGISTER); mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate"); - RNA_boolean_set(mot->ptr, "keep_inputs", TRUE); + RNA_boolean_set(mot->ptr, "keep_inputs", true); WM_operatortype_macro_define(ot, "NODE_OT_translate_attach"); ot = WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", "Move a node to detach links", @@ -222,24 +222,24 @@ void node_keymap(struct wmKeyConfig *keyconf) * NOTE 3: select op is registered for various combinations of modifier key, so the specialized * grab operators (unlink, attach, etc.) can work easily on single nodes. */ - node_select_keymap(keymap, FALSE); - node_select_keymap(keymap, TRUE); + node_select_keymap(keymap, false); + node_select_keymap(keymap, true); kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0); - RNA_boolean_set(kmi->ptr, "tweak", TRUE); + RNA_boolean_set(kmi->ptr, "tweak", true); kmi = WM_keymap_add_item(keymap, "NODE_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "NODE_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); WM_keymap_add_item(keymap, "NODE_OT_select_circle", CKEY, KM_PRESS, 0, 0); /* each of these falls through if not handled... */ kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "detach", FALSE); + RNA_boolean_set(kmi->ptr, "detach", false); kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "detach", TRUE); + RNA_boolean_set(kmi->ptr, "detach", true); WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0); @@ -256,9 +256,9 @@ void node_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NODE_OT_backimage_sample", ACTIONMOUSE, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "replace", FALSE); + RNA_boolean_set(kmi->ptr, "replace", false); kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "replace", TRUE); + RNA_boolean_set(kmi->ptr, "replace", true); WM_keymap_add_menu(keymap, "NODE_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "NODE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0); @@ -279,7 +279,7 @@ void node_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NODE_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "tweak", FALSE); + RNA_boolean_set(kmi->ptr, "tweak", false); WM_keymap_add_item(keymap, "NODE_OT_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "NODE_OT_delete", DELKEY, KM_PRESS, 0, 0); @@ -295,9 +295,9 @@ void node_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NODE_OT_select_same_type", GKEY, KM_PRESS, KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", RIGHTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "prev", FALSE); + RNA_boolean_set(kmi->ptr, "prev", false); kmi = WM_keymap_add_item(keymap, "NODE_OT_select_same_type_step", LEFTBRACKETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "prev", TRUE); + RNA_boolean_set(kmi->ptr, "prev", true); WM_keymap_add_item(keymap, "NODE_OT_find_node", FKEY, KM_PRESS, KM_CTRL, 0); @@ -306,9 +306,9 @@ void node_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NODE_OT_group_ungroup", GKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "NODE_OT_group_separate", PKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "exit", FALSE); + RNA_boolean_set(kmi->ptr, "exit", false); kmi = WM_keymap_add_item(keymap, "NODE_OT_group_edit", TABKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "exit", TRUE); + RNA_boolean_set(kmi->ptr, "exit", true); WM_keymap_add_item(keymap, "NODE_OT_read_renderlayers", RKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "NODE_OT_read_fullsamplelayers", RKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c index 3e1e605682f..7d9bf4b67f2 100644 --- a/source/blender/editors/space_node/node_relationships.c +++ b/source/blender/editors/space_node/node_relationships.c @@ -691,7 +691,7 @@ void NODE_OT_link(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; - RNA_def_boolean(ot->srna, "detach", FALSE, "Detach", "Detach and redirect existing links"); + RNA_def_boolean(ot->srna, "detach", false, "Detach", "Detach and redirect existing links"); } /* ********************** Make Link operator ***************** */ @@ -770,7 +770,7 @@ static int cut_links_exec(bContext *C, wmOperator *op) RNA_END; if (i > 1) { - int found = FALSE; + int found = false; bNodeLink *link, *next; ED_preview_kill_jobs(C); @@ -782,9 +782,9 @@ static int cut_links_exec(bContext *C, wmOperator *op) if (cut_links_intersect(link, mcoords, i)) { - if (found == FALSE) { + if (found == false) { ED_preview_kill_jobs(C); - found = TRUE; + found = true; } snode_update(snode, link->tonode); @@ -1057,7 +1057,7 @@ static int node_attach_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent if (node->flag & NODE_SELECT) { if (node->parent == NULL) { /* disallow moving a parent into its child */ - if (nodeAttachNodeCheck(frame, node) == FALSE) { + if (nodeAttachNodeCheck(frame, node) == false) { /* attach all unparented nodes */ nodeAttachNode(node, frame); } @@ -1072,7 +1072,7 @@ static int node_attach_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent if (parent) { /* disallow moving a parent into its child */ - if (nodeAttachNodeCheck(frame, node) == FALSE) { + if (nodeAttachNodeCheck(frame, node) == false) { nodeDetachNode(node); nodeAttachNode(node, frame); } diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 89f07950fe9..d9e1f4fa611 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -141,7 +141,7 @@ void node_deselect_all(SpaceNode *snode) bNode *node; for (node = snode->edittree->nodes.first; node; node = node->next) - nodeSetSelected(node, FALSE); + nodeSetSelected(node, false); } void node_deselect_all_input_sockets(SpaceNode *snode, const bool deselect_nodes) @@ -227,12 +227,12 @@ int node_select_same_type(SpaceNode *snode) if (p->type != nac->type && p->flag & SELECT) { /* if it's selected but different type, unselect */ redraw = 1; - nodeSetSelected(p, FALSE); + nodeSetSelected(p, false); } else if (p->type == nac->type && (!(p->flag & SELECT))) { /* if it's the same type and is not selected, select! */ redraw = 1; - nodeSetSelected(p, TRUE); + nodeSetSelected(p, true); } } return(redraw); @@ -274,8 +274,8 @@ int node_select_same_type_np(SpaceNode *snode, int dir) if (p) { for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next) if (tnode != p) - nodeSetSelected(tnode, FALSE); - nodeSetSelected(p, TRUE); + nodeSetSelected(tnode, false); + nodeSetSelected(p, true); return(1); } return(0); @@ -289,8 +289,8 @@ void node_select_single(bContext *C, bNode *node) for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next) if (tnode != node) - nodeSetSelected(tnode, FALSE); - nodeSetSelected(node, TRUE); + nodeSetSelected(tnode, false); + nodeSetSelected(node, true); ED_node_set_active(bmain, snode->edittree, node); ED_node_set_active_viewer_key(snode); @@ -365,7 +365,7 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next) { nodeSetSelected(tnode, false); } - nodeSetSelected(node, TRUE); + nodeSetSelected(node, true); ED_node_set_active(bmain, snode->edittree, node); selected = 1; } @@ -460,7 +460,7 @@ static int node_borderselect_exec(bContext *C, wmOperator *op) nodeSetSelected(node, (gesture_mode == GESTURE_MODAL_SELECT)); } else if (!extend) { - nodeSetSelected(node, FALSE); + nodeSetSelected(node, false); } } @@ -510,7 +510,7 @@ void NODE_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); RNA_def_boolean(ot->srna, "tweak", 0, "Tweak", "Only activate when mouse is not over a node - useful for tweak gesture"); } @@ -672,10 +672,10 @@ static int node_select_all_exec(bContext *C, wmOperator *op) for (node = node_lb->first; node; node = node->next) { switch (action) { case SEL_SELECT: - nodeSetSelected(node, TRUE); + nodeSetSelected(node, true); break; case SEL_DESELECT: - nodeSetSelected(node, FALSE); + nodeSetSelected(node, false); break; case SEL_INVERT: nodeSetSelected(node, !(node->flag & SELECT)); @@ -726,7 +726,7 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op)) for (node = snode->edittree->nodes.first; node; node = node->next) { if (node->flag & NODE_TEST) - nodeSetSelected(node, TRUE); + nodeSetSelected(node, true); } ED_node_sort(snode->edittree); @@ -770,7 +770,7 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op)) for (node = snode->edittree->nodes.first; node; node = node->next) { if (node->flag & NODE_TEST) - nodeSetSelected(node, TRUE); + nodeSetSelected(node, true); } ED_node_sort(snode->edittree); @@ -985,7 +985,7 @@ static uiBlock *node_find_menu(bContext *C, ARegion *ar, void *arg_op) event.type = EVT_BUT_OPEN; event.val = KM_PRESS; event.customdata = but; - event.customdatafree = FALSE; + event.customdatafree = false; wm_event_add(win, &event); return block; diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index c75c16e61c5..44639b1295c 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -512,7 +512,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_ bNodeTreeType *ntreetype = arg->ntree->typeinfo; uiBlockSetCurLayout(block, layout); - split = uiLayoutSplit(layout, 0.0f, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); arg->bmain = bmain; arg->scene = scene; @@ -521,7 +521,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_ if (ntreetype && ntreetype->foreach_nodeclass) ntreetype->foreach_nodeclass(scene, arg, node_menu_column_foreach_cb); - column = uiLayoutColumn(split, FALSE); + column = uiLayoutColumn(split, false); uiBlockSetCurLayout(block, column); if (sock->link) { @@ -588,9 +588,9 @@ static void ui_node_draw_node(uiLayout *layout, bContext *C, bNodeTree *ntree, b if (node->typeinfo->draw_buttons) { if (node->type != NODE_GROUP) { - split = uiLayoutSplit(layout, 0.35f, FALSE); - col = uiLayoutColumn(split, FALSE); - col = uiLayoutColumn(split, FALSE); + split = uiLayoutSplit(layout, 0.35f, false); + col = uiLayoutColumn(split, false); + col = uiLayoutColumn(split, false); node->typeinfo->draw_buttons(col, C, &nodeptr); } @@ -632,9 +632,9 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree, BLI_snprintf(label, UI_MAX_NAME_STR, "%s%s:", label, IFACE_(input->name)); /* split in label and value */ - split = uiLayoutSplit(layout, 0.35f, FALSE); + split = uiLayoutSplit(layout, 0.35f, false); - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); if (depth > 0) { uiBlockSetEmboss(block, UI_EMBOSSN); @@ -657,7 +657,7 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree, bt->drawflag = UI_BUT_TEXT_LEFT; if (dependency_loop) { - row = uiLayoutRow(split, FALSE); + row = uiLayoutRow(split, false); uiItemL(row, IFACE_("Dependency Loop"), ICON_ERROR); } else if (lnode) { @@ -680,22 +680,22 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree, case SOCK_BOOLEAN: case SOCK_RGBA: case SOCK_STRING: - row = uiLayoutRow(split, TRUE); + row = uiLayoutRow(split, true); uiItemR(row, &inputptr, "default_value", 0, "", ICON_NONE); break; case SOCK_VECTOR: - row = uiLayoutRow(split, FALSE); - col = uiLayoutColumn(row, FALSE); + row = uiLayoutRow(split, false); + col = uiLayoutColumn(row, false); uiItemR(col, &inputptr, "default_value", 0, "", ICON_NONE); break; default: - row = uiLayoutRow(split, FALSE); + row = uiLayoutRow(split, false); break; } } else - row = uiLayoutRow(split, FALSE); + row = uiLayoutRow(split, false); uiTemplateNodeLink(row, ntree, node, input); } diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c index a8ab96067d5..90b9c2071de 100644 --- a/source/blender/editors/space_node/node_view.c +++ b/source/blender/editors/space_node/node_view.c @@ -88,7 +88,7 @@ int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar, tot++; if (node->type == NODE_FRAME) { - has_frame = TRUE; + has_frame = true; } } } @@ -102,7 +102,7 @@ int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar, /* for single non-frame nodes, don't zoom in, just pan view, * but do allow zooming out, this allows for big nodes to be zoomed out */ if ((tot == 1) && - (has_frame == FALSE) && + (has_frame == false) && ((oldwidth * oldheight) > (width * height))) { /* center, don't zoom */ @@ -411,7 +411,7 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info) ImageSampleInfo *info = arg_info; if (info->draw) { - ED_image_draw_info(scene, ar, info->color_manage, FALSE, info->channels, + ED_image_draw_info(scene, ar, info->color_manage, false, info->channels, info->x, info->y, info->col, info->colf, info->linearcol, info->zp, info->zfp); } @@ -425,19 +425,19 @@ bool ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], floa Image *ima; ImBuf *ibuf; float fx, fy, bufx, bufy; - int ret = FALSE; + int ret = false; if (STREQ(snode->tree_idname, ntreeType_Composite->idname) || (snode->flag & SNODE_BACKDRAW) == 0) { /* use viewer image for color sampling only if we're in compositor tree * with backdrop enabled */ - return FALSE; + return false; } ima = BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node"); ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock); if (!ibuf) { - return FALSE; + return false; } /* map the mouse coords to the backdrop image space */ @@ -458,12 +458,12 @@ bool ED_space_node_color_sample(SpaceNode *snode, ARegion *ar, int mval[2], floa fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); /* IB_PROFILE_NONE is default but infact its linear */ linearrgb_to_srgb_v3_v3(r_col, fp); - ret = TRUE; + ret = true; } else if (ibuf->rect) { cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); rgb_uchar_to_float(r_col, cp); - ret = TRUE; + ret = true; } } @@ -531,7 +531,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event) copy_v4_v4(info->linearcol, info->colf); IMB_colormanagement_colorspace_to_scene_linear_v4(info->linearcol, false, ibuf->rect_colorspace); - info->color_manage = TRUE; + info->color_manage = true; } if (ibuf->rect_float) { fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); @@ -541,7 +541,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event) info->colf[2] = fp[2]; info->colf[3] = fp[3]; - info->color_manage = TRUE; + info->color_manage = true; } if (ibuf->zbuf) { diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index f7520d12bf6..e9531ea0020 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -828,7 +828,7 @@ void ED_spacetype_node(void) art->draw = node_main_area_draw; art->listener = node_region_listener; art->cursor = node_cursor; - art->event_cursor = TRUE; + art->event_cursor = true; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_GPENCIL; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 91b8554a789..117730cdb9e 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1657,7 +1657,7 @@ static int outliner_parenting_poll(bContext *C) return ELEM4(soops->outlinevis, SO_ALL_SCENES, SO_CUR_SCENE, SO_VISIBLE, SO_GROUPS); } - return FALSE; + return false; } static int parent_clear_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) diff --git a/source/blender/editors/space_outliner/outliner_ops.c b/source/blender/editors/space_outliner/outliner_ops.c index b9e3942a7ce..d735b5e75cf 100644 --- a/source/blender/editors/space_outliner/outliner_ops.c +++ b/source/blender/editors/space_outliner/outliner_ops.c @@ -88,28 +88,28 @@ void outliner_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_DBL_CLICK, 0, 0); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, 0, 0); - RNA_boolean_set(kmi->ptr, "recursive", FALSE); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "recursive", false); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "recursive", FALSE); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "recursive", false); + RNA_boolean_set(kmi->ptr, "extend", true); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "recursive", TRUE); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "recursive", true); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_activate", LEFTMOUSE, KM_CLICK, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "recursive", TRUE); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "recursive", true); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_add_item(keymap, "OUTLINER_OT_select_border", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "all", FALSE); + RNA_boolean_set(kmi->ptr, "all", false); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_item_openclose", RETKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "all", TRUE); + RNA_boolean_set(kmi->ptr, "all", true); WM_keymap_add_item(keymap, "OUTLINER_OT_item_rename", LEFTMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "OUTLINER_OT_operation", RIGHTMOUSE, KM_PRESS, 0, 0); @@ -121,11 +121,11 @@ void outliner_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "OUTLINER_OT_scroll_page", PAGEDOWNKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_scroll_page", PAGEUPKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "up", TRUE); + RNA_boolean_set(kmi->ptr, "up", true); WM_keymap_add_item(keymap, "OUTLINER_OT_show_one_level", PADPLUSKEY, KM_PRESS, 0, 0); /* open */ kmi = WM_keymap_add_item(keymap, "OUTLINER_OT_show_one_level", PADMINUS, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "open", FALSE); /* close */ + RNA_boolean_set(kmi->ptr, "open", false); /* close */ WM_keymap_verify_item(keymap, "OUTLINER_OT_selected_toggle", AKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "OUTLINER_OT_expanded_toggle", AKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index d5b46655b82..9fa17cd1120 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -618,19 +618,19 @@ static eOLDrawState tree_element_active_ebone( if (set == OL_SETSEL_NORMAL) { if (!(ebone->flag & BONE_HIDDEN_A)) { ED_armature_deselect_all(scene->obedit, 0); // deselect - tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE); + tree_element_active_ebone__sel(C, scene, arm, ebone, true); status = OL_DRAWSEL_NORMAL; } } else if (set == OL_SETSEL_EXTEND) { if (!(ebone->flag & BONE_HIDDEN_A)) { if (!(ebone->flag & BONE_SELECTED)) { - tree_element_active_ebone__sel(C, scene, arm, ebone, TRUE); + tree_element_active_ebone__sel(C, scene, arm, ebone, true); status = OL_DRAWSEL_NORMAL; } else { /* entirely selected, so de-select */ - tree_element_active_ebone__sel(C, scene, arm, ebone, FALSE); + tree_element_active_ebone__sel(C, scene, arm, ebone, false); status = OL_DRAWSEL_NONE; } } @@ -1117,7 +1117,7 @@ void OUTLINER_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border(ot, FALSE); + WM_operator_properties_gesture_border(ot, false); } /* ****************************************************** */ diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index cdc7178e767..9f31bbb3320 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -419,7 +419,7 @@ static void group_instance_cb(bContext *C, Scene *scene, TreeElement *UNUSED(te) { Group *group = (Group *)tselem->id; - Object *ob = ED_object_add_type(C, OB_EMPTY, scene->cursor, NULL, FALSE, scene->layact); + Object *ob = ED_object_add_type(C, OB_EMPTY, scene->cursor, NULL, false, scene->layact); rename_id(&ob->id, group->id.name + 2); ob->dup_group = group; ob->transflag |= OB_DUPLIGROUP; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 0c8c7a2e12f..721eb626cdf 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1402,7 +1402,7 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb) TreeElement *te, *ten; TreeStoreElem *tselem; - /* although we don't have any search string, we return TRUE + /* although we don't have any search string, we return true * since the entire tree is ok then... */ if (soops->search_string[0] == 0) diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 1f7415a3a56..eede11cb51c 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -146,7 +146,7 @@ static int outliner_parent_clear_poll(bContext *C, wmDrag *drag, const wmEvent * UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]); if (!ELEM4(soops->outlinevis, SO_ALL_SCENES, SO_CUR_SCENE, SO_VISIBLE, SO_GROUPS)) { - return FALSE; + return false; } if (drag->type == WM_DRAG_ID) { diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index d6b5bb3e534..c266563cd6f 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -284,7 +284,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) seq->flag |= SELECT; } - if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { + if (RNA_boolean_get(op->ptr, "overlap") == false) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } @@ -378,7 +378,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) seq->flag |= SELECT; } - if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { + if (RNA_boolean_get(op->ptr, "overlap") == false) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } @@ -470,7 +470,7 @@ static int sequencer_add_mask_strip_exec(bContext *C, wmOperator *op) seq->flag |= SELECT; } - if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { + if (RNA_boolean_get(op->ptr, "overlap") == false) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } @@ -523,7 +523,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad SeqLoadInfo seq_load; Sequence *seq; int tot_files; - const short overlap = RNA_boolean_get(op->ptr, "overlap"); + const bool overlap = RNA_boolean_get(op->ptr, "overlap"); seq_load_operator_info(&seq_load, op); @@ -552,7 +552,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad seq = seq_load_func(C, ed->seqbasep, &seq_load); if (seq) { - if (overlap == FALSE) { + if (overlap == false) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } @@ -564,7 +564,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad /* single file */ seq = seq_load_func(C, ed->seqbasep, &seq_load); if (seq) { - if (overlap == FALSE) { + if (overlap == false) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } @@ -630,7 +630,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); - RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie"); + RNA_def_boolean(ot->srna, "sound", true, "Sound", "Load sound with the movie"); } /* add sound operator */ @@ -679,7 +679,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); - RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory"); + RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory"); } /* add image operator */ @@ -736,7 +736,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) /* last active name */ BLI_strncpy(ed->act_imagedir, strip->dir, sizeof(ed->act_imagedir)); - if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { + if (RNA_boolean_get(op->ptr, "overlap") == false) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } @@ -867,7 +867,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) } } - if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { + if (RNA_boolean_get(op->ptr, "overlap") == false) { if (BKE_sequence_test_overlap(ed->seqbasep, seq)) BKE_sequence_base_shuffle(ed->seqbasep, seq, scene); } diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index ddade51e5ad..952be939025 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -493,7 +493,7 @@ int ED_space_sequencer_maskedit_poll(bContext *C) return ED_space_sequencer_check_show_maskedit(sseq, scene); } - return FALSE; + return false; } /* are we displaying the seq output (not channels or histogram)*/ @@ -1246,7 +1246,7 @@ static int sequencer_mute_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); Sequence *seq; - int selected; + bool selected; selected = !RNA_boolean_get(op->ptr, "unselected"); @@ -1297,7 +1297,7 @@ static int sequencer_unmute_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); Editing *ed = BKE_sequencer_editing_get(scene, false); Sequence *seq; - int selected; + bool selected; selected = !RNA_boolean_get(op->ptr, "unselected"); @@ -2572,8 +2572,8 @@ void SEQUENCER_OT_strip_jump(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "next", TRUE, "Next Strip", ""); - RNA_def_boolean(ot->srna, "center", TRUE, "Use strip center", ""); + RNA_def_boolean(ot->srna, "next", true, "Next Strip", ""); + RNA_def_boolean(ot->srna, "center", true, "Use strip center", ""); } static void swap_sequence(Scene *scene, Sequence *seqa, Sequence *seqb) @@ -3009,7 +3009,7 @@ void SEQUENCER_OT_view_ghost_border(wmOperatorType *ot) ot->flag = 0; /* rna */ - WM_operator_properties_gesture_border(ot, FALSE); + WM_operator_properties_gesture_border(ot, false); } /* rebuild_proxy operator */ @@ -3245,10 +3245,10 @@ static int sequencer_change_path_invoke(bContext *C, wmOperator *op, const wmEve /* set default display depending on seq type */ if (seq->type == SEQ_TYPE_IMAGE) { - RNA_boolean_set(op->ptr, "filter_movie", FALSE); + RNA_boolean_set(op->ptr, "filter_movie", false); } else { - RNA_boolean_set(op->ptr, "filter_image", FALSE); + RNA_boolean_set(op->ptr, "filter_image", false); } WM_event_add_fileselect(C, op); diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c index d3057645972..ff40bf1e638 100644 --- a/source/blender/editors/space_sequencer/sequencer_modifier.c +++ b/source/blender/editors/space_sequencer/sequencer_modifier.c @@ -74,7 +74,7 @@ static int strip_modifier_active_poll(bContext *C) return BKE_sequence_supports_modifiers(seq); } - return FALSE; + return false; } static int strip_modifier_add_exec(bContext *C, wmOperator *op) diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 184e686678a..f022e78a0ad 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -160,14 +160,14 @@ void sequencer_keymap(wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "type", SEQ_CUT_HARD); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0); @@ -176,7 +176,7 @@ void sequencer_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "adjust_length", TRUE); + RNA_boolean_set(kmi->ptr, "adjust_length", true); WM_keymap_add_item(keymap, "SEQUENCER_OT_offset_clear", OKEY, KM_PRESS, KM_ALT, 0); @@ -204,25 +204,25 @@ void sequencer_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SEQUENCER_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEUPKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "next", TRUE); - RNA_boolean_set(kmi->ptr, "center", FALSE); + RNA_boolean_set(kmi->ptr, "next", true); + RNA_boolean_set(kmi->ptr, "center", false); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEDOWNKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "next", FALSE); - RNA_boolean_set(kmi->ptr, "center", FALSE); + RNA_boolean_set(kmi->ptr, "next", false); + RNA_boolean_set(kmi->ptr, "center", false); /* alt for center */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEUPKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "next", TRUE); - RNA_boolean_set(kmi->ptr, "center", TRUE); + RNA_boolean_set(kmi->ptr, "next", true); + RNA_boolean_set(kmi->ptr, "center", true); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_strip_jump", PAGEDOWNKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "next", FALSE); - RNA_boolean_set(kmi->ptr, "center", TRUE); + RNA_boolean_set(kmi->ptr, "next", false); + RNA_boolean_set(kmi->ptr, "center", true); RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", LEFTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_LEFT); RNA_enum_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_swap", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0)->ptr, "side", SEQ_SIDE_RIGHT); - RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "all", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "all", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, 0, 0)->ptr, "all", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_remove", BACKSPACEKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "all", true); WM_keymap_add_item(keymap, "SEQUENCER_OT_gap_insert", EQUALKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_snap", SKEY, KM_PRESS, KM_SHIFT, 0); @@ -242,76 +242,76 @@ void sequencer_keymap(wmKeyConfig *keyconf) /* Mouse selection, a bit verbose :/ */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "linked_handle", false); + RNA_boolean_set(kmi->ptr, "left_right", false); + RNA_boolean_set(kmi->ptr, "linked_time", false); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "linked_handle", false); + RNA_boolean_set(kmi->ptr, "left_right", false); + RNA_boolean_set(kmi->ptr, "linked_time", false); /* 2.4x method, now use Alt for handles and select the side based on which handle was selected */ #if 0 kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "linked_left", TRUE); + RNA_boolean_set(kmi->ptr, "linked_left", true); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "linked_right", TRUE); + RNA_boolean_set(kmi->ptr, "linked_right", true); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "linked_left", TRUE); - RNA_boolean_set(kmi->ptr, "linked_right", TRUE); + RNA_boolean_set(kmi->ptr, "linked_left", true); + RNA_boolean_set(kmi->ptr, "linked_right", true); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_left", TRUE); - RNA_boolean_set(kmi->ptr, "linked_right", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "linked_left", true); + RNA_boolean_set(kmi->ptr, "linked_right", true); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_left", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "linked_left", true); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_right", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "linked_right", true); #endif /* 2.5 method, Alt and use selected handle */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "linked_handle", true); + RNA_boolean_set(kmi->ptr, "left_right", false); + RNA_boolean_set(kmi->ptr, "linked_time", false); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "linked_handle", true); + RNA_boolean_set(kmi->ptr, "left_right", false); + RNA_boolean_set(kmi->ptr, "linked_time", false); /* match action editor */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", TRUE); /* grr, these conflict - only use left_right if not over an active seq */ - RNA_boolean_set(kmi->ptr, "linked_time", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "linked_handle", false); + RNA_boolean_set(kmi->ptr, "left_right", true); /* grr, these conflict - only use left_right if not over an active seq */ + RNA_boolean_set(kmi->ptr, "linked_time", true); /* adjusted since 2.4 */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "linked_handle", false); + RNA_boolean_set(kmi->ptr, "left_right", false); + RNA_boolean_set(kmi->ptr, "linked_time", true); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "extend", true); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index cc97f7108ce..9edf8433fca 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -723,11 +723,11 @@ void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot) static int sequencer_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene = CTX_data_scene(C); - int selected; + bool selected; - selected = 1; + selected = true; while (selected) { - selected = select_more_less_seq__internal(scene, 1, 1); + selected = select_more_less_seq__internal(scene, true, true); } WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); @@ -907,7 +907,7 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } /* ****** Selected Grouped ****** */ @@ -1105,7 +1105,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq) } SEQ_END; - actseq->tmp = SET_INT_IN_POINTER(TRUE); + actseq->tmp = SET_INT_IN_POINTER(true); for (BKE_sequence_iterator_begin(ed, &iter, true); iter.valid; BKE_sequence_iterator_next(&iter)) { seq = iter.seq; @@ -1129,7 +1129,7 @@ static bool select_grouped_effect_link(Editing *ed, Sequence *actseq) if (enddisp < seq->enddisp) enddisp = seq->enddisp; if (machine < seq->machine) machine = seq->machine; - seq->tmp = SET_INT_IN_POINTER(TRUE); + seq->tmp = SET_INT_IN_POINTER(true); seq->flag |= SELECT; changed = true; @@ -1210,7 +1210,7 @@ void SEQUENCER_OT_select_grouped(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); + RNA_def_boolean(ot->srna, "extend", false, "Extend", "Extend selection instead of deselecting everything first"); ot->prop = RNA_def_enum(ot->srna, "type", sequencer_prop_select_grouped_types, 0, "Type", ""); } diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index 74fd22b4226..cad25663609 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -82,7 +82,7 @@ static void sample_draw(const bContext *C, ARegion *ar, void *arg_info) ImageSampleInfo *info = arg_info; if (info->draw) { - ED_image_draw_info(scene, ar, info->color_manage, FALSE, info->channels, + ED_image_draw_info(scene, ar, info->color_manage, false, info->channels, info->x, info->y, info->colp, info->colfp, info->linearcol, NULL, NULL); } @@ -140,7 +140,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event) copy_v4_v4(info->linearcol, info->colf); IMB_colormanagement_colorspace_to_scene_linear_v4(info->linearcol, false, ibuf->rect_colorspace); - info->color_manage = TRUE; + info->color_manage = true; } if (ibuf->rect_float) { fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); @@ -155,7 +155,7 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event) copy_v4_v4(info->linearcol, info->colf); BKE_sequencer_pixel_from_sequencer_space_v4(scene, info->linearcol); - info->color_manage = TRUE; + info->color_manage = true; } } else { diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 03d74d1952f..f24d853369c 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -458,17 +458,17 @@ static int sequencer_context(const bContext *C, const char *member, bContextData if (CTX_data_dir(member)) { CTX_data_dir_set(result, sequencer_context_dir); - return TRUE; + return true; } else if (CTX_data_equals(member, "edit_mask")) { Mask *mask = BKE_sequencer_mask_get(scene); if (mask) { CTX_data_id_pointer_set(result, &mask->id); } - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index 875496d5edf..6e49569314f 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -275,19 +275,19 @@ static void text_keymap(struct wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", FALSE); + RNA_boolean_set(kmi->ptr, "reverse", false); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", TRUE); + RNA_boolean_set(kmi->ptr, "reverse", true); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", FALSE); + RNA_boolean_set(kmi->ptr, "reverse", false); kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", PADMINUS, KM_PRESS, KM_CTRL, 0); RNA_string_set(kmi->ptr, "data_path", "space_data.font_size"); - RNA_boolean_set(kmi->ptr, "reverse", TRUE); + RNA_boolean_set(kmi->ptr, "reverse", true); WM_keymap_add_item(keymap, "TEXT_OT_new", NKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "TEXT_OT_open", OKEY, KM_PRESS, KM_ALT, 0); @@ -309,7 +309,7 @@ static void text_keymap(struct wmKeyConfig *keyconf) if (U.uiflag & USER_MMB_PASTE) { // XXX not dynamic kmi = WM_keymap_add_item(keymap, "TEXT_OT_paste", MIDDLEMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "selection", TRUE); + RNA_boolean_set(kmi->ptr, "selection", true); } WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_CTRL, 0); @@ -368,7 +368,7 @@ static void text_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "TEXT_OT_selection_set", EVT_TWEAK_L, KM_ANY, 0, 0); WM_keymap_add_item(keymap, "TEXT_OT_cursor_set", LEFTMOUSE, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "TEXT_OT_selection_set", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "select", TRUE); + RNA_boolean_set(kmi->ptr, "select", true); RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELUPMOUSE, KM_PRESS, 0, 0)->ptr, "lines", -1); RNA_int_set(WM_keymap_add_item(keymap, "TEXT_OT_scroll", WHEELDOWNMOUSE, KM_PRESS, 0, 0)->ptr, "lines", 1); @@ -572,7 +572,7 @@ void ED_spacetype_text(void) art->init = text_main_area_init; art->draw = text_main_area_draw; art->cursor = text_cursor; - art->event_cursor = TRUE; + art->event_cursor = true; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_text/text_autocomplete.c b/source/blender/editors/space_text/text_autocomplete.c index 692cefd3ee9..d3b494631bb 100644 --- a/source/blender/editors/space_text/text_autocomplete.c +++ b/source/blender/editors/space_text/text_autocomplete.c @@ -280,7 +280,7 @@ static int text_autocomplete_invoke(bContext *C, wmOperator *op, const wmEvent * SpaceText *st = CTX_wm_space_text(C); Text *text = CTX_data_edit_text(C); - st->doplugins = TRUE; + st->doplugins = true; op->customdata = text_autocomplete_build(text); if (texttool_suggest_first()) { @@ -524,7 +524,7 @@ static void text_autocomplete_free(bContext *C, wmOperator *op) /* other stuff */ { SpaceText *st = CTX_wm_space_text(C); - st->doplugins = FALSE; + st->doplugins = false; texttool_text_clear(); } } diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index f25e09a905d..6a98fd802f9 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1340,7 +1340,7 @@ void draw_text_main(SpaceText *st, ARegion *ar) lineno = 0; for (i = 0; i < st->top && tmp; i++) { if (st->showsyntax && !tmp->format) - tft->format_line(st, tmp, 0); + tft->format_line(st, tmp, false); if (st->wordwrap) { int lines = text_get_visible_lines_no(st, lineno); @@ -1389,7 +1389,7 @@ void draw_text_main(SpaceText *st, ARegion *ar) for (i = 0; y > 0 && i < st->viewlines && tmp; i++, tmp = tmp->next) { if (st->showsyntax && !tmp->format) - tft->format_line(st, tmp, 0); + tft->format_line(st, tmp, false); if (st->showlinenrs && !wrap_skip) { /* draw line number */ diff --git a/source/blender/editors/space_text/text_format.h b/source/blender/editors/space_text/text_format.h index 808311cbb62..daed3b3e447 100644 --- a/source/blender/editors/space_text/text_format.h +++ b/source/blender/editors/space_text/text_format.h @@ -77,7 +77,7 @@ typedef struct TextFormatType { * * See: FMT_TYPE_ enums below */ - void (*format_line)(SpaceText *st, TextLine *line, int do_next); + void (*format_line)(SpaceText *st, TextLine *line, const bool do_next); const char **ext; /* NULL terminated extensions */ } TextFormatType; diff --git a/source/blender/editors/space_text/text_format_lua.c b/source/blender/editors/space_text/text_format_lua.c index d9d2a9213a3..1e842729ab3 100644 --- a/source/blender/editors/space_text/text_format_lua.c +++ b/source/blender/editors/space_text/text_format_lua.c @@ -150,7 +150,7 @@ static char txtfmt_lua_format_identifier(const char *str) return fmt; } -static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const int do_next) +static void txtfmt_lua_format_line(SpaceText *st, TextLine *line, const bool do_next) { FlattenString fs; const char *str; diff --git a/source/blender/editors/space_text/text_format_osl.c b/source/blender/editors/space_text/text_format_osl.c index 2e863f2a569..97dc1be3b9a 100644 --- a/source/blender/editors/space_text/text_format_osl.c +++ b/source/blender/editors/space_text/text_format_osl.c @@ -174,7 +174,7 @@ static char txtfmt_osl_format_identifier(const char *str) return fmt; } -static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const int do_next) +static void txtfmt_osl_format_line(SpaceText *st, TextLine *line, const bool do_next) { FlattenString fs; const char *str; diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c index 50425e258e3..2f6962f0493 100644 --- a/source/blender/editors/space_text/text_format_py.c +++ b/source/blender/editors/space_text/text_format_py.c @@ -157,7 +157,7 @@ static char txtfmt_py_format_identifier(const char *str) return fmt; } -static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const int do_next) +static void txtfmt_py_format_line(SpaceText *st, TextLine *line, const bool do_next) { FlattenString fs; const char *str; diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 43776f28c62..b45838e0bac 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -1571,7 +1571,7 @@ static int cursor_skip_find_line(SpaceText *st, ARegion *ar, return 1; } -static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel) +static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, const bool sel) { Text *text = st->text; TextLine **linep; @@ -1643,7 +1643,7 @@ static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel) if (!sel) txt_pop_sel(text); } -static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel) +static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, const bool sel) { Text *text = st->text; TextLine **linep; @@ -1713,7 +1713,7 @@ static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel) if (!sel) txt_pop_sel(text); } -static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel) +static void txt_wrap_move_up(SpaceText *st, ARegion *ar, const bool sel) { Text *text = st->text; TextLine **linep; @@ -1746,7 +1746,7 @@ static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel) if (!sel) txt_pop_sel(text); } -static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel) +static void txt_wrap_move_down(SpaceText *st, ARegion *ar, const bool sel) { Text *text = st->text; TextLine **linep; @@ -1783,7 +1783,7 @@ static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel) * * This is to replace screen_skip for PageUp/Down operations. */ -static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, int sel) +static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, const bool sel) { TextLine **linep; int *charp; @@ -1814,7 +1814,7 @@ static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, int s if (!sel) txt_pop_sel(text); } -static int text_move_cursor(bContext *C, int type, int select) +static int text_move_cursor(bContext *C, int type, bool select) { SpaceText *st = CTX_wm_space_text(C); Text *text = CTX_data_edit_text(C); @@ -2465,7 +2465,7 @@ static TextLine *get_first_visible_line(SpaceText *st, ARegion *ar, int *y) return linep; } -static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, int y, int sel) +static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, int y, const bool sel) { Text *text = st->text; int max = wrap_width(st, ar); /* column */ @@ -2582,7 +2582,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in } } -static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) +static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, const bool sel) { Text *text = st->text; text_update_character_width(st); @@ -2845,7 +2845,7 @@ static int text_insert_exec(bContext *C, wmOperator *op) SpaceText *st = CTX_wm_space_text(C); Text *text = CTX_data_edit_text(C); char *str; - int done = FALSE; + int done = false; size_t i = 0; unsigned int code; diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index f86f7134b31..eba4451502e 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -368,7 +368,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar time_draw_idblock_keyframes(v2d, (ID *)ob, onlysel); } else { - short active_done = FALSE; + bool active_done = false; /* draw keyframes from all selected objects */ CTX_DATA_BEGIN (C, Object *, obsel, selected_objects) @@ -378,7 +378,7 @@ static void time_draw_keyframes(const bContext *C, SpaceTime *stime, ARegion *ar /* if this object is the active one, set flag so that we don't draw again */ if (obsel == ob) - active_done = TRUE; + active_done = true; } CTX_DATA_END; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index daa6ea0a95a..a8abd08a4cc 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1517,7 +1517,7 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D } for (track = tracksbase->first; track; track = track->next) { - int selected = TRACK_SELECTED(track); + bool selected = TRACK_SELECTED(track); if (draw_selected && !selected) continue; @@ -1915,7 +1915,7 @@ static void ensure_curve_cache(Scene *scene, Object *object) case OB_CURVE: case OB_SURF: case OB_FONT: - BKE_displist_make_curveTypes(scene, object, FALSE); + BKE_displist_make_curveTypes(scene, object, false); break; case OB_MBALL: BKE_displist_make_mball(G.main->eval_ctx, scene, object); @@ -4129,7 +4129,7 @@ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3 break; } - return FALSE; + return false; } static bool drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, const char dt, const short dflag, const unsigned char ob_wire_col[4]) @@ -4396,7 +4396,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv float cfra; float ma_col[3] = {0.0f, 0.0f, 0.0f}; int a, totpart, totpoint = 0, totve = 0, drawn, draw_as, totchild = 0; - int select = ob->flag & SELECT, create_cdata = 0, need_v = 0; + bool select = (ob->flag & SELECT) != 0, create_cdata = false, need_v = false; GLint polygonmode[2]; char numstr[32]; unsigned char tcol[4] = {0, 0, 0, 255}; diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index e49e135ec6e..187919e9ff3 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -318,7 +318,7 @@ static SpaceLink *view3d_new(const bContext *C) v3d->lay = v3d->layact = scene->lay; v3d->camera = scene->camera; } - v3d->scenelock = TRUE; + v3d->scenelock = true; v3d->grid = 1.0f; v3d->gridlines = 16; v3d->gridsubdiv = 10; diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 5ba2ed8c89c..d61017fb80e 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -930,7 +930,7 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) { uiLayout *split, *colsub; - split = uiLayoutSplit(layout, 0.8f, FALSE); + split = uiLayoutSplit(layout, 0.8f, false); if (ptr->type == &RNA_PoseBone) { PointerRNA boneptr; @@ -940,19 +940,19 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) bone = boneptr.data; uiLayoutSetActive(split, !(bone->parent && bone->flag & BONE_CONNECTED)); } - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemR(colsub, ptr, "location", 0, NULL, ICON_NONE); - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemL(colsub, "", ICON_NONE); uiItemR(colsub, ptr, "lock_location", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - split = uiLayoutSplit(layout, 0.8f, FALSE); + split = uiLayoutSplit(layout, 0.8f, false); switch (RNA_enum_get(ptr, "rotation_mode")) { case ROT_MODE_QUAT: /* quaternion */ - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemR(colsub, ptr, "rotation_quaternion", 0, IFACE_("Rotation"), ICON_NONE); - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, IFACE_("4L"), ICON_NONE); if (RNA_boolean_get(ptr, "lock_rotations_4d")) uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE + UI_ITEM_R_ICON_ONLY, "", ICON_NONE); @@ -961,9 +961,9 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE); break; case ROT_MODE_AXISANGLE: /* axis angle */ - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemR(colsub, ptr, "rotation_axis_angle", 0, IFACE_("Rotation"), ICON_NONE); - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, IFACE_("4L"), ICON_NONE); if (RNA_boolean_get(ptr, "lock_rotations_4d")) uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE); @@ -972,19 +972,19 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE); break; default: /* euler rotations */ - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemR(colsub, ptr, "rotation_euler", 0, IFACE_("Rotation"), ICON_NONE); - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemL(colsub, "", ICON_NONE); uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE); break; } uiItemR(layout, ptr, "rotation_mode", 0, "", ICON_NONE); - split = uiLayoutSplit(layout, 0.8f, FALSE); - colsub = uiLayoutColumn(split, TRUE); + split = uiLayoutSplit(layout, 0.8f, false); + colsub = uiLayoutColumn(split, true); uiItemR(colsub, ptr, "scale", 0, NULL, ICON_NONE); - colsub = uiLayoutColumn(split, TRUE); + colsub = uiLayoutColumn(split, true); uiItemL(colsub, "", ICON_NONE); uiItemR(colsub, ptr, "lock_scale", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE); @@ -1013,7 +1013,7 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob) RNA_pointer_create(&ob->id, &RNA_PoseBone, pchan, &pchanptr); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); /* XXX: RNA buts show data in native types (i.e. quats, 4-component axis/angle, etc.) * but old-school UI shows in eulers always. Do we want to be able to still display in Eulers? @@ -1037,7 +1037,7 @@ static void v3d_editarmature_buts(uiLayout *layout, Object *ob) RNA_pointer_create(&arm->id, &RNA_EditBone, ebone, &eboneptr); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, &eboneptr, "head", 0, NULL, ICON_NONE); if (ebone->parent && ebone->flag & BONE_CONNECTED) { PointerRNA parptr = RNA_pointer_get(&eboneptr, "parent"); @@ -1067,7 +1067,7 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob) RNA_pointer_create(&mball->id, &RNA_MetaElement, mball->lastelem, &ptr); - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); uiItemR(col, &ptr, "co", 0, NULL, ICON_NONE); uiItemR(col, &ptr, "radius", 0, NULL, ICON_NONE); @@ -1075,7 +1075,7 @@ static void v3d_editmetaball_buts(uiLayout *layout, Object *ob) uiItemR(col, &ptr, "type", 0, NULL, ICON_NONE); - col = uiLayoutColumn(layout, TRUE); + col = uiLayoutColumn(layout, true); switch (RNA_enum_get(&ptr, "type")) { case MB_BALL: break; @@ -1144,7 +1144,7 @@ static void view3d_panel_transform(const bContext *C, Panel *pa) block = uiLayoutGetBlock(pa->layout); uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL); - col = uiLayoutColumn(pa->layout, FALSE); + col = uiLayoutColumn(pa->layout, false); if (ob == obedit) { if (ob->type == OB_ARMATURE) { diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 09c120477b7..9b455748713 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1313,7 +1313,7 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) } #endif - if (v3d->drawtype > OB_WIRE) v3d->zbuf = TRUE; + if (v3d->drawtype > OB_WIRE) v3d->zbuf = true; /* dithering and AA break color coding, so disable */ glDisable(GL_DITHER); @@ -1378,7 +1378,7 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) v3d->flag &= ~V3D_INVALID_BACKBUF; G.f &= ~G_BACKBUFSEL; - v3d->zbuf = FALSE; + v3d->zbuf = false; glDisable(GL_DEPTH_TEST); glEnable(GL_DITHER); if (multisample_enabled) @@ -1877,7 +1877,7 @@ static void view3d_draw_transp(Scene *scene, ARegion *ar, View3D *v3d) View3DAfter *v3da, *next; glDepthMask(0); - v3d->transp = TRUE; + v3d->transp = true; for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { next = v3da->next; @@ -1885,7 +1885,7 @@ static void view3d_draw_transp(Scene *scene, ARegion *ar, View3D *v3d) BLI_remlink(&v3d->afterdraw_transp, v3da); MEM_freeN(v3da); } - v3d->transp = FALSE; + v3d->transp = false; glDepthMask(1); @@ -1899,14 +1899,14 @@ static void view3d_draw_xray(Scene *scene, ARegion *ar, View3D *v3d, int clear) if (clear && v3d->zbuf) glClear(GL_DEPTH_BUFFER_BIT); - v3d->xray = TRUE; + v3d->xray = true; for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { next = v3da->next; draw_object(scene, ar, v3d, v3da->base, v3da->dflag); BLI_remlink(&v3d->afterdraw_xray, v3da); MEM_freeN(v3da); } - v3d->xray = FALSE; + v3d->xray = false; } @@ -1918,8 +1918,8 @@ static void view3d_draw_xraytransp(Scene *scene, ARegion *ar, View3D *v3d, int c if (clear && v3d->zbuf) glClear(GL_DEPTH_BUFFER_BIT); - v3d->xray = TRUE; - v3d->transp = TRUE; + v3d->xray = true; + v3d->transp = true; for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { next = v3da->next; @@ -1928,8 +1928,8 @@ static void view3d_draw_xraytransp(Scene *scene, ARegion *ar, View3D *v3d, int c MEM_freeN(v3da); } - v3d->transp = FALSE; - v3d->xray = FALSE; + v3d->transp = false; + v3d->xray = false; } @@ -2230,7 +2230,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d) glLoadMatrixf(rv3d->viewmat); - v3d->zbuf = TRUE; + v3d->zbuf = true; glEnable(GL_DEPTH_TEST); if (v3d->flag2 & V3D_SHOW_GPENCIL) { @@ -2272,7 +2272,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo ED_view3d_clipping_set(rv3d); } - v3d->zbuf = TRUE; + v3d->zbuf = true; glEnable(GL_DEPTH_TEST); /* draw set first */ @@ -2310,7 +2310,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo View3DAfter *v3da, *next; int mask_orig; - v3d->xray = TRUE; + v3d->xray = true; /* transp materials can change the depth mask, see #21388 */ glGetIntegerv(GL_DEPTH_WRITEMASK, &mask_orig); @@ -2326,8 +2326,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo } /* draw 3 passes, transp/xray/xraytransp */ - v3d->xray = FALSE; - v3d->transp = TRUE; + v3d->xray = false; + v3d->transp = true; for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { next = v3da->next; draw_object(scene, ar, v3d, v3da->base, 0); @@ -2335,8 +2335,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo MEM_freeN(v3da); } - v3d->xray = TRUE; - v3d->transp = FALSE; + v3d->xray = true; + v3d->transp = false; for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { next = v3da->next; draw_object(scene, ar, v3d, v3da->base, 0); @@ -2344,8 +2344,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo MEM_freeN(v3da); } - v3d->xray = TRUE; - v3d->transp = TRUE; + v3d->xray = true; + v3d->transp = true; for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { next = v3da->next; draw_object(scene, ar, v3d, v3da->base, 0); @@ -2354,8 +2354,8 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo } - v3d->xray = FALSE; - v3d->transp = FALSE; + v3d->xray = false; + v3d->transp = false; glDepthMask(mask_orig); } @@ -2626,11 +2626,11 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx, /* set zbuffer */ if (v3d->drawtype > OB_WIRE) { - v3d->zbuf = TRUE; + v3d->zbuf = true; glEnable(GL_DEPTH_TEST); } else - v3d->zbuf = FALSE; + v3d->zbuf = false; /* important to do before clipping */ if (do_bgpic) { @@ -2687,7 +2687,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx, /* cleanup */ if (v3d->zbuf) { - v3d->zbuf = FALSE; + v3d->zbuf = false; glDisable(GL_DEPTH_TEST); } @@ -3255,11 +3255,11 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const /* set zbuffer after we draw clipping region */ if (v3d->drawtype > OB_WIRE) { - v3d->zbuf = TRUE; + v3d->zbuf = true; glEnable(GL_DEPTH_TEST); } else - v3d->zbuf = FALSE; + v3d->zbuf = false; /* enables anti-aliasing for 3D view drawing */ if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) { @@ -3380,7 +3380,7 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const if (v3d->zbuf) { - v3d->zbuf = FALSE; + v3d->zbuf = false; glDisable(GL_DEPTH_TEST); } diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 204054b24cd..6c04f836349 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -197,7 +197,7 @@ static int view3d_layers_invoke(bContext *C, wmOperator *op, const wmEvent *even return OPERATOR_PASS_THROUGH; if (event->shift) - RNA_boolean_set(op->ptr, "extend", TRUE); + RNA_boolean_set(op->ptr, "extend", true); else RNA_boolean_set(op->ptr, "extend", false); @@ -274,7 +274,7 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C) BMEditMesh *em = BKE_editmesh_from_object(obedit); uiLayout *row; - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); block = uiLayoutGetBlock(row); uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, @@ -322,7 +322,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) modeselect = OB_MODE_OBJECT; } - row = uiLayoutRow(layout, FALSE); + row = uiLayoutRow(layout, false); { EnumPropertyItem *item = object_mode_items; const char *name = ""; @@ -347,7 +347,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) if (ob->mode & OB_MODE_WEIGHT_PAINT) { /* Only for Weight Paint. makes no sense in other paint modes. */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); } @@ -361,14 +361,14 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); } else { - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); } } } else { - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); /* pose/object only however we want to allow in weight paint mode too @@ -380,7 +380,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) } /* Transform widget / manipulators */ - row = uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, true); uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); if (v3d->twflag & V3D_USE_MANIPULATOR) { uiItemR(row, &v3dptr, "transform_manipulators", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index c087fe72fdb..3383ac3660a 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -207,7 +207,7 @@ void view3d_keymap(wmKeyConfig *keyconf) keymap = WM_keymap_find(keyconf, "3D View", SPACE_VIEW3D, 0); kmi = WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, KM_ANY, 0); - RNA_boolean_set(kmi->ptr, "release_confirm", TRUE); + RNA_boolean_set(kmi->ptr, "release_confirm", true); /* * Doesn't work with KM_SHIFT, have to use KM_ANY and filter in invoke * */ @@ -220,9 +220,9 @@ void view3d_keymap(wmKeyConfig *keyconf) WM_keymap_verify_item(keymap, "VIEW3D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_dolly", MIDDLEMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", PADPERIOD, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "use_all_regions", TRUE); + RNA_boolean_set(kmi->ptr, "use_all_regions", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "use_all_regions", FALSE); + RNA_boolean_set(kmi->ptr, "use_all_regions", false); WM_keymap_verify_item(keymap, "VIEW3D_OT_view_lock_to_active", PADPERIOD, KM_PRESS, KM_SHIFT, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_view_lock_clear", PADPERIOD, KM_PRESS, KM_ALT, 0); @@ -265,12 +265,12 @@ void view3d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW3D_OT_view_center_pick", FKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "center", FALSE); /* only without camera view */ + RNA_boolean_set(kmi->ptr, "center", false); /* only without camera view */ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "use_all_regions", TRUE); - RNA_boolean_set(kmi->ptr, "center", FALSE); /* only without camera view */ + RNA_boolean_set(kmi->ptr, "use_all_regions", true); + RNA_boolean_set(kmi->ptr, "center", false); /* only without camera view */ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", CKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "center", TRUE); + RNA_boolean_set(kmi->ptr, "center", true); /* numpad view hotkeys*/ RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD0, KM_PRESS, 0, 0)->ptr, "type", RV3D_VIEW_CAMERA); @@ -309,22 +309,22 @@ void view3d_keymap(wmKeyConfig *keyconf) /* active aligned, replaces '*' key in 2.4x */ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_FRONT); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_RIGHT); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_TOP); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BACK); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_LEFT); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BOTTOM); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); WM_keymap_add_item(keymap, "VIEW3D_OT_localview", PADSLASHKEY, KM_PRESS, 0, 0); @@ -336,7 +336,7 @@ void view3d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_pan", NDOF_MOTION, 0, KM_SHIFT, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_ndof_all", NDOF_MOTION, 0, KM_CTRL | KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_selected", NDOF_BUTTON_FIT, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "use_all_regions", FALSE); + RNA_boolean_set(kmi->ptr, "use_all_regions", false); RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", NDOF_BUTTON_ROLL_CCW, KM_PRESS, 0, 0)->ptr, "angle", M_PI / -2); RNA_float_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_roll", NDOF_BUTTON_ROLL_CW, KM_PRESS, 0, 0)->ptr, "angle", M_PI / 2); @@ -351,13 +351,13 @@ void view3d_keymap(wmKeyConfig *keyconf) /* 3D mouse align */ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_FRONT, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_FRONT); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_RIGHT, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_RIGHT); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", NDOF_BUTTON_TOP, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_TOP); - RNA_boolean_set(kmi->ptr, "align_active", TRUE); + RNA_boolean_set(kmi->ptr, "align_active", true); /* NDOF: end */ @@ -393,78 +393,78 @@ void view3d_keymap(wmKeyConfig *keyconf) /* selection*/ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", FALSE); - RNA_boolean_set(kmi->ptr, "center", FALSE); - RNA_boolean_set(kmi->ptr, "object", FALSE); - RNA_boolean_set(kmi->ptr, "enumerate", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", false); + RNA_boolean_set(kmi->ptr, "center", false); + RNA_boolean_set(kmi->ptr, "object", false); + RNA_boolean_set(kmi->ptr, "enumerate", false); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); - RNA_boolean_set(kmi->ptr, "center", FALSE); - RNA_boolean_set(kmi->ptr, "object", FALSE); - RNA_boolean_set(kmi->ptr, "enumerate", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", true); + RNA_boolean_set(kmi->ptr, "center", false); + RNA_boolean_set(kmi->ptr, "object", false); + RNA_boolean_set(kmi->ptr, "enumerate", false); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", FALSE); - RNA_boolean_set(kmi->ptr, "center", TRUE); - RNA_boolean_set(kmi->ptr, "object", TRUE); /* use Ctrl+Select for 2 purposes */ - RNA_boolean_set(kmi->ptr, "enumerate", FALSE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", false); + RNA_boolean_set(kmi->ptr, "center", true); + RNA_boolean_set(kmi->ptr, "object", true); /* use Ctrl+Select for 2 purposes */ + RNA_boolean_set(kmi->ptr, "enumerate", false); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", FALSE); - RNA_boolean_set(kmi->ptr, "center", FALSE); - RNA_boolean_set(kmi->ptr, "object", FALSE); - RNA_boolean_set(kmi->ptr, "enumerate", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", false); + RNA_boolean_set(kmi->ptr, "center", false); + RNA_boolean_set(kmi->ptr, "object", false); + RNA_boolean_set(kmi->ptr, "enumerate", true); /* selection key-combinations */ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); - RNA_boolean_set(kmi->ptr, "center", TRUE); - RNA_boolean_set(kmi->ptr, "object", FALSE); - RNA_boolean_set(kmi->ptr, "enumerate", FALSE); + RNA_boolean_set(kmi->ptr, "extend", true); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", true); + RNA_boolean_set(kmi->ptr, "center", true); + RNA_boolean_set(kmi->ptr, "object", false); + RNA_boolean_set(kmi->ptr, "enumerate", false); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", FALSE); - RNA_boolean_set(kmi->ptr, "center", TRUE); - RNA_boolean_set(kmi->ptr, "object", FALSE); - RNA_boolean_set(kmi->ptr, "enumerate", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", false); + RNA_boolean_set(kmi->ptr, "center", true); + RNA_boolean_set(kmi->ptr, "object", false); + RNA_boolean_set(kmi->ptr, "enumerate", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); - RNA_boolean_set(kmi->ptr, "center", FALSE); - RNA_boolean_set(kmi->ptr, "object", FALSE); - RNA_boolean_set(kmi->ptr, "enumerate", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", true); + RNA_boolean_set(kmi->ptr, "center", false); + RNA_boolean_set(kmi->ptr, "object", false); + RNA_boolean_set(kmi->ptr, "enumerate", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); - RNA_boolean_set(kmi->ptr, "toggle", TRUE); - RNA_boolean_set(kmi->ptr, "center", TRUE); - RNA_boolean_set(kmi->ptr, "object", FALSE); - RNA_boolean_set(kmi->ptr, "enumerate", TRUE); + RNA_boolean_set(kmi->ptr, "extend", false); + RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_boolean_set(kmi->ptr, "toggle", true); + RNA_boolean_set(kmi->ptr, "center", true); + RNA_boolean_set(kmi->ptr, "object", false); + RNA_boolean_set(kmi->ptr, "enumerate", true); WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_clip_border", BKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_render_border", BKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "camera_only", TRUE); + RNA_boolean_set(kmi->ptr, "camera_only", true); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_render_border", BKEY, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "camera_only", FALSE); + RNA_boolean_set(kmi->ptr, "camera_only", false); WM_keymap_add_item(keymap, "VIEW3D_OT_clear_render_border", BKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index bdb203ab003..8946559bca8 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -117,7 +117,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) uiBlock *block = uiLayoutGetBlock(pa->layout); if (!WM_operator_check_ui_enabled(C, op->type->name)) - uiLayoutSetEnabled(pa->layout, FALSE); + uiLayoutSetEnabled(pa->layout, false); /* note, blockfunc is a default but->func, use Handle func to allow button callbacks too */ uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, op); @@ -199,7 +199,7 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) event.type = EVT_BUT_OPEN; event.val = KM_PRESS; event.customdata = but; - event.customdatafree = FALSE; + event.customdatafree = false; wm_event_add(win, &event); return block; @@ -221,12 +221,12 @@ static void view3d_panel_tool_shelf(const bContext *C, Panel *pa) for (ct = st->toolshelf.first; ct; ct = ct->next) { if (0 == strncmp(context, ct->context, OP_MAX_TYPENAME)) { - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); uiItemFullO(col, ct->opname, NULL, ICON_NONE, NULL, WM_OP_INVOKE_REGION_WIN, 0); } } } - col = uiLayoutColumn(pa->layout, TRUE); + col = uiLayoutColumn(pa->layout, true); uiDefBlockBut(uiLayoutGetBlock(pa->layout), tool_search_menu, &st->toolshelf, "Add Tool", 0, 0, UI_UNIT_X, UI_UNIT_Y, "Add Tool in shelf, gets saved in files"); } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index fa3e511f945..fdfce062adc 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -981,7 +981,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b mul_m4_m4m4(vc->rv3d->persmat, vc->rv3d->winmat, vc->rv3d->viewmat); if (v3d->drawtype > OB_WIRE) { - v3d->zbuf = TRUE; + v3d->zbuf = true; glEnable(GL_DEPTH_TEST); } @@ -1006,7 +1006,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b else { Base *base; - v3d->xray = TRUE; /* otherwise it postpones drawing */ + v3d->xray = true; /* otherwise it postpones drawing */ for (base = scene->base.first; base; base = base->next) { if (base->lay & v3d->lay) { diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index e1c240f72d0..13f030a3650 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1519,7 +1519,7 @@ int transformEvent(TransInfo *t, const wmEvent *event) int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], float cent2d[2]) { TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data"); - int success; + bool success; t->state = TRANS_RUNNING; @@ -1538,10 +1538,10 @@ int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], float t->around = centerMode; // override userdefined mode if (t->total == 0) { - success = FALSE; + success = false; } else { - success = TRUE; + success = true; calculateCenter(t); @@ -2584,7 +2584,7 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td) bConstraintTypeInfo *cti = BKE_get_constraint_typeinfo(CONSTRAINT_TYPE_ROTLIMIT); bConstraintOb cob; bConstraint *con; - int do_limit = FALSE; + int do_limit = false; /* Evaluate valid constraints */ for (con = td->con; con; con = con->next) { @@ -2605,9 +2605,9 @@ static void constraintRotLim(TransInfo *UNUSED(t), TransData *td) continue; /* only do conversion if necessary, to preserve quats and eulers */ - if (do_limit == FALSE) { + if (do_limit == false) { constraintob_from_transdata(&cob, td); - do_limit = TRUE; + do_limit = true; } /* do space conversions */ @@ -4571,7 +4571,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) { TransData *td; float ratio; - int i, initial_feather = FALSE; + int i, initial_feather = false; char str[MAX_INFO_LEN]; ratio = t->values[0]; @@ -4593,7 +4593,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) /* detect if no points have feather yet */ if (ratio > 1.0f) { - initial_feather = TRUE; + initial_feather = true; for (td = t->data, i = 0; i < t->total; i++, td++) { if (td->flag & TD_NOACTION) @@ -4603,7 +4603,7 @@ static void applyMaskShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) continue; if (td->ival >= 0.001f) - initial_feather = FALSE; + initial_feather = false; } } @@ -5357,7 +5357,7 @@ static bool createEdgeSlideVerts(TransInfo *t) sld->is_proportional = true; sld->curr_sv_index = 0; - sld->flipped_vtx = FALSE; + sld->flipped_vtx = false; if (!rv3d) { /* ok, let's try to survive this */ @@ -6003,7 +6003,7 @@ static eRedrawFlag handleEventEdgeSlide(struct TransInfo *t, const struct wmEven case FKEY: { if (event->val == KM_PRESS) { - if (sld->is_proportional == FALSE) { + if (sld->is_proportional == false) { sld->flipped_vtx = !sld->flipped_vtx; } return TREDRAW_HARD; @@ -6039,7 +6039,7 @@ static void drawEdgeSlide(const struct bContext *C, TransInfo *t) if (t->mode == TFM_EDGE_SLIDE) { EdgeSlideData *sld = (EdgeSlideData *)t->customData; /* Non-Prop mode */ - if (sld && sld->is_proportional == FALSE) { + if (sld && sld->is_proportional == false) { View3D *v3d = CTX_wm_view3d(C); float co_a[3], co_b[3], co_mark[3]; TransDataEdgeSlideVert *curr_sv = &sld->sv[sld->curr_sv_index]; @@ -6120,7 +6120,7 @@ static int doEdgeSlide(TransInfo *t, float perc) sld->perc = perc; sv = svlist; - if (sld->is_proportional == TRUE) { + if (sld->is_proportional == true) { for (i = 0; i < sld->totsv; i++, sv++) { float vec[3]; if (perc > 0.0f) { @@ -6630,7 +6630,7 @@ static void drawVertSlide(const struct bContext *C, TransInfo *t) glPointSize(ctrl_size); bglBegin(GL_POINTS); - bglVertex3fv((sld->flipped_vtx && sld->is_proportional == FALSE) ? + bglVertex3fv((sld->flipped_vtx && sld->is_proportional == false) ? curr_sv->co_link_orig_3d[curr_sv->co_link_curr] : curr_sv->co_orig_3d); bglEnd(); @@ -6655,7 +6655,7 @@ static int doVertSlide(TransInfo *t, float perc) sld->perc = perc; sv = svlist; - if (sld->is_proportional == TRUE) { + if (sld->is_proportional == true) { for (i = 0; i < sld->totsv; i++, sv++) { interp_v3_v3v3(sv->v->co, sv->co_orig_3d, sv->co_link_orig_3d[sv->co_link_curr], perc); } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index c81637cc827..4dd7f3c3fdf 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3188,11 +3188,11 @@ static void posttrans_action_clean(bAnimContext *ac, bAction *act) if (adt) { ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); - posttrans_fcurve_clean(ale->key_data, FALSE); /* only use handles in graph editor */ + posttrans_fcurve_clean(ale->key_data, false); /* only use handles in graph editor */ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else - posttrans_fcurve_clean(ale->key_data, FALSE); /* only use handles in graph editor */ + posttrans_fcurve_clean(ale->key_data, false); /* only use handles in graph editor */ } /* free temp data */ @@ -4170,7 +4170,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count int right = BKE_sequence_tx_get_final_right(seq, true); if (seq->depth == 0 && ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK))) { - *recursive = FALSE; + *recursive = false; *count = 0; *flag = 0; } @@ -4178,16 +4178,16 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count /* for meta's we only ever need to extend their children, no matter what depth * just check the meta's are in the bounds */ - if (t->frame_side == 'R' && right <= cfra) *recursive = FALSE; - else if (t->frame_side == 'L' && left >= cfra) *recursive = FALSE; - else *recursive = TRUE; + if (t->frame_side == 'R' && right <= cfra) *recursive = false; + else if (t->frame_side == 'L' && left >= cfra) *recursive = false; + else *recursive = true; *count = 1; *flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL); } else { - *recursive = FALSE; /* not a meta, so no thinking here */ + *recursive = false; /* not a meta, so no thinking here */ *count = 1; /* unless its set to 0, extend will never set 2 handles at once */ *flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL); @@ -4215,7 +4215,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count /* Non nested strips (resect selection and handles) */ if ((seq->flag & SELECT) == 0 || (seq->flag & SEQ_LOCK)) { - *recursive = FALSE; + *recursive = false; *count = 0; *flag = 0; } @@ -4233,10 +4233,10 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count if ((seq->type == SEQ_TYPE_META) && ((seq->flag & (SEQ_LEFTSEL | SEQ_RIGHTSEL)) == 0)) { /* if any handles are selected, don't recurse */ - *recursive = TRUE; + *recursive = true; } else { - *recursive = FALSE; + *recursive = false; } } } @@ -4255,12 +4255,12 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count * BKE_sequence_calc() will update its settings when run on the toplevel meta */ *flag = 0; *count = 0; - *recursive = TRUE; + *recursive = true; } else { *flag = (seq->flag | SELECT) & ~(SEQ_LEFTSEL | SEQ_RIGHTSEL); *count = 1; /* ignore the selection for nested */ - *recursive = FALSE; + *recursive = false; } #endif } @@ -4732,7 +4732,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob, } /* update object's loc/rot to get current rigid body transform */ mat4_to_loc_rot_size(ob->loc, rot, scale, ob->obmat); - BKE_object_mat3_to_rot(ob, rot, FALSE); + BKE_object_mat3_to_rot(ob, rot, false); } } @@ -5053,29 +5053,29 @@ void autokeyframe_ob_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *ob, /* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */ if (tmode == TFM_TRANSLATION) { - do_loc = TRUE; + do_loc = true; } else if (tmode == TFM_ROTATION) { if (v3d->around == V3D_ACTIVE) { if (ob != OBACT) - do_loc = TRUE; + do_loc = true; } else if (v3d->around == V3D_CURSOR) - do_loc = TRUE; + do_loc = true; if ((v3d->flag & V3D_ALIGN) == 0) - do_rot = TRUE; + do_rot = true; } else if (tmode == TFM_RESIZE) { if (v3d->around == V3D_ACTIVE) { if (ob != OBACT) - do_loc = TRUE; + do_loc = true; } else if (v3d->around == V3D_CURSOR) - do_loc = TRUE; + do_loc = true; if ((v3d->flag & V3D_ALIGN) == 0) - do_scale = TRUE; + do_scale = true; } /* insert keyframes for the affected sets of channels using the builtin KeyingSets found */ @@ -5186,28 +5186,28 @@ void autokeyframe_pose_cb_func(bContext *C, Scene *scene, View3D *v3d, Object *o } /* only insert keyframe if needed? */ else if (IS_AUTOKEY_FLAG(scene, INSERTNEEDED)) { - short do_loc = FALSE, do_rot = FALSE, do_scale = FALSE; + bool do_loc = false, do_rot = false, do_scale = false; /* filter the conditions when this happens (assume that curarea->spacetype==SPACE_VIE3D) */ if (tmode == TFM_TRANSLATION) { if (targetless_ik) - do_rot = TRUE; + do_rot = true; else - do_loc = TRUE; + do_loc = true; } else if (tmode == TFM_ROTATION) { if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE)) - do_loc = TRUE; + do_loc = true; if ((v3d->flag & V3D_ALIGN) == 0) - do_rot = TRUE; + do_rot = true; } else if (tmode == TFM_RESIZE) { if (ELEM(v3d->around, V3D_CURSOR, V3D_ACTIVE)) - do_loc = TRUE; + do_loc = true; if ((v3d->flag & V3D_ALIGN) == 0) - do_scale = TRUE; + do_scale = true; } if (do_loc) { @@ -5336,7 +5336,7 @@ static void special_aftertrans_update__mask(bContext *C, TransInfo *t) static void special_aftertrans_update__node(bContext *UNUSED(C), TransInfo *t) { - int canceled = (t->state == TRANS_CANCEL); + const bool canceled = (t->state == TRANS_CANCEL); if (canceled && t->remove_on_cancel) { /* remove selected nodes on cancel */ @@ -5396,8 +5396,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t) { Object *ob; // short redrawipo=0, resetslowpar=1; - int canceled = (t->state == TRANS_CANCEL); - short duplicate = (t->mode == TFM_TIME_DUPLICATE); + const bool canceled = (t->state == TRANS_CANCEL); + const bool duplicate = (t->mode == TFM_TIME_DUPLICATE); /* early out when nothing happened */ if (t->total == 0 || t->mode == TFM_DUMMY) @@ -5413,7 +5413,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t) /* handle multires re-projection, done * on transform completion since it's * really slow -joeedh */ - projectEdgeSlideData(t, TRUE); + projectEdgeSlideData(t, true); /* free temporary faces to avoid automerging and deleting * during cleanup - psy-fi */ @@ -5429,7 +5429,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t) EdgeSlideData *sld = t->customData; sld->perc = 0.0; - projectEdgeSlideData(t, FALSE); + projectEdgeSlideData(t, false); } } } @@ -5515,11 +5515,11 @@ void special_aftertrans_update(bContext *C, TransInfo *t) { if (adt) { ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1); - posttrans_fcurve_clean(fcu, FALSE); /* only use handles in graph editor */ + posttrans_fcurve_clean(fcu, false); /* only use handles in graph editor */ ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1); } else - posttrans_fcurve_clean(fcu, FALSE); /* only use handles in graph editor */ + posttrans_fcurve_clean(fcu, false); /* only use handles in graph editor */ } } @@ -5967,10 +5967,10 @@ static bool is_node_parent_select(bNode *node) { while ((node = node->parent)) { if (node->flag & NODE_TRANSFORM) { - return TRUE; + return true; } } - return FALSE; + return false; } static void createTransNodeData(bContext *UNUSED(C), TransInfo *t) @@ -5992,7 +5992,7 @@ static void createTransNodeData(bContext *UNUSED(C), TransInfo *t) /* set transform flags on nodes */ for (node = snode->edittree->nodes.first; node; node = node->next) { - if (node->flag & NODE_SELECT && is_node_parent_select(node) == FALSE) { + if (node->flag & NODE_SELECT && is_node_parent_select(node) == false) { node->flag |= NODE_TRANSFORM; t->total++; } @@ -6601,7 +6601,7 @@ static void MaskHandleToTransData(MaskSplinePoint *point, eMaskWhichHandle which tdm->point = point; copy_m3_m3(tdm->vec, bezt->vec); - tdm->is_handle = TRUE; + tdm->is_handle = true; copy_m3_m3(tdm->parent_matrix, parent_matrix); copy_m3_m3(tdm->parent_inverse_matrix, parent_inverse_matrix); @@ -6958,7 +6958,7 @@ void createTransData(bContext *C, TransInfo *t) if (t->data && (t->flag & T_PROP_EDIT)) { sort_trans_data(t); // makes selected become first in array - set_prop_dist(t, TRUE); + set_prop_dist(t, true); sort_trans_data_dist(t); } } @@ -7014,7 +7014,7 @@ void createTransData(bContext *C, TransInfo *t) if (t->data && (t->flag & T_PROP_EDIT)) { sort_trans_data(t); // makes selected become first in array - set_prop_dist(t, TRUE); + set_prop_dist(t, true); sort_trans_data_dist(t); } } diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 845e3cfe349..2fa0b6b320f 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -372,7 +372,7 @@ int calc_manipulator_stats(const bContext *C) totsel++; } if ((ebo->flag & BONE_ROOTSEL) || - ((ebo->flag & BONE_TIPSEL) == FALSE)) /* ensure we get at least one point */ + ((ebo->flag & BONE_TIPSEL) == false)) /* ensure we get at least one point */ { calc_tw_center(scene, ebo->head); totsel++; @@ -505,7 +505,7 @@ int calc_manipulator_stats(const bContext *C) else if (ob && (ob->mode & OB_MODE_POSE)) { bPoseChannel *pchan; int mode = TFM_ROTATION; // mislead counting bones... bah. We don't know the manipulator mode, could be mixed - int ok = FALSE; + int ok = false; if ((ob->lay & v3d->lay) == 0) return 0; @@ -515,7 +515,7 @@ int calc_manipulator_stats(const bContext *C) if (bone) { stats_pose(scene, rv3d, pchan); totsel = 1; - ok = TRUE; + ok = true; } } else { @@ -529,7 +529,7 @@ int calc_manipulator_stats(const bContext *C) stats_pose(scene, rv3d, pchan); } } - ok = TRUE; + ok = true; } } @@ -709,9 +709,9 @@ static void partial_doughnut(float radring, float radhole, int start, int end, i float cos_theta, sin_theta; float cos_theta1, sin_theta1; float ring_delta, side_delta; - int i, j, do_caps = TRUE; + int i, j, do_caps = true; - if (start == 0 && end == nrings) do_caps = FALSE; + if (start == 0 && end == nrings) do_caps = false; ring_delta = 2.0f * (float)M_PI / (float)nrings; side_delta = 2.0f * (float)M_PI / (float)nsides; @@ -1835,7 +1835,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op) } RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); WM_operator_name_call(C, "TRANSFORM_OT_translate", WM_OP_INVOKE_DEFAULT, op->ptr); - //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_translate", 0), event, op->ptr, NULL, FALSE); + //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_translate", 0), event, op->ptr, NULL, false); } else if (drawflags & MAN_SCALE_C) { switch (drawflags) { @@ -1866,7 +1866,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op) } RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); WM_operator_name_call(C, "TRANSFORM_OT_resize", WM_OP_INVOKE_DEFAULT, op->ptr); - //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_resize", 0), event, op->ptr, NULL, FALSE); + //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_resize", 0), event, op->ptr, NULL, false); } else if (drawflags == MAN_ROT_T) { /* trackball need special case, init is different */ /* Do not pass op->ptr!!! trackball has no "constraint" properties! @@ -1877,7 +1877,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op) WM_operator_properties_create_ptr(&props_ptr, ot); RNA_boolean_set(&props_ptr, "release_confirm", RNA_boolean_get(op->ptr, "release_confirm")); WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, &props_ptr); - //wm_operator_invoke(C, WM_operatortype_find(ot->idname, 0), event, NULL, NULL, FALSE); + //wm_operator_invoke(C, WM_operatortype_find(ot->idname, 0), event, NULL, NULL, false); WM_operator_properties_free(&props_ptr); } else if (drawflags & MAN_ROT_C) { @@ -1894,7 +1894,7 @@ int BIF_do_manipulator(bContext *C, const struct wmEvent *event, wmOperator *op) } RNA_boolean_set_array(op->ptr, "constraint_axis", constraint_axis); WM_operator_name_call(C, "TRANSFORM_OT_rotate", WM_OP_INVOKE_DEFAULT, op->ptr); - //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_rotate", 0), event, op->ptr, NULL, FALSE); + //wm_operator_invoke(C, WM_operatortype_find("TRANSFORM_OT_rotate", 0), event, op->ptr, NULL, false); } } /* after transform, restore drawflags */ diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 3f53ee796a0..d8c5339c14f 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -283,10 +283,10 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) ot->poll = ED_operator_areaactive; RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the new custom orientation"); - RNA_def_boolean(ot->srna, "use_view", FALSE, "Use View", + RNA_def_boolean(ot->srna, "use_view", false, "Use View", "Use the current view instead of the active object to create the new orientation"); - RNA_def_boolean(ot->srna, "use", FALSE, "Use after creation", "Select orientation after its creation"); - RNA_def_boolean(ot->srna, "overwrite", FALSE, "Overwrite previous", + RNA_def_boolean(ot->srna, "use", false, "Use after creation", "Select orientation after its creation"); + RNA_def_boolean(ot->srna, "overwrite", false, "Overwrite previous", "Overwrite previously created orientation with same name"); } @@ -991,7 +991,7 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac WM_keymap_add_item(keymap, "TRANSFORM_OT_select_orientation", SPACEKEY, KM_PRESS, KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_create_orientation", SPACEKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "use", TRUE); + RNA_boolean_set(kmi->ptr, "use", true); WM_keymap_add_item(keymap, OP_MIRROR, MKEY, KM_PRESS, KM_CTRL, 0); @@ -1003,10 +1003,10 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac kmi = WM_keymap_add_item(keymap, OP_TRANSLATION, TKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "texture_space", TRUE); + RNA_boolean_set(kmi->ptr, "texture_space", true); kmi = WM_keymap_add_item(keymap, OP_RESIZE, TKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "texture_space", TRUE); + RNA_boolean_set(kmi->ptr, "texture_space", true); WM_keymap_add_item(keymap, OP_SKIN_RESIZE, AKEY, KM_PRESS, KM_CTRL, 0); @@ -1060,11 +1060,11 @@ void transform_keymap_for_space(wmKeyConfig *keyconf, wmKeyMap *keymap, int spac * in that case the secondary regular operators are called with same keymap. */ kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", GKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "release_confirm", TRUE); + RNA_boolean_set(kmi->ptr, "release_confirm", true); kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", EVT_TWEAK_A, KM_ANY, 0, 0); - RNA_boolean_set(kmi->ptr, "release_confirm", TRUE); + RNA_boolean_set(kmi->ptr, "release_confirm", true); kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", EVT_TWEAK_S, KM_ANY, 0, 0); - RNA_boolean_set(kmi->ptr, "release_confirm", TRUE); + RNA_boolean_set(kmi->ptr, "release_confirm", true); WM_keymap_add_item(keymap, OP_ROTATION, RKEY, KM_PRESS, 0, 0); diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 5d415d73be1..1338a34749a 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -858,12 +858,12 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], bArmature *arm = ob->data; bPoseChannel *pchan; float imat[3][3], mat[3][3]; - int ok = FALSE; + int ok = false; if (activeOnly && (pchan = BKE_pose_channel_active(ob))) { add_v3_v3(normal, pchan->pose_mat[2]); add_v3_v3(plane, pchan->pose_mat[1]); - ok = TRUE; + ok = true; } else { int totsel; @@ -877,7 +877,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], add_v3_v3(plane, pchan->pose_mat[1]); } } - ok = TRUE; + ok = true; } } diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 246094a337a..887cc430f69 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -163,7 +163,7 @@ void ED_editors_flush_edits(const bContext *C, bool for_render) else { /* Set reorder=false so that saving the file doesn't reorder * the BMesh's elements */ - sculptsession_bm_to_me(obact, FALSE); + sculptsession_bm_to_me(obact, false); } } } diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index caa5e7659f8..9be0d68e573 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -212,9 +212,9 @@ static void undo_clean_stack(bContext *C) if (uel->type == obedit->type) { if (strcmp(uel->id.name, obedit->id.name) == 0) { if (uel->validate_undo == NULL) - is_valid = TRUE; + is_valid = true; else if (uel->validate_undo(uel->undodata, editdata)) - is_valid = TRUE; + is_valid = true; } } if (is_valid) diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 7aa5c7ee766..434f1e30188 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -482,7 +482,7 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem) EnumPropertyItem item_tmp = {0}, *item = NULL; int active, i = 0; - while (TRUE) { + while (true) { const char *name = NULL; if (undosys == UNDOSYSTEM_PARTICLE) { @@ -531,13 +531,13 @@ static int undo_history_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE if (totitem > 0) { uiPopupMenu *pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE); uiLayout *layout = uiPupMenuLayout(pup); - uiLayout *split = uiLayoutSplit(layout, 0.0f, FALSE); + uiLayout *split = uiLayoutSplit(layout, 0.0f, false); uiLayout *column = NULL; int i, c; for (c = 0, i = totitem - 1; i >= 0; i--, c++) { if ( (c % 20) == 0) - column = uiLayoutColumn(split, FALSE); + column = uiLayoutColumn(split, false); if (item[i].identifier) uiItemIntO(column, item[i].name, item[i].icon, op->type->idname, "item", item[i].value); diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 62a3b138632..7735c0b1b51 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -467,9 +467,9 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV); const int cd_poly_tex_offset = CustomData_get_offset(&bm->pdata, CD_MTEXPOLY); - activetf = EDBM_mtexpoly_active_get(em, &efa_act, FALSE, FALSE); /* will be set to NULL if hidden */ + activetf = EDBM_mtexpoly_active_get(em, &efa_act, false, false); /* will be set to NULL if hidden */ #ifndef USE_EDBM_LOOPTRIS - activef = BM_mesh_active_face_get(bm, FALSE, FALSE); + activef = BM_mesh_active_face_get(bm, false, false); #endif ts = scene->toolsettings; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 8fc3e7952ca..f5dcac7e062 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -147,14 +147,14 @@ bool ED_object_get_active_image(Object *ob, int mat_nr, if (r_ima) *r_ima = (Image *)node->id; if (r_iuser) *r_iuser = NULL; if (r_node) *r_node = node; - return TRUE; + return true; } if (r_ima) *r_ima = NULL; if (r_iuser) *r_iuser = NULL; if (r_node) *r_node = node; - return FALSE; + return false; } void ED_object_assign_active_image(Main *bmain, Object *ob, int mat_nr, Image *ima) @@ -389,7 +389,7 @@ bool uvedit_face_select_enable(Scene *scene, BMEditMesh *em, BMFace *efa, const ToolSettings *ts = scene->toolsettings; if (ts->uv_flag & UV_SYNC_SELECTION) { - BM_face_select_set(em->bm, efa, TRUE); + BM_face_select_set(em->bm, efa, true); if (do_history) { BM_select_history_store(em->bm, (BMElem *)efa); } @@ -416,7 +416,7 @@ bool uvedit_face_select_disable(Scene *scene, BMEditMesh *em, BMFace *efa, ToolSettings *ts = scene->toolsettings; if (ts->uv_flag & UV_SYNC_SELECTION) { - BM_face_select_set(em->bm, efa, FALSE); + BM_face_select_set(em->bm, efa, false); } else { BMLoop *l; @@ -481,12 +481,12 @@ void uvedit_edge_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l, const bo if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, TRUE); + BM_face_select_set(em->bm, l->f, true); else if (ts->selectmode & SCE_SELECT_EDGE) - BM_edge_select_set(em->bm, l->e, TRUE); + BM_edge_select_set(em->bm, l->e, true); else { - BM_vert_select_set(em->bm, l->e->v1, TRUE); - BM_vert_select_set(em->bm, l->e->v2, TRUE); + BM_vert_select_set(em->bm, l->e->v1, true); + BM_vert_select_set(em->bm, l->e->v2, true); } if (do_history) { @@ -512,12 +512,12 @@ void uvedit_edge_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l, if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, FALSE); + BM_face_select_set(em->bm, l->f, false); else if (ts->selectmode & SCE_SELECT_EDGE) - BM_edge_select_set(em->bm, l->e, FALSE); + BM_edge_select_set(em->bm, l->e, false); else { - BM_vert_select_set(em->bm, l->e->v1, FALSE); - BM_vert_select_set(em->bm, l->e->v2, FALSE); + BM_vert_select_set(em->bm, l->e->v1, false); + BM_vert_select_set(em->bm, l->e->v2, false); } } else { @@ -566,9 +566,9 @@ void uvedit_uv_select_enable(BMEditMesh *em, Scene *scene, BMLoop *l, if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, TRUE); + BM_face_select_set(em->bm, l->f, true); else - BM_vert_select_set(em->bm, l->v, TRUE); + BM_vert_select_set(em->bm, l->v, true); if (do_history) { BM_select_history_remove(em->bm, (BMElem *)l->v); @@ -587,9 +587,9 @@ void uvedit_uv_select_disable(BMEditMesh *em, Scene *scene, BMLoop *l, if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode & SCE_SELECT_FACE) - BM_face_select_set(em->bm, l->f, FALSE); + BM_face_select_set(em->bm, l->f, false); else - BM_vert_select_set(em->bm, l->v, FALSE); + BM_vert_select_set(em->bm, l->v, false); } else { MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); @@ -1016,7 +1016,7 @@ static int uv_select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestH uv_select_all_perform(scene, ima, em, SEL_DESELECT); } - BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, FALSE); + BM_mesh_elem_hflag_disable_all(em->bm, BM_FACE, BM_ELEM_TAG, false); /* set flags for first face and verts */ iterv_curr = uv_select_edgeloop_vertex_map_get(vmap, hit->efa, hit->l); @@ -1708,7 +1708,7 @@ static int uv_remove_doubles_exec(bContext *C, wmOperator *op) scene = CTX_data_scene(C); ima = CTX_data_edit_image(C); - if (use_unselected == FALSE) { + if (use_unselected == false) { UVvert *vert_arr = NULL; BLI_array_declare(vert_arr); MLoopUV **loop_arr = NULL; @@ -2158,7 +2158,7 @@ static int uv_mouse_select(bContext *C, const float co[2], bool extend, bool loo /* de-selecting an edge may deselect a face too - validate */ if (sync) { - if (select == FALSE) { + if (select == false) { BM_select_history_validate(em->bm); } } @@ -2488,10 +2488,10 @@ static int uv_select_split_exec(bContext *C, wmOperator *op) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (luv->flag & MLOOPUV_VERTSEL) { - is_sel = TRUE; + is_sel = true; } else { - is_unsel = TRUE; + is_unsel = true; } /* we have mixed selection, bail out */ @@ -2538,7 +2538,7 @@ static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short s /* bmesh API handles flushing but not on de-select */ if (ts->uv_flag & UV_SYNC_SELECTION) { if (ts->selectmode != SCE_SELECT_FACE) { - if (select == FALSE) { + if (select == false) { EDBM_deselect_flush(em); } else { @@ -2546,7 +2546,7 @@ static void uv_select_sync_flush(ToolSettings *ts, BMEditMesh *em, const short s } } - if (select == FALSE) { + if (select == false) { BM_select_history_validate(em->bm); } } @@ -2906,7 +2906,7 @@ static void UV_OT_select_border(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only"); - WM_operator_properties_gesture_border(ot, TRUE); + WM_operator_properties_gesture_border(ot, true); } /* ******************** circle select operator **************** */ @@ -3629,7 +3629,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) if (em->selectmode == SCE_SELECT_FACE) { /* check that every UV is selected */ if (bm_face_is_all_uv_sel(efa, true, cd_loop_uv_offset) == !swap) { - BM_face_select_set(em->bm, efa, FALSE); + BM_face_select_set(em->bm, efa, false); } uvedit_face_select_disable(scene, em, efa, cd_loop_uv_offset); } @@ -3638,7 +3638,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (UV_SEL_TEST(luv, !swap)) { - BM_vert_select_set(em->bm, l->v, FALSE); + BM_vert_select_set(em->bm, l->v, false); } } } @@ -3648,7 +3648,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) else if (em->selectmode == SCE_SELECT_FACE) { /* check if a UV is de-selected */ if (bm_face_is_all_uv_sel(efa, false, cd_loop_uv_offset) != !swap) { - BM_face_select_set(em->bm, efa, FALSE); + BM_face_select_set(em->bm, efa, false); uvedit_face_select_disable(scene, em, efa, cd_loop_uv_offset); } } @@ -3656,7 +3656,7 @@ static int uv_hide_exec(bContext *C, wmOperator *op) BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) { luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); if (UV_SEL_TEST(luv, !swap)) { - BM_vert_select_set(em->bm, l->v, FALSE); + BM_vert_select_set(em->bm, l->v, false); if (!swap) luv->flag &= ~MLOOPUV_VERTSEL; } } @@ -3729,7 +3729,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->flag |= MLOOPUV_VERTSEL; } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3750,7 +3750,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->flag |= MLOOPUV_VERTSEL; } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3766,7 +3766,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv->flag |= MLOOPUV_VERTSEL; } } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3781,7 +3781,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset); luv->flag |= MLOOPUV_VERTSEL; } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -3796,7 +3796,7 @@ static int uv_reveal_exec(bContext *C, wmOperator *UNUSED(op)) luv->flag |= MLOOPUV_VERTSEL; } } - /* BM_face_select_set(em->bm, efa, TRUE); */ + /* BM_face_select_set(em->bm, efa, true); */ BM_elem_flag_enable(efa, BM_ELEM_TAG); } } @@ -4095,7 +4095,7 @@ static int uv_mark_seam_exec(bContext *C, wmOperator *UNUSED(op)) me->drawflag |= ME_DRAWSEAMS; if (scene->toolsettings->edge_mode_live_unwrap) - ED_unwrap_lscm(scene, ob, FALSE); + ED_unwrap_lscm(scene, ob, false); DAG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); @@ -4182,30 +4182,30 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "UV_OT_mark_seam", EKEY, KM_PRESS, KM_CTRL, 0); /* pick selection */ - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "extend", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, 0, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_ALT, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_loop", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "extend", true); WM_keymap_add_item(keymap, "UV_OT_select_split", YKEY, KM_PRESS, 0, 0); /* border/circle selection */ kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "pinned", FALSE); + RNA_boolean_set(kmi->ptr, "pinned", false); kmi = WM_keymap_add_item(keymap, "UV_OT_select_border", BKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "pinned", TRUE); + RNA_boolean_set(kmi->ptr, "pinned", true); WM_keymap_add_item(keymap, "UV_OT_circle_select", CKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", FALSE); + RNA_boolean_set(kmi->ptr, "deselect", false); kmi = WM_keymap_add_item(keymap, "UV_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "deselect", TRUE); + RNA_boolean_set(kmi->ptr, "deselect", true); /* selection manipulation */ - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", FALSE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "extend", TRUE); - RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", TRUE); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0)->ptr, "extend", false); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked", LKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "extend", true); + RNA_boolean_set(WM_keymap_add_item(keymap, "UV_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "extend", true); /* select more/less */ WM_keymap_add_item(keymap, "UV_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); @@ -4223,9 +4223,9 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) /* uv operations */ WM_keymap_add_item(keymap, "UV_OT_stitch", VKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "clear", FALSE); + RNA_boolean_set(kmi->ptr, "clear", false); kmi = WM_keymap_add_item(keymap, "UV_OT_pin", PKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "clear", TRUE); + RNA_boolean_set(kmi->ptr, "clear", true); /* unwrap */ WM_keymap_add_item(keymap, "UV_OT_unwrap", EKEY, KM_PRESS, 0, 0); @@ -4235,9 +4235,9 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) /* hide */ kmi = WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", false); kmi = WM_keymap_add_item(keymap, "UV_OT_hide", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", true); WM_keymap_add_item(keymap, "UV_OT_reveal", HKEY, KM_PRESS, KM_ALT, 0); @@ -4250,7 +4250,7 @@ void ED_keymap_uvedit(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "IMAGE_MT_uvs_select_mode", TABKEY, KM_PRESS, KM_CTRL, 0); ED_keymap_proportional_cycle(keyconf, keymap); - ED_keymap_proportional_editmode(keyconf, keymap, FALSE); + ED_keymap_proportional_editmode(keyconf, keymap, false); transform_keymap_for_space(keyconf, keymap, SPACE_IMAGE); } diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 7150d74c32c..64de56206c2 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -4148,7 +4148,7 @@ ParamHandle *param_construct_begin(void) handle->arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "param construct arena"); handle->aspx = 1.0f; handle->aspy = 1.0f; - handle->do_aspect = FALSE; + handle->do_aspect = false; handle->hash_verts = phash_new((PHashLink **)&handle->construction_chart->verts, 1); handle->hash_edges = phash_new((PHashLink **)&handle->construction_chart->edges, 1); @@ -4163,7 +4163,7 @@ void param_aspect_ratio(ParamHandle *handle, float aspx, float aspy) phandle->aspx = aspx; phandle->aspy = aspy; - phandle->do_aspect = TRUE; + phandle->do_aspect = true; } void param_delete(ParamHandle *handle) diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index d8a66979565..630b601b69d 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1257,7 +1257,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final) UvEdge *edge = state->edges + i; if ((edge->flag & STITCH_BOUNDARY) && (state->uvs[edge->uv1]->flag & STITCH_STITCHABLE) && (state->uvs[edge->uv2]->flag & STITCH_STITCHABLE)) { stitch_island_calculate_edge_rotation(edge, state, final_position, uvfinal_map, island_stitch_data); - island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = TRUE; + island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = true; } } @@ -1305,7 +1305,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final) if (edge->flag & STITCH_STITCHABLE) { stitch_island_calculate_edge_rotation(edge, state, final_position, NULL, island_stitch_data); - island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = TRUE; + island_stitch_data[state->uvs[edge->uv1]->island].use_edge_rotation = true; } } @@ -1456,7 +1456,7 @@ static void stitch_switch_selection_mode(StitchState *state) UvElement *element2 = state->uvs[edge->uv2]; if ((element1->flag & STITCH_SELECTED) && (element2->flag & STITCH_SELECTED)) - stitch_select_edge(edge, state, TRUE); + stitch_select_edge(edge, state, true); } /* unselect selected uvelements */ @@ -1477,8 +1477,8 @@ static void stitch_switch_selection_mode(StitchState *state) UvElement *element1 = state->uvs[edge->uv1]; UvElement *element2 = state->uvs[edge->uv2]; - stitch_select_uv(element1, state, TRUE); - stitch_select_uv(element2, state, TRUE); + stitch_select_uv(element1, state, true); + stitch_select_uv(element2, state, true); edge->flag &= ~STITCH_SELECTED; } @@ -1857,7 +1857,7 @@ static int stitch_init(bContext *C, wmOperator *op) edge = BLI_ghash_lookup(edge_hash, &tmp_edge); - stitch_select_edge(edge, state, TRUE); + stitch_select_edge(edge, state, true); } RNA_END; } @@ -1897,7 +1897,7 @@ static int stitch_init(bContext *C, wmOperator *op) if (uvedit_edge_select_test(scene, l, cd_loop_uv_offset)) { UvEdge *edge = uv_edge_get(l, state); if (edge) { - stitch_select_edge(edge, state, TRUE); + stitch_select_edge(edge, state, true); } } } @@ -1921,7 +1921,7 @@ static int stitch_init(bContext *C, wmOperator *op) } } - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { state_delete(state); return 0; @@ -2043,7 +2043,7 @@ static void stitch_select(bContext *C, Scene *scene, const wmEvent *event, Stitc /* This works due to setting of tmp in find nearest uv vert */ UvElement *element = BM_uv_element_get(state->element_map, hit.efa, hit.l); - stitch_select_uv(element, state, FALSE); + stitch_select_uv(element, state, false); } } @@ -2052,7 +2052,7 @@ static void stitch_select(bContext *C, Scene *scene, const wmEvent *event, Stitc if (hit.efa) { UvEdge *edge = uv_edge_get(hit.l, state); - stitch_select_edge(edge, state, FALSE); + stitch_select_edge(edge, state, false); } } } @@ -2078,7 +2078,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_PRESS) { stitch_select(C, scene, event, state); - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2088,7 +2088,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) case PADENTER: case RETKEY: if (event->val == KM_PRESS) { - if (stitch_process_data(state, scene, TRUE)) { + if (stitch_process_data(state, scene, true)) { stitch_exit(C, op, 1); return OPERATOR_FINISHED; } @@ -2105,7 +2105,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) case WHEELUPMOUSE: if (event->val == KM_PRESS && event->alt) { state->limit_dist += 0.01f; - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2120,7 +2120,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_PRESS && event->alt) { state->limit_dist -= 0.01f; state->limit_dist = MAX2(0.01f, state->limit_dist); - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2134,7 +2134,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) case LKEY: if (event->val == KM_PRESS) { state->use_limit = !state->use_limit; - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2147,7 +2147,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) state->static_island++; state->static_island %= state->element_map->totalIslands; - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2158,7 +2158,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) case MKEY: if (event->val == KM_PRESS) { state->midpoints = !state->midpoints; - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2174,7 +2174,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_PRESS && !(U.flag & USER_LMOUSESELECT)) { stitch_select(C, scene, event, state); - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2186,7 +2186,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) case SKEY: if (event->val == KM_PRESS) { state->snap_islands = !state->snap_islands; - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } @@ -2201,7 +2201,7 @@ static int stitch_modal(bContext *C, wmOperator *op, const wmEvent *event) if (event->val == KM_PRESS) { stitch_switch_selection_mode(state); - if (!stitch_process_data(state, scene, FALSE)) { + if (!stitch_process_data(state, scene, false)) { stitch_cancel(C, op); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 75b124803ab..7f43ca01f4a 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -91,9 +91,9 @@ static void modifier_unwrap_state(Object *obedit, Scene *scene, bool *r_use_subs /* subsurf will take the modifier settings only if modifier is first or right after mirror */ if (subsurf) { if (md && md->type == eModifierType_Subsurf) - subsurf = TRUE; + subsurf = true; else - subsurf = FALSE; + subsurf = false; } *r_use_subsurf = subsurf; @@ -195,8 +195,8 @@ static bool uvedit_have_selection(Scene *scene, BMEditMesh *em, bool implicit) void uvedit_get_aspect(Scene *scene, Object *ob, BMEditMesh *em, float *aspx, float *aspy) { - int sloppy = TRUE; - int selected = FALSE; + bool sloppy = true; + bool selected = false; BMFace *efa; Image *ima; @@ -808,9 +808,9 @@ void ED_uvedit_live_unwrap_begin(Scene *scene, Object *obedit) } if (use_subsurf) - liveHandle = construct_param_handle_subsurfed(scene, obedit, em, fillholes, FALSE, TRUE); + liveHandle = construct_param_handle_subsurfed(scene, obedit, em, fillholes, false, true); else - liveHandle = construct_param_handle(scene, obedit, em, FALSE, fillholes, FALSE, TRUE); + liveHandle = construct_param_handle(scene, obedit, em, false, fillholes, false, true); param_lscm_begin(liveHandle, PARAM_TRUE, abf); } @@ -841,7 +841,7 @@ void ED_uvedit_live_unwrap(Scene *scene, Object *obedit) if (scene->toolsettings->edge_mode_live_unwrap && CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) { - ED_unwrap_lscm(scene, obedit, FALSE); /* unwrap all not just sel */ + ED_unwrap_lscm(scene, obedit, false); /* unwrap all not just sel */ } } @@ -1139,7 +1139,7 @@ void ED_unwrap_lscm(Scene *scene, Object *obedit, const short sel) if (use_subsurf) handle = construct_param_handle_subsurfed(scene, obedit, em, fill_holes, sel, correct_aspect); else - handle = construct_param_handle(scene, obedit, em, FALSE, fill_holes, sel, correct_aspect); + handle = construct_param_handle(scene, obedit, em, false, fill_holes, sel, correct_aspect); param_lscm_begin(handle, PARAM_FALSE, scene->toolsettings->unwrapper == 0); param_lscm_solve(handle); @@ -1211,7 +1211,7 @@ static int unwrap_exec(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_INFO, "Subsurf modifier needs to be first to work with unwrap"); /* execute unwrap */ - ED_unwrap_lscm(scene, obedit, TRUE); + ED_unwrap_lscm(scene, obedit, true); DAG_id_tag_update(obedit->data, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index b25996031c0..760c5c93455 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -444,7 +444,7 @@ void BlenderStrokeRenderer::RenderStrokeRepBasic(StrokeRep *iStrokeRep) const } } // loop over strip vertices #if 0 - BKE_mesh_validate(mesh, TRUE); + BKE_mesh_validate(mesh, true); #endif } // loop over strips } diff --git a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h index 7e8c6635953..d3329693a06 100644 --- a/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h +++ b/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h @@ -69,7 +69,7 @@ public: _DrawingStyle.setPointSize(iPointSize); } - /*! Enables or disables the lighting. TRUE = enable */ + /*! Enables or disables the lighting. true = enable */ inline void setLightingEnabled(const bool iEnableLighting) { _DrawingStyle.setLightingEnabled(iEnableLighting); diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index 1ad8901fa7b..eed3c913057 100644 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -106,7 +106,7 @@ int Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& p Chain *new_chain = new Chain(id); ++id; - while (TRUE) { + while (true) { new_chain->push_viewedge_back(*it, it.getOrientation()); if (modifier(**it) < 0) { delete new_chain; @@ -172,7 +172,7 @@ int Operators::chain(ViewEdgeInternal::ViewEdgeIterator& it, UnaryPredicate1D& p Chain *new_chain = new Chain(id); ++id; - while (TRUE) { + while (true) { new_chain->push_viewedge_back(*it, it.getOrientation()); ts(**it); ++it; @@ -349,7 +349,7 @@ int Operators::bidirectionalChain(ChainingIterator& it, UnaryPredicate1D& pred) ViewEdgeIterator it_back(it); --it_back; #endif - while (TRUE) { + while (true) { new_chain->push_viewedge_back(*it, it.getOrientation()); ts(**it); if (it.increment() < 0) { diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.h b/source/blender/freestyle/intern/view_map/BoxGrid.h index 92f886ef429..a03924cf893 100644 --- a/source/blender/freestyle/intern/view_map/BoxGrid.h +++ b/source/blender/freestyle/intern/view_map/BoxGrid.h @@ -28,7 +28,7 @@ * \date 2011-1-29 */ -#define BOX_GRID_LOGGING FALSE +#define BOX_GRID_LOGGING false // I would like to avoid using deque because including ViewMap.h and <deque> or <vector> // separately results in redefinitions of identifiers. ViewMap.h already includes <vector> diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.h b/source/blender/freestyle/intern/view_map/SphericalGrid.h index 050dcc4c882..915398af02f 100644 --- a/source/blender/freestyle/intern/view_map/SphericalGrid.h +++ b/source/blender/freestyle/intern/view_map/SphericalGrid.h @@ -28,7 +28,7 @@ * \date 2010-12-19 */ -#define SPHERICAL_GRID_LOGGING FALSE +#define SPHERICAL_GRID_LOGGING false // I would like to avoid using deque because including ViewMap.h and <deque> or <vector> separately results in // redefinitions of identifiers. ViewMap.h already includes <vector> so it should be a safe fall-back. diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index 702ee9bfea2..85c460a5fff 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -51,7 +51,7 @@ namespace Freestyle { // XXX Grmll... G is used as template's typename parameter :/ static const Global &_global = G; -#define LOGGING FALSE +#define LOGGING false using namespace std; diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp index 3d1cb907ed0..4493080c8fb 100644 --- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp +++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp @@ -130,7 +130,7 @@ static real angle_from_cotan(WVertex *vo, WVertex *v1, WVertex *v2) * VisMath '02, Berlin (Germany) * http://www-grail.usc.edu/pubs.html * - * Returns: %TRUE if the operator could be evaluated, %FALSE if the evaluation failed for some reason (@v is + * Returns: %true if the operator could be evaluated, %false if the evaluation failed for some reason (@v is * boundary or is the endpoint of a non-manifold edge.) */ bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh) @@ -192,7 +192,7 @@ bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh) * VisMath '02, Berlin (Germany) * http://www-grail.usc.edu/pubs.html * - * Returns: %TRUE if the operator could be evaluated, %FALSE if the evaluation failed for some reason (@v is + * Returns: %true if the operator could be evaluated, %false if the evaluation failed for some reason (@v is * boundary or is the endpoint of a non-manifold edge.) */ bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg) diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 516fbedf2ae..d378cec4e39 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -184,12 +184,12 @@ void GPU_update_bmesh_pbvh_buffers(GPU_PBVH_Buffers *buffers, void GPU_update_grid_pbvh_buffers(GPU_PBVH_Buffers *buffers, struct CCGElem **grids, const struct DMFlagMat *grid_flag_mats, int *grid_indices, int totgrid, const struct CCGKey *key, - int show_diffuse_color); + bool show_diffuse_color); void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial, - int wireframe); + bool wireframe); -int GPU_pbvh_buffers_diffuse_changed(GPU_PBVH_Buffers *buffers, int show_diffuse_color); +bool GPU_pbvh_buffers_diffuse_changed(GPU_PBVH_Buffers *buffers, bool show_diffuse_color); void GPU_free_pbvh_buffers(GPU_PBVH_Buffers *buffers); diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index 475e833b202..7e2f4655cb1 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -125,10 +125,11 @@ void GPU_set_gpu_mipmapping(int gpu_mipmap); void GPU_paint_update_image(struct Image *ima, int x, int y, int w, int h); void GPU_update_images_framechange(void); int GPU_update_image_time(struct Image *ima, double time); -int GPU_verify_image(struct Image *ima, struct ImageUser *iuser, int tftile, int compare, int mipmap, bool is_data); -void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float *frect, int rectw, int recth, int mipmap, int use_hight_bit_depth, struct Image *ima); +int GPU_verify_image(struct Image *ima, struct ImageUser *iuser, int tftile, bool compare, bool mipmap, bool is_data); +void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float *frect, int rectw, int recth, + bool mipmap, bool use_hight_bit_depth, struct Image *ima); void GPU_create_gl_tex_compressed(unsigned int *bind, unsigned int *pix, int x, int y, int mipmap, struct Image *ima, struct ImBuf *ibuf); -int GPU_upload_dxt_texture(struct ImBuf *ibuf); +bool GPU_upload_dxt_texture(struct ImBuf *ibuf); void GPU_free_image(struct Image *ima); void GPU_free_images(void); void GPU_free_images_anim(void); diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 1db424b514d..e97cc57055f 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -115,7 +115,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, int channels, float * GPUTexture *GPU_texture_create_depth(int w, int h, char err_out[256]); GPUTexture *GPU_texture_create_vsm_shadow_map(int size, char err_out[256]); GPUTexture *GPU_texture_from_blender(struct Image *ima, - struct ImageUser *iuser, int isdata, double time, int mipmap); + struct ImageUser *iuser, bool is_data, double time, int mipmap); GPUTexture *GPU_texture_from_preview(struct PreviewImage *prv, int mipmap); void GPU_texture_free(GPUTexture *tex); diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index cd8e9e74906..ce974e1eceb 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -108,7 +108,7 @@ typedef struct GPUNodeStack { GPUNodeLink *GPU_attribute(int type, const char *name); GPUNodeLink *GPU_uniform(float *num); GPUNodeLink *GPU_dynamic_uniform(float *num, int dynamictype, void *data); -GPUNodeLink *GPU_image(struct Image *ima, struct ImageUser *iuser, int isdata); +GPUNodeLink *GPU_image(struct Image *ima, struct ImageUser *iuser, bool is_data); GPUNodeLink *GPU_image_preview(struct PreviewImage *prv); GPUNodeLink *GPU_texture(int size, float *pixels); GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex, int dynamictype, void *data); @@ -138,7 +138,7 @@ struct Scene *GPU_material_scene(GPUMaterial *material); void GPU_material_vertex_attributes(GPUMaterial *material, struct GPUVertexAttribs *attrib); -int GPU_material_do_color_management(GPUMaterial *mat); +bool GPU_material_do_color_management(GPUMaterial *mat); /* Exported shading */ diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index d3353e68d0b..7902d092cac 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1353,7 +1353,7 @@ struct GPU_PBVH_Buffers { * smooth-shaded or all faces are flat-shaded */ int smooth; - int show_diffuse_color; + bool show_diffuse_color; float diffuse_color[4]; }; typedef enum { @@ -1582,7 +1582,7 @@ GPU_PBVH_Buffers *GPU_build_pbvh_mesh_buffers(int (*face_vert_indices)[4], buffers->index_type = GL_UNSIGNED_SHORT; buffers->smooth = mface[face_indices[0]].flag & ME_SMOOTH; - buffers->show_diffuse_color = FALSE; + buffers->show_diffuse_color = false; /* Count the number of visible triangles */ for (i = 0, tottri = 0; i < totface; ++i) { @@ -1652,7 +1652,7 @@ GPU_PBVH_Buffers *GPU_build_pbvh_mesh_buffers(int (*face_vert_indices)[4], void GPU_update_grid_pbvh_buffers(GPU_PBVH_Buffers *buffers, CCGElem **grids, const DMFlagMat *grid_flag_mats, int *grid_indices, - int totgrid, const CCGKey *key, int show_diffuse_color) + int totgrid, const CCGKey *key, bool show_diffuse_color) { VertexBufferFormat *vert_data; int i, j, k, x, y; @@ -1902,7 +1902,7 @@ GPU_PBVH_Buffers *GPU_build_grid_pbvh_buffers(int *grid_indices, int totgrid, buffers->grid_hidden = grid_hidden; buffers->totgrid = totgrid; - buffers->show_diffuse_color = FALSE; + buffers->show_diffuse_color = false; /* Count the number of quads */ totquad = gpu_count_grid_quads(grid_hidden, grid_indices, totgrid, gridsize); @@ -2188,7 +2188,7 @@ GPU_PBVH_Buffers *GPU_build_bmesh_pbvh_buffers(int smooth_shading) if (smooth_shading) glGenBuffersARB(1, &buffers->index_buf); glGenBuffersARB(1, &buffers->vert_buf); - buffers->use_bmesh = TRUE; + buffers->use_bmesh = true; buffers->smooth = smooth_shading; return buffers; @@ -2393,7 +2393,7 @@ static void gpu_draw_buffers_legacy_grids(GPU_PBVH_Buffers *buffers) } void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial, - int wireframe) + bool wireframe) { /* sets material from the first face, to solve properly face would need to * be sorted in buckets by materials */ @@ -2485,15 +2485,15 @@ void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial, } } -int GPU_pbvh_buffers_diffuse_changed(GPU_PBVH_Buffers *buffers, int show_diffuse_color) +bool GPU_pbvh_buffers_diffuse_changed(GPU_PBVH_Buffers *buffers, bool show_diffuse_color) { float diffuse_color[4]; if (buffers->show_diffuse_color != show_diffuse_color) - return TRUE; + return true; - if (buffers->show_diffuse_color == FALSE) - return FALSE; + if (buffers->show_diffuse_color == false) + return false; if (buffers->mface) { MFace *f = buffers->mface + buffers->face_indices[0]; diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 68cf51f10d3..20e65028495 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -1136,14 +1136,14 @@ GPUNodeLink *GPU_dynamic_uniform(float *num, int dynamictype, void *data) return link; } -GPUNodeLink *GPU_image(Image *ima, ImageUser *iuser, int isdata) +GPUNodeLink *GPU_image(Image *ima, ImageUser *iuser, bool is_data) { GPUNodeLink *link = GPU_node_link_create(0); - link->image= LINK_IMAGE_BLENDER; - link->ptr1= ima; - link->ptr2= iuser; - link->image_isdata= isdata; + link->image = LINK_IMAGE_BLENDER; + link->ptr1 = ima; + link->ptr2 = iuser; + link->image_isdata = is_data; return link; } diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 40ee745db23..fba7e028830 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -460,7 +460,7 @@ static void gpu_verify_reflection(Image *ima) } } -int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int mipmap, bool is_data) +int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, bool compare, bool mipmap, bool is_data) { ImBuf *ibuf = NULL; unsigned int *bind = NULL; @@ -470,7 +470,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int float *srgb_frect = NULL; short texwindx, texwindy, texwinsx, texwinsy; /* flag to determine whether high resolution format is used */ - int use_high_bit_depth = FALSE, do_color_management = FALSE; + bool use_high_bit_depth = false, do_color_management = false; /* initialize tile mode and number of repeats */ GTS.ima = ima; @@ -526,12 +526,12 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int if (U.use_16bit_textures) { /* use high precision textures. This is relatively harmless because OpenGL gives us * a high precision format only if it is available */ - use_high_bit_depth = TRUE; + use_high_bit_depth = true; } /* TODO unneeded when float images are correctly treated as linear always */ if (!is_data) - do_color_management = TRUE; + do_color_management = true; if (ibuf->rect==NULL) IMB_rect_from_float(ibuf); @@ -573,7 +573,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int if (do_color_management) { srgb_frect = MEM_mallocN(ibuf->x*ibuf->y*sizeof(float)*4, "floar_buf_col_cor"); IMB_buffer_float_from_float(srgb_frect, ibuf->rect_float, - ibuf->channels, IB_PROFILE_SRGB, IB_PROFILE_LINEAR_RGB, TRUE, + ibuf->channels, IB_PROFILE_SRGB, IB_PROFILE_LINEAR_RGB, true, ibuf->x, ibuf->y, ibuf->x, ibuf->x); IMB_buffer_float_unpremultiply(srgb_frect, ibuf->x, ibuf->y); /* clamp buffer colors to 1.0 to avoid artifacts due to glu for hdr images */ @@ -599,7 +599,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int if (do_color_management) { frect = srgb_frect = MEM_mallocN(ibuf->x*ibuf->y*sizeof(*srgb_frect)*4, "floar_buf_col_cor"); IMB_buffer_float_from_float(srgb_frect, ibuf->rect_float, - ibuf->channels, IB_PROFILE_SRGB, IB_PROFILE_LINEAR_RGB, TRUE, + ibuf->channels, IB_PROFILE_SRGB, IB_PROFILE_LINEAR_RGB, true, ibuf->x, ibuf->y, ibuf->x, ibuf->x); IMB_buffer_float_unpremultiply(srgb_frect, ibuf->x, ibuf->y); /* clamp buffer colors to 1.0 to avoid artifacts due to glu for hdr images */ @@ -682,7 +682,8 @@ 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, + bool mipmap, bool use_high_bit_depth, Image *ima) { unsigned int *scalerect = NULL; float *fscalerect = NULL; @@ -760,9 +761,9 @@ void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float *frect, int /** * GPU_upload_dxt_texture() assumes that the texture is already bound and ready to go. * This is so the viewport and the BGE can share some code. - * Returns FALSE if the provided ImBuf doesn't have a supported DXT compression format + * Returns false if the provided ImBuf doesn't have a supported DXT compression format */ -int GPU_upload_dxt_texture(ImBuf *ibuf) +bool GPU_upload_dxt_texture(ImBuf *ibuf) { #ifdef WITH_DDS GLint format = 0; @@ -782,12 +783,12 @@ int GPU_upload_dxt_texture(ImBuf *ibuf) if (format == 0) { printf("Unable to find a suitable DXT compression, falling back to uncompressed\n"); - return FALSE; + return false; } if (!is_power_of_2_resolution(width, height)) { printf("Unable to load non-power-of-two DXT image resolution, falling back to uncompressed\n"); - return FALSE; + return false; } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gpu_get_mipmap_filter(0)); @@ -818,10 +819,10 @@ int GPU_upload_dxt_texture(ImBuf *ibuf) /* set number of mipmap levels we have, needed in case they don't go down to 1x1 */ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, i-1); - return TRUE; + return true; #else (void)ibuf; - return FALSE; + return false; #endif } @@ -873,7 +874,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap, int alphablend) gpu_verify_alpha_blend(alphablend); gpu_verify_reflection(ima); - if (GPU_verify_image(ima, NULL, tface->tile, 1, mipmap, FALSE)) { + if (GPU_verify_image(ima, NULL, tface->tile, 1, mipmap, false)) { GTS.curtile= GTS.tile; GTS.curima= GTS.ima; GTS.curtilemode= GTS.tilemode; @@ -1424,7 +1425,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O * - object transparency off: for glsl we draw both in a single pass, and * for solid we don't use transparency at all. */ GMS.use_alpha_pass = (do_alpha_after != NULL); - GMS.is_alpha_pass = (v3d->transp != FALSE); + GMS.is_alpha_pass = (v3d->transp != false); if (GMS.use_alpha_pass) *do_alpha_after = false; @@ -1495,7 +1496,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O } } - /* setting 'do_alpha_after = TRUE' indicates this object needs to be + /* setting 'do_alpha_after = true' indicates this object needs to be * drawn in a second alpha pass for improved blending */ if (do_alpha_after && !GMS.is_alpha_pass) if (ELEM3(alphablend, GPU_BLEND_ALPHA, GPU_BLEND_ADD, GPU_BLEND_ALPHA_SORT)) diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index e8fd8eb49d6..5c3bf6eb8e2 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -555,7 +555,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, int channels, float * return tex; } -GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, int isdata, double time, int mipmap) +GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, bool is_data, double time, int mipmap) { GPUTexture *tex; GLint w, h, border, lastbindcode, bindcode; @@ -564,7 +564,7 @@ GPUTexture *GPU_texture_from_blender(Image *ima, ImageUser *iuser, int isdata, d GPU_update_image_time(ima, time); /* this binds a texture, so that's why to restore it with lastbindcode */ - bindcode = GPU_verify_image(ima, iuser, 0, 0, mipmap, isdata); + bindcode = GPU_verify_image(ima, iuser, 0, 0, mipmap, is_data); if (ima->gputexture) { ima->gputexture->bindcode = bindcode; diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 608c498bd1e..f73c98f9123 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -393,10 +393,10 @@ void gpu_material_add_node(GPUMaterial *material, GPUNode *node) /* Code generation */ -int GPU_material_do_color_management(GPUMaterial *mat) +bool GPU_material_do_color_management(GPUMaterial *mat) { if (!BKE_scene_check_color_management_enabled(mat->scene)) - return FALSE; + return false; return !((mat->scene->gm.flag & GAME_GLSL_NO_COLOR_MANAGEMENT)); } @@ -653,7 +653,7 @@ static void shade_light_textures(GPUMaterial *mat, GPULamp *lamp, GPUNodeLink ** GPU_link(mat, "shade_light_texture", GPU_builtin(GPU_VIEW_POSITION), - GPU_image(mtex->tex->ima, &mtex->tex->iuser, FALSE), + GPU_image(mtex->tex->ima, &mtex->tex->iuser, false), GPU_dynamic_uniform((float*)lamp->dynpersmat, GPU_DYNAMIC_LAMP_DYNPERSMAT, lamp->ob), &tex_rgb); texture_rgb_blend(mat, tex_rgb, *rgb, GPU_uniform(&one), GPU_uniform(&mtex->colfac), mtex->blendtype, rgb); @@ -976,7 +976,8 @@ static void do_material_tex(GPUShadeInput *shi) /*char *lastuvname = NULL;*/ /*UNUSED*/ float one = 1.0f, norfac, ofs[3]; int tex_nr, rgbnor, talpha; - int init_done = FALSE, iBumpSpacePrev = 0; /* Not necessary, quiting gcc warning. */ + bool init_done = false; + int iBumpSpacePrev = 0; /* Not necessary, quiting gcc warning. */ GPUNodeLink *vNorg, *vNacc, *fPrevMagnitude; int iFirstTimeNMap=1; int found_deriv_map = 0; @@ -1046,7 +1047,7 @@ static void do_material_tex(GPUShadeInput *shi) talpha = 0; if (tex && tex->type == TEX_IMAGE && tex->ima) { - GPU_link(mat, "mtex_image", texco, GPU_image(tex->ima, &tex->iuser, FALSE), &tin, &trgb); + GPU_link(mat, "mtex_image", texco, GPU_image(tex->ima, &tex->iuser, false), &tin, &trgb); rgbnor= TEX_RGB; talpha = ((tex->imaflag & TEX_USEALPHA) && tex->ima && (tex->ima->flag & IMA_IGNORE_ALPHA) == 0); @@ -1121,7 +1122,7 @@ static void do_material_tex(GPUShadeInput *shi) if (tex->imaflag & TEX_NORMALMAP) { /* normalmap image */ - GPU_link(mat, "mtex_normal", texco, GPU_image(tex->ima, &tex->iuser, TRUE), &tnor); + GPU_link(mat, "mtex_normal", texco, GPU_image(tex->ima, &tex->iuser, true), &tnor); if (mtex->norfac < 0.0f) GPU_link(mat, "mtex_negate_texnormal", tnor, &tnor); @@ -1219,7 +1220,7 @@ static void do_material_tex(GPUShadeInput *shi) // copy shi->vn to vNorg and vNacc, set magnitude to 1 GPU_link(mat, "mtex_bump_normals_init", shi->vn, &vNorg, &vNacc, &fPrevMagnitude); iBumpSpacePrev = 0; - init_done = TRUE; + init_done = true; } // find current bump space @@ -1261,26 +1262,26 @@ static void do_material_tex(GPUShadeInput *shi) if (found_deriv_map) { GPU_link(mat, "mtex_bump_deriv", - texco, GPU_image(tex->ima, &tex->iuser, TRUE), GPU_uniform(&ima_x), GPU_uniform(&ima_y), tnorfac, + texco, GPU_image(tex->ima, &tex->iuser, true), GPU_uniform(&ima_x), GPU_uniform(&ima_y), tnorfac, &dBs, &dBt ); } else if ( mtex->texflag & MTEX_3TAP_BUMP) GPU_link(mat, "mtex_bump_tap3", - texco, GPU_image(tex->ima, &tex->iuser, TRUE), tnorfac, + texco, GPU_image(tex->ima, &tex->iuser, true), tnorfac, &dBs, &dBt ); else if ( mtex->texflag & MTEX_5TAP_BUMP) GPU_link(mat, "mtex_bump_tap5", - texco, GPU_image(tex->ima, &tex->iuser, TRUE), tnorfac, + texco, GPU_image(tex->ima, &tex->iuser, true), tnorfac, &dBs, &dBt ); else if ( mtex->texflag & MTEX_BICUBIC_BUMP ) { if (GPU_bicubic_bump_support()) { GPU_link(mat, "mtex_bump_bicubic", - texco, GPU_image(tex->ima, &tex->iuser, TRUE), tnorfac, + texco, GPU_image(tex->ima, &tex->iuser, true), tnorfac, &dBs, &dBt); } else { GPU_link(mat, "mtex_bump_tap5", - texco, GPU_image(tex->ima, &tex->iuser, TRUE), tnorfac, + texco, GPU_image(tex->ima, &tex->iuser, true), tnorfac, &dBs, &dBt); } } @@ -1290,7 +1291,7 @@ static void do_material_tex(GPUShadeInput *shi) float imag_tspace_dimension_y = aspect*imag_tspace_dimension_x; GPU_link(mat, "mtex_bump_apply_texspace", fDet, dBs, dBt, vR1, vR2, - GPU_image(tex->ima, &tex->iuser, TRUE), texco, + GPU_image(tex->ima, &tex->iuser, true), texco, GPU_uniform(&imag_tspace_dimension_x), GPU_uniform(&imag_tspace_dimension_y), vNacc, &vNacc, &shi->vn ); } diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index be0069f5bfa..c941f1b065e 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -240,11 +240,11 @@ int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc); /** - * Return the fps contained in movie files (function rval is FALSE, + * Return the fps contained in movie files (function rval is false, * and frs_sec and frs_sec_base untouched if none available!) */ -int IMB_anim_get_fps(struct anim *anim, - short *frs_sec, float *frs_sec_base); +bool IMB_anim_get_fps(struct anim *anim, + short *frs_sec, float *frs_sec_base); /** * @@ -354,7 +354,7 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags); * * \attention Defined in util.c */ -int IMB_ispic(const char *name); +bool IMB_ispic(const char *name); /** * @@ -386,16 +386,16 @@ void IMB_saturation(struct ImBuf *ibuf, float sat); /* converting pixel buffers */ void IMB_buffer_byte_from_float(unsigned char *rect_to, const float *rect_from, - int channels_from, float dither, int profile_to, int profile_from, int predivide, + int channels_from, float dither, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from); void IMB_buffer_float_from_byte(float *rect_to, const unsigned char *rect_from, - int profile_to, int profile_from, int predivide, + int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from); void IMB_buffer_float_from_float(float *rect_to, const float *rect_from, - int channels_from, int profile_to, int profile_from, int predivide, + int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from); void IMB_buffer_byte_from_byte(unsigned char *rect_to, const unsigned char *rect_from, - int profile_to, int profile_from, int predivide, + int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from); void IMB_buffer_float_clamp(float *buf, int width, int height); void IMB_buffer_float_unpremultiply(float *buf, int width, int height); diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index a6c51b1d397..40fdf19ccc1 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -147,7 +147,8 @@ static void free_anim_movie(struct anim *UNUSED(anim)) static int an_stringdec(const char *string, char *head, char *tail, unsigned short *numlen) { unsigned short len, nume, nums = 0; - short i, found = FALSE; + short i; + bool found = false; len = strlen(string); nume = len; @@ -161,7 +162,7 @@ static int an_stringdec(const char *string, char *head, char *tail, unsigned sho else { nume = i; nums = i; - found = TRUE; + found = true; } } else { @@ -178,7 +179,7 @@ static int an_stringdec(const char *string, char *head, char *tail, unsigned sho tail[0] = '\0'; strcpy(head, string); *numlen = 0; - return TRUE; + return true; } @@ -567,7 +568,7 @@ static int startffmpeg(struct anim *anim) anim->next_packet.stream_index = -1; anim->pFrame = avcodec_alloc_frame(); - anim->pFrameComplete = FALSE; + anim->pFrameComplete = false; anim->pFrameDeinterlaced = avcodec_alloc_frame(); anim->pFrameRGB = avcodec_alloc_frame(); @@ -690,7 +691,7 @@ static void ffmpeg_postprocess(struct anim *anim) anim->pCodecCtx->width, anim->pCodecCtx->height) < 0) { - filter_y = TRUE; + filter_y = true; } else { input = anim->pFrameDeinterlaced; @@ -936,18 +937,18 @@ static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx) const char **p; if (pFormatCtx->iformat->flags & AVFMT_TS_DISCONT) { - return TRUE; + return true; } p = byte_seek_list; while (*p) { if (match_format(*p++, pFormatCtx)) { - return TRUE; + return true; } } - return FALSE; + return false; } static ImBuf *ffmpeg_fetchibuf(struct anim *anim, int position, @@ -1425,15 +1426,15 @@ int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc) return IMB_indexer_get_duration(idx); } -int IMB_anim_get_fps(struct anim *anim, +bool IMB_anim_get_fps(struct anim *anim, short *frs_sec, float *frs_sec_base) { if (anim->frs_sec) { *frs_sec = anim->frs_sec; *frs_sec_base = anim->frs_sec_base; - return TRUE; + return true; } - return FALSE; + return false; } void IMB_anim_set_preseek(struct anim *anim, int preseek) diff --git a/source/blender/imbuf/intern/colormanagement.c b/source/blender/imbuf/intern/colormanagement.c index efd3037cda0..8aa9615feac 100644 --- a/source/blender/imbuf/intern/colormanagement.c +++ b/source/blender/imbuf/intern/colormanagement.c @@ -1404,12 +1404,12 @@ static void *do_display_buffer_apply_thread(void *handle_v) if (cm_processor == NULL) { if (display_buffer_byte) { IMB_buffer_byte_from_byte(display_buffer_byte, handle->byte_buffer, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - FALSE, width, height, width, width); + false, width, height, width, width); } if (display_buffer) { IMB_buffer_float_from_byte(display_buffer, handle->byte_buffer, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - FALSE, width, height, width, width); + false, width, height, width, width); } } else { @@ -1976,7 +1976,7 @@ void IMB_colormanagement_buffer_make_display_space(float *buffer, unsigned char IMB_buffer_byte_from_float(display_buffer, display_buffer_float, channels, dither, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - TRUE, width, height, width, width); + true, width, height, width, width); MEM_freeN(display_buffer_float); IMB_colormanagement_processor_free(cm_processor); @@ -2095,7 +2095,7 @@ void IMB_display_buffer_transform_apply(unsigned char *display_buffer, float *li IMB_colormanagement_processor_free(cm_processor); IMB_buffer_byte_from_float(display_buffer, buffer, channels, 0.0f, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - FALSE, width, height, width, width); + false, width, height, width, width); MEM_freeN(buffer); } @@ -2704,7 +2704,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffe if (display_buffer_float) { /* huh, for dither we need float buffer first, no cheaper way. currently */ IMB_buffer_float_from_byte(display_buffer_float, byte_buffer, - IB_PROFILE_SRGB, IB_PROFILE_SRGB, TRUE, + IB_PROFILE_SRGB, IB_PROFILE_SRGB, true, width, height, width, display_stride); } else { @@ -2723,7 +2723,7 @@ static void partial_buffer_update_rect(ImBuf *ibuf, unsigned char *display_buffe int display_index = (ymin * display_stride + xmin) * channels; IMB_buffer_byte_from_float(display_buffer + display_index, display_buffer_float, channels, dither, - IB_PROFILE_SRGB, IB_PROFILE_SRGB, TRUE, width, height, display_stride, width); + IB_PROFILE_SRGB, IB_PROFILE_SRGB, true, width, height, display_stride, width); MEM_freeN(display_buffer_float); } diff --git a/source/blender/imbuf/intern/divers.c b/source/blender/imbuf/intern/divers.c index 6f6169b6a92..ef1bc9eaafa 100644 --- a/source/blender/imbuf/intern/divers.c +++ b/source/blender/imbuf/intern/divers.c @@ -175,7 +175,7 @@ MINLINE void float_to_byte_dither_v4(uchar b[4], const float f[4], DitherContext /* float to byte pixels, output 4-channel RGBA */ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from, - int channels_from, float dither, int profile_to, int profile_from, int predivide, + int channels_from, float dither, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from) { float tmp[4]; @@ -329,7 +329,7 @@ void IMB_buffer_byte_from_float(uchar *rect_to, const float *rect_from, /* byte to float pixels, input and output 4-channel RGBA */ void IMB_buffer_float_from_byte(float *rect_to, const uchar *rect_from, - int profile_to, int profile_from, int predivide, + int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from) { float tmp[4]; @@ -382,7 +382,7 @@ void IMB_buffer_float_from_byte(float *rect_to, const uchar *rect_from, /* float to float pixels, output 4-channel RGBA */ void IMB_buffer_float_from_float(float *rect_to, const float *rect_from, - int channels_from, int profile_to, int profile_from, int predivide, + int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from) { int x, y; @@ -468,7 +468,7 @@ void IMB_buffer_float_from_float(float *rect_to, const float *rect_from, /* byte to byte pixels, input and output 4-channel RGBA */ void IMB_buffer_byte_from_byte(uchar *rect_to, const uchar *rect_from, - int profile_to, int profile_from, int predivide, + int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from) { float tmp[4]; @@ -556,7 +556,7 @@ void IMB_rect_from_float(ImBuf *ibuf) /* convert float to byte */ IMB_buffer_byte_from_float((unsigned char *) ibuf->rect, buffer, ibuf->channels, ibuf->dither, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - FALSE, ibuf->x, ibuf->y, ibuf->x, ibuf->x); + false, ibuf->x, ibuf->y, ibuf->x, ibuf->x); MEM_freeN(buffer); @@ -591,12 +591,12 @@ void IMB_partial_rect_from_float(ImBuf *ibuf, float *buffer, int x, int y, int w /* and do color space conversion to byte */ IMB_buffer_byte_from_float(rect_byte, rect_float, - 4, ibuf->dither, IB_PROFILE_SRGB, profile_from, TRUE, + 4, ibuf->dither, IB_PROFILE_SRGB, profile_from, true, w, h, ibuf->x, w); } else { IMB_buffer_float_from_float(buffer, rect_float, - ibuf->channels, IB_PROFILE_SRGB, profile_from, TRUE, + ibuf->channels, IB_PROFILE_SRGB, profile_from, true, w, h, w, ibuf->x); /* XXX: need to convert to image buffer's rect space */ @@ -637,7 +637,7 @@ void IMB_float_from_rect(ImBuf *ibuf) /* first, create float buffer in non-linear space */ IMB_buffer_float_from_byte(rect_float, (unsigned char *) ibuf->rect, IB_PROFILE_SRGB, IB_PROFILE_SRGB, - FALSE, ibuf->x, ibuf->y, ibuf->x, ibuf->x); + false, ibuf->x, ibuf->y, ibuf->x, ibuf->x); /* then make float be in linear space */ IMB_colormanagement_colorspace_to_scene_linear(rect_float, ibuf->x, ibuf->y, ibuf->channels, diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h index 999aae81cb7..897a149a45c 100644 --- a/source/blender/imbuf/intern/imbuf.h +++ b/source/blender/imbuf/intern/imbuf.h @@ -69,9 +69,6 @@ typedef unsigned char uchar; -#define TRUE 1 -#define FALSE 0 - #define IMB_DPI_DEFAULT 72.0f #endif /* __IMBUF_H__ */ diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 14967c32477..841e13d3ff1 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -376,7 +376,7 @@ static void get_index_dir(struct anim *anim, char *index_dir, size_t index_dir_l } static void get_proxy_filename(struct anim *anim, IMB_Proxy_Size preview_size, - char *fname, int temp) + char *fname, bool temp) { char index_dir[FILE_MAXDIR]; int i = IMB_proxy_size_to_array_index(preview_size); @@ -484,7 +484,7 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg( rv->proxy_size = proxy_size; rv->anim = anim; - get_proxy_filename(rv->anim, rv->proxy_size, fname, TRUE); + get_proxy_filename(rv->anim, rv->proxy_size, fname, true); BLI_make_existing_file(fname); rv->of = avformat_alloc_context(); @@ -677,14 +677,14 @@ static void free_proxy_output_ffmpeg(struct proxy_output_ctx *ctx, } get_proxy_filename(ctx->anim, ctx->proxy_size, - fname_tmp, TRUE); + fname_tmp, true); if (rollback) { unlink(fname_tmp); } else { get_proxy_filename(ctx->anim, ctx->proxy_size, - fname, FALSE); + fname, false); unlink(fname); BLI_rename(fname_tmp, fname); } @@ -856,7 +856,7 @@ static void index_rebuild_ffmpeg_proc_decoded_frame( if (!context->start_pts_set) { context->start_pts = pts; - context->start_pts_set = TRUE; + context->start_pts_set = true; } context->frameno = floor((pts - context->start_pts) * @@ -917,7 +917,7 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context, if (*progress != next_progress) { *progress = next_progress; - *do_update = TRUE; + *do_update = true; } if (*stop) { @@ -1056,7 +1056,7 @@ static IndexBuildContext *index_fallback_create_context(struct anim *anim, IMB_T if (context->proxy_sizes_in_use & proxy_sizes[i]) { char fname[FILE_MAX]; - get_proxy_filename(anim, proxy_sizes[i], fname, TRUE); + get_proxy_filename(anim, proxy_sizes[i], fname, true); BLI_make_existing_file(fname); context->proxy_ctx[i] = alloc_proxy_output_avi(anim, fname, @@ -1079,8 +1079,8 @@ static void index_rebuild_fallback_finish(FallbackIndexBuilderContext *context, AVI_close_compress(context->proxy_ctx[i]); MEM_freeN(context->proxy_ctx[i]); - get_proxy_filename(anim, proxy_sizes[i], fname_tmp, TRUE); - get_proxy_filename(anim, proxy_sizes[i], fname, FALSE); + get_proxy_filename(anim, proxy_sizes[i], fname_tmp, true); + get_proxy_filename(anim, proxy_sizes[i], fname, false); if (stop) { unlink(fname_tmp); @@ -1107,7 +1107,7 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context, if (*progress != next_progress) { *progress = next_progress; - *do_update = TRUE; + *do_update = true; } if (*stop) { @@ -1261,7 +1261,7 @@ struct anim *IMB_anim_open_proxy( return NULL; } - get_proxy_filename(anim, preview_size, fname, FALSE); + get_proxy_filename(anim, preview_size, fname, false); /* proxies are generated in the same color space as animation itself */ anim->proxy_anim[i] = IMB_open_anim(fname, 0, 0, anim->colorspace); diff --git a/source/blender/imbuf/intern/indexer_dv.c b/source/blender/imbuf/intern/indexer_dv.c index 4e8c13d2e99..f456fc420b2 100644 --- a/source/blender/imbuf/intern/indexer_dv.c +++ b/source/blender/imbuf/intern/indexer_dv.c @@ -351,8 +351,8 @@ static void indexer_dv_proc_frame(anim_index_builder *idx, isPAL = (buffer[3] & 0x80); - This->got_record_date = FALSE; - This->got_record_time = FALSE; + This->got_record_date = false; + This->got_record_time = false; parse_frame(This, buffer, isPAL); proc_frame(This, buffer, isPAL); diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c index f4ac4322747..18c096450af 100644 --- a/source/blender/imbuf/intern/jp2.c +++ b/source/blender/imbuf/intern/jp2.c @@ -122,8 +122,8 @@ static void info_callback(const char *msg, void *client_data) struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) { struct ImBuf *ibuf = NULL; - int use_float = FALSE; /* for precision higher then 8 use float */ - int use_alpha = FALSE; + bool use_float = false; /* for precision higher then 8 use float */ + bool use_alpha = false; long signed_offsets[4] = {0, 0, 0, 0}; int float_divs[4] = {1, 1, 1, 1}; @@ -201,11 +201,11 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags, char co case 1: /* Grayscale */ case 3: /* Color */ planes = 24; - use_alpha = FALSE; + use_alpha = false; break; default: /* 2 or 4 - Grayscale or Color + alpha */ planes = 32; /* grayscale + alpha */ - use_alpha = TRUE; + use_alpha = true; break; } @@ -217,7 +217,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags, char co i--; if (image->comps[i].prec > 8) - use_float = TRUE; + use_float = true; if (image->comps[i].sgnd) signed_offsets[i] = 1 << (image->comps[i].prec - 1); @@ -432,7 +432,7 @@ static int initialise_4K_poc(opj_poc_t *POC, int numres) static void cinema_parameters(opj_cparameters_t *parameters) { - parameters->tile_size_on = 0; /* FALSE */ + parameters->tile_size_on = 0; /* false */ parameters->cp_tdx = 1; parameters->cp_tdy = 1; diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index a31ed5e7420..f8a8beb72bc 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -157,7 +157,7 @@ static boolean fill_input_buffer(j_decompress_ptr cinfo) src->terminal[0] = (JOCTET) 0xFF; src->terminal[1] = (JOCTET) JPEG_EOI; - return TRUE; + return true; } @@ -234,7 +234,7 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t /* Read a byte into variable V. - * If must suspend, take the specified action (typically "return FALSE"). + * If must suspend, take the specified action (typically "return false"). */ #define INPUT_BYTE(cinfo, V, action) \ MAKESTMT(MAKE_BYTE_AVAIL(cinfo, action); \ @@ -262,18 +262,18 @@ handle_app1(j_decompress_ptr cinfo) INPUT_VARS(cinfo); - INPUT_2BYTES(cinfo, length, return FALSE); + INPUT_2BYTES(cinfo, length, return false); length -= 2; if (length < 16) { - for (i = 0; i < length; i++) INPUT_BYTE(cinfo, neogeo[i], return FALSE); + for (i = 0; i < length; i++) INPUT_BYTE(cinfo, neogeo[i], return false); length = 0; if (strncmp(neogeo, "NeoGeo", 6) == 0) memcpy(&ibuf_ftype, neogeo + 6, 4); ibuf_ftype = BIG_LONG(ibuf_ftype); } INPUT_SYNC(cinfo); /* do before skip_input_data */ if (length > 0) (*cinfo->src->skip_input_data)(cinfo, length); - return TRUE; + return true; } @@ -294,7 +294,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla cinfo->dct_method = JDCT_FLOAT; jpeg_save_markers(cinfo, JPEG_COM, 0xffff); - if (jpeg_read_header(cinfo, FALSE) == JPEG_HEADER_OK) { + if (jpeg_read_header(cinfo, false) == JPEG_HEADER_OK) { x = cinfo->image_width; y = cinfo->image_height; depth = cinfo->num_components; @@ -482,7 +482,7 @@ static void write_jpeg(struct jpeg_compress_struct *cinfo, struct ImBuf *ibuf) ImMetaData *iptr; char *text; - jpeg_start_compress(cinfo, TRUE); + jpeg_start_compress(cinfo, true); strcpy(neogeo, "NeoGeo"); ibuf_ftype = BIG_LONG(ibuf->ftype); @@ -600,7 +600,7 @@ static int init_jpeg(FILE *outfile, struct jpeg_compress_struct *cinfo, struct I /* own settings */ cinfo->dct_method = JDCT_FLOAT; - jpeg_set_quality(cinfo, quality, TRUE); + jpeg_set_quality(cinfo, quality, true); return(0); } diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c index f699afd3475..6b2251eb24a 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -335,7 +335,7 @@ void IMB_moviecache_set_priority_callback(struct MovieCache *cache, MovieCacheGe cache->prioritydeleterfp = prioritydeleterfp; } -static void do_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf, int need_lock) +static void do_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf, bool need_lock) { MovieCacheKey *key; MovieCacheItem *item; @@ -393,7 +393,7 @@ static void do_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf, int void IMB_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf) { - do_moviecache_put(cache, userkey, ibuf, TRUE); + do_moviecache_put(cache, userkey, ibuf, true); } bool IMB_moviecache_put_if_possible(MovieCache *cache, void *userkey, ImBuf *ibuf) @@ -408,8 +408,8 @@ bool IMB_moviecache_put_if_possible(MovieCache *cache, void *userkey, ImBuf *ibu mem_in_use = MEM_CacheLimiter_get_memory_in_use(limitor); if (mem_in_use + elem_size <= mem_limit) { - do_moviecache_put(cache, userkey, ibuf, FALSE); - result = TRUE; + do_moviecache_put(cache, userkey, ibuf, false); + result = true; } BLI_mutex_unlock(&limitor_lock); diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c index 3c24864c671..d9cec1f3047 100644 --- a/source/blender/imbuf/intern/scaling.c +++ b/source/blender/imbuf/intern/scaling.c @@ -821,13 +821,13 @@ static void q_scale_float(float *in, float *out, int in_width, * * NOTE: disabled, due to unacceptable inaccuracy and quality loss, see bug #18609 (ton) */ -static int q_scale_linear_interpolation( +static bool q_scale_linear_interpolation( struct ImBuf *ibuf, int newx, int newy) { if ((newx >= ibuf->x && newy <= ibuf->y) || (newx <= ibuf->x && newy >= ibuf->y)) { - return FALSE; + return false; } if (ibuf->rect) { @@ -853,7 +853,7 @@ static int q_scale_linear_interpolation( ibuf->x = newx; ibuf->y = newy; - return TRUE; + return true; } static ImBuf *scaledownx(struct ImBuf *ibuf, int newx) @@ -1141,12 +1141,12 @@ static ImBuf *scaleupx(struct ImBuf *ibuf, int newx) if (ibuf->rect == NULL && ibuf->rect_float == NULL) return (ibuf); if (ibuf->rect) { - do_rect = TRUE; + do_rect = true; _newrect = MEM_mallocN(newx * ibuf->y * sizeof(int), "scaleupx"); if (_newrect == NULL) return(ibuf); } if (ibuf->rect_float) { - do_float = TRUE; + do_float = true; _newrectf = MEM_mallocN(newx * ibuf->y * sizeof(float) * 4, "scaleupxf"); if (_newrectf == NULL) { if (_newrect) MEM_freeN(_newrect); @@ -1298,7 +1298,8 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy) float val_bf, nval_bf, diff_bf; float val_gf, nval_gf, diff_gf; float val_rf, nval_rf, diff_rf; - int x, y, do_rect = FALSE, do_float = FALSE, skipx; + int x, y, skipx; + bool do_rect = false, do_float = false; val_a = nval_a = diff_a = val_b = nval_b = diff_b = 0; val_g = nval_g = diff_g = val_r = nval_r = diff_r = 0; @@ -1308,12 +1309,12 @@ static ImBuf *scaleupy(struct ImBuf *ibuf, int newy) if (ibuf->rect == NULL && ibuf->rect_float == NULL) return (ibuf); if (ibuf->rect) { - do_rect = TRUE; + do_rect = true; _newrect = MEM_mallocN(ibuf->x * newy * sizeof(int), "scaleupy"); if (_newrect == NULL) return(ibuf); } if (ibuf->rect_float) { - do_float = TRUE; + do_float = true; _newrectf = MEM_mallocN(ibuf->x * newy * sizeof(float) * 4, "scaleupyf"); if (_newrectf == NULL) { if (_newrect) MEM_freeN(_newrect); @@ -1527,16 +1528,17 @@ struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned { unsigned int *rect, *_newrect, *newrect; struct imbufRGBA *rectf, *_newrectf, *newrectf; - int x, y, do_float = FALSE, do_rect = FALSE; + int x, y; + bool do_float = false, do_rect = false; int ofsx, ofsy, stepx, stepy; rect = NULL; _newrect = NULL; newrect = NULL; rectf = NULL; _newrectf = NULL; newrectf = NULL; if (ibuf == NULL) return(NULL); - if (ibuf->rect) do_rect = TRUE; - if (ibuf->rect_float) do_float = TRUE; - if (do_rect == FALSE && do_float == FALSE) return(ibuf); + if (ibuf->rect) do_rect = true; + if (ibuf->rect_float) do_float = true; + if (do_rect == false && do_float == false) return(ibuf); if (newx == ibuf->x && newy == ibuf->y) return(ibuf); diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c index 6dbd7a4027e..07c6bb6f84f 100644 --- a/source/blender/imbuf/intern/targa.c +++ b/source/blender/imbuf/intern/targa.c @@ -163,7 +163,7 @@ static short makebody_tga(ImBuf *ibuf, FILE *file, int (*out)(unsigned int, FILE rect = temp; last = this; - copy = FALSE; + copy = 0; } else { while (*rect++ == this) { /* seek for first different byte */ @@ -189,7 +189,7 @@ static short makebody_tga(ImBuf *ibuf, FILE *file, int (*out)(unsigned int, FILE } if (out(last, file) == EOF) return 0; } - copy = TRUE; + copy = 1; } } } diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 9259c4f743d..a91990774fc 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -183,7 +183,7 @@ const char *imb_ext_audio[] = { NULL }; -int IMB_ispic(const char *name) +bool IMB_ispic(const char *name) { /* increased from 32 to 64 because of the bitmaps header size */ #define HEADER_SIZE 64 @@ -196,17 +196,17 @@ int IMB_ispic(const char *name) if (UTIL_DEBUG) printf("IMB_ispic_name: loading %s\n", name); if (BLI_stat(name, &st) == -1) - return FALSE; + return false; if (((st.st_mode) & S_IFMT) != S_IFREG) - return FALSE; + return false; if ((fp = BLI_open(name, O_BINARY | O_RDONLY, 0)) < 0) - return FALSE; + return false; memset(buf, 0, sizeof(buf)); if (read(fp, buf, HEADER_SIZE) <= 0) { close(fp); - return FALSE; + return false; } close(fp); @@ -228,7 +228,7 @@ int IMB_ispic(const char *name) } } - return FALSE; + return false; #undef HEADER_SIZE } @@ -240,7 +240,7 @@ static int isavi(const char *name) return AVI_is_avi(name); #else (void)name; - return FALSE; + return false; #endif } diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c index 1519fc1990d..d4a9bf7dc09 100644 --- a/source/blender/imbuf/intern/writeimage.c +++ b/source/blender/imbuf/intern/writeimage.c @@ -64,13 +64,13 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags) { ImFileType *type; - if (ibuf == NULL) return (FALSE); + if (ibuf == NULL) return (false); ibuf->flags = flags; for (type = IMB_FILE_TYPES; type < IMB_FILE_TYPES_LAST; type++) { if (type->save && type->ftype(type, ibuf)) { ImBuf *write_ibuf; - short result = FALSE; + short result = false; write_ibuf = prepare_write_imbuf(type, ibuf); @@ -85,6 +85,6 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags) fprintf(stderr, "Couldn't save picture.\n"); - return FALSE; + return false; } diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index f1ecb8ddf1e..189e75935d1 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1768,12 +1768,12 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property if (cprop->item_type) fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s, %s)", collection_funcs, (const char *)cprop->item_type, srna->identifier, - rna_safe_id(prop->identifier), (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + rna_safe_id(prop->identifier), (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); else fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s, %s)", collection_funcs, "UnknownType", srna->identifier, - rna_safe_id(prop->identifier), (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + rna_safe_id(prop->identifier), (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); break; } } @@ -1949,12 +1949,12 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe if (cprop->type) fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s)", (const char *)cprop->type, srna->identifier, - prop->identifier, (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + prop->identifier, (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); else fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s, %s, %s, %s)", "UnknownType", srna->identifier, - prop->identifier, (cprop->length ? "TRUE" : "FALSE"), - (cprop->lookupint ? "TRUE" : "FALSE"), (cprop->lookupstring ? "TRUE" : "FALSE")); + prop->identifier, (cprop->length ? "true" : "false"), + (cprop->lookupint ? "true" : "false"), (cprop->lookupstring ? "true" : "false")); #endif break; } diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index c5af85a45fa..7959e60da33 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -115,10 +115,10 @@ static int rna_ID_name_editable(PointerRNA *ptr) if (GS(id->name) == ID_VF) { VFont *vfont = (VFont *)id; if (BKE_vfont_is_builtin(vfont)) - return FALSE; + return false; } - return TRUE; + return true; } short RNA_type_to_ID_code(StructRNA *type) diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 43de4b374b4..ae8280e9ec4 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4414,7 +4414,7 @@ static char *rna_path_from_ID_to_idpgroup(PointerRNA *ptr) * of an armature or object */ RNA_id_pointer_create(ptr->id.data, &id_ptr); - haystack = RNA_struct_idprops(&id_ptr, FALSE); + haystack = RNA_struct_idprops(&id_ptr, false); if (haystack) { /* can fail when called on bones */ needle = ptr->data; return rna_idp_path(&id_ptr, haystack, needle, NULL); @@ -4568,7 +4568,7 @@ char *RNA_path_full_property_py(PointerRNA *ptr, PropertyRNA *prop, int index) data_path = RNA_path_from_ID_to_property(ptr, prop); - if ((index == -1) || (RNA_property_array_check(prop) == FALSE)) { + if ((index == -1) || (RNA_property_array_check(prop) == false)) { ret = BLI_sprintfN("%s.%s", id_path, data_path); } @@ -4610,7 +4610,7 @@ char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index) } } - if ((index == -1) || (RNA_property_array_check(prop) == FALSE)) { + if ((index == -1) || (RNA_property_array_check(prop) == false)) { ret = BLI_sprintfN("%s", data_path); } @@ -4634,7 +4634,7 @@ char *RNA_path_property_py(PointerRNA *UNUSED(ptr), PropertyRNA *prop, int index { char *ret; - if ((index == -1) || (RNA_property_array_check(prop) == FALSE)) { + if ((index == -1) || (RNA_property_array_check(prop) == false)) { ret = BLI_sprintfN("%s", RNA_property_identifier(prop)); } diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 0f39846aa97..de12839dc01 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -80,7 +80,7 @@ static void rna_Action_groups_remove(bAction *act, ReportList *reports, PointerR FCurve *fcu, *fcn; /* try to remove the F-Curve from the action */ - if (BLI_remlink_safe(&act->groups, agrp) == FALSE) { + if (BLI_remlink_safe(&act->groups, agrp) == false) { BKE_reportf(reports, RPT_ERROR, "Action group '%s' not found in action '%s'", agrp->name, act->id.name + 2); return; } @@ -205,7 +205,7 @@ static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, static void rna_Action_frame_range_get(PointerRNA *ptr, float *values) { /* don't include modifiers because they too easily can have very large * ranges: MINAFRAMEF to MAXFRAMEF. */ - calc_action_range(ptr->id.data, values, values + 1, FALSE); + calc_action_range(ptr->id.data, values, values + 1, false); } diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 18c3f107876..f2881bf2541 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -460,7 +460,7 @@ static void rna_KeyingSet_paths_remove(KeyingSet *keyingset, ReportList *reports KS_Path *ksp = ksp_ptr->data; /* if data is valid, call the API function for this */ - if ((keyingset && ksp) == FALSE) { + if ((keyingset && ksp) == false) { BKE_report(reports, RPT_ERROR, "Keying set path could not be removed"); return; } diff --git a/source/blender/makesrna/intern/rna_armature_api.c b/source/blender/makesrna/intern/rna_armature_api.c index 96c5350e5b7..1a4a9492543 100644 --- a/source/blender/makesrna/intern/rna_armature_api.c +++ b/source/blender/makesrna/intern/rna_armature_api.c @@ -46,7 +46,7 @@ static void rna_EditBone_align_roll(EditBone *ebo, float no[3]) { - ebo->roll = ED_rollBoneToVector(ebo, no, FALSE); + ebo->roll = ED_rollBoneToVector(ebo, no, false); } static float rna_Bone_do_envelope(Bone *bone, float *vec) diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index a55be8e285f..df9a08480cb 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -90,7 +90,7 @@ static void rna_CurveMapping_clip_set(PointerRNA *ptr, int value) if (value) cumap->flag |= CUMA_DO_CLIP; else cumap->flag &= ~CUMA_DO_CLIP; - curvemapping_changed(cumap, FALSE); + curvemapping_changed(cumap, false); } static void rna_CurveMapping_black_level_set(PointerRNA *ptr, const float *values) @@ -370,7 +370,7 @@ static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *repo { CBData *element = element_ptr->data; int index = (int)(element - coba->data); - if (colorband_element_remove(coba, index) == FALSE) { + if (colorband_element_remove(coba, index) == false) { BKE_report(reports, RPT_ERROR, "Element not found in element collection or last element"); return; } @@ -381,7 +381,7 @@ static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *repo void rna_CurveMap_remove_point(CurveMap *cuma, ReportList *reports, PointerRNA *point_ptr) { CurveMapPoint *point = point_ptr->data; - if (curvemap_remove_point(cuma, point) == FALSE) { + if (curvemap_remove_point(cuma, point) == false) { BKE_report(reports, RPT_ERROR, "Unable to remove curve point"); return; } @@ -596,13 +596,13 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *UNUSED(bmain) if (scene->ed) { ColorManagedColorspaceSettings *colorspace_settings = (ColorManagedColorspaceSettings *) ptr->data; Sequence *seq; - int seq_found = FALSE; + bool seq_found = false; if (&scene->sequencer_colorspace_settings != colorspace_settings) { SEQ_BEGIN(scene->ed, seq); { if (seq->strip && &seq->strip->colorspace_settings == colorspace_settings) { - seq_found = TRUE; + seq_found = true; break; } } diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 43e50ed6c3d..f720a695ef1 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -628,7 +628,7 @@ static void rna_Curve_spline_remove(Curve *cu, ReportList *reports, PointerRNA * Nurb *nu = nu_ptr->data; ListBase *nurbs = BKE_curve_nurbs_get(cu); - if (BLI_remlink_safe(nurbs, nu) == FALSE) { + if (BLI_remlink_safe(nurbs, nu) == false) { BKE_reportf(reports, RPT_ERROR, "Curve '%s' does not contain spline given", cu->id.name + 2); return; } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index ce55a452d3e..7c6198d2c05 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -382,7 +382,7 @@ static int rna_find_sdna_member(SDNA *sdna, const char *structname, const char * return 0; } -static int rna_validate_identifier(const char *identifier, char *error, int property) +static int rna_validate_identifier(const char *identifier, char *error, bool property) { int a = 0; @@ -706,7 +706,7 @@ StructRNA *RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRN if (DefRNA.preprocess) { char error[512]; - if (rna_validate_identifier(identifier, error, FALSE) == 0) { + if (rna_validate_identifier(identifier, error, false) == 0) { fprintf(stderr, "%s: struct identifier \"%s\" error - %s\n", __func__, identifier, error); DefRNA.error = 1; } @@ -1000,7 +1000,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier if (DefRNA.preprocess) { char error[512]; - if (rna_validate_identifier(identifier, error, TRUE) == 0) { + if (rna_validate_identifier(identifier, error, true) == 0) { fprintf(stderr, "%s: property identifier \"%s.%s\" - %s\n", __func__, CONTAINER_RNA_ID(cont), identifier, error); DefRNA.error = 1; @@ -1020,7 +1020,7 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier else { #ifdef DEBUG char error[512]; - if (rna_validate_identifier(identifier, error, TRUE) == 0) { + if (rna_validate_identifier(identifier, error, true) == 0) { fprintf(stderr, "%s: runtime property identifier \"%s.%s\" - %s\n", __func__, CONTAINER_RNA_ID(cont), identifier, error); DefRNA.error = 1; @@ -2990,7 +2990,7 @@ static FunctionRNA *rna_def_function(StructRNA *srna, const char *identifier) if (DefRNA.preprocess) { char error[512]; - if (rna_validate_identifier(identifier, error, FALSE) == 0) { + if (rna_validate_identifier(identifier, error, false) == 0) { fprintf(stderr, "%s: function identifier \"%s\" - %s\n", __func__, identifier, error); DefRNA.error = 1; } diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index f37925a6ff5..4288bf2dddb 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -736,12 +736,12 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); /* whether this surface has preview data for 3D view */ - RNA_define_verify_sdna(FALSE); + RNA_define_verify_sdna(false); prop = RNA_def_property(srna, "use_color_preview", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_DynamicPaint_use_color_preview_get", NULL); RNA_def_property_ui_text(prop, "Use Color Preview", "Whether this surface has some color preview for 3D view"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); - RNA_define_verify_sdna(TRUE); + RNA_define_verify_sdna(true); } static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index eca50b84d25..55e60047194 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -440,7 +440,7 @@ static void rna_FCurve_group_set(PointerRNA *ptr, PointerRNA value) /* calculate time extents of F-Curve */ static void rna_FCurve_range(FCurve *fcu, float range[2]) { - calc_fcurve_range(fcu, range, range + 1, FALSE, FALSE); + calc_fcurve_range(fcu, range, range + 1, false, false); } @@ -448,7 +448,7 @@ static void rna_FCurve_range(FCurve *fcu, float range[2]) static void rna_FCurve_update_data_ex(FCurve *fcu) { sort_time_fcurve(fcu); - testhandles_fcurve(fcu, TRUE); + testhandles_fcurve(fcu, true); } /* RNA update callback for F-Curves after curve shape changes */ diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 99f427a9ab6..0b129bab524 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -388,7 +388,7 @@ static int rna_Image_is_float_get(PointerRNA *ptr) Image *im = (Image *)ptr->data; ImBuf *ibuf; void *lock; - int is_float = FALSE; + bool is_float = false; ibuf = BKE_image_acquire_ibuf(im, NULL, &lock); if (ibuf) diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c index 81387bdd1c3..0619bb0352a 100644 --- a/source/blender/makesrna/intern/rna_linestyle.c +++ b/source/blender/makesrna/intern/rna_linestyle.c @@ -310,25 +310,25 @@ static void rna_def_modifier_type_common(StructRNA *srna, EnumPropertyItem *modi static void rna_def_color_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_color_modifier_type_items, - "rna_LineStyleColorModifier_name_set", TRUE, TRUE); + "rna_LineStyleColorModifier_name_set", true, true); } static void rna_def_alpha_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_alpha_modifier_type_items, - "rna_LineStyleAlphaModifier_name_set", TRUE, FALSE); + "rna_LineStyleAlphaModifier_name_set", true, false); } static void rna_def_thickness_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_thickness_modifier_type_items, - "rna_LineStyleThicknessModifier_name_set", TRUE, FALSE); + "rna_LineStyleThicknessModifier_name_set", true, false); } static void rna_def_geometry_modifier(StructRNA *srna) { rna_def_modifier_type_common(srna, linestyle_geometry_modifier_type_items, - "rna_LineStyleGeometryModifier_name_set", FALSE, FALSE); + "rna_LineStyleGeometryModifier_name_set", false, false); } static void rna_def_modifier_color_ramp_common(StructRNA *srna, int range) @@ -354,7 +354,7 @@ static void rna_def_modifier_color_ramp_common(StructRNA *srna, int range) } } -static void rna_def_modifier_curve_common(StructRNA *srna, int range, int value) +static void rna_def_modifier_curve_common(StructRNA *srna, bool range, bool value) { PropertyRNA *prop; @@ -467,17 +467,17 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) srna = RNA_def_struct(brna, "LineStyleColorModifier_AlongStroke", "LineStyleColorModifier"); RNA_def_struct_ui_text(srna, "Along Stroke", "Change line color along stroke"); rna_def_color_modifier(srna); - rna_def_modifier_color_ramp_common(srna, FALSE); + rna_def_modifier_color_ramp_common(srna, false); srna = RNA_def_struct(brna, "LineStyleColorModifier_DistanceFromCamera", "LineStyleColorModifier"); RNA_def_struct_ui_text(srna, "Distance from Camera", "Change line color based on the distance from the camera"); rna_def_color_modifier(srna); - rna_def_modifier_color_ramp_common(srna, TRUE); + rna_def_modifier_color_ramp_common(srna, true); srna = RNA_def_struct(brna, "LineStyleColorModifier_DistanceFromObject", "LineStyleColorModifier"); RNA_def_struct_ui_text(srna, "Distance from Object", "Change line color based on the distance from an object"); rna_def_color_modifier(srna); - rna_def_modifier_color_ramp_common(srna, TRUE); + rna_def_modifier_color_ramp_common(srna, true); prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target"); @@ -490,7 +490,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Material", "Change line color based on a material attribute"); rna_def_color_modifier(srna); rna_def_modifier_material_common(srna); - rna_def_modifier_color_ramp_common(srna, FALSE); + rna_def_modifier_color_ramp_common(srna, false); prop = RNA_def_property(srna, "use_ramp", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", LS_MODIFIER_USE_RAMP); @@ -508,19 +508,19 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) srna = RNA_def_struct(brna, "LineStyleAlphaModifier_AlongStroke", "LineStyleAlphaModifier"); RNA_def_struct_ui_text(srna, "Along Stroke", "Change alpha transparency along stroke"); rna_def_alpha_modifier(srna); - rna_def_modifier_curve_common(srna, FALSE, FALSE); + rna_def_modifier_curve_common(srna, false, false); srna = RNA_def_struct(brna, "LineStyleAlphaModifier_DistanceFromCamera", "LineStyleAlphaModifier"); RNA_def_struct_ui_text(srna, "Distance from Camera", "Change alpha transparency based on the distance from the camera"); rna_def_alpha_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, FALSE); + rna_def_modifier_curve_common(srna, true, false); srna = RNA_def_struct(brna, "LineStyleAlphaModifier_DistanceFromObject", "LineStyleAlphaModifier"); RNA_def_struct_ui_text(srna, "Distance from Object", "Change alpha transparency based on the distance from an object"); rna_def_alpha_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, FALSE); + rna_def_modifier_curve_common(srna, true, false); prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target"); @@ -533,7 +533,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Material", "Change alpha transparency based on a material attribute"); rna_def_alpha_modifier(srna); rna_def_modifier_material_common(srna); - rna_def_modifier_curve_common(srna, FALSE, FALSE); + rna_def_modifier_curve_common(srna, false, false); /* line thickness modifiers */ @@ -546,17 +546,17 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) srna = RNA_def_struct(brna, "LineStyleThicknessModifier_AlongStroke", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Along Stroke", "Change line thickness along stroke"); rna_def_thickness_modifier(srna); - rna_def_modifier_curve_common(srna, FALSE, TRUE); + rna_def_modifier_curve_common(srna, false, true); srna = RNA_def_struct(brna, "LineStyleThicknessModifier_DistanceFromCamera", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Distance from Camera", "Change line thickness based on the distance from the camera"); rna_def_thickness_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, TRUE); + rna_def_modifier_curve_common(srna, true, true); srna = RNA_def_struct(brna, "LineStyleThicknessModifier_DistanceFromObject", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Distance from Object", "Change line thickness based on the distance from an object"); rna_def_thickness_modifier(srna); - rna_def_modifier_curve_common(srna, TRUE, TRUE); + rna_def_modifier_curve_common(srna, true, true); prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target"); @@ -569,7 +569,7 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Material", "Change line thickness based on a material attribute"); rna_def_thickness_modifier(srna); rna_def_modifier_material_common(srna); - rna_def_modifier_curve_common(srna, FALSE, TRUE); + rna_def_modifier_curve_common(srna, false, true); srna = RNA_def_struct(brna, "LineStyleThicknessModifier_Calligraphy", "LineStyleThicknessModifier"); RNA_def_struct_ui_text(srna, "Calligraphy", diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index b7b793ebeaf..f163808c61b 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -72,7 +72,7 @@ static int rna_Main_is_dirty_get(PointerRNA *ptr) return !wm->file_saved; } - return TRUE; + return true; } static void rna_Main_filepath_get(PointerRNA *ptr, char *value) diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 5fedc233ff9..f7080375902 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -310,7 +310,7 @@ Mesh *rna_Main_meshes_new_from_object( int uv_from_orco; /* copies object and modifiers (but not the data) */ - tmpobj = BKE_object_copy_ex(bmain, ob, TRUE); + tmpobj = BKE_object_copy_ex(bmain, ob, true); tmpcu = (Curve *)tmpobj->data; tmpcu->id.us--; diff --git a/source/blender/makesrna/intern/rna_mask.c b/source/blender/makesrna/intern/rna_mask.c index eb94da6c87b..afd149a755a 100644 --- a/source/blender/makesrna/intern/rna_mask.c +++ b/source/blender/makesrna/intern/rna_mask.c @@ -440,7 +440,7 @@ static void rna_MaskLayer_spline_remove(ID *id, MaskLayer *mask_layer, ReportLis Mask *mask = (Mask *) id; MaskSpline *spline = spline_ptr->data; - if (BKE_mask_spline_remove(mask_layer, spline) == FALSE) { + if (BKE_mask_spline_remove(mask_layer, spline) == false) { BKE_reportf(reports, RPT_ERROR, "Mask layer '%s' does not contain spline given", mask_layer->name); return; } diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c index 2627e628538..5f4a7706c0e 100644 --- a/source/blender/makesrna/intern/rna_meta.c +++ b/source/blender/makesrna/intern/rna_meta.c @@ -132,7 +132,7 @@ static void rna_MetaBall_elements_remove(MetaBall *mb, ReportList *reports, Poin { MetaElem *ml = ml_ptr->data; - if (BLI_remlink_safe(&mb->elems, ml) == FALSE) { + if (BLI_remlink_safe(&mb->elems, ml) == false) { BKE_reportf(reports, RPT_ERROR, "Metaball '%s' does not contain spline given", mb->id.name + 2); return; } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index c6fa87c7d96..0664ecf0d34 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1393,7 +1393,7 @@ static bNodeType *rna_Node_register_base(Main *bmain, ReportList *reports, Struc func = RNA_def_function_runtime(nt->ext.srna, "is_registered_node_type", rna_Node_is_registered_node_type_runtime); RNA_def_function_ui_description(func, "True if a registered node type"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - parm = RNA_def_boolean(func, "result", FALSE, "Result", ""); + parm = RNA_def_boolean(func, "result", false, "Result", ""); RNA_def_function_return(func, parm); /* XXX bad level call! needed to initialize the basic draw functions ... */ @@ -1532,13 +1532,13 @@ static int rna_Node_parent_poll(PointerRNA *ptr, PointerRNA value) * in the future should have a poll function or so to test possible attachment. */ if (parent->type != NODE_FRAME) - return FALSE; + return false; /* make sure parent is not attached to the node */ if (nodeAttachNodeCheck(parent, node)) - return FALSE; + return false; - return TRUE; + return true; } static void rna_Node_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -2414,7 +2414,7 @@ static StructRNA *rna_NodeCustomGroup_register( static void rna_CompositorNode_tag_need_exec(bNode *node) { - node->need_exec = TRUE; + node->need_exec = true; } static void rna_Node_tex_image_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -2482,7 +2482,7 @@ static StructRNA *rna_NodeGroup_interface_typef(PointerRNA *ptr) bNodeTree *ngroup = (bNodeTree *)node->id; if (ngroup) { - StructRNA *srna = ntreeInterfaceTypeGet(ngroup, TRUE); + StructRNA *srna = ntreeInterfaceTypeGet(ngroup, true); if (srna) return srna; } @@ -2494,7 +2494,7 @@ static StructRNA *rna_NodeGroupInputOutput_interface_typef(PointerRNA *ptr) bNodeTree *ntree = ptr->id.data; if (ntree) { - StructRNA *srna = ntreeInterfaceTypeGet(ntree, TRUE); + StructRNA *srna = ntreeInterfaceTypeGet(ntree, true); if (srna) return srna; } @@ -3859,7 +3859,7 @@ static void def_sh_script(StructRNA *srna) RNA_def_function_ui_description(func, "Find a socket by name"); parm = RNA_def_string(func, "name", NULL, 0, "Socket name", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - /*parm =*/ RNA_def_boolean(func, "is_output", FALSE, "Output", "Whether the socket is an output"); + /*parm =*/ RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output"); parm = RNA_def_pointer(func, "result", "NodeSocket", "", ""); RNA_def_function_return(func, parm); @@ -3870,7 +3870,7 @@ static void def_sh_script(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED); parm = RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - /*parm =*/ RNA_def_boolean(func, "is_output", FALSE, "Output", "Whether the socket is an output"); + /*parm =*/ RNA_def_boolean(func, "is_output", false, "Output", "Whether the socket is an output"); parm = RNA_def_pointer(func, "result", "NodeSocket", "", ""); RNA_def_function_return(func, parm); @@ -5738,19 +5738,19 @@ static void def_cmp_colorcorrection(StructRNA *srna) PropertyRNA *prop; prop = RNA_def_property(srna, "red", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_ui_text(prop, "Red", "Red channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "green", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 2); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_ui_text(prop, "Green", "Green channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); prop = RNA_def_property(srna, "blue", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "custom1", 4); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_ui_text(prop, "Blue", "Blue channel active"); RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); @@ -6929,13 +6929,13 @@ static void rna_def_internal_node(BlenderRNA *brna) func = RNA_def_function(srna, "poll", "rna_NodeInternal_poll"); RNA_def_function_ui_description(func, "If non-null output is returned, the node type can be added to the tree"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "poll_instance", "rna_NodeInternal_poll_instance"); RNA_def_function_ui_description(func, "If non-null output is returned, the node can be added to the tree"); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -7161,7 +7161,7 @@ static void rna_def_node(BlenderRNA *brna) func = RNA_def_function(srna, "is_registered_node_type", "rna_Node_is_registered_node_type"); RNA_def_function_ui_description(func, "True if a registered node type"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - parm = RNA_def_boolean(func, "result", FALSE, "Result", ""); + parm = RNA_def_boolean(func, "result", false, "Result", ""); RNA_def_function_return(func, parm); /* registration */ @@ -7223,14 +7223,14 @@ static void rna_def_node(BlenderRNA *brna) func = RNA_def_function(srna, "poll", NULL); RNA_def_function_ui_description(func, "If non-null output is returned, the node type can be added to the tree"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); func = RNA_def_function(srna, "poll_instance", NULL); RNA_def_function_ui_description(func, "If non-null output is returned, the node can be added to the tree"); RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", ""); RNA_def_property_flag(parm, PROP_REQUIRED); @@ -7394,7 +7394,7 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); parm = RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket"); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - RNA_def_boolean(func, "verify_limits", TRUE, "Verify Limits", "Remove existing links if connection limit is exceeded"); + RNA_def_boolean(func, "verify_limits", true, "Verify Limits", "Remove existing links if connection limit is exceeded"); /* return */ parm = RNA_def_pointer(func, "link", "NodeLink", "", "New node link"); RNA_def_function_return(func, parm); @@ -7571,7 +7571,7 @@ static void rna_def_nodetree(BlenderRNA *brna) RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER_OPTIONAL); parm = RNA_def_pointer(func, "context", "Context", "", ""); RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); - RNA_def_function_return(func, RNA_def_boolean(func, "visible", FALSE, "", "")); + RNA_def_function_return(func, RNA_def_boolean(func, "visible", false, "", "")); /* update */ func = RNA_def_function(srna, "update", NULL); @@ -7676,7 +7676,7 @@ static StructRNA *define_specific_node(BlenderRNA *brna, const char *struct_name func = RNA_def_function(srna, "is_registered_node_type", "rna_Node_is_registered_node_type"); RNA_def_function_ui_description(func, "True if a registered node type"); RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_SELF_TYPE); - parm = RNA_def_boolean(func, "result", FALSE, "Result", ""); + parm = RNA_def_boolean(func, "result", false, "Result", ""); RNA_def_function_return(func, parm); /* Exposes the socket template type lists in RNA for use in scripts diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index b46b1e71c32..193d7baad33 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -213,7 +213,7 @@ static void rna_Object_internal_update(Main *UNUSED(bmain), Scene *UNUSED(scene) static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) { /* don't use compat so we get predictable rotation */ - BKE_object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, FALSE, TRUE); + BKE_object_apply_mat4(ptr->id.data, ((Object *)ptr->id.data)->obmat, false, true); rna_Object_internal_update(bmain, scene, ptr); } @@ -245,7 +245,7 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16]) } /* don't use compat so we get predictable rotation */ - BKE_object_apply_mat4(ob, ob->obmat, FALSE, FALSE); + BKE_object_apply_mat4(ob, ob->obmat, false, false); } static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16]) @@ -257,7 +257,7 @@ static void rna_Object_matrix_basis_get(PointerRNA *ptr, float values[16]) static void rna_Object_matrix_basis_set(PointerRNA *ptr, const float values[16]) { Object *ob = ptr->id.data; - BKE_object_apply_mat4(ob, (float(*)[4])values, FALSE, FALSE); + BKE_object_apply_mat4(ob, (float(*)[4])values, false, false); } void rna_Object_internal_update_data(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -1335,7 +1335,7 @@ static ModifierData *rna_Object_modifier_new(Object *object, bContext *C, Report static void rna_Object_modifier_remove(Object *object, bContext *C, ReportList *reports, PointerRNA *md_ptr) { ModifierData *md = md_ptr->data; - if (ED_object_modifier_remove(reports, CTX_data_main(C), object, md) == FALSE) { + if (ED_object_modifier_remove(reports, CTX_data_main(C), object, md) == false) { /* error is already set */ return; } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index e672a7ef2a7..0b6d6b36e7c 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -382,7 +382,7 @@ static int rna_Object_is_deform_modified(Object *ob, Scene *scene, int settings) void rna_Object_dm_info(struct Object *ob, int type, char *result) { DerivedMesh *dm = NULL; - int dm_release = FALSE; + bool dm_release = false; char *ret = NULL; result[0] = '\0'; @@ -392,7 +392,7 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result) if (ob->type == OB_MESH) { dm = CDDM_from_mesh(ob->data); ret = DM_debug_info(dm); - dm_release = TRUE; + dm_release = true; } break; case 1: diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 4050b9b2df3..a7be3daea20 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -605,10 +605,10 @@ static int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, Pointer bPoseChannel *pchan = BKE_pose_channel_find_name(pose, key); if (pchan) { RNA_pointer_create(ptr->id.data, &RNA_PoseBone, pchan, r_ptr); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -621,7 +621,7 @@ static void rna_PoseChannel_matrix_basis_get(PointerRNA *ptr, float *values) static void rna_PoseChannel_matrix_basis_set(PointerRNA *ptr, const float *values) { bPoseChannel *pchan = (bPoseChannel *)ptr->data; - BKE_pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */ + BKE_pchan_apply_mat4(pchan, (float (*)[4])values, false); /* no compat for predictable result */ } static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values) @@ -632,7 +632,7 @@ static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values) BKE_armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat); - BKE_pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */ + BKE_pchan_apply_mat4(pchan, tmat, false); /* no compat for predictable result */ } #else diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index 6e24397d066..78cd8d4bad4 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -825,7 +825,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) /* Dynamics Parameters - Deactivation */ prop = RNA_def_property(srna, "use_deactivation", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", RBO_FLAG_USE_DEACTIVATION); - RNA_def_property_boolean_default(prop, TRUE); + RNA_def_property_boolean_default(prop, true); RNA_def_property_boolean_funcs(prop, NULL, "rna_RigidBodyOb_activation_state_set"); RNA_def_property_ui_text(prop, "Enable Deactivation", "Enable deactivation of resting rigid bodies (increases performance and stability " @@ -897,7 +897,7 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) /* Collision Parameters - Sensitivity */ prop = RNA_def_property(srna, "use_margin", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", RBO_FLAG_USE_MARGIN); - RNA_def_property_boolean_default(prop, FALSE); + RNA_def_property_boolean_default(prop, false); RNA_def_property_ui_text(prop, "Collision Margin", "Use custom collision margin (some shapes will have a visible gap around them)"); RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_shape_reset"); diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index ae0841b4e28..8d448f26bbe 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -381,7 +381,7 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point propptr.data = prop; *r_ptr = propptr; - return TRUE; + return true; } } else { @@ -391,7 +391,7 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point propptr.data = prop; *r_ptr = propptr; - return TRUE; + return true; } } } @@ -413,13 +413,13 @@ int rna_builtin_properties_lookup_string(PointerRNA *ptr, const char *key, Point propptr.data = idp; *r_ptr = propptr; - return TRUE; + return true; } } } } #endif - return FALSE; + return false; } PointerRNA rna_builtin_type_get(PointerRNA *ptr) @@ -992,10 +992,10 @@ static int rna_BlenderRNA_structs_lookup_int(PointerRNA *ptr, int index, Pointer if (srna) { RNA_pointer_create(NULL, &RNA_Struct, srna, r_ptr); - return TRUE; + return true; } else { - return FALSE; + return false; } } static int rna_BlenderRNA_structs_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr) @@ -1004,11 +1004,11 @@ static int rna_BlenderRNA_structs_lookup_string(PointerRNA *ptr, const char *key for (; srna; srna = srna->cont.next) { if (key[0] == srna->identifier[0] && strcmp(key, srna->identifier) == 0) { RNA_pointer_create(NULL, &RNA_Struct, srna, r_ptr); - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index d15e9dc3441..95425440eac 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -348,11 +348,11 @@ static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key for (base = scene->base.first; base; base = base->next) { if (strncmp(base->object->id.name + 2, key, sizeof(base->object->id.name) - 2) == 0) { *r_ptr = rna_pointer_inherit_refine(ptr, &RNA_ObjectBase, base); - return TRUE; + return true; } } - return FALSE; + return false; } static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter) @@ -1408,7 +1408,7 @@ static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[], int frame) static void rna_TimeLine_remove(Scene *scene, ReportList *reports, PointerRNA *marker_ptr) { TimeMarker *marker = marker_ptr->data; - if (BLI_remlink_safe(&scene->markers, marker) == FALSE) { + if (BLI_remlink_safe(&scene->markers, marker) == false) { BKE_reportf(reports, RPT_ERROR, "Timeline marker '%s' not found in scene '%s'", marker->name, scene->id.name + 2); return; diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index c51ee901370..84134e7cd3a 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -108,8 +108,8 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name if (BKE_imtype_is_movie(rd->im_format.imtype)) BKE_movie_filepath_get(name, rd); else - BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, &rd->im_format, - rd->scemode & R_EXTENSION, TRUE); + BKE_makepicstring(name, rd->pic, G.main->name, (frame == INT_MIN) ? rd->cfra : frame, + &rd->im_format, (rd->scemode & R_EXTENSION) != 0, true); } static void rna_Scene_ray_cast(Scene *scene, float ray_start[3], float ray_end[3], diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c index adea1f641a9..1d9464ab7c5 100644 --- a/source/blender/makesrna/intern/rna_screen.c +++ b/source/blender/makesrna/intern/rna_screen.c @@ -157,7 +157,7 @@ static void rna_Area_type_update(bContext *C, PointerRNA *ptr) /* It is possible that new layers becomes visible. */ if (sa->spacetype == SPACE_VIEW3D) { - DAG_on_visible_update(CTX_data_main(C), FALSE); + DAG_on_visible_update(CTX_data_main(C), false); } CTX_wm_window_set(C, prevwin); diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 1ac43e426de..9d8d360c6f1 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -1000,9 +1000,9 @@ static int rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA v Sequence *cur = (Sequence *) value.data; if (seq == cur) - return FALSE; + return false; - return TRUE; + return true; } static SequenceModifierData *rna_Sequence_modifier_new(Sequence *seq, bContext *C, ReportList *reports, const char *name, int type) diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 0356d871e0e..8fe5376322e 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -396,7 +396,7 @@ static void rna_SpaceView3D_layer_set(PointerRNA *ptr, const int *values) static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { - DAG_on_visible_update(bmain, FALSE); + DAG_on_visible_update(bmain, false); } static void rna_SpaceView3D_viewport_shade_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) @@ -508,10 +508,10 @@ static void rna_RegionView3D_quadview_update(Main *UNUSED(main), Scene *UNUSED(s rna_area_region_from_regiondata(ptr, &sa, &ar); if (sa && ar && ar->alignment == RGN_ALIGN_QSPLIT) - ED_view3d_quadview_update(sa, ar, FALSE); + ED_view3d_quadview_update(sa, ar, false); } -/* same as above but call clip==TRUE */ +/* same as above but call clip==true */ static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main), Scene *UNUSED(scene), PointerRNA *ptr) { ScrArea *sa; @@ -519,7 +519,7 @@ static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main), Scene *UNU rna_area_region_from_regiondata(ptr, &sa, &ar); if (sa && ar && ar->alignment == RGN_ALIGN_QSPLIT) - ED_view3d_quadview_update(sa, ar, TRUE); + ED_view3d_quadview_update(sa, ar, true); } static void rna_RegionView3D_view_location_get(PointerRNA *ptr, float *values) @@ -1195,7 +1195,7 @@ static int rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type) if (type->poll) return type->poll(C, type); else - return TRUE; + return true; } static EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free) diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index df8c68676b3..847efa2fad5 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -599,7 +599,7 @@ static MovieTrackingObject *rna_trackingObject_new(MovieTracking *tracking, cons static void rna_trackingObject_remove(MovieTracking *tracking, ReportList *reports, PointerRNA *object_ptr) { MovieTrackingObject *object = object_ptr->data; - if (BKE_tracking_object_delete(tracking, object) == FALSE) { + if (BKE_tracking_object_delete(tracking, object) == false) { BKE_reportf(reports, RPT_ERROR, "MovieTracking '%s' cannot be removed", object->name); return; } @@ -1168,7 +1168,7 @@ static void rna_def_trackingMarkers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to find marker for", MINFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_boolean(func, "exact", TRUE, "Exact", + RNA_def_boolean(func, "exact", true, "Exact", "Get marker at exact frame number rather than get estimated marker"); parm = RNA_def_pointer(func, "marker", "MovieTrackingMarker", "", "Marker for specified frame"); RNA_def_function_return(func, parm); @@ -1466,7 +1466,7 @@ static void rna_def_trackingPlaneMarkers(BlenderRNA *brna, PropertyRNA *cprop) parm = RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to find marker for", MINFRAME, MAXFRAME); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_boolean(func, "exact", TRUE, "Exact", + RNA_def_boolean(func, "exact", true, "Exact", "Get plane marker at exact frame number rather than get estimated marker"); parm = RNA_def_pointer(func, "plane_marker", "MovieTrackingPlaneMarker", "", "Plane marker for specified frame"); RNA_def_function_return(func, parm); diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index ed526d00741..f14fadfa722 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -483,7 +483,7 @@ static StructRNA *rna_UIList_register(Main *bmain, ReportList *reports, void *da } /* check if we have registered this uilist type before, and remove it */ - ult = WM_uilisttype_find(dummyult.idname, TRUE); + ult = WM_uilisttype_find(dummyult.idname, true); if (ult && ult->ext.srna) rna_UIList_unregister(bmain, ult->ext.srna); @@ -708,7 +708,7 @@ static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data } /* check if we have registered this menu type before, and remove it */ - mt = WM_menutype_find(dummymt.idname, TRUE); + mt = WM_menutype_find(dummymt.idname, true); if (mt && mt->ext.srna) rna_Menu_unregister(bmain, mt->ext.srna); @@ -983,7 +983,7 @@ static void rna_def_panel(BlenderRNA *brna) RNA_def_property_string_sdna(prop, NULL, "type->translation_context"); RNA_def_property_string_default(prop, BLF_I18NCONTEXT_DEFAULT_BPYRNA); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); - RNA_define_verify_sdna(TRUE); + RNA_define_verify_sdna(true); prop = RNA_def_property(srna, "bl_category", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->category"); @@ -1218,7 +1218,7 @@ static void rna_def_menu(BlenderRNA *brna) parm = RNA_def_pointer(func, "context", "Context", "", ""); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_define_verify_sdna(FALSE); /* not in sdna */ + RNA_define_verify_sdna(false); /* not in sdna */ prop = RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "layout"); diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index fd8d8aede87..7271d35086e 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -540,7 +540,7 @@ static IDProperty *rna_AddonPref_idprops(PointerRNA *ptr, bool create) static PointerRNA rna_Addon_preferences_get(PointerRNA *ptr) { bAddon *addon = (bAddon *)ptr->data; - bAddonPrefType *apt = BKE_addon_pref_type_find(addon->module, TRUE); + bAddonPrefType *apt = BKE_addon_pref_type_find(addon->module, true); if (apt) { if (addon->prop == NULL) { IDPropertyTemplate val = {0}; @@ -592,7 +592,7 @@ static StructRNA *rna_AddonPref_register(Main *bmain, ReportList *reports, void } /* check if we have registered this header type before, and remove it */ - apt = BKE_addon_pref_type_find(dummyaddon.module, TRUE); + apt = BKE_addon_pref_type_find(dummyaddon.module, true); if (apt) { if (apt->ext.srna) { rna_AddonPref_unregister(bmain, apt->ext.srna); diff --git a/source/blender/makesrna/intern/rna_vfont.c b/source/blender/makesrna/intern/rna_vfont.c index ff9469550d9..f24f94282b6 100644 --- a/source/blender/makesrna/intern/rna_vfont.c +++ b/source/blender/makesrna/intern/rna_vfont.c @@ -48,9 +48,9 @@ static int rna_VectorFont_filepath_editable(PointerRNA *ptr) { VFont *vfont = ptr->id.data; if (BKE_vfont_is_builtin(vfont)) { - return FALSE; + return false; } - return TRUE; + return true; } static void rna_VectorFont_reload_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 3cad1df83f4..23b6d1e41ae 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -519,7 +519,7 @@ static PointerRNA rna_Operator_properties_get(PointerRNA *ptr) static PointerRNA rna_OperatorMacro_properties_get(PointerRNA *ptr) { wmOperatorTypeMacro *otmacro = (wmOperatorTypeMacro *)ptr->data; - wmOperatorType *ot = WM_operatortype_find(otmacro->idname, TRUE); + wmOperatorType *ot = WM_operatortype_find(otmacro->idname, true); return rna_pointer_inherit_refine(ptr, ot->srna, otmacro->properties); } @@ -862,7 +862,7 @@ static int rna_wmClipboard_length(PointerRNA *UNUSED(ptr)) static void rna_wmClipboard_set(PointerRNA *UNUSED(ptr), const char *value) { - WM_clipboard_text_set((void *) value, FALSE); + WM_clipboard_text_set((void *) value, false); } #ifdef WITH_PYTHON @@ -1157,7 +1157,7 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void * /* check if we have registered this operator type before, and remove it */ { - wmOperatorType *ot = WM_operatortype_find(dummyot.idname, TRUE); + wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true); if (ot && ot->ext.srna) rna_Operator_unregister(bmain, ot->ext.srna); } @@ -1249,7 +1249,7 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v /* check if we have registered this operator type before, and remove it */ { - wmOperatorType *ot = WM_operatortype_find(dummyot.idname, TRUE); + wmOperatorType *ot = WM_operatortype_find(dummyot.idname, true); if (ot && ot->ext.srna) rna_Operator_unregister(bmain, ot->ext.srna); } diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c index ea13cff442a..9b288903aa2 100644 --- a/source/blender/makesrna/intern/rna_wm_api.c +++ b/source/blender/makesrna/intern/rna_wm_api.c @@ -235,7 +235,7 @@ static void rna_KeyMap_item_remove(wmKeyMap *km, ReportList *reports, PointerRNA { wmKeyMapItem *kmi = kmi_ptr->data; - if (WM_keymap_remove_item(km, kmi) == FALSE) { + if (WM_keymap_remove_item(km, kmi) == false) { BKE_reportf(reports, RPT_ERROR, "KeyMapItem '%s' cannot be removed from '%s'", kmi->idname, km->idname); return; } @@ -272,7 +272,7 @@ static void rna_KeyMap_remove(wmKeyConfig *keyconfig, ReportList *reports, Point { wmKeyMap *keymap = keymap_ptr->data; - if (WM_keymap_remove(keyconfig, keymap) == FALSE) { + if (WM_keymap_remove(keyconfig, keymap) == false) { BKE_reportf(reports, RPT_ERROR, "KeyConfig '%s' cannot be removed", keymap->idname); return; } @@ -284,7 +284,7 @@ static void rna_KeyConfig_remove(wmWindowManager *wm, ReportList *reports, Point { wmKeyConfig *keyconf = keyconf_ptr->data; - if (WM_keyconfig_remove(wm, keyconf) == FALSE) { + if (WM_keyconfig_remove(wm, keyconf) == false) { BKE_reportf(reports, RPT_ERROR, "KeyConfig '%s' cannot be removed", keyconf->idname); return; } diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 7f8fb851668..a3ac09d87f2 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -272,7 +272,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd, MDeformVert *dvert = (MDeformVert *) CustomData_get_layer(&result->vertData, CD_MDEFORMVERT) + maxVerts; int *flip_map = NULL, flip_map_len = 0; - flip_map = defgroup_flip_map(ob, &flip_map_len, FALSE); + flip_map = defgroup_flip_map(ob, &flip_map_len, false); if (flip_map) { for (i = 0; i < maxVerts; dvert++, i++) { diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index e5d9a9dae0e..91b1b2cbbca 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -64,7 +64,7 @@ static void clear_cache_data(struct OceanModifierData *omd) { BKE_free_ocean_cache(omd->oceancache); omd->oceancache = NULL; - omd->cached = FALSE; + omd->cached = false; } /* keep in sync with init_ocean_modifier_bake(), object_modifier.c */ @@ -74,7 +74,7 @@ static void init_ocean_modifier(struct OceanModifierData *omd) if (!omd || !omd->ocean) return; - do_heightfield = TRUE; + do_heightfield = true; do_chop = (omd->chop_amount > 0); do_normals = (omd->flag & MOD_OCEAN_GENERATE_NORMALS); do_jacobian = (omd->flag & MOD_OCEAN_GENERATE_FOAM); @@ -442,7 +442,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob, omd->refresh = 0; /* do ocean simulation */ - if (omd->cached == TRUE) { + if (omd->cached == true) { if (!omd->oceancache) init_cache_data(ob, omd); BKE_simulate_ocean_cache(omd->oceancache, md->scene->r.cfra); } @@ -495,7 +495,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob, const float u = OCEAN_CO(size_co_inv, co[0]); const float v = OCEAN_CO(size_co_inv, co[1]); - if (omd->oceancache && omd->cached == TRUE) { + if (omd->oceancache && omd->cached == true) { BKE_ocean_cache_eval_uv(omd->oceancache, &ocr, cfra, u, v); foam = ocr.foam; CLAMP(foam, 0.0f, 1.0f); @@ -523,7 +523,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *ob, const float u = OCEAN_CO(size_co_inv, mv->co[0]); const float v = OCEAN_CO(size_co_inv, mv->co[1]); - if (omd->oceancache && omd->cached == TRUE) + if (omd->oceancache && omd->cached == true) BKE_ocean_cache_eval_uv(omd->oceancache, &ocr, cfra, u, v); else BKE_ocean_eval_uv(omd->ocean, &ocr, u, v); diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 8afcc5a9c9e..6dc3f9cf240 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -217,7 +217,7 @@ static bool skin_frame_find_contained_faces(const Frame *frame, return false; } -/* Returns true if hull is successfully built, FALSE otherwise */ +/* Returns true if hull is successfully built, false otherwise */ static bool build_hull(SkinOutput *so, Frame **frames, int totframe) { BMesh *bm = so->bm; @@ -1664,7 +1664,7 @@ static void skin_smooth_hulls(BMesh *bm, SkinNode *skin_nodes, BM_data_layer_free_n(bm, &bm->vdata, CD_SHAPEKEY, skey); } -/* Returns TRUE if all hulls are successfully built, false otherwise */ +/* Returns true if all hulls are successfully built, false otherwise */ static bool skin_output_branch_hulls(SkinOutput *so, SkinNode *skin_nodes, int totvert, const MeshElemMap *emap, const MEdge *medge) diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c index 952ec15f2aa..76101409ba7 100644 --- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c +++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c @@ -129,7 +129,7 @@ bNodeSocket *ntreeCompositOutputFileAddSocket(bNodeTree *ntree, bNode *node, con else BKE_imformat_defaults(&sockdata->format); /* use node data format by default */ - sockdata->use_node_format = TRUE; + sockdata->use_node_format = true; nimf->active_input = BLI_findindex(&node->inputs, sock); diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c index 0ed6530cbaa..af9108b2559 100644 --- a/source/blender/nodes/intern/node_common.c +++ b/source/blender/nodes/intern/node_common.c @@ -94,10 +94,10 @@ int node_group_poll_instance(bNode *node, bNodeTree *nodetree) if (grouptree) return nodeGroupPoll(nodetree, grouptree); else - return TRUE; /* without a linked node tree, group node is always ok */ + return true; /* without a linked node tree, group node is always ok */ } else - return FALSE; + return false; } int nodeGroupPoll(bNodeTree *nodetree, bNodeTree *grouptree) diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c index 37018b3a98d..2ae2da6d6b4 100644 --- a/source/blender/nodes/intern/node_exec.c +++ b/source/blender/nodes/intern/node_exec.c @@ -265,7 +265,7 @@ bNodeThreadStack *ntreeGetThreadStack(bNodeTreeExec *exec, int thread) for (nts = lb->first; nts; nts = nts->next) { if (!nts->used) { - nts->used = TRUE; + nts->used = true; break; } } @@ -273,7 +273,7 @@ bNodeThreadStack *ntreeGetThreadStack(bNodeTreeExec *exec, int thread) if (!nts) { nts = MEM_callocN(sizeof(bNodeThreadStack), "bNodeThreadStack"); nts->stack = MEM_dupallocN(exec->stack); - nts->used = TRUE; + nts->used = true; BLI_addtail(lb, nts); } diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h index 4101c6c4c4d..a0023d02295 100644 --- a/source/blender/nodes/intern/node_exec.h +++ b/source/blender/nodes/intern/node_exec.h @@ -72,7 +72,7 @@ typedef struct bNodeTreeExec { typedef struct bNodeThreadStack { struct bNodeThreadStack *next, *prev; struct bNodeStack *stack; - int used; + bool used; } bNodeThreadStack; int node_exec_socket_use_stack(struct bNodeSocket *sock); diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c index 8e83140733a..e40d1d1a9c7 100644 --- a/source/blender/nodes/shader/node_shader_util.c +++ b/source/blender/nodes/shader/node_shader_util.c @@ -228,22 +228,23 @@ void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs, sh bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */ bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */ GPUNodeStack gpuin[MAX_SOCKET + 1], gpuout[MAX_SOCKET + 1]; - int do_it; + bool do_it; stack = exec->stack; for (n = 0, nodeexec = exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) { node = nodeexec->node; - do_it = FALSE; + do_it = false; /* for groups, only execute outputs for edited group */ if (node->typeinfo->nclass == NODE_CLASS_OUTPUT) { if (node->typeinfo->compatibility & compatibility) if (do_outputs && (node->flag & NODE_DO_OUTPUT)) - do_it = TRUE; + do_it = true; + } + else { + do_it = true; } - else - do_it = TRUE; if (do_it) { if (node->typeinfo->gpufunc) { diff --git a/source/blender/nodes/shader/nodes/node_shader_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c index 6f4e56c76a4..4e5d2e712dc 100644 --- a/source/blender/nodes/shader/nodes/node_shader_texture.c +++ b/source/blender/nodes/shader/nodes/node_shader_texture.c @@ -125,7 +125,7 @@ static int gpu_shader_texture(GPUMaterial *mat, bNode *node, bNodeExecData *UNUS Tex *tex = (Tex *)node->id; if (tex && tex->type == TEX_IMAGE && tex->ima) { - GPUNodeLink *texlink = GPU_image(tex->ima, &tex->iuser, FALSE); + GPUNodeLink *texlink = GPU_image(tex->ima, &tex->iuser, false); int ret = GPU_stack_link(mat, "texture_image", in, out, texlink); if (ret) { diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c index f93c020b38b..a0d54cdae4e 100644 --- a/source/blender/nodes/texture/nodes/node_texture_output.c +++ b/source/blender/nodes/texture/nodes/node_texture_output.c @@ -65,7 +65,7 @@ static void exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *exe tex_input_rgba(&target->tr, in[0], ¶ms, cdata->thread); target->tin = (target->tr + target->tg + target->tb) / 3.0f; - target->talpha = TRUE; + target->talpha = true; if (target->nor) { if (in[1] && in[1]->hasinput) diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index 938a4cc8049..5821d48b994 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -847,7 +847,7 @@ static PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *value) } /* XXX, possible one is inside the other */ - IDP_MergeGroup(self->prop, other->prop, TRUE); + IDP_MergeGroup(self->prop, other->prop, true); } else if (PyDict_Check(value)) { while (PyDict_Next(value, &i, &pkey, &pval)) { @@ -1550,7 +1550,7 @@ void IDP_spit(IDProperty *prop) { if (prop) { PyGILState_STATE gilstate; - int use_gil = TRUE; /* !PyC_IsInterpreterActive(); */ + bool use_gil = true; /* !PyC_IsInterpreterActive(); */ PyObject *ret_dict; PyObject *ret_str; diff --git a/source/blender/quicktime/apple/qtkit_import.m b/source/blender/quicktime/apple/qtkit_import.m index 51a9f128f94..9318c896d7c 100644 --- a/source/blender/quicktime/apple/qtkit_import.m +++ b/source/blender/quicktime/apple/qtkit_import.m @@ -66,7 +66,7 @@ typedef struct _QuicktimeMovie { void quicktime_init(void) { - G.have_quicktime = TRUE; + G.have_quicktime = true; } void quicktime_exit(void) diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index 8cb49f68243..6d994b36f26 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -224,8 +224,11 @@ void RE_init_threadcount(Render *re); void RE_TileProcessor(struct Render *re); /* only RE_NewRender() needed, main Blender render calls */ -void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, struct SceneRenderLayer *srl, struct Object *camera_override, unsigned int lay_override, int frame, const short write_still); -void RE_BlenderAnim(struct Render *re, struct Main *bmain, struct Scene *scene, struct Object *camera_override, unsigned int lay_override, int sfra, int efra, int tfra); +void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, + struct SceneRenderLayer *srl, struct Object *camera_override, + unsigned int lay_override, int frame, const bool write_still); +void RE_BlenderAnim(struct Render *re, struct Main *bmain, struct Scene *scene, struct Object *camera_override, + unsigned int lay_override, int sfra, int efra, int tfra); #ifdef WITH_FREESTYLE void RE_RenderFreestyleStrokes(struct Render *re, struct Main *bmain, struct Scene *scene, int render); #endif @@ -236,12 +239,12 @@ void RE_SetReports(struct Render *re, struct ReportList *reports); /* main preview render call */ void RE_PreviewRender(struct Render *re, struct Main *bmain, struct Scene *scene); -int RE_ReadRenderResult(struct Scene *scene, struct Scene *scenode); -int RE_WriteRenderResult(struct ReportList *reports, RenderResult *rr, const char *filename, int compress); -struct RenderResult *RE_MultilayerConvert(void *exrhandle, const char *colorspace, int predivide, int rectx, int recty); +bool RE_ReadRenderResult(struct Scene *scene, struct Scene *scenode); +bool RE_WriteRenderResult(struct ReportList *reports, RenderResult *rr, const char *filename, int compress); +struct RenderResult *RE_MultilayerConvert(void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty); extern const float default_envmap_layout[]; -int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]); +bool RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]); /* do a full sample buffer compo */ void RE_MergeFullSample(struct Render *re, struct Main *bmain, struct Scene *sce, struct bNodeTree *ntree); diff --git a/source/blender/render/intern/include/initrender.h b/source/blender/render/intern/include/initrender.h index 69706ecc933..1f11cdc6729 100644 --- a/source/blender/render/intern/include/initrender.h +++ b/source/blender/render/intern/include/initrender.h @@ -40,7 +40,7 @@ struct Object; void free_sample_tables(Render *re); void make_sample_tables(Render *re); -void RE_parts_init(Render *re, int do_crop); +void RE_parts_init(Render *re, bool do_crop); void RE_parts_free(Render *re); void RE_parts_clamp(Render *re); diff --git a/source/blender/render/intern/include/render_result.h b/source/blender/render/intern/include/render_result.h index 61b39a59b0b..457f1377e9b 100644 --- a/source/blender/render/intern/include/render_result.h +++ b/source/blender/render/intern/include/render_result.h @@ -57,7 +57,7 @@ struct RenderResult *render_result_new(struct Render *re, struct RenderResult *render_result_new_full_sample(struct Render *re, struct ListBase *lb, struct rcti *partrct, int crop, int savebuffers); -struct RenderResult *render_result_new_from_exr(void *exrhandle, const char *colorspace, int predivide, int rectx, int recty); +struct RenderResult *render_result_new_from_exr(void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty); /* Merge */ diff --git a/source/blender/render/intern/include/renderdatabase.h b/source/blender/render/intern/include/renderdatabase.h index 891505dd3a8..9b14560b5f5 100644 --- a/source/blender/render/intern/include/renderdatabase.h +++ b/source/blender/render/intern/include/renderdatabase.h @@ -92,7 +92,7 @@ void free_renderdata_tables(struct Render *re); void free_renderdata_vertnodes(struct VertTableNode *vertnodes); void free_renderdata_vlaknodes(struct VlakTableNode *vlaknodes); -void project_renderdata(struct Render *re, void (*projectfunc)(const float *, float mat[4][4], float *), int do_pano, float xoffs, int do_buckets); +void project_renderdata(struct Render *re, void (*projectfunc)(const float *, float mat[4][4], float *), bool do_pano, float xoffs, bool do_buckets); int clip_render_object(float boundbox[2][3], float bounds[4], float mat[4][4]); /* functions are not exported... so wrong names */ diff --git a/source/blender/render/intern/raytrace/rayobject_octree.cpp b/source/blender/render/intern/raytrace/rayobject_octree.cpp index 6182d066f68..24804b8c0ad 100644 --- a/source/blender/render/intern/raytrace/rayobject_octree.cpp +++ b/source/blender/render/intern/raytrace/rayobject_octree.cpp @@ -380,7 +380,7 @@ static void d2dda(Octree *oc, short b1, short b2, short c1, short c2, char *ocfa x = ocx1; y = ocy1; lambda = MIN2(lambda_x, lambda_y); - while (TRUE) { + while (true) { if (x < 0 || y < 0 || x >= oc->ocres || y >= oc->ocres) { /* pass*/ @@ -1004,7 +1004,7 @@ static int RE_rayobject_octree_intersect(RayObject *tree, Isect *is) /* this loop has been constructed to make sure the first and last node of ray * are always included, even when dda_lambda==1.0f or larger */ - while (TRUE) { + while (true) { no = ocread(oc, xo, yo, zo); if (no) { diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index 766db0d7479..e9d3e294b28 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -398,7 +398,7 @@ static void SetTSpace(const SMikkTSpaceContext *pContext, const float fvTangent[ } } -static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangent, int do_nmap_tangent) +static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, bool do_tangent, bool do_nmap_tangent) { int a; @@ -456,7 +456,7 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen } /* normal mapping tangent with mikktspace */ - if (do_nmap_tangent != FALSE) { + if (do_nmap_tangent != false) { SRenderMeshToTangent mesh2tangent; SMikkTSpaceContext sContext; SMikkTSpaceInterface sInterface; @@ -1328,7 +1328,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem float pa_time, pa_birthtime, pa_dietime; float random, simplify[2], pa_co[3]; const float cfra= BKE_scene_frame_get(re->scene); - int i, a, k, max_k=0, totpart, do_simplify = FALSE, do_surfacecache = FALSE, use_duplimat = FALSE; + int i, a, k, max_k=0, totpart; + bool do_simplify = false, do_surfacecache = false, use_duplimat = false; int totchild=0, step_nbr; int seed, path_nbr=0, orco1=0, num; int totface; @@ -1460,7 +1461,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem if (psys->flag & PSYS_USE_IMAT) { /* psys->imat is the original emitter's inverse matrix, ob->obmat is the duplicated object's matrix */ mul_m4_m4m4(duplimat, ob->obmat, psys->imat); - use_duplimat = TRUE; + use_duplimat = true; } /* 2.6 setup strand rendering */ @@ -1510,10 +1511,10 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem svert= strandbuf->vert; if (re->r.mode & R_SPEED) - do_surfacecache = TRUE; + do_surfacecache = true; else if ((re->wrld.mode & (WO_AMB_OCC|WO_ENV_LIGHT|WO_INDIRECT_LIGHT)) && (re->wrld.ao_gather_method == WO_AOGATHER_APPROX)) if (ma->amb != 0.0f) - do_surfacecache = TRUE; + do_surfacecache = true; totface= psmd->dm->getNumTessFaces(psmd->dm); index_mf_to_mpoly = psmd->dm->getTessFaceDataArray(psmd->dm, CD_ORIGINDEX); @@ -2600,7 +2601,8 @@ static void init_render_surf(Render *re, ObjectRen *obr, int timeoffset) DispList *dl; Material **matar; float *orco=NULL, mat[4][4]; - int a, totmat, need_orco=0; + int a, totmat; + bool need_orco = false; DerivedMesh *dm= NULL; cu= ob->data; @@ -2674,7 +2676,8 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset) float *data, *fp, *orco=NULL; float n[3], mat[4][4], nmat[4][4]; int nr, startvert, a, b; - int need_orco=0, totmat; + bool need_orco = false; + int totmat; cu= ob->data; if (ob->type==OB_FONT && cu->str==NULL) return; @@ -3151,10 +3154,11 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) CustomDataMask mask; float xn, yn, zn, imat[3][3], mat[4][4]; //nor[3], float *orco = NULL; - int need_orco=0, need_stress=0, need_nmap_tangent=0, need_tangent=0, need_origindex=0; + bool need_orco = false, need_stress = false, need_nmap_tangent = false, need_tangent = false, need_origindex = false; int a, a1, ok, vertofs; - int end, do_autosmooth = FALSE, totvert = 0; - int use_original_normals = FALSE; + int end, totvert = 0; + bool do_autosmooth = false; + bool use_original_normals = false; int recalc_normals = 0; /* false by default */ int negative_scale; #ifdef WITH_FREESTYLE @@ -3209,7 +3213,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) need_origindex= 1; /* check autosmooth and displacement, we then have to skip only-verts optimize */ - do_autosmooth |= (me->flag & ME_AUTOSMOOTH); + do_autosmooth |= (me->flag & ME_AUTOSMOOTH) != 0; if (do_autosmooth) timeoffset= 0; if (test_for_displace(re, ob ) ) @@ -3246,7 +3250,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) /* attempt to autsmooth on original mesh, only without subsurf */ if (do_autosmooth && me->totvert==totvert && me->totface==dm->getNumTessFaces(dm)) - use_original_normals= TRUE; + use_original_normals= true; ma= give_render_material(re, ob, 1); @@ -3270,7 +3274,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) for (a=0; a<totvert; a++, mvert++) { ver= RE_findOrAddVert(obr, obr->totvert++); copy_v3_v3(ver->co, mvert->co); - if (do_autosmooth == FALSE) { /* autosmooth on original unrotated data to prevent differences between frames */ + if (do_autosmooth == false) { /* autosmooth on original unrotated data to prevent differences between frames */ normal_short_to_float_v3(ver->n, mvert->no); mul_m4_v3(mat, ver->co); mul_transposed_m3_v3(imat, ver->n); @@ -3356,7 +3360,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset) if ( mface->mat_nr==a1 ) { float len; - int reverse_verts = (negative_scale != 0 && do_autosmooth == FALSE); + int reverse_verts = (negative_scale != 0 && do_autosmooth == false); int rev_tab[] = {reverse_verts==0 ? 0 : 2, 1, reverse_verts==0 ? 2 : 0, 3}; v1= reverse_verts==0 ? mface->v1 : mface->v3; v2= mface->v2; @@ -4782,7 +4786,7 @@ void RE_Database_Free(Render *re) free_strand_surface(re); re->totvlak=re->totvert=re->totstrand=re->totlamp=re->tothalo= 0; - re->i.convertdone = FALSE; + re->i.convertdone = false; re->bakebuf= NULL; @@ -5167,7 +5171,7 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l re->lampren.first= re->lampren.last= NULL; slurph_opt= 0; - re->i.partsdone = FALSE; /* signal now in use for previewrender */ + re->i.partsdone = false; /* signal now in use for previewrender */ /* in localview, lamps are using normal layers, objects only local bits */ if (re->lay & 0xFF000000) @@ -5284,7 +5288,7 @@ void RE_Database_Preprocess(Render *re) volume_precache(re); } - re->i.convertdone = TRUE; + re->i.convertdone = true; if (re->test_break(re->tbh)) RE_Database_Free(re); @@ -5739,7 +5743,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned /* free dbase and make the future one */ strandsurface= re->strandsurface; memset(&re->strandsurface, 0, sizeof(ListBase)); - re->i.convertdone = TRUE; + re->i.convertdone = true; RE_Database_Free(re); re->strandsurface= strandsurface; @@ -5755,7 +5759,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned /* free dbase and make the real one */ strandsurface= re->strandsurface; memset(&re->strandsurface, 0, sizeof(ListBase)); - re->i.convertdone = TRUE; + re->i.convertdone = true; RE_Database_Free(re); re->strandsurface= strandsurface; diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 311ec1efc6b..39b9a0f0b63 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -532,7 +532,8 @@ static void render_envmap(Render *re, EnvMap *env) void make_envmaps(Render *re) { Tex *tex; - int do_init = FALSE, depth = 0, trace; + bool do_init = false; + int depth = 0, trace; if (!(re->r.mode & R_ENVMAP)) return; @@ -586,7 +587,7 @@ void make_envmaps(Render *re) if (env->ok == 0 && depth == 0) env->recalc = 1; if (env->ok == 0) { - do_init = TRUE; + do_init = true; render_envmap(re, env); if (depth == env->depth) env->recalc = 0; diff --git a/source/blender/render/intern/source/external_engine.c b/source/blender/render/intern/source/external_engine.c index 5255e574c41..f5901370c61 100644 --- a/source/blender/render/intern/source/external_engine.c +++ b/source/blender/render/intern/source/external_engine.c @@ -131,7 +131,7 @@ bool RE_engine_is_external(Render *re) RenderEngine *RE_engine_create(RenderEngineType *type) { - return RE_engine_create_ex(type, FALSE); + return RE_engine_create_ex(type, false); } RenderEngine *RE_engine_create_ex(RenderEngineType *type, bool use_for_viewport) @@ -524,7 +524,7 @@ int RE_engine_render(Render *re, int do_all) engine->resolution_x = re->winx; engine->resolution_y = re->winy; - RE_parts_init(re, FALSE); + RE_parts_init(re, false); engine->tile_x = re->partx; engine->tile_y = re->party; @@ -563,7 +563,7 @@ int RE_engine_render(Render *re, int do_all) RE_parts_free(re); if (BKE_reports_contain(re->reports, RPT_ERROR)) - G.is_break = TRUE; + G.is_break = true; return 1; } diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index 716c4b8af65..31748549768 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -227,7 +227,7 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul if (ima) { if ((tex->imaflag & TEX_USEALPHA) && (ima->flag & IMA_IGNORE_ALPHA) == 0) { if ((tex->imaflag & TEX_CALCALPHA) == 0) { - texres->talpha = TRUE; + texres->talpha = true; } } } @@ -1536,7 +1536,7 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const if (ima) { if ((tex->imaflag & TEX_USEALPHA) && (ima->flag & IMA_IGNORE_ALPHA) == 0) { if ((tex->imaflag & TEX_CALCALPHA) == 0) { - texres->talpha = TRUE; + texres->talpha = true; } } } @@ -1909,7 +1909,7 @@ void image_sample(Image *ima, float fx, float fy, float dx, float dy, float resu if ( (R.flag & R_SEC_FIELD) && (ibuf->flags & IB_fields) ) ibuf->rect+= (ibuf->x*ibuf->y); - texres.talpha = TRUE; /* boxsample expects to be initialized */ + texres.talpha = true; /* boxsample expects to be initialized */ boxsample(ibuf, fx, fy, fx + dx, fy + dy, &texres, 0, 1); copy_v4_v4(result, &texres.tr); diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c index fa47593bbe4..2c431bf869c 100644 --- a/source/blender/render/intern/source/initrender.c +++ b/source/blender/render/intern/source/initrender.c @@ -545,7 +545,7 @@ void RE_parts_clamp(Render *re) re->party = max_ii(1, min_ii(re->r.tiley, re->recty)); } -void RE_parts_init(Render *re, int do_crop) +void RE_parts_init(Render *re, bool do_crop) { int nr, xd, yd, partx, party, xparts, yparts; int xminb, xmaxb, yminb, ymaxb; diff --git a/source/blender/render/intern/source/multires_bake.c b/source/blender/render/intern/source/multires_bake.c index be11df4e1a6..b0416c5d517 100644 --- a/source/blender/render/intern/source/multires_bake.c +++ b/source/blender/render/intern/source/multires_bake.c @@ -432,7 +432,7 @@ static void *do_multires_bake_thread(void *data_v) bkr->baked_faces++; if (bkr->do_update) - *bkr->do_update = TRUE; + *bkr->do_update = true; if (bkr->progress) *bkr->progress = ((float)bkr->baked_objects + (float)bkr->baked_faces / handle->queue->tot_face) / bkr->tot_obj; @@ -463,7 +463,7 @@ static void init_ccgdm_arrays(DerivedMesh *dm) (void) grid_offset; } -static void do_multires_bake(MultiresBakeRender *bkr, Image *ima, int require_tangent, MPassKnownData passKnownData, +static void do_multires_bake(MultiresBakeRender *bkr, Image *ima, bool require_tangent, MPassKnownData passKnownData, MInitBakeData initBakeData, MFreeBakeData freeBakeData, MultiresBakeResult *result) { DerivedMesh *dm = bkr->lores_dm; @@ -937,7 +937,7 @@ static void build_permutation_table(unsigned short permutation[], unsigned short for (i = 0; i < number_of_rays; i++) { const unsigned int nr_entries_left = number_of_rays - i; - unsigned short rnd = is_first_perm_table != FALSE ? get_ao_random1(i) : get_ao_random2(i); + unsigned short rnd = is_first_perm_table != false ? get_ao_random1(i) : get_ao_random2(i); const unsigned short entry = rnd % nr_entries_left; /* pull entry */ @@ -1072,7 +1072,7 @@ static void build_coordinate_frame(float axisX[3], float axisY[3], const float a } } -/* return FALSE if nothing was hit and TRUE otherwise */ +/* return false if nothing was hit and true otherwise */ static int trace_ao_ray(MAOBakeData *ao_data, float ray_start[3], float ray_direction[3]) { Isect isect = {{0}}; @@ -1234,14 +1234,14 @@ static void bake_images(MultiresBakeRender *bkr, MultiresBakeResult *result) switch (bkr->mode) { case RE_BAKE_NORMALS: - do_multires_bake(bkr, ima, TRUE, apply_tangmat_callback, init_normal_data, free_normal_data, result); + do_multires_bake(bkr, ima, true, apply_tangmat_callback, init_normal_data, free_normal_data, result); break; case RE_BAKE_DISPLACEMENT: case RE_BAKE_DERIVATIVE: - do_multires_bake(bkr, ima, FALSE, apply_heights_callback, init_heights_data, free_heights_data, result); + do_multires_bake(bkr, ima, false, apply_heights_callback, init_heights_data, free_heights_data, result); break; case RE_BAKE_AO: - do_multires_bake(bkr, ima, FALSE, apply_ao_callback, init_ao_data, free_ao_data, result); + do_multires_bake(bkr, ima, false, apply_ao_callback, init_ao_data, free_ao_data, result); break; } } diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index d144da5bc4e..1a3d07f9aeb 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -146,7 +146,7 @@ static void result_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr)) {} static void result_rcti_nothing(void *UNUSED(arg), RenderResult *UNUSED(rr), volatile struct rcti *UNUSED(rect)) {} static void stats_nothing(void *UNUSED(arg), RenderStats *UNUSED(rs)) {} static void float_nothing(void *UNUSED(arg), float UNUSED(val)) {} -static int default_break(void *UNUSED(arg)) { return G.is_break == TRUE; } +static int default_break(void *UNUSED(arg)) { return G.is_break == true; } static void stats_background(void *UNUSED(arg), RenderStats *rs) { @@ -211,7 +211,7 @@ RenderLayer *RE_GetRenderLayer(RenderResult *rr, const char *name) } } -RenderResult *RE_MultilayerConvert(void *exrhandle, const char *colorspace, int predivide, int rectx, int recty) +RenderResult *RE_MultilayerConvert(void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty) { return render_result_new_from_exr(exrhandle, colorspace, predivide, rectx, recty); } @@ -506,7 +506,7 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer * { bool had_freestyle = (re->r.mode & R_EDGE_FRS) != 0; - re->ok = TRUE; /* maybe flag */ + re->ok = true; /* maybe flag */ re->i.starttime = PIL_check_seconds_timer(); @@ -1029,7 +1029,7 @@ static void threaded_tile_processor(Render *re) /* warning; no return here without closing exr file */ - RE_parts_init(re, TRUE); + RE_parts_init(re, true); if (re->result->do_exr_tile) render_result_exr_file_begin(re); @@ -1297,7 +1297,7 @@ static void addblur_rect(RenderResult *rr, float *rectf, float *rectf1, float bl /* called by blur loop, accumulate renderlayers */ -static void merge_renderresult_blur(RenderResult *rr, RenderResult *brr, float blurfac, int key_alpha) +static void merge_renderresult_blur(RenderResult *rr, RenderResult *brr, float blurfac, bool key_alpha) { RenderLayer *rl, *rl1; RenderPass *rpass, *rpass1; @@ -1341,7 +1341,7 @@ static void do_render_blur_3d(Render *re) blurfac = 1.0f / (float)(re->r.mblur_samples - blur); - merge_renderresult_blur(rres, re->result, blurfac, FALSE); + merge_renderresult_blur(rres, re->result, blurfac, false); if (re->test_break(re->tbh)) break; } @@ -1502,7 +1502,7 @@ static void do_render_fields_blur_3d(Render *re) /* also check for camera here */ if (camera == NULL) { BKE_report(re->reports, RPT_ERROR, "Cannot render, no camera"); - G.is_break = TRUE; + G.is_break = true; return; } @@ -1602,7 +1602,7 @@ static int composite_needs_render(Scene *sce, int this_scene) bNode *node; if (ntree == NULL) return 1; - if (sce->use_nodes == FALSE) return 1; + if (sce->use_nodes == false) return 1; if ((sce->r.scemode & R_DOCOMP) == 0) return 1; for (node = ntree->nodes.first; node; node = node->next) { @@ -1964,7 +1964,7 @@ static void do_merge_fullsample(Render *re, bNodeTree *ntree) ntreeCompositTagRender(re->scene); ntreeCompositTagAnimated(ntree); - ntreeCompositExecTree(re->scene, ntree, &re->r, TRUE, G.background == 0, &re->scene->view_settings, &re->scene->display_settings); + ntreeCompositExecTree(re->scene, ntree, &re->r, true, G.background == 0, &re->scene->view_settings, &re->scene->display_settings); } /* ensure we get either composited result or the active layer */ @@ -2038,7 +2038,7 @@ void RE_MergeFullSample(Render *re, Main *bmain, Scene *sce, bNodeTree *ntree) bNode *node; /* default start situation */ - G.is_break = FALSE; + G.is_break = false; re->main = bmain; re->scene = sce; @@ -2160,7 +2160,7 @@ static void do_render_composite_fields_blur_3d(Render *re) if (re->r.scemode & R_FULL_SAMPLE) do_merge_fullsample(re, ntree); else { - ntreeCompositExecTree(re->scene, ntree, &re->r, TRUE, G.background == 0, &re->scene->view_settings, &re->scene->display_settings); + ntreeCompositExecTree(re->scene, ntree, &re->r, true, G.background == 0, &re->scene->view_settings, &re->scene->display_settings); } ntree->stats_draw = NULL; @@ -2404,24 +2404,24 @@ static int check_valid_camera(Scene *scene, Object *camera_override, ReportList return true; } -static int node_tree_has_composite_output(bNodeTree *ntree) +static bool node_tree_has_composite_output(bNodeTree *ntree) { bNode *node; for (node = ntree->nodes.first; node; node = node->next) { if (ELEM(node->type, CMP_NODE_COMPOSITE, CMP_NODE_OUTPUT_FILE)) { - return TRUE; + return true; } else if (node->type == NODE_GROUP) { if (node->id) { if (node_tree_has_composite_output((bNodeTree *)node->id)) { - return TRUE; + return true; } } } } - return FALSE; + return false; } static int check_composite_output(Scene *scene) @@ -2630,10 +2630,11 @@ void RE_SetReports(Render *re, ReportList *reports) } /* general Blender frame render call */ -void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *srl, Object *camera_override, unsigned int lay_override, int frame, const short write_still) +void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *srl, Object *camera_override, + unsigned int lay_override, int frame, const bool write_still) { /* ugly global still... is to prevent preview events and signal subsurfs etc to make full resol */ - G.is_rendering = TRUE; + G.is_rendering = true; scene->r.cfra = frame; @@ -2651,7 +2652,8 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr } else { char name[FILE_MAX]; - BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, FALSE); + BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, + &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, false); /* reports only used for Movie */ do_write_image_or_movie(re, bmain, scene, NULL, name); @@ -2664,7 +2666,7 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr BLI_callback_exec(re->main, (ID *)scene, G.is_break ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE); /* UGLY WARNING */ - G.is_rendering = FALSE; + G.is_rendering = false; } #ifdef WITH_FREESTYLE @@ -2699,7 +2701,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie ibuf->rect = MEM_mapallocN(sizeof(int) * rres.rectx * rres.recty, "temp 32 bits rect"); ibuf->mall |= IB_rect; RE_AcquiredResultGet32(re, &rres, ibuf->rect); - do_free = TRUE; + do_free = true; } @@ -2723,7 +2725,8 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie if (name_override) BLI_strncpy(name, name_override, sizeof(name)); else - BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, TRUE); + BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, + &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, true); if (re->r.im_format.imtype == R_IMF_IMTYPE_MULTILAYER) { if (re->result) { @@ -2786,7 +2789,8 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie } /* saves images to disk */ -void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, unsigned int lay_override, int sfra, int efra, int tfra) +void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, + unsigned int lay_override, int sfra, int efra, int tfra) { bMovieHandle *mh = BKE_movie_handle_get(scene->r.im_format.imtype); int cfrao = scene->r.cfra; @@ -2798,7 +2802,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri /* ugly global still... is to prevent renderwin events and signal subsurfs etc to make full resol */ /* is also set by caller renderwin.c */ - G.is_rendering = TRUE; + G.is_rendering = true; re->flag |= R_ANIMATION; @@ -2820,7 +2824,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri } if (!mh->start_movie(scene, &re->r, width, height, re->reports)) - G.is_break = TRUE; + G.is_break = true; } if (mh->get_next_frame) { @@ -2836,16 +2840,16 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri if (re->test_break(re->tbh) == 0) { if (!do_write_image_or_movie(re, bmain, scene, mh, NULL)) - G.is_break = TRUE; + G.is_break = true; } - if (G.is_break == FALSE) { + if (G.is_break == false) { BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ } } else { if (re->test_break(re->tbh)) { - G.is_break = TRUE; + G.is_break = true; } } } @@ -2879,7 +2883,8 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri /* Touch/NoOverwrite options are only valid for image's */ if (BKE_imtype_is_movie(scene->r.im_format.imtype) == 0) { if (scene->r.mode & (R_NO_OVERWRITE | R_TOUCH)) - BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, &scene->r.im_format, scene->r.scemode & R_EXTENSION, TRUE); + BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, + &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, true); if (scene->r.mode & R_NO_OVERWRITE && BLI_exists(name)) { printf("skipping existing frame \"%s\"\n", name); @@ -2904,12 +2909,12 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri if (re->test_break(re->tbh) == 0) { if (!G.is_break) if (!do_write_image_or_movie(re, bmain, scene, mh, NULL)) - G.is_break = TRUE; + G.is_break = true; } else - G.is_break = TRUE; + G.is_break = true; - if (G.is_break == TRUE) { + if (G.is_break == true) { /* remove touched file */ if (BKE_imtype_is_movie(scene->r.im_format.imtype) == 0) { if (scene->r.mode & R_TOUCH && BLI_exists(name) && BLI_file_size(name) == 0) { @@ -2920,7 +2925,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri break; } - if (G.is_break == FALSE) { + if (G.is_break == false) { BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */ } } @@ -2940,7 +2945,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri BLI_callback_exec(re->main, (ID *)scene, G.is_break ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE); /* UGLY WARNING */ - G.is_rendering = FALSE; + G.is_rendering = false; } void RE_PreviewRender(Render *re, Main *bmain, Scene *sce) @@ -2972,10 +2977,11 @@ void RE_PreviewRender(Render *re, Main *bmain, Scene *sce) /* note; repeated win/disprect calc... solve that nicer, also in compo */ /* only the temp file! */ -int RE_ReadRenderResult(Scene *scene, Scene *scenode) +bool RE_ReadRenderResult(Scene *scene, Scene *scenode) { Render *re; - int winx, winy, success; + int winx, winy; + bool success; rcti disprect; /* calculate actual render result and display size */ @@ -3073,7 +3079,7 @@ void RE_result_load_from_file(RenderResult *result, ReportList *reports, const c const float default_envmap_layout[] = { 0, 0, 1, 0, 2, 0, 0, 1, 1, 1, 2, 1 }; -int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env, const char *relpath, const char imtype, float layout[12]) +bool RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env, const char *relpath, const char imtype, float layout[12]) { ImageFormatData imf; ImBuf *ibuf = NULL; @@ -3124,11 +3130,11 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env, IMB_freeImBuf(ibuf); if (ok) { - return TRUE; + return true; } else { BKE_report(reports, RPT_ERROR, "Error writing environment map"); - return FALSE; + return false; } } diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index 661c8dec5ef..0c3da335963 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -567,7 +567,7 @@ void shadeSunView(float col_r[3], const float view[3]) GroupObject *go; LampRen *lar; float sview[3]; - int do_init = TRUE; + bool do_init = true; for (go=R.lights.first; go; go= go->next) { lar= go->lampren; @@ -582,11 +582,11 @@ void shadeSunView(float col_r[3], const float view[3]) if (sview[2] < 0.0f) sview[2] = 0.0f; normalize_v3(sview); - do_init = FALSE; + do_init = false; } GetSkyXYZRadiancef(lar->sunsky, sview, colorxyz); - xyz_to_rgb(colorxyz[0], colorxyz[1], colorxyz[2], &sun_collector[0], &sun_collector[1], &sun_collector[2], + xyz_to_rgb(colorxyz[0], colorxyz[1], colorxyz[2], &sun_collector[0], &sun_collector[1], &sun_collector[2], lar->sunsky->sky_colorspace); ramp_blend(lar->sunsky->skyblendtype, col_r, lar->sunsky->skyblendfac, sun_collector); diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index ce87888b6a0..b085ac5812b 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -503,7 +503,7 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) case TEX_PD_COLOR_PARTAGE: if (pd->coba) { if (do_colorband(pd->coba, age, col)) { - texres->talpha = TRUE; + texres->talpha = true; copy_v3_v3(&texres->tr, col); texres->tin *= col[3]; texres->ta = texres->tin; @@ -516,7 +516,7 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) if (pd->coba) { if (do_colorband(pd->coba, speed, col)) { - texres->talpha = TRUE; + texres->talpha = true; copy_v3_v3(&texres->tr, col); texres->tin *= col[3]; texres->ta = texres->tin; @@ -525,7 +525,7 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) break; } case TEX_PD_COLOR_PARTVEL: - texres->talpha = TRUE; + texres->talpha = true; mul_v3_fl(vec, pd->speed_scale); copy_v3_v3(&texres->tr, vec); texres->ta = texres->tin; diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index ed2c7455250..60327c7db8d 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -749,7 +749,7 @@ static void traceray(ShadeInput *origshi, ShadeResult *origshr, short depth, con shi.lay= origshi->lay; shi.passflag= SCE_PASS_COMBINED; /* result of tracing needs no pass info */ shi.combinedflag= 0xFFFFFF; /* ray trace does all options */ - //shi.do_preview = FALSE; // memset above, so don't need this + //shi.do_preview = false; // memset above, so don't need this shi.light_override= origshi->light_override; shi.mat_override= origshi->mat_override; @@ -1205,13 +1205,13 @@ static QMCSampler *get_thread_qmcsampler(Render *re, int thread, int type, int t for (qsa=re->qmcsamplers[thread].first; qsa; qsa=qsa->next) { if (qsa->type == type && qsa->tot == tot && !qsa->used) { - qsa->used = TRUE; + qsa->used = true; return qsa; } } qsa= QMC_initSampler(type, tot); - qsa->used = TRUE; + qsa->used = true; BLI_addtail(&re->qmcsamplers[thread], qsa); return qsa; @@ -2156,7 +2156,8 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3], float adapt_thresh = lar->adapt_thresh; int min_adapt_samples=4, max_samples = lar->ray_totsamp; float start[3]; - int do_soft = TRUE, full_osa = FALSE, i; + bool do_soft = true, full_osa = false; + int i; float min[3], max[3]; RayHint bb_hint; @@ -2171,8 +2172,8 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, const float lampco[3], else shadfac[3]= 1.0f; - if (lar->ray_totsamp < 2) do_soft = FALSE; - if ((R.r.mode & R_OSA) && (R.osa > 0) && (shi->vlr->flag & R_FULL_OSA)) full_osa = TRUE; + if (lar->ray_totsamp < 2) do_soft = false; + if ((R.r.mode & R_OSA) && (R.osa > 0) && (shi->vlr->flag & R_FULL_OSA)) full_osa = true; if (full_osa) { if (do_soft) max_samples = max_samples/R.osa + 1; diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index f2c5a7597b8..f27bd3a8292 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -471,7 +471,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf rr->tilerect.ymax = partrct->ymax - re->disprect.ymin; if (savebuffers) { - rr->do_exr_tile = TRUE; + rr->do_exr_tile = true; } /* check renderdata for amount of layers */ @@ -664,7 +664,7 @@ static void ml_addpass_cb(void *UNUSED(base), void *lay, const char *str, float } /* from imbuf, if a handle was returned we convert this to render result */ -RenderResult *render_result_new_from_exr(void *exrhandle, const char *colorspace, int predivide, int rectx, int recty) +RenderResult *render_result_new_from_exr(void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty) { RenderResult *rr = MEM_callocN(sizeof(RenderResult), __func__); RenderLayer *rl; @@ -771,12 +771,12 @@ static char *make_pass_name(RenderPass *rpass, int chan) /* filename already made absolute */ /* called from within UI, saves both rendered result as a file-read result */ -int RE_WriteRenderResult(ReportList *reports, RenderResult *rr, const char *filename, int compress) +bool RE_WriteRenderResult(ReportList *reports, RenderResult *rr, const char *filename, int compress) { RenderLayer *rl; RenderPass *rpass; void *exrhandle = IMB_exr_get_handle(); - int success; + bool success; BLI_make_existing_file(filename); @@ -819,12 +819,12 @@ int RE_WriteRenderResult(ReportList *reports, RenderResult *rr, const char *file /* when the filename has no permissions, this can fail */ if (IMB_exr_begin_write(exrhandle, filename, rr->rectx, rr->recty, compress)) { IMB_exr_write_channels(exrhandle); - success = TRUE; + success = true; } else { /* TODO, get the error from openexr's exception */ BKE_report(reports, RPT_ERROR, "Error writing render result (see console)"); - success = FALSE; + success = false; } IMB_exr_close(exrhandle); @@ -1001,7 +1001,7 @@ void render_result_exr_file_end(Render *re) rl->exrhandle = NULL; } - rr->do_exr_tile = FALSE; + rr->do_exr_tile = false; } render_result_free_list(&re->fullresult, re->result); @@ -1036,7 +1036,7 @@ int render_result_exr_file_read(Render *re, int sample) { RenderLayer *rl; char str[FILE_MAX]; - int success = TRUE; + bool success = true; RE_FreeRenderResult(re->result); re->result = render_result_new(re, &re->disprect, 0, RR_USE_MEM, RR_ALL_LAYERS); @@ -1048,7 +1048,7 @@ int render_result_exr_file_read(Render *re, int sample) if (!render_result_exr_file_read_path(re->result, rl, str)) { printf("cannot read: %s\n", str); - success = FALSE; + success = false; } } diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index ce1f1467393..3ed216518de 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -1103,7 +1103,7 @@ static int multitex(Tex *tex, float texvec[3], float dxt[3], float dyt[3], int o float tmpvec[3]; int retval = 0; /* return value, int:0, col:1, nor:2, everything:3 */ - texres->talpha = FALSE; /* is set when image texture returns alpha (considered premul) */ + texres->talpha = false; /* is set when image texture returns alpha (considered premul) */ if (tex->use_nodes && tex->nodetree) { retval = ntreeTexExecTree(tex->nodetree, texres, texvec, dxt, dyt, osatex, thread, @@ -1200,7 +1200,7 @@ static int multitex(Tex *tex, float texvec[3], float dxt[3], float dyt[3], int o if (tex->flag & TEX_COLORBAND) { float col[4]; if (do_colorband(tex->coba, texres->tin, col)) { - texres->talpha = TRUE; + texres->talpha = true; texres->tr= col[0]; texres->tg= col[1]; texres->tb= col[2]; @@ -1326,7 +1326,7 @@ int multitex_ext_safe(Tex *tex, float texvec[3], TexResult *texres, struct Image { int use_nodes= tex->use_nodes, retval; - tex->use_nodes = FALSE; + tex->use_nodes = false; retval= multitex_nodes_intern(tex, texvec, NULL, NULL, 0, texres, 0, 0, NULL, NULL, pool, scene_color_manage); tex->use_nodes= use_nodes; @@ -1642,7 +1642,7 @@ static void texco_mapping(ShadeInput *shi, Tex *tex, MTex *mtex, typedef struct CompatibleBump { float nu[3], nv[3], nn[3]; float dudnu, dudnv, dvdnu, dvdnv; - int nunvdone; + bool nunvdone; } CompatibleBump; static void compatible_bump_init(CompatibleBump *compat_bump) @@ -1679,7 +1679,7 @@ static void compatible_bump_uv_derivs(CompatibleBump *compat_bump, ShadeInput *s compat_bump->nn[1] = -shi->vn[1]; compat_bump->nn[2] = -shi->vn[2]; ortho_basis_v3v3_v3(compat_bump->nu, compat_bump->nv, compat_bump->nn); - compat_bump->nunvdone = TRUE; + compat_bump->nunvdone = true; } if (tf) { @@ -1733,7 +1733,7 @@ static int compatible_bump_compute(CompatibleBump *compat_bump, ShadeInput *shi, /* render normal is negated */ negate_v3_v3(compat_bump->nn, shi->vn); ortho_basis_v3v3_v3(compat_bump->nu, compat_bump->nv, compat_bump->nn); - compat_bump->nunvdone = TRUE; + compat_bump->nunvdone = true; } /* two methods, either constant based on main image resolution, @@ -1916,7 +1916,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T ntap_bump->fPrevMagnitude = 1.0f; ntap_bump->iPrevBumpSpace = 0; - ntap_bump->init_done = TRUE; + ntap_bump->init_done = true; } /* resolve image dimensions */ @@ -2142,10 +2142,10 @@ void do_material_tex(ShadeInput *shi, Render *re) float *co = NULL, *dx = NULL, *dy = NULL; float fact, facm, factt, facmm, stencilTin=1.0; float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3]={0.0f, 0.0f, 0.0f}, Tnor=1.0; - int tex_nr, rgbnor= 0, warp_done = FALSE; - int use_compat_bump = FALSE, use_ntap_bump = FALSE; - int found_nmapping = 0, found_deriv_map = 0; - int iFirstTimeNMap=1; + int tex_nr, rgbnor= 0; + bool warp_done = false, use_compat_bump = false, use_ntap_bump = false; + bool found_nmapping = false, found_deriv_map = false; + bool iFirstTimeNMap = true; compatible_bump_init(&compat_bump); ntap_bump_init(&ntap_bump); @@ -2165,25 +2165,25 @@ void do_material_tex(ShadeInput *shi, Render *re) if (tex == NULL) continue; found_deriv_map = (tex->type==TEX_IMAGE) && (tex->imaflag & TEX_DERIVATIVEMAP); - use_compat_bump= (mtex->texflag & MTEX_COMPAT_BUMP); - use_ntap_bump = ((mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP|MTEX_BICUBIC_BUMP))!=0 || found_deriv_map!=0) ? TRUE : FALSE; + use_compat_bump= (mtex->texflag & MTEX_COMPAT_BUMP) != 0; + use_ntap_bump = ((mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP|MTEX_BICUBIC_BUMP))!=0 || found_deriv_map!=0) ? true : false; /* XXX texture node trees don't work for this yet */ if (tex->nodetree && tex->use_nodes) { - use_compat_bump = FALSE; - use_ntap_bump = FALSE; + use_compat_bump = false; + use_ntap_bump = false; } /* case displacement mapping */ if (shi->osatex == 0 && use_ntap_bump) { - use_ntap_bump = FALSE; - use_compat_bump = TRUE; + use_ntap_bump = false; + use_compat_bump = true; } /* case ocean */ if (tex->type == TEX_OCEAN) { - use_ntap_bump = FALSE; - use_compat_bump = FALSE; + use_ntap_bump = false; + use_compat_bump = false; } /* which coords */ @@ -2381,7 +2381,7 @@ void do_material_tex(ShadeInput *shi, Render *re) warpvec[0]= mtex->warpfac*warpnor[0]; warpvec[1]= mtex->warpfac*warpnor[1]; warpvec[2]= mtex->warpfac*warpnor[2]; - warp_done = TRUE; + warp_done = true; } #if 0 if (mtex->texflag & MTEX_VIEWSPACE) { @@ -2476,8 +2476,8 @@ void do_material_tex(ShadeInput *shi, Render *re) if (mtex->normapspace == MTEX_NSPACE_TANGENT) { /* qdn: tangent space */ float B[3], tv[3]; - const float * no = iFirstTimeNMap!=0 ? shi->nmapnorm : shi->vn; - iFirstTimeNMap=0; + const float *no = iFirstTimeNMap ? shi->nmapnorm : shi->vn; + iFirstTimeNMap = false; cross_v3_v3v3(B, no, shi->nmaptang); /* bitangent */ mul_v3_fl(B, shi->nmaptang[3]); /* transform norvec from tangent space to object surface in camera space */ diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index a6f37f2670c..63fcafe2cc0 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -698,7 +698,8 @@ static void sky_tile(RenderPart *pa, RenderLayer *rl) for (y=pa->disprect.ymin; y<pa->disprect.ymax; y++) { for (x=pa->disprect.xmin; x<pa->disprect.xmax; x++, od+=4) { float col[4]; - int sample, done = FALSE; + int sample; + bool done = false; for (sample= 0; sample<totsample; sample++) { float *pass= rlpp[sample]->rectf + od; @@ -707,7 +708,7 @@ static void sky_tile(RenderPart *pa, RenderLayer *rl) if (done==0) { shadeSkyPixel(col, x, y, pa->thread); - done = TRUE; + done = true; } if (pass[3]==0.0f) { @@ -765,7 +766,7 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl) float *zrect= RE_RenderLayerGetPass(rlpp[sample], SCE_PASS_Z) + od; float *rgbrect = rlpp[sample]->rectf + 4*od; float rgb[3] = {0}; - int done = FALSE; + bool done = false; for (go=R.lights.first; go; go= go->next) { @@ -797,7 +798,7 @@ static void atm_tile(RenderPart *pa, RenderLayer *rl) if (done==0) { copy_v3_v3(rgb, tmp_rgb); - done = TRUE; + done = true; } else { rgb[0] = 0.5f*rgb[0] + 0.5f*tmp_rgb[0]; @@ -1961,7 +1962,7 @@ void add_halo_flare(Render *re) /* for now, we get the first renderlayer in list with halos set */ for (rl= rr->layers.first; rl; rl= rl->next) { - int do_draw = FALSE; + bool do_draw = false; if ((rl->layflag & SCE_LAY_HALO) == 0) continue; @@ -1977,7 +1978,7 @@ void add_halo_flare(Render *re) har= R.sortedhalos[a]; if (har->flarec && (har->lay & rl->lay)) { - do_draw = TRUE; + do_draw = true; renderflare(rr, rl->rectf, har); } } diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c index 9a1ee91d1f0..0d5b0b920b4 100644 --- a/source/blender/render/intern/source/renderdatabase.c +++ b/source/blender/render/intern/source/renderdatabase.c @@ -1234,13 +1234,13 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater /* -------------------------- operations on entire database ----------------------- */ /* ugly function for halos in panorama */ -static int panotestclip(Render *re, int do_pano, float v[4]) +static int panotestclip(Render *re, bool do_pano, float v[4]) { /* part size (ensure we run RE_parts_clamp first) */ BLI_assert(re->partx == min_ii(re->r.tilex, re->rectx)); BLI_assert(re->party == min_ii(re->r.tiley, re->recty)); - if (do_pano == FALSE) { + if (do_pano == false) { return testclip(v); } else { @@ -1278,7 +1278,7 @@ static int panotestclip(Render *re, int do_pano, float v[4]) void project_renderdata(Render *re, void (*projectfunc)(const float *, float mat[4][4], float *), - int do_pano, float xoffs, int UNUSED(do_buckets)) + bool do_pano, float xoffs, bool UNUSED(do_buckets)) { ObjectRen *obr; HaloRen *har = NULL; diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index 4f41f2729a1..cc781c863a0 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -181,7 +181,8 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) double a, b, c, disc, nray[3], npos[3]; double t0, t1 = 0.0f, t2= 0.0f, t3; float p1[3], p2[3], ladist, maxz = 0.0f, maxy = 0.0f, haint; - int cuts, do_clip = TRUE, use_yco = FALSE; + int cuts; + bool do_clip = true, use_yco = false; *intens= 0.0f; haint= lar->haint; @@ -217,7 +218,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) /* rotate maxz */ if (shi->co[2]==0.0f) { - do_clip = FALSE; /* for when halo at sky */ + do_clip = false; /* for when halo at sky */ } else { p1[0]= shi->co[0]-lar->co[0]; @@ -229,7 +230,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) maxy= lar->imat[0][1]*p1[0]+lar->imat[1][1]*p1[1]+lar->imat[2][1]*p1[2]; if (fabs(nray[2]) < FLT_EPSILON) { - use_yco = TRUE; + use_yco = true; } } @@ -285,7 +286,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) if (ok1==0 && ok2==0) return; /* intersction point with -ladist, the bottom of the cone */ - if (use_yco == FALSE) { + if (use_yco == false) { t3= ((double)(-ladist)-npos[2])/nray[2]; /* de we have to replace one of the intersection points? */ @@ -319,7 +320,7 @@ static void spothalo(struct LampRen *lar, ShadeInput *shi, float *intens) /* calculate t0: is the maximum visible z (when halo is intersected by face) */ if (do_clip) { - if (use_yco == FALSE) t0 = ((double)maxz - npos[2]) / nray[2]; + if (use_yco == false) t0 = ((double)maxz - npos[2]) / nray[2]; else t0 = ((double)maxy - npos[1]) / nray[1]; if (t0 < t1) return; diff --git a/source/blender/render/intern/source/texture_ocean.c b/source/blender/render/intern/source/texture_ocean.c index 0d68c40be0f..bfd155eba62 100644 --- a/source/blender/render/intern/source/texture_ocean.c +++ b/source/blender/render/intern/source/texture_ocean.c @@ -83,7 +83,7 @@ int ocean_texture(Tex *tex, const float texvec[2], TexResult *texres) const float u = 0.5f + 0.5f * texvec[0]; const float v = 0.5f + 0.5f * texvec[1]; - if (omd->oceancache && omd->cached == TRUE) { + if (omd->oceancache && omd->cached == true) { CLAMP(cfra, omd->bakestart, omd->bakeend); cfra -= omd->bakestart; /* shift to 0 based */ diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c index 0936d5fcef9..24e32817a97 100644 --- a/source/blender/render/intern/source/voxeldata.c +++ b/source/blender/render/intern/source/voxeldata.c @@ -70,7 +70,7 @@ #include "texture.h" #include "voxeldata.h" -static int is_vd_res_ok(VoxelData *vd) +static bool is_vd_res_ok(VoxelData *vd) { /* arbitrary large value so corrupt headers don't break */ const int min = 1, max = 100000; @@ -90,7 +90,7 @@ static int load_frame_blendervoxel(VoxelData *vd, FILE *fp, int frame) const size_t size = vd_resol_size(vd); size_t offset = sizeof(VoxelDataHeader); - if (is_vd_res_ok(vd) == FALSE) + if (is_vd_res_ok(vd) == false) return 0; vd->dataset = MEM_mapallocN(sizeof(float) * size, "voxel dataset"); @@ -112,7 +112,7 @@ static int load_frame_raw8(VoxelData *vd, FILE *fp, int frame) size_t i; char *data_c; - if (is_vd_res_ok(vd) == FALSE) + if (is_vd_res_ok(vd) == false) return 0; vd->dataset = MEM_mapallocN(sizeof(float) * size, "voxel dataset"); diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index a74d6efbc0b..d50d53b5f53 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -4007,7 +4007,7 @@ unsigned short *zbuffer_transp_shade(RenderPart *pa, RenderLayer *rl, float *pas if (R.osa > 16) { /* MAX_OSA */ printf("zbuffer_transp_shade: osa too large\n"); - G.is_break = TRUE; + G.is_break = true; return NULL; } diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index c93ed89d78f..e73d599a643 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -132,7 +132,7 @@ struct ImBuf; #define OPTYPE_PRESET 32 /* show preset menu */ #define OPTYPE_INTERNAL 64 /* some operators are mainly for internal use * and don't make sense to be accessed from the - * search menu, even if poll() returns TRUE. + * search menu, even if poll() returns true. * currently only used for the search toolbox */ #define OPTYPE_LOCK_BYPASS 128 /* Allow operator to run when interface is locked */ @@ -169,7 +169,7 @@ enum { #define KM_OSKEY2 128 /* KM_MOD_ flags for wmKeyMapItem and wmEvent.alt/shift/oskey/ctrl */ -/* note that KM_ANY and FALSE are used with these defines too */ +/* note that KM_ANY and false are used with these defines too */ #define KM_MOD_FIRST 1 #define KM_MOD_SECOND 2 diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index b7b606552e3..e3a67c3824e 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -715,10 +715,10 @@ static bool wm_draw_update_test_window(wmWindow *win) for (ar = win->screen->regionbase.first; ar; ar = ar->next) { if (ar->do_draw_overlay) { wm_tag_redraw_overlay(win, ar); - ar->do_draw_overlay = FALSE; + ar->do_draw_overlay = false; } if (ar->swinid && ar->do_draw) - do_draw = TRUE; + do_draw = true; } for (sa = win->screen->areabase.first; sa; sa = sa->next) { @@ -726,7 +726,7 @@ static bool wm_draw_update_test_window(wmWindow *win) wm_region_test_render_do_draw(win->screen, sa, ar); if (ar->swinid && ar->do_draw) - do_draw = TRUE; + do_draw = true; } } @@ -796,13 +796,13 @@ void wm_tag_redraw_overlay(wmWindow *win, ARegion *ar) if (ar && win) { if (wm_automatic_draw_method(win) != USER_DRAW_TRIPLE) ED_region_tag_redraw(ar); - win->screen->do_draw_paintcursor = TRUE; + win->screen->do_draw_paintcursor = true; } } void WM_paint_cursor_tag_redraw(wmWindow *win, ARegion *ar) { - win->screen->do_draw_paintcursor = TRUE; + win->screen->do_draw_paintcursor = true; wm_tag_redraw_overlay(win, ar); } @@ -855,9 +855,9 @@ void wm_draw_update(bContext *C) else // if (drawmethod == USER_DRAW_TRIPLE) wm_method_draw_triple(C, win); - win->screen->do_draw_gesture = FALSE; - win->screen->do_draw_paintcursor = FALSE; - win->screen->do_draw_drag = FALSE; + win->screen->do_draw_gesture = false; + win->screen->do_draw_paintcursor = false; + win->screen->do_draw_drag = false; wm_window_swap_buffers(win); @@ -893,7 +893,7 @@ void wm_draw_region_clear(wmWindow *win, ARegion *ar) if (ELEM(drawmethod, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP)) wm_flush_regions_down(win->screen, &ar->winrct); - win->screen->do_draw = TRUE; + win->screen->do_draw = true; } void WM_redraw_windows(bContext *C) diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index ecf56bcbc3a..9d04beac5ee 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -288,7 +288,7 @@ void wm_event_do_notifiers(bContext *C) { if (note->category == NC_SCENE) { if (note->data == ND_FRAME) - do_anim = TRUE; + do_anim = true; } } if (ELEM5(note->category, NC_SCENE, NC_OBJECT, NC_GEOM, NC_SCENE, NC_WM)) { @@ -301,7 +301,7 @@ void wm_event_do_notifiers(bContext *C) /* XXX, quick frame changes can cause a crash if framechange and rendering * collide (happens on slow scenes), BKE_scene_update_for_newframe can be called * twice which can depgraph update the same object at once */ - if (G.is_rendering == FALSE) { + if (G.is_rendering == false) { /* depsgraph gets called, might send more notifiers */ ED_update_for_newframe(CTX_data_main(C), win->screen->scene, 1); @@ -364,7 +364,7 @@ void wm_event_do_notifiers(bContext *C) } /* XXX make lock in future, or separated derivedmesh users in scene */ - if (G.is_rendering == FALSE) { + if (G.is_rendering == false) { /* depsgraph & animation: update tagged datablocks */ Main *bmain = CTX_data_main(C); @@ -489,7 +489,7 @@ int WM_operator_poll(bContext *C, wmOperatorType *ot) /* sets up the new context and calls 'wm_operator_invoke()' with poll_only */ int WM_operator_poll_context(bContext *C, wmOperatorType *ot, short context) { - return wm_operator_call_internal(C, ot, NULL, NULL, context, TRUE); + return wm_operator_call_internal(C, ot, NULL, NULL, context, true); } static void wm_operator_print(bContext *C, wmOperator *op) @@ -611,10 +611,10 @@ void WM_reportf(const bContext *C, ReportType type, const char *format, ...) BLI_dynstr_free(ds); } -/* (caller_owns_reports == TRUE) when called from python */ -static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int caller_owns_reports) +/* (caller_owns_reports == true) when called from python */ +static void wm_operator_reports(bContext *C, wmOperator *op, int retval, bool caller_owns_reports) { - if (caller_owns_reports == FALSE) { /* popup */ + if (caller_owns_reports == false) { /* popup */ if (op->reports->list.first) { /* FIXME, temp setting window, see other call to uiPupMenuReports for why */ wmWindow *win_prev = CTX_wm_window(C); @@ -638,7 +638,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int cal wm_operator_print(C, op); } - if (caller_owns_reports == FALSE) { + if (caller_owns_reports == false) { BKE_reports_print(op->reports, RPT_DEBUG); /* print out reports to console. */ } @@ -726,7 +726,7 @@ static int wm_operator_exec(bContext *C, wmOperator *op, const bool repeat, cons * Carefully checked all calls to wm_operator_exec and WM_operator_repeat, don't see any reason * why this was needed, but worth to note it in case something turns bad. (mont29) */ if (retval & (OPERATOR_FINISHED | OPERATOR_CANCELLED)/* && repeat == 0 */) - wm_operator_reports(C, op, retval, FALSE); + wm_operator_reports(C, op, retval, false); if (retval & OPERATOR_FINISHED) { if (store) { @@ -788,7 +788,7 @@ int WM_operator_repeat(bContext *C, wmOperator *op) { return wm_operator_exec(C, op, true, true); } -/* TRUE if WM_operator_repeat can run +/* true if WM_operator_repeat can run * simple check for now but may become more involved. * To be sure the operator can run call WM_operator_poll(C, op->type) also, since this call * checks if WM_operator_repeat() can run at all, not that it WILL run at any time. */ @@ -985,14 +985,14 @@ bool WM_operator_last_properties_store(wmOperator *op) #else -int WM_operator_last_properties_init(wmOperator *UNUSED(op)) +bool WM_operator_last_properties_init(wmOperator *UNUSED(op)) { - return FALSE; + return false; } -int WM_operator_last_properties_store(wmOperator *UNUSED(op)) +bool WM_operator_last_properties_store(wmOperator *UNUSED(op)) { - return FALSE; + return false; } #endif @@ -1075,7 +1075,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, */ if (ot->flag & OPTYPE_BLOCKING || (op->opm && op->opm->type->flag & OPTYPE_BLOCKING)) { int bounds[4] = {-1, -1, -1, -1}; - int wrap; + bool wrap; if (op->opm) { wrap = (U.uiflag & USER_CONTINUOUS_MOUSE) && @@ -1090,7 +1090,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, if (wrap) { ARegion *ar = CTX_wm_region(C); if (ar && ar->regiontype == RGN_TYPE_HEADER) { - wrap = FALSE; + wrap = false; } } @@ -1267,7 +1267,7 @@ int WM_operator_name_call(bContext *C, const char *opstring, short context, Poin { wmOperatorType *ot = WM_operatortype_find(opstring, 0); if (ot) - return wm_operator_call_internal(C, ot, properties, NULL, context, FALSE); + return wm_operator_call_internal(C, ot, properties, NULL, context, false); return 0; } @@ -1308,7 +1308,7 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, short context, wmWindowManager *wm = CTX_wm_manager(C); if (!is_undo && wm) wm->op_undo_depth++; - retval = wm_operator_call_internal(C, ot, properties, reports, context, FALSE); + retval = wm_operator_call_internal(C, ot, properties, reports, context, false); if (!is_undo && wm && (wm == CTX_wm_manager(C))) wm->op_undo_depth--; @@ -1579,7 +1579,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand wm->op_undo_depth--; if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) - wm_operator_reports(C, op, retval, FALSE); + wm_operator_reports(C, op, retval, false); /* important to run 'wm_operator_finished' before NULLing the context members */ if (retval & OPERATOR_FINISHED) { @@ -1624,7 +1624,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand if (ot) { if (wm_operator_check_locked_interface(C, ot)) { - retval = wm_operator_invoke(C, ot, event, properties, NULL, FALSE); + retval = wm_operator_invoke(C, ot, event, properties, NULL, false); } } } @@ -2017,12 +2017,15 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) * wasn't handled, the KM_RELEASE will become a KM_CLICK */ if (win && event->val == KM_PRESS) { - win->eventstate->check_click = TRUE; + win->eventstate->check_click = true; } if (win && win->eventstate->prevtype == event->type) { - if (event->val == KM_RELEASE && win->eventstate->prevval == KM_PRESS && win->eventstate->check_click == TRUE) { + if ((event->val == KM_RELEASE) && + (win->eventstate->prevval == KM_PRESS) && + (win->eventstate->check_click == true)) + { event->val = KM_CLICK; if (G.debug & (G_DEBUG_HANDLERS)) { @@ -2141,10 +2144,10 @@ static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *even } if (event->type == MOUSEMOVE) - win->screen->do_draw_drag = TRUE; + win->screen->do_draw_drag = true; else if (event->type == ESCKEY) { BLI_freelistN(&wm->drags); - win->screen->do_draw_drag = TRUE; + win->screen->do_draw_drag = true; } else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { event->type = EVT_DROP; @@ -2160,7 +2163,7 @@ static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *even event->customdatafree = 1; /* clear drop icon */ - win->screen->do_draw_drag = TRUE; + win->screen->do_draw_drag = true; /* restore cursor (disabled, see wm_dragdrop.c) */ // WM_cursor_modal_restore(win); @@ -2169,7 +2172,7 @@ static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *even /* overlap fails otherwise */ if (win->screen->do_draw_drag) if (win->drawmethod == USER_DRAW_OVERLAP) - win->screen->do_draw = TRUE; + win->screen->do_draw = true; } @@ -2274,7 +2277,7 @@ void wm_event_do_handlers(bContext *C) wm_paintcursor_test(C, event); } else if (event->type == NDOF_MOTION) { - win->addmousemove = TRUE; + win->addmousemove = true; } for (sa = win->screen->areabase.first; sa; sa = sa->next) { @@ -3176,22 +3179,22 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U case LEFTSHIFTKEY: case RIGHTSHIFTKEY: evt->shift = (event.val == KM_PRESS) ? ((evt->ctrl || evt->alt || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; + false; break; case LEFTCTRLKEY: case RIGHTCTRLKEY: evt->ctrl = (event.val == KM_PRESS) ? ((evt->shift || evt->alt || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; + false; break; case LEFTALTKEY: case RIGHTALTKEY: evt->alt = (event.val == KM_PRESS) ? ((evt->ctrl || evt->shift || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; + false; break; case OSKEY: evt->oskey = (event.val == KM_PRESS) ? ((evt->ctrl || evt->alt || evt->shift) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; + false; break; default: if (event.val == KM_PRESS && event.keymodifier == 0) @@ -3225,7 +3228,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U /* check other modifiers because ms-windows uses these to bring up the task manager */ (event.shift == 0 && event.ctrl == 0 && event.alt == 0)) { - G.is_break = TRUE; + G.is_break = true; } /* double click test - only for press */ diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index e4e7a91361d..952fb42d607 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -352,7 +352,7 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name) } else { #if 0 /* historic stuff - no longer used */ - WM_cursor_wait(TRUE); + WM_cursor_wait(true); if (is_foo_format(name)) { read_foo(name); @@ -364,7 +364,7 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name) retval = BKE_READ_EXOTIC_FAIL_FORMAT; } #if 0 - WM_cursor_wait(FALSE); + WM_cursor_wait(false); #endif } } @@ -413,7 +413,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports) ListBase wmbase; /* assume automated tasks with background, don't write recent file list */ - const bool do_history = (G.background == FALSE) && (CTX_wm_manager(C)->op_undo_depth == 0); + const bool do_history = (G.background == false) && (CTX_wm_manager(C)->op_undo_depth == 0); /* put aside screens to match with persistent windows later */ /* also exit screens and editors */ @@ -460,7 +460,7 @@ bool WM_file_read(bContext *C, const char *filepath, ReportList *reports) CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); ED_editors_init(C); - DAG_on_visible_update(CTX_data_main(C), TRUE); + DAG_on_visible_update(CTX_data_main(C), true); #ifdef WITH_PYTHON /* run any texts that were loaded in and flagged as modules */ @@ -650,7 +650,7 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c BKE_write_undo(C, "original"); /* save current state */ ED_editors_init(C); - DAG_on_visible_update(CTX_data_main(C), TRUE); + DAG_on_visible_update(CTX_data_main(C), true); #ifdef WITH_PYTHON if (CTX_py_init_get(C)) { @@ -671,7 +671,7 @@ int wm_homefile_read(bContext *C, ReportList *reports, bool from_memory, const c CTX_wm_window_set(C, NULL); /* exits queues */ } - return TRUE; + return true; } int wm_history_read_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) @@ -823,11 +823,11 @@ static ImBuf *blend_file_thumb(Scene *scene, bScreen *screen, int **thumb_pt) if (scene->camera) { ibuf = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, - IB_rect, OB_SOLID, FALSE, FALSE, R_ADDSKY, err_out); + IB_rect, OB_SOLID, false, false, R_ADDSKY, err_out); } else { ibuf = ED_view3d_draw_offscreen_imbuf(scene, v3d, ar, BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, - IB_rect, FALSE, R_ADDSKY, err_out); + IB_rect, false, R_ADDSKY, err_out); } if (ibuf) { diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 6e34c776719..f0b468145e3 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -382,7 +382,7 @@ void wm_gesture_tag_redraw(bContext *C) ARegion *ar = CTX_wm_region(C); if (screen) - screen->do_draw_gesture = TRUE; + screen->do_draw_gesture = true; wm_tag_redraw_overlay(win, ar); } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 5b1fd90a0df..5325ade011f 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -538,5 +538,5 @@ void WM_exit(bContext *C) } #endif - exit(G.is_break == TRUE); + exit(G.is_break == true); } diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index d26723e7f8c..7c0d7bf3606 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -230,13 +230,13 @@ bool WM_jobs_test(wmWindowManager *wm, void *owner, int job_type) if (wm_job->owner == owner) { if (job_type == WM_JOB_TYPE_ANY || (wm_job->job_type == job_type)) { if (wm_job->running || wm_job->suspended) { - return TRUE; + return true; } } } } - return FALSE; + return false; } float WM_jobs_progress(wmWindowManager *wm, void *owner) @@ -305,7 +305,7 @@ void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void (*free)(void * if (wm_job->running) { /* signal job to end */ - wm_job->stop = TRUE; + wm_job->stop = true; } } @@ -333,7 +333,7 @@ static void *do_job_thread(void *job_v) wmJob *wm_job = job_v; wm_job->startjob(wm_job->run_customdata, &wm_job->stop, &wm_job->do_update, &wm_job->progress); - wm_job->ready = TRUE; + wm_job->ready = true; return NULL; } @@ -342,11 +342,11 @@ static void *do_job_thread(void *job_v) static void wm_jobs_test_suspend_stop(wmWindowManager *wm, wmJob *test) { wmJob *wm_job; - int suspend = FALSE; + bool suspend = false; /* job added with suspend flag, we wait 1 timer step before activating it */ if (test->flag & WM_JOB_SUSPEND) { - suspend = TRUE; + suspend = true; test->flag &= ~WM_JOB_SUSPEND; } else { @@ -367,11 +367,11 @@ static void wm_jobs_test_suspend_stop(wmWindowManager *wm, wmJob *test) if (0 == (wm_job->flag & WM_JOB_EXCL_RENDER)) continue; - suspend = TRUE; + suspend = true; /* if this job has higher priority, stop others */ if (test->flag & WM_JOB_PRIORITY) { - wm_job->stop = TRUE; + wm_job->stop = true; // printf("job stopped: %s\n", wm_job->name); } } @@ -388,7 +388,7 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job) { if (wm_job->running) { /* signal job to end and restart */ - wm_job->stop = TRUE; + wm_job->stop = true; // printf("job started a running job, ending... %s\n", wm_job->name); } else { @@ -397,19 +397,19 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job) wm_jobs_test_suspend_stop(wm, wm_job); - if (wm_job->suspended == FALSE) { + if (wm_job->suspended == false) { /* copy to ensure proper free in end */ wm_job->run_customdata = wm_job->customdata; wm_job->run_free = wm_job->free; wm_job->free = NULL; wm_job->customdata = NULL; - wm_job->running = TRUE; + wm_job->running = true; if (wm_job->initjob) wm_job->initjob(wm_job->run_customdata); - wm_job->stop = FALSE; - wm_job->ready = FALSE; + wm_job->stop = false; + wm_job->ready = false; wm_job->progress = 0.0; // printf("job started: %s\n", wm_job->name); @@ -444,7 +444,7 @@ static void wm_jobs_kill_job(wmWindowManager *wm, wmJob *wm_job) { if (wm_job->running) { /* signal job to end */ - wm_job->stop = TRUE; + wm_job->stop = true; wm_job_main_thread_yield(wm_job, true); BLI_end_threads(&wm_job->threads); @@ -508,7 +508,7 @@ void WM_jobs_stop(wmWindowManager *wm, void *owner, void *startjob) for (wm_job = wm->jobs.first; wm_job; wm_job = wm_job->next) { if (wm_job->owner == owner || wm_job->startjob == startjob) { if (wm_job->running) { - wm_job->stop = TRUE; + wm_job->stop = true; } } } @@ -573,7 +573,7 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) if (wm_job->flag & WM_JOB_PROGRESS) WM_event_add_notifier(C, NC_WM | ND_JOB, NULL); - wm_job->do_update = FALSE; + wm_job->do_update = false; } if (wm_job->ready) { @@ -593,7 +593,7 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) PIL_check_seconds_timer() - wm_job->start_time); } - wm_job->running = FALSE; + wm_job->running = false; wm_job_main_thread_yield(wm_job, true); BLI_end_threads(&wm_job->threads); wm_job->main_thread_mutex_ending = false; @@ -654,9 +654,9 @@ bool WM_jobs_has_running(wmWindowManager *wm) for (wm_job = wm->jobs.first; wm_job; wm_job = wm_job->next) { if (wm_job->running) { - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index d6ceb8caf29..c0326e3582b 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -400,10 +400,10 @@ static void keymap_event_set(wmKeyMapItem *kmi, short type, short val, int modif kmi->shift = kmi->ctrl = kmi->alt = kmi->oskey = KM_ANY; } else { - kmi->shift = (modifier & KM_SHIFT) ? KM_MOD_FIRST : ((modifier & KM_SHIFT2) ? KM_MOD_SECOND : FALSE); - kmi->ctrl = (modifier & KM_CTRL) ? KM_MOD_FIRST : ((modifier & KM_CTRL2) ? KM_MOD_SECOND : FALSE); - kmi->alt = (modifier & KM_ALT) ? KM_MOD_FIRST : ((modifier & KM_ALT2) ? KM_MOD_SECOND : FALSE); - kmi->oskey = (modifier & KM_OSKEY) ? KM_MOD_FIRST : ((modifier & KM_OSKEY2) ? KM_MOD_SECOND : FALSE); + kmi->shift = (modifier & KM_SHIFT) ? KM_MOD_FIRST : ((modifier & KM_SHIFT2) ? KM_MOD_SECOND : false); + kmi->ctrl = (modifier & KM_CTRL) ? KM_MOD_FIRST : ((modifier & KM_CTRL2) ? KM_MOD_SECOND : false); + kmi->alt = (modifier & KM_ALT) ? KM_MOD_FIRST : ((modifier & KM_ALT2) ? KM_MOD_SECOND : false); + kmi->oskey = (modifier & KM_OSKEY) ? KM_MOD_FIRST : ((modifier & KM_OSKEY2) ? KM_MOD_SECOND : false); } } @@ -1040,7 +1040,7 @@ static wmKeyMapItem *wm_keymap_item_find( wmKeyMapItem *found = wm_keymap_item_find_props(C, opname, opcontext, properties, is_strict, is_hotkey, keymap_r); if (!found && properties) { - wmOperatorType *ot = WM_operatortype_find(opname, TRUE); + wmOperatorType *ot = WM_operatortype_find(opname, true); if (ot) { /* make a copy of the properties and set any unset props * to their default values, so the ID property compare function succeeds */ diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 259324935e6..f0ee8318a55 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -364,7 +364,7 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam { wmOperatorType *ot; - if (WM_operatortype_find(idname, TRUE)) { + if (WM_operatortype_find(idname, true)) { printf("%s: macro error: operator %s exists\n", __func__, idname); return NULL; } @@ -676,7 +676,7 @@ static char *wm_prop_pystring_from_context(bContext *C, PointerRNA *ptr, Propert */ /* don't get from the context store since this is normally set only for the UI and not usable elsewhere */ - ListBase lb = CTX_data_dir_get_ex(C, FALSE, TRUE, TRUE); + ListBase lb = CTX_data_dir_get_ex(C, false, true, true); LinkData *link; const char *member_found = NULL; @@ -943,7 +943,7 @@ bool WM_operator_properties_default(PointerRNA *ptr, const bool do_update) break; } default: - if ((do_update == false) || (RNA_property_is_set(ptr, prop) == FALSE)) { + if ((do_update == false) || (RNA_property_is_set(ptr, prop) == false)) { if (RNA_property_reset(ptr, prop, -1)) { changed = true; } @@ -1014,9 +1014,9 @@ void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op) PropertySubType pstype = RNA_property_subtype(prop); if (pstype == PROP_DISTANCE) { /* we don't support arrays yet */ - BLI_assert(RNA_property_array_check(prop) == FALSE); + BLI_assert(RNA_property_array_check(prop) == false); /* initialize */ - if (!RNA_property_is_set_ex(op->ptr, prop, FALSE)) { + if (!RNA_property_is_set_ex(op->ptr, prop, false)) { const float value = RNA_property_float_get_default(op->ptr, prop) * dia; RNA_property_float_set(op->ptr, prop, value); } @@ -1093,7 +1093,7 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op) event.type = EVT_BUT_OPEN; event.val = KM_PRESS; event.customdata = but; - event.customdatafree = FALSE; + event.customdatafree = false; wm_event_add(win, &event); return block; @@ -1161,9 +1161,9 @@ bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFor RNA_property_string_set(op->ptr, prop, filepath); /* note, we could check for and update 'filename' here, * but so far nothing needs this. */ - return TRUE; + return true; } - return FALSE; + return false; } /* default properties for fileselect */ @@ -1228,7 +1228,7 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); if (flag & WM_FILESEL_RELPATH) - RNA_def_boolean(ot->srna, "relative_path", TRUE, "Relative Path", "Select the file relative to the blend file"); + RNA_def_boolean(ot->srna, "relative_path", true, "Relative Path", "Select the file relative to the blend file"); prop = RNA_def_enum(ot->srna, "display_type", file_display_items, display, "Display Type", ""); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); @@ -1340,7 +1340,7 @@ int WM_operator_winactive(bContext *C) return 1; } -/* return FALSE, if the UI should be disabled */ +/* return false, if the UI should be disabled */ bool WM_operator_check_ui_enabled(const bContext *C, const char *idname) { wmWindowManager *wm = CTX_wm_manager(C); @@ -1409,7 +1409,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) if (op == WM_operator_last_redo(C)) if (!WM_operator_check_ui_enabled(C, op->type->name)) - uiLayoutSetEnabled(layout, FALSE); + uiLayoutSetEnabled(layout, false); if (op->type->flag & OPTYPE_MACRO) { for (op = op->macro.first; op; op = op->next) { @@ -1442,7 +1442,7 @@ static void dialog_exec_cb(bContext *C, void *arg1, void *arg2) WM_operator_call_ex(C, data->op, true); /* let execute handle freeing it */ - //data->free_op = FALSE; + //data->free_op = false; //data->op = NULL; /* in this case, wm_operator_ui_popup_cancel wont run */ @@ -1492,7 +1492,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData) uiLayout *col; uiBut *btn; - col = uiLayoutColumn(layout, FALSE); + col = uiLayoutColumn(layout, false); col_block = uiLayoutGetBlock(col); /* Create OK button, the callback of which will execute op */ btn = uiDefBut(col_block, BUT, 0, IFACE_("OK"), 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); @@ -1564,7 +1564,7 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height) data->op = op; data->width = width; data->height = height; - data->free_op = TRUE; /* if this runs and gets registered we may want not to free it */ + data->free_op = true; /* if this runs and gets registered we may want not to free it */ uiPupBlockEx(C, wm_operator_ui_create, NULL, wm_operator_ui_popup_cancel, data); return OPERATOR_RUNNING_MODAL; } @@ -1624,7 +1624,7 @@ int WM_operator_props_dialog_popup(bContext *C, wmOperator *op, int width, int h data->op = op; data->width = width; data->height = height; - data->free_op = TRUE; /* if this runs and gets registered we may want not to free it */ + data->free_op = true; /* if this runs and gets registered we may want not to free it */ /* op is not executed until popup OK but is clicked */ uiPupBlockEx(C, wm_block_dialog_create, wm_operator_ui_popup_ok, wm_operator_ui_popup_cancel, data); @@ -1743,7 +1743,7 @@ static int wm_resource_check_prev(void) // if (res) printf("LOCAL: %s\n", res); if (res) { - return FALSE; + return false; } else { return (BLI_get_folder_version(BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION - 1, true) != NULL); @@ -1758,7 +1758,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiStyle *style = UI_GetStyle(); struct RecentFile *recent; int i; - MenuType *mt = WM_menutype_find("USERPREF_MT_splash", TRUE); + MenuType *mt = WM_menutype_find("USERPREF_MT_splash", true); char url[96]; char file[FILE_MAX]; @@ -1865,8 +1865,8 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiBlockSetEmboss(block, UI_EMBOSSP); uiLayoutSetOperatorContext(layout, WM_OP_EXEC_REGION_WIN); - split = uiLayoutSplit(layout, 0.0f, FALSE); - col = uiLayoutColumn(split, FALSE); + split = uiLayoutSplit(layout, 0.0f, false); + col = uiLayoutColumn(split, false); uiItemL(col, IFACE_("Links"), ICON_NONE); uiItemStringO(col, IFACE_("Support an Open Animation Movie"), ICON_URL, "WM_OT_url_open", "url", "http://cloud.blender.org/gooseberry"); @@ -1891,7 +1891,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiItemStringO(col, IFACE_("Python API Reference"), ICON_URL, "WM_OT_url_open", "url", url); uiItemL(col, "", ICON_NONE); - col = uiLayoutColumn(split, FALSE); + col = uiLayoutColumn(split, false); if (wm_resource_check_prev()) { uiItemO(col, NULL, ICON_NEW, "WM_OT_copy_prev_settings"); @@ -1960,7 +1960,7 @@ static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *UNUSED(arg_ event.type = EVT_BUT_OPEN; event.val = KM_PRESS; event.customdata = but; - event.customdatafree = FALSE; + event.customdatafree = false; wm_event_add(win, &event); return block; @@ -2762,9 +2762,9 @@ static bool blend_save_check(bContext *UNUSED(C), wmOperator *op) * we keep getting nitpicking bug reports about this - campbell */ BLI_ensure_extension(filepath, FILE_MAX, ".blend"); RNA_string_set(op->ptr, "filepath", filepath); - return TRUE; + return true; } - return FALSE; + return false; } static void WM_OT_save_as_mainfile(wmOperatorType *ot) @@ -4648,15 +4648,15 @@ void wm_window_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "WM_OT_open_mainfile", F1KEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "WM_OT_link_append", OKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "WM_OT_link_append", F1KEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "link", FALSE); - RNA_boolean_set(kmi->ptr, "instance_groups", FALSE); + RNA_boolean_set(kmi->ptr, "link", false); + RNA_boolean_set(kmi->ptr, "instance_groups", false); WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_save_mainfile", WKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", F2KEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_ALT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "copy", TRUE); + RNA_boolean_set(kmi->ptr, "copy", true); WM_keymap_verify_item(keymap, "WM_OT_window_fullscreen_toggle", F11KEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "WM_OT_quit_blender", QKEY, KM_PRESS, KM_CTRL, 0); @@ -4765,57 +4765,57 @@ static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(pt /* can add more as needed */ EnumPropertyItem *RNA_action_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, FALSE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, false); } #if 0 /* UNUSED */ EnumPropertyItem *RNA_action_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, TRUE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->action.first : NULL, true); } #endif EnumPropertyItem *RNA_group_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, FALSE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, false); } EnumPropertyItem *RNA_group_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, TRUE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->group.first : NULL, true); } EnumPropertyItem *RNA_image_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, FALSE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, false); } EnumPropertyItem *RNA_image_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, TRUE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->image.first : NULL, true); } EnumPropertyItem *RNA_scene_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, FALSE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, false); } EnumPropertyItem *RNA_scene_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, TRUE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->scene.first : NULL, true); } EnumPropertyItem *RNA_movieclip_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclip.first : NULL, FALSE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclip.first : NULL, false); } EnumPropertyItem *RNA_movieclip_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclip.first : NULL, TRUE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->movieclip.first : NULL, true); } EnumPropertyItem *RNA_mask_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->mask.first : NULL, FALSE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->mask.first : NULL, false); } EnumPropertyItem *RNA_mask_local_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free) { - return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->mask.first : NULL, TRUE); + return rna_id_itemf(C, ptr, r_free, C ? (ID *)CTX_data_main(C)->mask.first : NULL, true); } diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index ab48e72562e..16c424f4aec 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -90,14 +90,15 @@ typedef struct PlayState { /* playback state */ short direction; short next_frame; - short once; - short turbo; - short pingpong; - short noskip; - short sstep; - short wait2; - short stopped; - short go; + + bool once; + bool turbo; + bool pingpong; + bool noskip; + bool sstep; + bool wait2; + bool stopped; + bool go; int fstep; @@ -213,7 +214,7 @@ typedef struct PlayAnimPict { } PlayAnimPict; static struct ListBase picsbase = {NULL, NULL}; -static int fromdisk = FALSE; +static bool fromdisk = false; static double ptottime = 0.0, swaptime = 0.04; static PlayAnimPict *playanim_step(PlayAnimPict *playanim, int step) @@ -385,7 +386,7 @@ static void build_pict_list(PlayState *ps, char *first, int totframes, int fstep picture->size = size; picture->IB_flags = IB_rect; - if (fromdisk == FALSE) { + if (fromdisk == false) { mem = (char *)MEM_mallocN(size, "build pic list"); if (mem == NULL) { printf("Couldn't get memory\n"); @@ -462,7 +463,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) val = ELEM(type, GHOST_kEventKeyDown, GHOST_kEventButtonDown); if (ps->wait2 && ps->stopped) { - ps->stopped = FALSE; + ps->stopped = false; } if (ps->wait2) { @@ -525,8 +526,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) break; case GHOST_kKeyLeftArrow: if (val) { - ps->sstep = TRUE; - ps->wait2 = FALSE; + ps->sstep = true; + ps->wait2 = false; if (g_WS.qual & WS_QUAL_SHIFT) { ps->picture = picsbase.first; ps->next_frame = 0; @@ -538,20 +539,20 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) break; case GHOST_kKeyDownArrow: if (val) { - ps->wait2 = FALSE; + ps->wait2 = false; if (g_WS.qual & WS_QUAL_SHIFT) { ps->next_frame = ps->direction = -1; } else { ps->next_frame = -10; - ps->sstep = TRUE; + ps->sstep = true; } } break; case GHOST_kKeyRightArrow: if (val) { - ps->sstep = TRUE; - ps->wait2 = FALSE; + ps->sstep = true; + ps->wait2 = false; if (g_WS.qual & WS_QUAL_SHIFT) { ps->picture = picsbase.last; ps->next_frame = 0; @@ -563,13 +564,13 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) break; case GHOST_kKeyUpArrow: if (val) { - ps->wait2 = FALSE; + ps->wait2 = false; if (g_WS.qual & WS_QUAL_SHIFT) { ps->next_frame = ps->direction = 1; } else { ps->next_frame = 10; - ps->sstep = TRUE; + ps->sstep = true; } } break; @@ -591,29 +592,29 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) case GHOST_kKeyNumpad0: if (val) { if (ps->once) { - ps->once = ps->wait2 = FALSE; + ps->once = ps->wait2 = false; } else { ps->picture = NULL; - ps->once = TRUE; - ps->wait2 = FALSE; + ps->once = true; + ps->wait2 = false; } } break; case GHOST_kKeyEnter: case GHOST_kKeyNumpadEnter: if (val) { - ps->wait2 = ps->sstep = FALSE; + ps->wait2 = ps->sstep = false; } break; case GHOST_kKeyPeriod: case GHOST_kKeyNumpadPeriod: if (val) { if (ps->sstep) { - ps->wait2 = FALSE; + ps->wait2 = false; } else { - ps->sstep = TRUE; + ps->sstep = true; ps->wait2 = !ps->wait2; } } @@ -643,7 +644,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) break; } case GHOST_kKeyEsc: - ps->go = FALSE; + ps->go = false; break; default: break; @@ -713,8 +714,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) if (ps->picture->next == NULL) break; ps->picture = ps->picture->next; } - ps->sstep = TRUE; - ps->wait2 = FALSE; + ps->sstep = true; + ps->wait2 = false; ps->next_frame = 0; } break; @@ -761,7 +762,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) case GHOST_kEventQuit: case GHOST_kEventWindowClose: { - ps->go = FALSE; + ps->go = false; break; } case GHOST_kEventDraggingDropDone: @@ -774,7 +775,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr ps_void) for (a = 0; a < stra->count; a++) { BLI_strncpy(ps->dropped_file, (char *)stra->strings[a], sizeof(ps->dropped_file)); - ps->go = FALSE; + ps->go = false; printf("drop file %s\n", stra->strings[a]); break; /* only one drop element supported now */ } @@ -803,7 +804,7 @@ static void playanim_window_open(const char *title, int posx, int posy, int size /* could optionally start fullscreen */ GHOST_kWindowStateNormal, GHOST_kDrawingContextTypeOpenGL, - FALSE /* no stereo */, FALSE); + false /* no stereo */, false); } static void playanim_window_zoom(PlayState *ps, const float zoom_offset) @@ -841,21 +842,21 @@ static char *wm_main_playanim_intern(int argc, const char **argv) PlayState ps = {0}; - /* ps.doubleb = TRUE;*/ /* UNUSED */ - ps.go = TRUE; - ps.direction = TRUE; + /* ps.doubleb = true;*/ /* UNUSED */ + ps.go = true; + ps.direction = true; ps.next_frame = 1; - ps.once = FALSE; - ps.turbo = FALSE; - ps.pingpong = FALSE; - ps.noskip = FALSE; - ps.sstep = FALSE; - ps.wait2 = FALSE; - ps.stopped = FALSE; + ps.once = false; + ps.turbo = false; + ps.pingpong = false; + ps.noskip = false; + ps.sstep = false; + ps.wait2 = false; + ps.stopped = false; ps.picture = NULL; ps.dropped_file[0] = 0; ps.zoom = 1.0f; - /* resetmap = FALSE */ + /* resetmap = false */ ps.fstep = 1; @@ -865,7 +866,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv) if (argv[1][0] == '-') { switch (argv[1][1]) { case 'm': - fromdisk = TRUE; + fromdisk = true; break; case 'p': if (argc > 3) { @@ -1039,7 +1040,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv) if (ps.picture == NULL) { printf("couldn't find pictures\n"); - ps.go = FALSE; + ps.go = false; } if (ps.pingpong) { if (ps.direction == 1) { @@ -1096,17 +1097,17 @@ static char *wm_main_playanim_intern(int argc, const char **argv) if (ps.once) { if (ps.picture->next == NULL) { - ps.wait2 = TRUE; + ps.wait2 = true; } else if (ps.picture->prev == NULL) { - ps.wait2 = TRUE; + ps.wait2 = true; } } ps.next_frame = ps.direction; - while ( (hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0)) || ps.wait2 != 0) { + while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0)) || ps.wait2) { if (hasevent) { GHOST_DispatchEvents(g_WS.ghost_system); } @@ -1120,15 +1121,15 @@ static char *wm_main_playanim_intern(int argc, const char **argv) } } } - if (!ps.go) { + if (ps.go == false) { break; } } ps.wait2 = ps.sstep; - if (ps.wait2 == 0 && ps.stopped == 0) { - ps.stopped = TRUE; + if (ps.wait2 == false && ps.stopped == false) { + ps.stopped = true; } pupdate_time(); @@ -1140,10 +1141,10 @@ static char *wm_main_playanim_intern(int argc, const char **argv) if (ps.once && ps.picture != NULL) { if (ps.picture->next == NULL) { - ps.wait2 = TRUE; + ps.wait2 = true; } else if (ps.picture->prev == NULL) { - ps.wait2 = TRUE; + ps.wait2 = true; } } @@ -1154,7 +1155,7 @@ static char *wm_main_playanim_intern(int argc, const char **argv) ps.picture = playanim_step(ps.picture, ps.next_frame); } } - if (ps.go == FALSE) { + if (ps.go == false) { break; } } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index dfac1f25c89..1bd9f15ba66 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -254,8 +254,8 @@ wmWindow *wm_window_copy(bContext *C, wmWindow *winorig) BLI_strncpy(win->screenname, win->screen->id.name + 2, sizeof(win->screenname)); win->screen->winid = win->winid; - win->screen->do_refresh = TRUE; - win->screen->do_draw = TRUE; + win->screen->do_refresh = true; + win->screen->do_draw = true; win->drawmethod = U.wmdrawmethod; win->drawdata = NULL; diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index 17389c06e7e..619624b01b5 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -243,7 +243,7 @@ float RE_lamp_get_data(struct ShadeInput *shi, struct Object *lamp_obj, float co /* blenkernel */ void RE_FreeRenderResult(struct RenderResult *res) RET_NONE void RE_FreeAllRenderResults(void) RET_NONE -struct RenderResult *RE_MultilayerConvert(void *exrhandle, const char *colorspace, int predivide, int rectx, int recty) RET_NULL +struct RenderResult *RE_MultilayerConvert(void *exrhandle, const char *colorspace, bool predivide, int rectx, int recty) RET_NULL struct Scene *RE_GetScene(struct Render *re) RET_NULL void RE_Database_Free(struct Render *re) RET_NONE void RE_FreeRender(struct Render *re) RET_NONE @@ -255,8 +255,8 @@ const unsigned char stipple_quarttone[128]; double elbeemEstimateMemreq(int res, float sx, float sy, float sz, int refine, char *retstr) RET_ZERO struct Render *RE_NewRender(const char *name) RET_NULL void RE_SwapResult(struct Render *re, struct RenderResult **rr) RET_NONE -void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, struct SceneRenderLayer *srl, struct Object *camera_override, unsigned int lay_override, int frame, const short write_still) RET_NONE -int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]) RET_ZERO +void RE_BlenderFrame(struct Render *re, struct Main *bmain, struct Scene *scene, struct SceneRenderLayer *srl, struct Object *camera_override, unsigned int lay_override, int frame, const bool write_still) RET_NONE +bool RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]) RET_ZERO /* rna */ float *ED_view3d_cursor3d_get(struct Scene *scene, struct View3D *v3d) RET_NULL @@ -369,8 +369,8 @@ struct ListBase builtin_keyingsets; void ANIM_keyingset_info_register(struct KeyingSetInfo *ksi) RET_NONE void ANIM_keyingset_info_unregister(struct Main *bmain, KeyingSetInfo *ksi) RET_NONE short ANIM_validate_keyingset(struct bContext *C, struct ListBase *dsources, struct KeyingSet *ks) RET_ZERO -short ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type) RET_ZERO -short ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag) RET_ZERO +int ANIM_add_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag, int type) RET_ZERO +bool ANIM_remove_driver(struct ReportList *reports, struct ID *id, const char rna_path[], int array_index, short flag) RET_ZERO void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock) RET_NONE struct ImBuf *ED_space_image_acquire_buffer(struct SpaceImage *sima, void **lock_r) RET_NULL void ED_space_image_get_zoom(struct SpaceImage *sima, struct ARegion *ar, float *zoomx, float *zoomy) RET_NONE diff --git a/source/creator/creator.c b/source/creator/creator.c index 249b18e050e..b74c64fa6b8 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -210,7 +210,7 @@ static void blender_esc(int sig) { static int count = 0; - G.is_break = TRUE; /* forces render loop to read queue, not sure if its needed */ + G.is_break = true; /* forces render loop to read queue, not sure if its needed */ if (sig == 2) { if (count) { @@ -538,7 +538,7 @@ static void blender_crash_handler_backtrace(FILE *fp) process = GetCurrentProcess(); - SymInitialize(process, NULL, TRUE); + SymInitialize(process, NULL, true); nframes = CaptureStackBackTrace(0, SIZE, stack, NULL); symbolinfo = MEM_callocN(sizeof(SYMBOL_INFO) + MAXSYMBOL * sizeof( char ), "crash Symbol table"); @@ -1283,7 +1283,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data) /* WM_file_read would call normally */ ED_editors_init(C); - DAG_on_visible_update(bmain, TRUE); + DAG_on_visible_update(bmain, true); BKE_scene_update_tagged(bmain->eval_ctx, bmain, CTX_data_scene(C)); } else { diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp index 34d706eff03..619797a8c69 100644 --- a/source/gameengine/Converter/BL_ArmatureObject.cpp +++ b/source/gameengine/Converter/BL_ArmatureObject.cpp @@ -114,7 +114,7 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint) ListBase listb; // copy all constraint for backward compatibility // BKE_copy_constraints NULLs listb, no need to make extern for this operation. - BKE_copy_constraints(&listb, &pchan->constraints, FALSE); + BKE_copy_constraints(&listb, &pchan->constraints, false); pchan->constraints= listb; } else { diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index e604b7bf81f..4b55d73178c 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2010,7 +2010,7 @@ static KX_GameObject *gameobject_from_blenderobject( case OB_CURVE: { if (ob->curve_cache == NULL) { - BKE_displist_make_curveTypes(blenderscene, ob, FALSE); + BKE_displist_make_curveTypes(blenderscene, ob, false); } } #endif @@ -2128,7 +2128,7 @@ static void bl_ConvertBlenderObject_Single( MT_Matrix3x3 rotation; float rotmat[3][3]; - BKE_object_rot_to_mat3(blenderobject, rotmat, FALSE); + BKE_object_rot_to_mat3(blenderobject, rotmat, false); rotation.setValue3x3((float*)rotmat); MT_Vector3 scale(blenderobject->size); @@ -2142,7 +2142,7 @@ static void bl_ConvertBlenderObject_Single( ); float rotmatPrev[3][3]; - BKE_object_rot_to_mat3(blenderobject, rotmatPrev, FALSE); + BKE_object_rot_to_mat3(blenderobject, rotmatPrev, false); float eulxyz[3], eulxyzPrev[3]; mat3_to_eul(eulxyz, rotmat); diff --git a/source/gameengine/Expressions/IfExpr.cpp b/source/gameengine/Expressions/IfExpr.cpp index baf91e4a5c3..152ca8704ce 100644 --- a/source/gameengine/Expressions/IfExpr.cpp +++ b/source/gameengine/Expressions/IfExpr.cpp @@ -64,8 +64,8 @@ CIfExpr::~CIfExpr() /** * pre: - * ret: a new object containing the value of m_e1 if m_guard is a boolean TRUE - * a new object containing the value of m_e2 if m_guard is a boolean FALSE + * ret: a new object containing the value of m_e1 if m_guard is a boolean true + * a new object containing the value of m_e2 if m_guard is a boolean false * an new errorvalue if m_guard is not a boolean */ CValue* CIfExpr::Calculate() diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index 1ce6650831e..b85d4b40ca8 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -187,7 +187,7 @@ static POINT scr_save_mouse_pos; static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - BOOL close = FALSE; + BOOL close = false; switch (uMsg) { case WM_MOUSEMOVE: @@ -199,7 +199,7 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara if (abs(dx) > SCR_SAVE_MOUSE_MOVE_THRESHOLD || abs(dy) > SCR_SAVE_MOUSE_MOVE_THRESHOLD) { - close = TRUE; + close = true; } scr_save_mouse_pos = pt; break; @@ -208,7 +208,7 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara case WM_MBUTTONDOWN: case WM_RBUTTONDOWN: case WM_KEYDOWN: - close = TRUE; + close = true; } if (close) PostMessage(hwnd,WM_CLOSE,0,0); @@ -218,11 +218,11 @@ static LRESULT CALLBACK screenSaverWindowProc(HWND hwnd, UINT uMsg, WPARAM wPara BOOL CALLBACK findGhostWindowHWNDProc(HWND hwnd, LPARAM lParam) { GHOST_IWindow *p = (GHOST_IWindow*) GetWindowLongPtr(hwnd, GWLP_USERDATA); - BOOL ret = TRUE; + BOOL ret = true; if (p == ghost_window_to_find) { found_ghost_window_hwnd = hwnd; - ret = FALSE; + ret = false; } return ret; } @@ -268,7 +268,7 @@ bool GPG_Application::startScreenSaverPreview( LONG_PTR exstyle = GetWindowLongPtr(ghost_hwnd, GWL_EXSTYLE); RECT adjrc = { 0, 0, windowWidth, windowHeight }; - AdjustWindowRectEx(&adjrc, style, FALSE, exstyle); + AdjustWindowRectEx(&adjrc, style, false, exstyle); style = (style & (~(WS_POPUP|WS_OVERLAPPEDWINDOW|WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_TILEDWINDOW ))) | WS_CHILD; SetWindowLongPtr(ghost_hwnd, GWL_STYLE, style); diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp index 44e02ee00c9..076b96601aa 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp @@ -149,13 +149,13 @@ static BOOL scr_saver_init(int argc, char **argv) { scr_saver_mode = SCREEN_SAVER_MODE_NONE; scr_saver_hwnd = NULL; - BOOL ret = FALSE; + BOOL ret = false; int len = ::strlen(argv[0]); if (len > 4 && !::stricmp(".scr", argv[0] + len - 4)) { scr_saver_mode = SCREEN_SAVER_MODE_CONFIGURATION; - ret = TRUE; + ret = true; if (argc >= 2) { if (argc >= 3) diff --git a/source/gameengine/Rasterizer/RAS_TexVert.cpp b/source/gameengine/Rasterizer/RAS_TexVert.cpp index aaaf70728fe..e6edc064200 100644 --- a/source/gameengine/Rasterizer/RAS_TexVert.cpp +++ b/source/gameengine/Rasterizer/RAS_TexVert.cpp @@ -120,7 +120,7 @@ void RAS_TexVert::SetTangent(const MT_Vector3& tangent) } -// compare two vertices, and return TRUE if both are almost identical (they can be shared) +// compare two vertices, and return true if both are almost identical (they can be shared) bool RAS_TexVert::closeTo(const RAS_TexVert* other) { const float eps = FLT_EPSILON; |