[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55593] branches/soc-2008-mxcurioni/source /blender/blenkernel: Freestyle: use native EOL for BKE_freestyle
Sergey Sharybin
sergey.vfx at gmail.com
Tue Mar 26 09:08:52 CET 2013
Revision: 55593
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55593
Author: nazgul
Date: 2013-03-26 08:08:51 +0000 (Tue, 26 Mar 2013)
Log Message:
-----------
Freestyle: use native EOL for BKE_freestyle
Hope it's not so big deal every single line was changed in this commit.
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_freestyle.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/freestyle.c
Property Changed:
----------------
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_freestyle.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/freestyle.c
Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_freestyle.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_freestyle.h 2013-03-26 08:05:56 UTC (rev 55592)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_freestyle.h 2013-03-26 08:08:51 UTC (rev 55593)
@@ -1,64 +1,64 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2013 Blender Foundation
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-#ifndef __BKE_FREESTYLE_H__
-#define __BKE_FREESTYLE_H__
-
-/** \file BKE_freestyle.h
- * \ingroup bke
- */
-
-#include "DNA_scene_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* FreestyleConfig */
-void BKE_freestyle_config_init(FreestyleConfig *config);
-void BKE_freestyle_config_free(FreestyleConfig *config);
-void BKE_freestyle_config_copy(FreestyleConfig *new_config, FreestyleConfig *config);
-
-/* FreestyleConfig.modules */
-void BKE_freestyle_module_add(FreestyleConfig *config);
-void BKE_freestyle_module_delete(FreestyleConfig *config, FreestyleModuleConfig *module_conf);
-void BKE_freestyle_module_move_up(FreestyleConfig *config, FreestyleModuleConfig *module_conf);
-void BKE_freestyle_module_move_down(FreestyleConfig *config, FreestyleModuleConfig *module_conf);
-
-/* FreestyleConfig.linesets */
-FreestyleLineSet *BKE_freestyle_lineset_add(FreestyleConfig *config);
-FreestyleLineSet *BKE_freestyle_lineset_get_active(FreestyleConfig *config);
-short BKE_freestyle_lineset_get_active_index(FreestyleConfig *config);
-void BKE_freestyle_lineset_set_active_index(FreestyleConfig *config, short index);
-void BKE_freestyle_lineset_unique_name(FreestyleConfig *config, FreestyleLineSet *lineset);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2013 Blender Foundation
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __BKE_FREESTYLE_H__
+#define __BKE_FREESTYLE_H__
+
+/** \file BKE_freestyle.h
+ * \ingroup bke
+ */
+
+#include "DNA_scene_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* FreestyleConfig */
+void BKE_freestyle_config_init(FreestyleConfig *config);
+void BKE_freestyle_config_free(FreestyleConfig *config);
+void BKE_freestyle_config_copy(FreestyleConfig *new_config, FreestyleConfig *config);
+
+/* FreestyleConfig.modules */
+void BKE_freestyle_module_add(FreestyleConfig *config);
+void BKE_freestyle_module_delete(FreestyleConfig *config, FreestyleModuleConfig *module_conf);
+void BKE_freestyle_module_move_up(FreestyleConfig *config, FreestyleModuleConfig *module_conf);
+void BKE_freestyle_module_move_down(FreestyleConfig *config, FreestyleModuleConfig *module_conf);
+
+/* FreestyleConfig.linesets */
+FreestyleLineSet *BKE_freestyle_lineset_add(FreestyleConfig *config);
+FreestyleLineSet *BKE_freestyle_lineset_get_active(FreestyleConfig *config);
+short BKE_freestyle_lineset_get_active_index(FreestyleConfig *config);
+void BKE_freestyle_lineset_set_active_index(FreestyleConfig *config, short index);
+void BKE_freestyle_lineset_unique_name(FreestyleConfig *config, FreestyleLineSet *lineset);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
Property changes on: branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_freestyle.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/freestyle.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/freestyle.c 2013-03-26 08:05:56 UTC (rev 55592)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/freestyle.c 2013-03-26 08:08:51 UTC (rev 55593)
@@ -1,234 +1,234 @@
-/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2013 Blender Foundation
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/blenkernel/intern/freestyle.c
- * \ingroup bke
- */
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_freestyle_types.h"
-#include "DNA_group_types.h"
-
-#include "BKE_freestyle.h"
-#include "BKE_linestyle.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
-
-// function declarations
-static FreestyleLineSet *alloc_lineset(void);
-static void copy_lineset(FreestyleLineSet *new_lineset, FreestyleLineSet *lineset);
-static FreestyleModuleConfig *alloc_module(void);
-static void copy_module(FreestyleModuleConfig *new_module, FreestyleModuleConfig *module);
-
-void BKE_freestyle_config_init(FreestyleConfig *config)
-{
- config->mode = FREESTYLE_CONTROL_EDITOR_MODE;
-
- config->modules.first = config->modules.last = NULL;
- config->flags = 0;
- config->sphere_radius = 1.0f;
- config->dkr_epsilon = 0.0f;
- config->crease_angle = DEG2RADF(134.43f);
-
- config->linesets.first = config->linesets.last = NULL;
-}
-
-void BKE_freestyle_config_free(FreestyleConfig *config)
-{
- FreestyleLineSet *lineset;
-
- for (lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) {
- if (lineset->group) {
- lineset->group->id.us--;
- lineset->group = NULL;
- }
- lineset->linestyle->id.us--;
- lineset->linestyle = NULL;
- }
- BLI_freelistN(&config->linesets);
- BLI_freelistN(&config->modules);
-}
-
-void BKE_freestyle_config_copy(FreestyleConfig *new_config, FreestyleConfig *config)
-{
- FreestyleLineSet *lineset, *new_lineset;
- FreestyleModuleConfig *module, *new_module;
-
- new_config->mode = config->mode;
- new_config->raycasting_algorithm = config->raycasting_algorithm; /* deprecated */
- new_config->flags = config->flags;
- new_config->sphere_radius = config->sphere_radius;
- new_config->dkr_epsilon = config->dkr_epsilon;
- new_config->crease_angle = config->crease_angle;
-
- new_config->linesets.first = new_config->linesets.last = NULL;
- for (lineset = (FreestyleLineSet *)config->linesets.first; lineset; lineset = lineset->next) {
- new_lineset = alloc_lineset();
- copy_lineset(new_lineset, lineset);
- BLI_addtail(&new_config->linesets, (void *)new_lineset);
- }
-
- new_config->modules.first = new_config->modules.last = NULL;
- for (module = (FreestyleModuleConfig *)config->modules.first; module; module = module->next) {
- new_module = alloc_module();
- copy_module(new_module, module);
- BLI_addtail(&new_config->modules, (void *)new_module);
- }
-}
-
-static void copy_lineset(FreestyleLineSet *new_lineset, FreestyleLineSet *lineset)
-{
- new_lineset->linestyle = lineset->linestyle;
- new_lineset->linestyle->id.us++;
- new_lineset->flags = lineset->flags;
- new_lineset->selection = lineset->selection;
- new_lineset->qi = lineset->qi;
- new_lineset->qi_start = lineset->qi_start;
- new_lineset->qi_end = lineset->qi_end;
- new_lineset->edge_types = lineset->edge_types;
- new_lineset->exclude_edge_types = lineset->exclude_edge_types;
- new_lineset->group = lineset->group;
- if (new_lineset->group) {
- new_lineset->group->id.us++;
- }
- strcpy(new_lineset->name, lineset->name);
-}
-
-static FreestyleModuleConfig *alloc_module(void)
-{
- return (FreestyleModuleConfig *)MEM_callocN(sizeof(FreestyleModuleConfig), "style module configuration");
-}
-
-void BKE_freestyle_module_add(FreestyleConfig *config)
-{
- FreestyleModuleConfig *module_conf = alloc_module();
- const size_t maxlen = sizeof(module_conf->module_path);
- BLI_addtail(&config->modules, (void *)module_conf);
-
- BLI_strncpy(module_conf->module_path, BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, "freestyle"), maxlen);
- BLI_join_dirfile(module_conf->module_path, maxlen, module_conf->module_path, "style_modules");
- BLI_join_dirfile(module_conf->module_path, maxlen, module_conf->module_path, "contour.py");
- module_conf->is_displayed = 1;
-}
-
-static void copy_module(FreestyleModuleConfig *new_module, FreestyleModuleConfig *module)
-{
- strcpy(new_module->module_path, module->module_path);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list