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
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-23 07:00:37 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-03-23 07:00:37 +0400
commit62cede96d34d802d97797a635ff8370a5f7556a1 (patch)
treeec56d7f332164b34c31607ed882218ce892c9319 /source/blender/makesrna/intern/rna_color.c
parent865e80f0f47b8cda1b126c2130114b833c7c5035 (diff)
A major code update for making the DNA file specification of Freestyle settings
and RNA for it independent of the build flag for enabling Freestyle. Suggested by Sergey Sharybin through a code review of the branch. * Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific DNA file specification and RNA for it built in Blender. This will allow Freestyle setting survive even when a non-Freestyle build is used for loading and saving files. It is noted that operations are still conditionally built through #ifdef WITH_FREESTYLE blocks. * To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have been added. All API functions in FRS_freestyle_config.h as well as some of those in FRS_freestyle.h were moved to the new files. Now the relocated API functions have BKE_ prefix instead of FRS_.
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r--source/blender/makesrna/intern/rna_color.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 98672f2fca2..640e91adabf 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -57,9 +57,7 @@
#include "BKE_node.h"
#include "BKE_sequencer.h"
#include "BKE_texture.h"
-#ifdef WITH_FREESTYLE
-# include "BKE_linestyle.h"
-#endif
+#include "BKE_linestyle.h"
#include "ED_node.h"
@@ -188,20 +186,18 @@ static char *rna_ColorRamp_path(PointerRNA *ptr)
break;
}
- default:
- /* everything else just uses 'color_ramp' */
- path = BLI_strdup("color_ramp");
- break;
-
-#ifdef WITH_FREESTYLE
case ID_LS:
{
- char *path = FRS_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data);
+ char *path = BKE_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data);
if (path)
return path;
break;
}
-#endif
+
+ default:
+ /* everything else just uses 'color_ramp' */
+ path = BLI_strdup("color_ramp");
+ break;
}
}
else {
@@ -273,13 +269,12 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
}
break;
-#ifdef WITH_FREESTYLE
case ID_LS:
{
ListBase listbase;
LinkData *link;
- FRS_list_modifier_color_ramps((FreestyleLineStyle *)id, &listbase);
+ BKE_list_modifier_color_ramps((FreestyleLineStyle *)id, &listbase);
for (link = (LinkData *)listbase.first; link; link = link->next) {
RNA_pointer_create(id, &RNA_ColorRamp, link->data, &ramp_ptr);
COLRAMP_GETPATH;
@@ -287,7 +282,6 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
BLI_freelistN(&listbase);
break;
}
-#endif
default: /* everything else should have a "color_ramp" property */
{
@@ -340,7 +334,6 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
WM_main_add_notifier(NC_TEXTURE, tex);
}
break;
-#ifdef WITH_FREESTYLE
case ID_LS:
{
FreestyleLineStyle *linestyle= ptr->id.data;
@@ -348,7 +341,6 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
WM_main_add_notifier(NC_LINESTYLE, linestyle);
break;
}
-#endif
default:
break;
}