row.prop(rl, "pass_refraction_exclude", text="")
- class RENDER_PT_freestyle(RenderButtonsPanel):
++class RENDER_PT_freestyle(RenderButtonsPanel, bpy.types.Panel):
+ bl_label = "Freestyle"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
- def poll(self, context):
++ @classmethod
++ def poll(cls, context):
+ rd = context.scene.render
+ rl = rd.layers[rd.active_layer_index]
+ return rl and rl.freestyle
+
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.render
+ rl = rd.layers[rd.active_layer_index]
+ freestyle = rl.freestyle_settings
+
+ split = layout.split()
+
+ col = split.column()
+ col.prop(freestyle, "mode", text="Control Mode")
+
+ if freestyle.mode == "EDITOR":
+ col.label(text="Edge Detection Options:")
+ col.prop(freestyle, "crease_angle")
+ col.prop(freestyle, "sphere_radius")
+ col.prop(freestyle, "dkr_epsilon")
+
+ lineset = freestyle.active_lineset
+
+ col.label(text="Line Sets:")
+ row = col.row()
+ rows = 2
+ if lineset:
+ rows = 5
+ # FIXME: scrollbar does not work correctly
+ row.template_list(freestyle, "linesets", freestyle, "active_lineset_index", rows=rows)
+
+ sub = row.column()
+ subsub = sub.column(align=True)
+ subsub.operator("scene.freestyle_lineset_add", icon='ZOOMIN', text="")
+ subsub.operator("scene.freestyle_lineset_remove", icon='ZOOMOUT', text="")
+ if lineset:
+ sub.separator()
+ subsub = sub.column(align=True)
+ subsub.operator("scene.freestyle_lineset_move", icon='TRIA_UP', text="").direction = 'UP'
+ subsub.operator("scene.freestyle_lineset_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+
+ if lineset:
+ col.prop(lineset, "name")
+ col.prop(lineset, "select_by_visibility")
+ col.prop(lineset, "select_by_edge_types")
+
+ if lineset.select_by_visibility:
+ col.label(text="Visibility:")
+ sub = col.row(align=True)
+ sub.prop(lineset, "visibility", expand=True)
+ if lineset.visibility == "RANGE":
+ sub = col.row(align=True)
+ sub.prop(lineset, "qi_start")
+ sub.prop(lineset, "qi_end")
+
+ if lineset.select_by_edge_types:
+ col.label(text="Edge Types:")
+ row = col.row()
+ row.prop(lineset, "edge_type_negation", expand=True)
+ row = col.row()
+ row.prop(lineset, "edge_type_combination", expand=True)
+
+ row = col.row()
+ sub = row.column()
+ sub.prop(lineset, "select_silhouette")
+ sub.prop(lineset, "select_border")
+ sub.prop(lineset, "select_crease")
+ sub.prop(lineset, "select_ridge")
+ sub.prop(lineset, "select_valley")
+ sub.prop(lineset, "select_suggestive_contour")
+ sub.prop(lineset, "select_material_boundary")
+ sub = row.column()
+ sub.prop(lineset, "select_contour")
+ sub.prop(lineset, "select_external_contour")
+
+ else: # freestyle.mode == "SCRIPT"
+
+ col.prop(freestyle, "crease_angle")
+ col.prop(freestyle, "sphere_radius")
+ col.prop(freestyle, "ridges_and_valleys")
+ col.prop(freestyle, "suggestive_contours")
+ sub = col.row()
+ sub.prop(freestyle, "dkr_epsilon")
+ sub.active = freestyle.suggestive_contours
+ col.prop(freestyle, "material_boundaries")
+ col.operator("scene.freestyle_module_add")
+
+ for i, module in enumerate(freestyle.modules):
+ box = layout.box()
+ box.set_context_pointer("freestyle_module", module)
+ row = box.row(align=True)
+ row.prop(module, "is_displayed", text="")
+ row.prop(module, "module_path", text="")
+ row.operator("scene.freestyle_module_remove", icon='X', text="")
+ row.operator("scene.freestyle_module_move", icon='TRIA_UP', text="").direction = 'UP'
+ row.operator("scene.freestyle_module_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+
+
- class RENDER_PT_freestyle_linestyle(RenderButtonsPanel):
++class RENDER_PT_freestyle_linestyle(RenderButtonsPanel, bpy.types.Panel):
+ bl_label = "Freestyle: Line Style"
+ COMPAT_ENGINES = {'BLENDER_RENDER'}
+
- def poll(self, context):
++ @classmethod
++ def poll(cls, context):
+ rd = context.scene.render
+ rl = rd.layers[rd.active_layer_index]
+ if rl and rl.freestyle:
+ freestyle = rl.freestyle_settings
+ return freestyle.mode == "EDITOR" and freestyle.active_lineset
+ return False
+
+ def draw_modifier_box_header(self, box, modifier):
+ row = box.row()
+ row.set_context_pointer("modifier", modifier)
+ if modifier.expanded:
+ icon = "TRIA_DOWN"
+ else:
+ icon = "TRIA_RIGHT"
+ row.operator("scene.freestyle_modifier_toggle_fold", icon=icon, text="", emboss=False)
+ row.label(text=modifier.rna_type.name)
+ row.prop(modifier, "name", text="")
+ row.prop(modifier, "enabled", text="")
+ sub = row.row(align=True)
+ sub.operator("scene.freestyle_modifier_move", icon='TRIA_UP', text="").direction = 'UP'
+ sub.operator("scene.freestyle_modifier_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+ row.operator("scene.freestyle_modifier_remove", icon='X', text="")
+
+ def draw_color_modifier(self, context, modifier):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ self.draw_modifier_box_header(col.box(), modifier)
+ if modifier.expanded:
+ box = col.box()
+ row = box.row()
+ row.prop(modifier, "blend", text="")
+ row.prop(modifier, "influence")
+ if modifier.type == "DISTANCE_FROM_OBJECT":
+ box.prop(modifier, "target")
+ box.template_color_ramp(modifier, "color_ramp", expand=True)
+ if modifier.type not in ["ALONG_STROKE"]:
+ row = box.row(align=True)
+ row.prop(modifier, "range_min")
+ row.prop(modifier, "range_max")
+
+ def draw_alpha_modifier(self, context, modifier):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ self.draw_modifier_box_header(col.box(), modifier)
+ if modifier.expanded:
+ box = col.box()
+ row = box.row()
+ row.prop(modifier, "blend", text="")
+ row.prop(modifier, "influence")
+ if modifier.type == "DISTANCE_FROM_OBJECT":
+ box.prop(modifier, "target")
+ row = box.row()
+ row.prop(modifier, "mapping", text="")
+ sub = row.column()
+ sub.prop(modifier, "invert")
+ if modifier.mapping == "CURVE":
+ sub.enabled = False
+ box.template_curve_mapping(modifier, "curve")
+ if modifier.type not in ["ALONG_STROKE"]:
+ row = box.row(align=True)
+ row.prop(modifier, "range_min")
+ row.prop(modifier, "range_max")
+
+ def draw_thickness_modifier(self, context, modifier):
+ layout = self.layout
+
+ col = layout.column(align=True)
+ self.draw_modifier_box_header(col.box(), modifier)
+ if modifier.expanded:
+ box = col.box()
+ row = box.row()
+ row.prop(modifier, "blend", text="")
+ row.prop(modifier, "influence")
+ if modifier.type == "DISTANCE_FROM_OBJECT":
+ box.prop(modifier, "target")
+ row = box.row()
+ row.prop(modifier, "mapping", text="")
+ sub = row.column()
+ sub.prop(modifier, "invert")
+ if modifier.mapping == "CURVE":
+ sub.enabled = False
+ box.template_curve_mapping(modifier, "curve")
+ if modifier.type not in ["ALONG_STROKE"]:
+ row = box.row(align=True)
+ row.prop(modifier, "range_min")
+ row.prop(modifier, "range_max")
+ row = box.row(align=True)
+ row.prop(modifier, "value_min")
+ row.prop(modifier, "value_max")
+
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.render
+ rl = rd.layers[rd.active_layer_index]
+ lineset = rl.freestyle_settings.active_lineset
+ linestyle = lineset.linestyle
+
+ split = layout.split()
+ col = split.column()
+ col.template_ID(lineset, "linestyle", new="scene.freestyle_linestyle_new")
+
+ col.separator()
+ sub = col.row(align=True)
+ sub.prop(linestyle, "panel", expand=True)
+
+ if linestyle.panel == "COLOR":
+ col.label(text="Base Color:")
+ col.prop(linestyle, "color", text="")
+ col.label(text="Modifiers:")
+ layout.operator_menu_enum("scene.freestyle_color_modifier_add", "type", text="Add Modifier")
+ for modifier in linestyle.color_modifiers:
+ self.draw_color_modifier(context, modifier)
+ elif linestyle.panel == "ALPHA":
+ col.label(text="Base Transparency:")
+ col.prop(linestyle, "alpha")
+ col.label(text="Modifiers:")
+ layout.operator_menu_enum("scene.freestyle_alpha_modifier_add", "type", text="Add Modifier")
+ for modifier in linestyle.alpha_modifiers:
+ self.draw_alpha_modifier(context, modifier)
+ elif linestyle.panel == "THICKNESS":
+ col.label(text="Base Thickness:")
+ col.prop(linestyle, "thickness")
+ col.label(text="Modifiers:")
+ layout.operator_menu_enum("scene.freestyle_thickness_modifier_add", "type", text="Add Modifier")
+ for modifier in linestyle.thickness_modifiers:
+ self.draw_thickness_modifier(context, modifier)
+ elif linestyle.panel == "STROKES":
+ pass
+ elif linestyle.panel == "DISTORT":
+ pass
+ elif linestyle.panel == "MISC":
+ pass
+
+
- class RENDER_PT_shading(RenderButtonsPanel):
+ class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_RENDER'}
sub.prop(rd, "edge_threshold", text="Threshold", slider=True)
sub.prop(rd, "edge_color", text="")
+ layout.separator()
+
+ split = layout.split()
+ col = split.column()
+ col.prop(rd, "freestyle", text="Freestyle")
+
- class RENDER_PT_output(RenderButtonsPanel):
+ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Output"
COMPAT_ENGINES = {'BLENDER_RENDER'}
layout = self.layout
rd = context.scene.render
- wide_ui = context.region.width > narrowui
layout.operator("object.bake_image", icon='RENDER_STILL')
-
+
- if wide_ui:
- layout.prop(rd, "bake_type")
- else:
- layout.prop(rd, "bake_type", text="")
+ layout.prop(rd, "bake_type")
-
+
if rd.bake_type == 'NORMALS':
- if wide_ui:
- layout.prop(rd, "bake_normal_space")
- else:
- layout.prop(rd, "bake_normal_space", text="")
+ layout.prop(rd, "bake_normal_space")
elif rd.bake_type in ('DISPLACEMENT', 'AO'):
layout.prop(rd, "bake_normalized")
-
+
# col.prop(rd, "bake_aa_mode")
# col.prop(rd, "bake_enable_aa")
-
+
layout.separator()
-
+
split = layout.split()
col = split.column()
col.prop(rd, "bake_clear")
col.prop(rd, "bake_margin")
col.prop(rd, "bake_quad_split", text="Split")
-
+
- if wide_ui:
- col = split.column()
+ col = split.column()
col.prop(rd, "bake_active")
sub = col.column()
sub.active = rd.bake_active
sub.prop(rd, "bake_distance")
sub.prop(rd, "bake_bias")
-
+
- classes = [
- RENDER_MT_presets,
- RENDER_MT_ffmpeg_presets,
- RENDER_PT_render,
- RENDER_PT_layers,
- RENDER_PT_freestyle,
- RENDER_PT_freestyle_linestyle,
- RENDER_PT_dimensions,
- RENDER_PT_antialiasing,
- RENDER_PT_motion_blur,
- RENDER_PT_shading,
- RENDER_PT_output,
- RENDER_PT_encoding,
- RENDER_PT_performance,
- RENDER_PT_post_processing,
- RENDER_PT_stamp,
- RENDER_PT_bake]
-
-
def register():
- register = bpy.types.register
- for cls in classes:
- register(cls)
+ pass
def unregister():
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
- RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get", "rna_FreestyleLineSet_linestyle_set", NULL);
+static void rna_def_freestyle_settings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem negation_items[] = {
+ {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given edge type conditions."},
+ {FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive", "Select feature edges not satisfying the given edge type conditions."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem combination_items[] = {
+ {0, "OR", 0, "Logical OR", "Combine feature edge type conditions by logical OR (logical disjunction)."},
+ {FREESTYLE_LINESET_FE_AND, "AND", 0, "Logical AND", "Combine feature edge type conditions by logical AND (logical conjunction)."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem freestyle_ui_mode_items[] = {
+ {FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting Mode", "Advanced mode for using style modules in Python"},
+ {FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor Mode", "Basic mode for interactive style parameter editing"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem visibility_items[] ={
+ {FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible feature edges."},
+ {FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feature edges."},
+ {FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range", "Select feature edges within a range of quantitative invisibility (QI) values."},
+ {0, NULL, 0, NULL, NULL}};
+
+ /* FreestyleLineSet */
+
+ srna= RNA_def_struct(brna, "FreestyleLineSet", NULL);
+ RNA_def_struct_ui_text(srna, "Freestyle Line Set", "Line set for associating lines and style parameters.");
+
+ /* access to line style settings is redirected through functions */
+ /* to allow proper id-buttons functionality */
+ prop= RNA_def_property(srna, "linestyle", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "FreestyleLineStyle");
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL);
- RNA_def_property_pointer_funcs(prop, "rna_FreestyleSettings_active_lineset_get", NULL, NULL);
++ RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get", "rna_FreestyleLineSet_linestyle_set", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Line Style", "Line style settings");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "name");
+ RNA_def_property_ui_text(prop, "Line Set Name", "Line set name");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+ RNA_def_struct_name_property(srna, prop);
+
+ prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_LINESET_ENABLED);
+ RNA_def_property_ui_text(prop, "Enabled", "Enable or disable the line set.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_VISIBILITY);
+ RNA_def_property_ui_text(prop, "Selection by Visibility", "Select feature edges based on visibility.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_EDGE_TYPES);
+ RNA_def_property_ui_text(prop, "Selection by Edge Types", "Select feature edges based on edge types.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
+ RNA_def_property_enum_items(prop, negation_items);
+ RNA_def_property_ui_text(prop, "Edge Type Negation", "Set the negation operation for conditions on feature edge types.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
+ RNA_def_property_enum_items(prop, combination_items);
+ RNA_def_property_ui_text(prop, "Edge Type Combination", "Set the combination operation for conditions on feature edge types.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "objects", NULL);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_ui_text(prop, "Target Objects", "A list of objects on which stylized lines are drawn.");
+
+ prop= RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SILHOUETTE);
+ RNA_def_property_ui_text(prop, "Silhouette", "Select silhouette edges.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BORDER);
+ RNA_def_property_ui_text(prop, "Border", "Select border edges.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CREASE);
+ RNA_def_property_ui_text(prop, "Crease", "Select crease edges.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_ridge", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RIDGE);
+ RNA_def_property_ui_text(prop, "Ridge", "Select ridges.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_valley", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_VALLEY);
+ RNA_def_property_ui_text(prop, "Valley", "Select valleys.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
+ RNA_def_property_ui_text(prop, "Suggestive Contour", "Select suggestive contours.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY);
+ RNA_def_property_ui_text(prop, "Material Boundary", "Select edges at material boundaries.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CONTOUR);
+ RNA_def_property_ui_text(prop, "Contour", "Select contours.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR);
+ RNA_def_property_ui_text(prop, "External Contour", "Select external contours.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "qi");
+ RNA_def_property_enum_items(prop, visibility_items);
+ RNA_def_property_ui_text(prop, "Visibility", "Determine how to use visibility for feature edge selection.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "qi_start");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_text(prop, "Start", "First QI value of the QI range");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "qi_end");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_text(prop, "End", "Last QI value of the QI range");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ /* FreestyleModuleSettings */
+
+ srna= RNA_def_struct(brna, "FreestyleModuleSettings", NULL);
+ RNA_def_struct_sdna(srna, "FreestyleModuleConfig");
+ RNA_def_struct_ui_text(srna, "Freestyle Module", "Style module configuration for specifying a style module.");
+
+ prop= RNA_def_property(srna, "module_path", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_string_sdna(prop, NULL, "module_path");
+ RNA_def_property_ui_text(prop, "Module Path", "Path to a style module file.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "is_displayed", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1);
+ RNA_def_property_ui_text(prop, "Is Displayed", "Enable this style module during the rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ /* FreestyleSettings */
+
+ srna= RNA_def_struct(brna, "FreestyleSettings", NULL);
+ RNA_def_struct_sdna(srna, "FreestyleConfig");
+ RNA_def_struct_nested(brna, srna, "SceneRenderLayer");
+ RNA_def_struct_ui_text(srna, "Frestyle Settings", "Freestyle settings for a SceneRenderLayer datablock.");
+
+ prop= RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "modules", NULL);
+ RNA_def_property_struct_type(prop, "FreestyleModuleSettings");
+ RNA_def_property_ui_text(prop, "Style modules", "A list of style modules (to be applied from top to bottom).");
+
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, freestyle_ui_mode_items);
+ RNA_def_property_ui_text(prop, "Control Mode", "Select the Freestyle control mode");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "suggestive_contours", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_SUGGESTIVE_CONTOURS_FLAG);
+ RNA_def_property_ui_text(prop, "Suggestive Contours", "Enable suggestive contours.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "ridges_and_valleys", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_RIDGES_AND_VALLEYS_FLAG);
+ RNA_def_property_ui_text(prop, "Ridges and Valleys", "Enable ridges and valleys.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "material_boundaries", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_MATERIAL_BOUNDARIES_FLAG);
+ RNA_def_property_ui_text(prop, "Material Boundaries", "Enable material boundaries.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sphere_radius");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for computing curvatures.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "dkr_epsilon", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Kr Derivative Epsilon", "Kr derivative epsilon for computing suggestive contours.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "crease_angle");
+ RNA_def_property_range(prop, 0.0, 180.0);
+ RNA_def_property_ui_text(prop, "Crease Angle", "Angular threshold in degrees (between 0 and 180) for detecting crease edges.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "linesets", NULL);
+ RNA_def_property_struct_type(prop, "FreestyleLineSet");
+ RNA_def_property_ui_text(prop, "Line Sets", "Line sets for associating lines and style parameters");
+
+ prop= RNA_def_property(srna, "active_lineset", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "FreestyleLineSet");
++ RNA_def_property_pointer_funcs(prop, "rna_FreestyleSettings_active_lineset_get", NULL, NULL, NULL);
+ RNA_def_property_ui_text(prop, "Active Line Set", "Active line set being displayed");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "active_lineset_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_FreestyleSettings_active_lineset_index_get", "rna_FreestyleSettings_active_lineset_index_set", "rna_FreestyleSettings_active_lineset_index_range");
+ RNA_def_property_ui_text(prop, "Active Line Set Index", "Index of active line set slot");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+}
+
static void rna_def_scene_game_data(BlenderRNA *brna)
{
StructRNA *srna;