[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52899] branches/soc-2008-mxcurioni: A big cleaning patch by Bastien Montagne (thanks a lot!)

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Tue Dec 11 23:00:24 CET 2012


Revision: 52899
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52899
Author:   kjym3
Date:     2012-12-11 22:00:22 +0000 (Tue, 11 Dec 2012)
Log Message:
-----------
A big cleaning patch by Bastien Montagne (thanks a lot!)

* Split and moved Cycles?\226?\128?\153 render layers panels into the render_layer
context as well (would be nice to hide this context when not needed,
e.g. with the BGE, but this is not so easy to do nicely...).

* Fixed some inconsistencies with trunk (probably due to svn merge
glitches) using r52858 as reference.  Also recovered the missing
release/bin/blender-softwaregl file.

* A bunch of style code fixes in Blender's own code (not Freestyle
itself yet): line lengths, spaces around operators, block formatting,
headers, etc.  In rna_linestyle.c, color_blend_items was replaced by
ramp_blend_items (exported from rna_material.c).

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52858

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py
    branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py
    branches/soc-2008-mxcurioni/source/blender/CMakeLists.txt
    branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_linestyle.h
    branches/soc-2008-mxcurioni/source/blender/blenkernel/CMakeLists.txt
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/anim_sys.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/linestyle.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/scene.c
    branches/soc-2008-mxcurioni/source/blender/blenlib/CMakeLists.txt
    branches/soc-2008-mxcurioni/source/blender/blenlib/intern/bpath.c
    branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
    branches/soc-2008-mxcurioni/source/blender/blenloader/intern/writefile.c
    branches/soc-2008-mxcurioni/source/blender/bmesh/intern/bmesh_construct.c
    branches/soc-2008-mxcurioni/source/blender/bmesh/operators/bmo_similar.c
    branches/soc-2008-mxcurioni/source/blender/editors/animation/anim_channels_defines.c
    branches/soc-2008-mxcurioni/source/blender/editors/animation/anim_filter.c
    branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_templates.c
    branches/soc-2008-mxcurioni/source/blender/editors/interface/resources.c
    branches/soc-2008-mxcurioni/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2008-mxcurioni/source/blender/editors/render/render_shading.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_buttons/space_buttons.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_file/filelist.c
    branches/soc-2008-mxcurioni/source/blender/editors/transform/transform.c
    branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_freestyle_types.h
    branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_linestyle_types.h
    branches/soc-2008-mxcurioni/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_action.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_color.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_linestyle.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_main.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_main_api.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2008-mxcurioni/source/blender/python/intern/bpy.c
    branches/soc-2008-mxcurioni/source/creator/creator.c

Added Paths:
-----------
    branches/soc-2008-mxcurioni/release/bin/blender-softwaregl

Modified: branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py	2012-12-11 20:39:54 UTC (rev 52898)
+++ branches/soc-2008-mxcurioni/intern/cycles/blender/addon/ui.py	2012-12-11 22:00:22 UTC (rev 52899)
@@ -221,10 +221,69 @@
         sub.prop(rd, "use_persistent_data", text="Persistent Images")
 
 
+class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
+    bl_label = "Post Processing"
+    bl_options = {'DEFAULT_CLOSED'}
+
+    def draw(self, context):
+        layout = self.layout
+
+        rd = context.scene.render
+
+        split = layout.split()
+
+        col = split.column()
+        col.prop(rd, "use_compositing")
+        col.prop(rd, "use_sequencer")
+
+        col = split.column()
+        col.prop(rd, "dither_intensity", text="Dither", slider=True)
+
+
+class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
+    bl_label = "Depth of Field"
+    bl_context = "data"
+
+    @classmethod
+    def poll(cls, context):
+        return context.camera and CyclesButtonsPanel.poll(context)
+
+    def draw(self, context):
+        layout = self.layout
+
+        cam = context.camera
+        ccam = cam.cycles
+
+        split = layout.split()
+
+        col = split.column()
+        col.label("Focus:")
+        col.prop(cam, "dof_object", text="")
+
+        sub = col.row()
+        sub.active = cam.dof_object is None
+        sub.prop(cam, "dof_distance", text="Distance")
+
+        col = split.column()
+
+        col.label("Aperture:")
+        sub = col.column(align=True)
+        sub.prop(ccam, "aperture_type", text="")
+        if ccam.aperture_type == 'RADIUS':
+            sub.prop(ccam, "aperture_size", text="Size")
+        elif ccam.aperture_type == 'FSTOP':
+            sub.prop(ccam, "aperture_fstop", text="Number")
+
+        sub = col.column(align=True)
+        sub.prop(ccam, "aperture_blades", text="Blades")
+        sub.prop(ccam, "aperture_rotation", text="Rotation")
+
+
 class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
     bl_label = "Layers"
