Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-05-03 18:04:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-03 18:41:45 +0400
commit08d899d1e7fe0c669954b197fef0e57269edfb79 (patch)
tree0b3e872af049ec1582068447d20e2a4579c94c7d /source
parente08db08a84bffaab27bc4562fd41f44756eb2e3e (diff)
Code cleanup: style
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c12
-rw-r--r--source/blender/editors/object/object_bake_api.c41
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c2
3 files changed, 30 insertions, 25 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index b0395931ffe..8028bdbc327 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -156,12 +156,12 @@ FreestyleLineStyle *BKE_copy_linestyle(FreestyleLineStyle *linestyle)
BKE_free_linestyle(new_linestyle);
for (a = 0; a < MAX_MTEX; a++) {
- if (linestyle->mtex[a]) {
- new_linestyle->mtex[a] = MEM_mallocN(sizeof(MTex), "BKE_copy_linestyle");
- memcpy(new_linestyle->mtex[a], linestyle->mtex[a], sizeof(MTex));
- id_us_plus((ID *)new_linestyle->mtex[a]->tex);
- }
- }
+ if (linestyle->mtex[a]) {
+ new_linestyle->mtex[a] = MEM_mallocN(sizeof(MTex), "BKE_copy_linestyle");
+ memcpy(new_linestyle->mtex[a], linestyle->mtex[a], sizeof(MTex));
+ id_us_plus((ID *)new_linestyle->mtex[a]->tex);
+ }
+ }
if (linestyle->nodetree) {
linestyle->nodetree = ntreeCopyTree(linestyle->nodetree);
}
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 813e28b25ed..0575a7bcbbe 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -367,13 +367,14 @@ typedef struct BakeAPIRender {
bool ready;
} BakeAPIRender;
-static int bake(Main *bmain, Scene *scene, Object *ob_low, ListBase *selected_objects, ReportList *reports,
- const ScenePassType pass_type, const int margin,
- const BakeSaveMode save_mode, const bool is_clear, const bool is_split_materials,
- const bool is_automatic_name, const bool use_selected_to_active,
- const float cage_extrusion, const int normal_space, const BakeNormalSwizzle normal_swizzle[],
- const char *custom_cage, const char *filepath, const int width, const int height,
- const char *identifier)
+static int bake(
+ Main *bmain, Scene *scene, Object *ob_low, ListBase *selected_objects, ReportList *reports,
+ const ScenePassType pass_type, const int margin,
+ const BakeSaveMode save_mode, const bool is_clear, const bool is_split_materials,
+ const bool is_automatic_name, const bool use_selected_to_active,
+ const float cage_extrusion, const int normal_space, const BakeNormalSwizzle normal_swizzle[],
+ const char *custom_cage, const char *filepath, const int width, const int height,
+ const char *identifier)
{
int op_result = OPERATOR_CANCELLED;
bool ok = false;
@@ -886,11 +887,12 @@ static int bake_exec(bContext *C, wmOperator *op)
bake_init_api_data(op, C, &bkr);
- result = bake(bkr.main, bkr.scene, bkr.ob, &bkr.selected_objects, bkr.reports,
- bkr.pass_type, bkr.margin, bkr.save_mode,
- bkr.is_clear, bkr.is_split_materials, bkr.is_automatic_name, bkr.use_selected_to_active,
- bkr.cage_extrusion, bkr.normal_space, bkr.normal_swizzle,
- bkr.custom_cage, bkr.filepath, bkr.width, bkr.height, bkr.identifier);
+ result = bake(
+ bkr.main, bkr.scene, bkr.ob, &bkr.selected_objects, bkr.reports,
+ bkr.pass_type, bkr.margin, bkr.save_mode,
+ bkr.is_clear, bkr.is_split_materials, bkr.is_automatic_name, bkr.use_selected_to_active,
+ bkr.cage_extrusion, bkr.normal_space, bkr.normal_swizzle,
+ bkr.custom_cage, bkr.filepath, bkr.width, bkr.height, bkr.identifier);
BLI_freelistN(&bkr.selected_objects);
return result;
@@ -900,12 +902,13 @@ static void bake_startjob(void *bkv, short *UNUSED(stop), short *UNUSED(do_updat
{
BakeAPIRender *bkr = (BakeAPIRender *)bkv;
- bkr->result = bake(bkr->main, bkr->scene, bkr->ob, &bkr->selected_objects, bkr->reports,
- bkr->pass_type, bkr->margin, bkr->save_mode,
- bkr->is_clear, bkr->is_split_materials, bkr->is_automatic_name, bkr->use_selected_to_active,
- bkr->cage_extrusion, bkr->normal_space, bkr->normal_swizzle,
- bkr->custom_cage, bkr->filepath, bkr->width, bkr->height, bkr->identifier
- );
+ bkr->result = bake(
+ bkr->main, bkr->scene, bkr->ob, &bkr->selected_objects, bkr->reports,
+ bkr->pass_type, bkr->margin, bkr->save_mode,
+ bkr->is_clear, bkr->is_split_materials, bkr->is_automatic_name, bkr->use_selected_to_active,
+ bkr->cage_extrusion, bkr->normal_space, bkr->normal_swizzle,
+ bkr->custom_cage, bkr->filepath, bkr->width, bkr->height, bkr->identifier
+ );
}
static void bake_freejob(void *bkv)
@@ -1018,7 +1021,7 @@ static int bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)
/* setup job */
wm_job = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake",
- WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE);
+ WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE);
WM_jobs_customdata_set(wm_job, bkr, bake_freejob);
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, NULL, NULL);
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 3f5d7de5cd0..4b37ac6b281 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -521,6 +521,7 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
return 0;
}
+#ifdef WITH_FREESTYLE
static bool buttons_context_linestyle_pinnable(const bContext *C)
{
Scene *scene = CTX_data_scene(C);
@@ -537,6 +538,7 @@ static bool buttons_context_linestyle_pinnable(const bContext *C)
}
return true;
}
+#endif
static int buttons_context_path(const bContext *C, ButsContextPath *path, int mainb, int flag)
{