Merged changes in the trunk up to revision 31630.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 28 Aug 2010 14:30:52 +0000 (14:30 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 28 Aug 2010 14:30:52 +0000 (14:30 +0000)
13 files changed:
1  2 
release/scripts/ui/properties_render.py
release/scripts/ui/space_userpref.py
source/blender/blenkernel/intern/library.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/transform/transform.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/python/SConscript
source/blender/render/CMakeLists.txt
source/blender/render/intern/source/pipeline.c
source/creator/CMakeLists.txt

index fcf1b41709332870282e192c03e1227e7f13eb0c,aef950563914295a603d0f63a52f2bfec868acd1..33c9fa33cf55ccc184050b135cc68822930013e6
@@@ -170,253 -169,6 +170,253 @@@ class RENDER_PT_layers(RenderButtonsPan
          row.prop(rl, "exclude_refraction", text="")
  
  
-         rl = rd.layers[rd.active_layer_index]
 +class RENDER_PT_freestyle(RenderButtonsPanel, bpy.types.Panel):
 +    bl_label = "Freestyle"
 +    COMPAT_ENGINES = {'BLENDER_RENDER'}
 +
 +    @classmethod
 +    def poll(cls, context):
 +        rd = context.scene.render
-         rl = rd.layers[rd.active_layer_index]
++        rl = rd.layers.active
 +        return rl and rl.use_freestyle
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        rd = context.scene.render
-         rl = rd.layers[rd.active_layer_index]
++        rl = rd.layers.active
 +        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, "kr_derivative_epsilon")
 +
 +            lineset = freestyle.active_lineset
 +
 +            col.label(text="Line Sets:")
 +            row = col.row()
 +            rows = 2
 +            if lineset:
 +                rows = 5
 +            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, "use_ridges_and_valleys")
 +            col.prop(freestyle, "use_suggestive_contours")
 +            sub = col.row()
 +            sub.prop(freestyle, "kr_derivative_epsilon")
 +            sub.active = freestyle.use_suggestive_contours
 +            col.prop(freestyle, "use_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, bpy.types.Panel):
 +    bl_label = "Freestyle: Line Style"
 +    COMPAT_ENGINES = {'BLENDER_RENDER'}
 +
 +    @classmethod
 +    def poll(cls, context):
 +        rd = context.scene.render
-         rl = rd.layers[rd.active_layer_index]
++        rl = rd.layers.active
 +        if rl and rl.use_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.active
 +        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, bpy.types.Panel):
      bl_label = "Shading"
      COMPAT_ENGINES = {'BLENDER_RENDER'}
Simple merge
index 7c57b0c742bb0bb8382c133f44e799c45968fa00,5ff1dbcd2b91c19983998f068fa6767e805ad985..83bbb137fd3a79d64fb9fd78e1a26489a466c825
@@@ -2086,18 -1826,37 +2104,47 @@@ static void rna_def_scene_render_layer(
        RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS);
  
        rna_def_render_layer_common(srna, 1);
 +
 +      /* Freestyle */
 +
 +      rna_def_freestyle_settings(brna);
 +
 +      prop= RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_flag(prop, PROP_NEVER_NULL);
 +      RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig");
 +      RNA_def_property_struct_type(prop, "FreestyleSettings");
 +      RNA_def_property_ui_text(prop, "Freestyle Settings", "");
  }
  
+ /* curve.splines */
+ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
+ {
+       StructRNA *srna;
+       PropertyRNA *prop;
+       // FunctionRNA *func;
+       // PropertyRNA *parm; 
+       RNA_def_property_srna(cprop, "RenderLayers");
+       srna= RNA_def_struct(brna, "RenderLayers", NULL);
+       RNA_def_struct_sdna(srna, "RenderData");
+       RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render layers");
+       prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "actlay");
+       RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", "rna_RenderSettings_active_layer_index_set", "rna_RenderSettings_active_layer_index_range");
+       RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array");
+       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+       
+       prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
+       RNA_def_property_struct_type(prop, "SceneRenderLayer");
+       RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get", "rna_RenderSettings_active_layer_set", NULL, NULL);
+       RNA_def_property_flag(prop, PROP_EDITABLE);
+       RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer");
+       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ }
  static void rna_def_scene_render_data(BlenderRNA *brna)
  {
        StructRNA *srna;
Simple merge
Simple merge
index 5e5acdc2dedc62504dfdad9cebaafee298b7d723,66923305cef65ed8e20fd7476c87a1ec60ce41b7..ad3849b17592eab6779c58d727052a4a9a2c3659
@@@ -437,12 -454,11 +455,12 @@@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux"
          bf_editor_animation
          bf_editor_datafiles
  
-               blender_BSP 
-               blender_render 
-               blender_ONL 
+               bf_intern_bsp 
+               bf_render 
+               bf_intern_opennl 
                bf_python 
-               bf_gen_python 
+               bf_python_ext 
 +              bf_freestyle
                bf_ikplugin
                bf_modifiers
                bf_blenkernel