-    bl_options = {'DEFAULT_CLOSED'}
-    COMPAT_ENGINES = {'BLENDER_RENDER'}
+    bl_options = {'HIDE_HEADER'}
+    bl_context = "render_layer"
+    COMPAT_ENGINES = {'CYCLES'}
 
     def draw(self, context):
         layout = self.layout
@@ -241,9 +300,24 @@
 
         row = layout.row()
         rl = rd.layers.active
-        row.prop(rl, "name")
+        if rl:
+            row.prop(rl, "name")
         row.prop(rd, "use_single_layer", text="", icon_only=True)
 
+
+class CyclesRender_PT_layer_options(CyclesButtonsPanel, Panel):
+    bl_label = "Layer"
+    bl_options = {'DEFAULT_CLOSED'}
+    bl_context = "render_layer"
+    COMPAT_ENGINES = {'CYCLES'}
+
+    def draw(self, context):
+        layout = self.layout
+
+        scene = context.scene
+        rd = scene.render
+        rl = rd.layers.active
+
         split = layout.split()
 
         col = split.column()
@@ -265,6 +339,20 @@
         col.prop(rl, "samples")
         col.prop(rl, "use_sky", "Use Environment")
 
+
+class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
+    bl_label = "Layer"
+    bl_options = {'DEFAULT_CLOSED'}
+    bl_context = "render_layer"
+    COMPAT_ENGINES = {'CYCLES'}
+
+    def draw(self, context):
+        layout = self.layout
+
+        scene = context.scene
+        rd = scene.render
+        rl = rd.layers.active
+
         split = layout.split()
 
         col = split.column()
@@ -301,64 +389,6 @@
         col.prop(rl, "use_pass_environment")
 
 
-class Cycles_PT_post_processing(CyclesButtonsPanel, Panel):
-    bl_label = "Post Processing"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.render
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(rd, "use_compositing")
-        col.prop(rd, "use_sequencer")
-
-        col = split.column()
-        col.prop(rd, "dither_intensity", text="Dither", slider=True)
-
-
-class CyclesCamera_PT_dof(CyclesButtonsPanel, Panel):
-    bl_label = "Depth of Field"
-    bl_context = "data"
-
-    @classmethod
-    def poll(cls, context):
-        return context.camera and CyclesButtonsPanel.poll(context)
-
-    def draw(self, context):
-        layout = self.layout
-
-        cam = context.camera
-        ccam = cam.cycles
-
-        split = layout.split()
-
-        col = split.column()
-        col.label("Focus:")
-        col.prop(cam, "dof_object", text="")
-
-        sub = col.row()
-        sub.active = cam.dof_object is None
-        sub.prop(cam, "dof_distance", text="Distance")
-
-        col = split.column()
-
-        col.label("Aperture:")
-        sub = col.column(align=True)
-        sub.prop(ccam, "aperture_type", text="")
-        if ccam.aperture_type == 'RADIUS':
-            sub.prop(ccam, "aperture_size", text="Size")
-        elif ccam.aperture_type == 'FSTOP':
-            sub.prop(ccam, "aperture_fstop", text="Number")
-
-        sub = col.column(align=True)
-        sub.prop(ccam, "aperture_blades", text="Blades")
-        sub.prop(ccam, "aperture_rotation", text="Rotation")
-
-
 class Cycles_PT_context_material(CyclesButtonsPanel, Panel):
     bl_label = ""
     bl_context = "material"

