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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 0553402d111..7469aac56ad 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -32,16 +32,15 @@
#include "DNA_particle_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
+#include "DNA_linestyle_types.h"
#include "DNA_userdef_types.h"
#include "DNA_world_types.h"
-#ifdef WITH_FREESTYLE
-# include "DNA_linestyle_types.h"
-#endif
#include "BLI_math.h"
#include "BLF_translation.h"
+#include "BKE_freestyle.h"
#include "BKE_tessmesh.h"
#include "RNA_define.h"
@@ -336,10 +335,6 @@ EnumPropertyItem image_color_depth_items[] = {
#include "RE_engine.h"
-#ifdef WITH_FREESTYLE
-# include "FRS_freestyle.h"
-#endif
-
static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
{
ED_space_image_uv_sculpt_update(bmain->wm.first, scene->toolsettings);
@@ -1461,7 +1456,6 @@ static char *rna_ToolSettings_path(PointerRNA *ptr)
return BLI_strdup("tool_settings");
}
-#ifdef WITH_FREESTYLE
static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr)
{
FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
@@ -1481,7 +1475,7 @@ static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value
static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
{
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
- FreestyleLineSet *lineset = FRS_get_active_lineset(config);
+ FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config);
return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset);
}
@@ -1497,15 +1491,14 @@ static void rna_FreestyleSettings_active_lineset_index_range(PointerRNA *ptr, in
static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr)
{
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
- return FRS_get_active_lineset_index(config);
+ return BKE_freestyle_lineset_get_active_index(config);
}
static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value)
{
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
- FRS_set_active_lineset_index(config, value);
+ BKE_freestyle_lineset_set_active_index(config, value);
}
-#endif
#else
@@ -1574,9 +1567,7 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{EDGE_MODE_TAG_SHARP, "SHARP", 0, "Tag Sharp", ""},
{EDGE_MODE_TAG_CREASE, "CREASE", 0, "Tag Crease", ""},
{EDGE_MODE_TAG_BEVEL, "BEVEL", 0, "Tag Bevel", ""},
-#ifdef WITH_FREESTYLE
{EDGE_MODE_TAG_FREESTYLE, "FREESTYLE", 0, "Tag Freestyle Edge Mark", ""},
-#endif
{0, NULL, 0, NULL, NULL}
};
@@ -2143,7 +2134,6 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-#ifdef WITH_FREESTYLE
prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_FRS);
RNA_def_property_ui_text(prop, "Freestyle", "Render stylized strokes in this Layer");
@@ -2151,7 +2141,6 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
else
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-#endif
/* passes */
prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
@@ -2373,7 +2362,6 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
-#ifdef WITH_FREESTYLE
static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop)
{
StructRNA *srna;
@@ -2781,7 +2769,6 @@ static void rna_def_freestyle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Line Sets", "");
rna_def_freestyle_linesets(brna, prop);
}
-#endif
static void rna_def_scene_game_recast_data(BlenderRNA *brna)
{
@@ -3326,9 +3313,7 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
rna_def_render_layer_common(srna, 1);
-#ifdef WITH_FREESTYLE
/* Freestyle */
-
rna_def_freestyle_settings(brna);
prop = RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_NONE);
@@ -3336,7 +3321,6 @@ static void rna_def_scene_render_layer(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig");
RNA_def_property_struct_type(prop, "FreestyleSettings");
RNA_def_property_ui_text(prop, "Freestyle Settings", "");
-#endif
}
/* curve.splines */
@@ -3931,14 +3915,12 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
-#ifdef WITH_FREESTYLE
static EnumPropertyItem freestyle_thickness_items[] = {
{R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"},
{R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative",
"Unit line thickness is scaled by the proportion of the present vertical image "
"resolution to 480 pixels"},
{0, NULL, 0, NULL, NULL}};
-#endif
rna_def_scene_ffmpeg_settings(brna);
#ifdef WITH_QUICKTIME
@@ -4184,12 +4166,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Edge Color", "Edge color");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-#ifdef WITH_FREESTYLE
prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS);
RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
-#endif
/* threads */
prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
@@ -4652,7 +4632,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Persistent Data", "Keep render data around for faster re-renders");
RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update");
-#ifdef WITH_FREESTYLE
/* Freestyle line thickness options */
prop = RNA_def_property(srna, "line_thickness_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "line_thickness_mode");
@@ -4663,7 +4642,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness");
RNA_def_property_range(prop, 0.f, 10000.f);
RNA_def_property_ui_text(prop, "Unit Line Thickness", "Unit line thickness in pixels");
-#endif
/* Scene API */
RNA_api_scene_render(srna);