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_main_api.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_main_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index f5c23923f81..fb0aeffcffb 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -76,9 +76,7 @@
#include "BKE_movieclip.h"
#include "BKE_mask.h"
#include "BKE_gpencil.h"
-#ifdef WITH_FREESTYLE
-# include "BKE_linestyle.h"
-#endif
+#include "BKE_linestyle.h"
#include "DNA_armature_types.h"
#include "DNA_camera_types.h"
@@ -848,10 +846,9 @@ static void rna_Main_grease_pencil_remove(Main *bmain, ReportList *reports, Poin
gpd->id.name + 2, ID_REAL_USERS(gpd));
}
-#ifdef WITH_FREESTYLE
FreestyleLineStyle *rna_Main_linestyles_new(Main *bmain, const char* name)
{
- FreestyleLineStyle *linestyle = FRS_new_linestyle(name, bmain);
+ FreestyleLineStyle *linestyle = BKE_new_linestyle(name, bmain);
id_us_min(&linestyle->id);
return linestyle;
}
@@ -865,7 +862,6 @@ void rna_Main_linestyles_remove(Main *bmain, ReportList *reports, FreestyleLineS
/* XXX python now has invalid pointer? */
}
-#endif
/* tag functions, all the same */
static void rna_Main_cameras_tag(Main *bmain, int value) { tag_main_lb(&bmain->camera, value); }
@@ -898,9 +894,7 @@ static void rna_Main_particles_tag(Main *bmain, int value) { tag_main_lb(&bmain-
static void rna_Main_gpencil_tag(Main *bmain, int value) { tag_main_lb(&bmain->gpencil, value); }
static void rna_Main_movieclips_tag(Main *bmain, int value) { tag_main_lb(&bmain->movieclip, value); }
static void rna_Main_masks_tag(Main *bmain, int value) { tag_main_lb(&bmain->mask, value); }
-#ifdef WITH_FREESTYLE
-void rna_Main_linestyle_tag(Main *bmain, int value) { tag_main_lb(&bmain->linestyle, value); }
-#endif
+static void rna_Main_linestyle_tag(Main *bmain, int value) { tag_main_lb(&bmain->linestyle, value); }
static int rna_Main_cameras_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_CA); }
static int rna_Main_scenes_is_updated_get(PointerRNA *ptr) { return DAG_id_type_tagged(ptr->data, ID_SCE); }
@@ -1943,7 +1937,6 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
}
-#ifdef WITH_FREESTYLE
void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
@@ -1969,6 +1962,5 @@ void RNA_def_main_linestyles(BlenderRNA *brna, PropertyRNA *cprop)
parm = RNA_def_pointer(func, "linestyle", "FreestyleLineStyle", "", "Line style to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
-#endif
#endif