Added: branches/soc-2008-mxcurioni/release/bin/blender-softwaregl
===================================================================
--- branches/soc-2008-mxcurioni/release/bin/blender-softwaregl	                        (rev 0)
+++ branches/soc-2008-mxcurioni/release/bin/blender-softwaregl	2012-12-11 22:00:22 UTC (rev 52899)
@@ -0,0 +1,25 @@
+#!/bin/sh
+BF_DIST_BIN=`dirname "$0"`
+BF_PROGRAM="blender" # BF_PROGRAM=`basename "$0"`-bin
+exitcode=0
+
+LD_LIBRARY_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH}
+
+if [ -n "$LD_LIBRARYN32_PATH" ]; then
+    LD_LIBRARYN32_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN32_PATH}
+fi
+if [ -n "$LD_LIBRARYN64_PATH" ]; then
+    LD_LIBRARYN64_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN64_PATH}
+fi
+if [ -n "$LD_LIBRARY_PATH_64" ]; then
+    LD_LIBRARY_PATH_64=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH_64}
+fi
+
+# Workaround for half-transparent windows when compiz is enabled
+XLIB_SKIP_ARGB_VISUALS=1
+
+export LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARYN64_PATH LD_LIBRARY_PATH_64 LD_PRELOAD XLIB_SKIP_ARGB_VISUALS
+
+"$BF_DIST_BIN/$BF_PROGRAM" ${1+"$@"}
+exitcode=$?
+exit $exitcode

Modified: branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py	2012-12-11 20:39:54 UTC (rev 52898)
+++ branches/soc-2008-mxcurioni/release/scripts/startup/bl_operators/freestyle.py	2012-12-11 22:00:22 UTC (rev 52899)
@@ -22,14 +22,15 @@
 
 
 class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
-    '''Fill the Range Min/Max entries by the min/max distance between selected mesh objects and the source object (either a user-specified object or the active camera)'''
+    '''Fill the Range Min/Max entries by the min/max distance between selected mesh objects and the source object
+       (either a user-specified object or the active camera)'''
     bl_idname = "scene.freestyle_fill_range_by_selection"
     bl_label = "Fill Range by Selection"
 
     type = EnumProperty(name="Type", description="Type of the modifier to work on",
-                        items=[("COLOR", "Color", "Color modifier type"),
+                        items=(("COLOR", "Color", "Color modifier type"),
                                ("ALPHA", "Alpha", "Alpha modifier type"),
-                               ("THICKNESS", "Thickness", "Thickness modifier type")])
+                               ("THICKNESS", "Thickness", "Thickness modifier type")))
     name = StringProperty(name="Name", description="Name of the modifier to work on")
 
     def execute(self, context):

Modified: branches/soc-2008-mxcurioni/source/blender/CMakeLists.txt
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/CMakeLists.txt	2012-12-11 20:39:54 UTC (rev 52898)
+++ branches/soc-2008-mxcurioni/source/blender/CMakeLists.txt	2012-12-11 22:00:22 UTC (rev 52899)
@@ -106,7 +106,7 @@
 add_subdirectory(modifiers)
 add_subdirectory(makesdna)
 add_subdirectory(makesrna)
-ADD_SUBDIRECTORY(freestyle)
+add_subdirectory(freestyle)
 
 if(WITH_COMPOSITOR)
 	add_subdirectory(opencl)  # later on this may be used more generally

Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_linestyle.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_linestyle.h	2012-12-11 20:39:54 UTC (rev 52898)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_linestyle.h	2012-12-11 22:00:22 UTC (rev 52899)
@@ -1,8 +1,4 @@
-/* BKE_linestyle.h
- *
- *
- * $Id: BKE_particle.h 29187 2010-06-03 15:39:02Z kjym3 $
- *
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -29,8 +25,12 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifndef BKE_LINESTYLE_H
-#define BKE_LINESTYLE_H
+#ifndef __BKE_LINESTYLE_H__
+#define __BKE_LINESTYLE_H__
+/** \file BKE_linestyle.h
+ *  \ingroup bke
+ *  \brief Blender kernel freestyle line style functionality.
+ */
 
 #include "DNA_linestyle_types.h"
 

Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/CMakeLists.txt
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/CMakeLists.txt	2012-12-11 20:39:54 UTC (rev 52898)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/CMakeLists.txt	2012-12-11 22:00:22 UTC (rev 52899)
@@ -103,7 +103,8 @@
 	intern/lattice.c
 	intern/library.c
 	intern/linestyle.c
-	intern/mask_evaluate.c	intern/mask_rasterize.c
+	intern/mask_evaluate.c
+	intern/mask_rasterize.c
 	intern/mask.c
 	intern/material.c
 	intern/mball.c

Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/anim_sys.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/anim_sys.c	2012-12-11 20:39:54 UTC (rev 52898)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/anim_sys.c	2012-12-11 22:00:22 UTC (rev 52899)
@@ -762,7 +762,7 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list