[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37959] branches/cycles: Cycles: svn merge -r37904:37957 https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Brecht Van Lommel
brechtvanlommel at pandora.be
Wed Jun 29 21:14:38 CEST 2011
Revision: 37959
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37959
Author: blendix
Date: 2011-06-29 19:14:37 +0000 (Wed, 29 Jun 2011)
Log Message:
-----------
Cycles: svn merge -r37904:37957 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37904
Modified Paths:
--------------
branches/cycles/CMakeLists.txt
branches/cycles/release/scripts/modules/bpy/__init__.py
branches/cycles/release/scripts/modules/console/intellisense.py
branches/cycles/release/scripts/startup/bl_ui/space_userpref.py
branches/cycles/source/blender/collada/EffectExporter.cpp
branches/cycles/source/blender/editors/object/object_edit.c
branches/cycles/source/blender/editors/space_image/image_buttons.c
branches/cycles/source/blenderplayer/bad_level_call_stubs/stubs.c
Property Changed:
----------------
branches/cycles/
branches/cycles/source/blender/editors/datafiles/startup.blend.c
branches/cycles/source/blender/editors/render/render_update.c
branches/cycles/source/blender/editors/uvedit/uvedit_buttons.c
branches/cycles/source/blender/python/intern/
Property changes on: branches/cycles
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:37695-37700
/trunk/blender:36353-37904
+ /trunk:37695-37700
/trunk/blender:36353-37957
Modified: branches/cycles/CMakeLists.txt
===================================================================
--- branches/cycles/CMakeLists.txt 2011-06-29 19:10:05 UTC (rev 37958)
+++ branches/cycles/CMakeLists.txt 2011-06-29 19:14:37 UTC (rev 37959)
@@ -53,11 +53,6 @@
set(FIRST_RUN "TRUE")
endif()
-# set default build type to Release
-if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "Release")
-endif()
-
# this starts out unset
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build_files/cmake/Modules")
@@ -150,7 +145,7 @@
option(WITH_IMAGE_REDCODE "Enable RedCode Image Support" OFF)
# Audio/Video format support
-option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu)" OFF)
+option(WITH_CODEC_FFMPEG "Enable FFMPeg Support (http://ffmpeg.org)" OFF)
option(WITH_CODEC_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
if(APPLE OR (WIN32 AND NOT UNIX))
option(WITH_CODEC_QUICKTIME "Enable Quicktime Support" OFF)
@@ -372,7 +367,7 @@
endif()
if(WITH_CODEC_FFMPEG)
- set(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
+ set(FFMPEG /usr CACHE PATH "FFMPEG Directory")
mark_as_advanced(FFMPEG)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include)
set(FFMPEG_LIBRARIES avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
@@ -416,18 +411,18 @@
endif()
if(WITH_OPENCOLLADA)
- set(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
+ set(OPENCOLLADA /usr/local/opencollada CACHE PATH "OpenCollada Directory")
mark_as_advanced(OPENCOLLADA)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre ftoa buffer xml2)
set(OPENCOLLADA_INCLUDE_DIR ${OPENCOLLADA})
- set(PCRE /usr CACHE FILEPATH "PCRE Directory")
+ set(PCRE /usr CACHE PATH "PCRE Directory")
mark_as_advanced(PCRE)
set(PCRE_LIBPATH ${PCRE}/lib)
set(PCRE_LIB pcre)
- set(EXPAT /usr CACHE FILEPATH "Expat Directory")
+ set(EXPAT /usr CACHE PATH "Expat Directory")
mark_as_advanced(EXPAT)
set(EXPAT_LIBPATH ${EXPAT}/lib)
set(EXPAT_LIB expat)
@@ -624,9 +619,10 @@
set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
+ set(FREETYPE ${LIBDIR}/freetype)
set(FREETYPE_INCLUDE_DIRS
- ${FREETYPE}/include
- ${FREETYPE}/include/freetype2
+ ${LIBDIR}/freetype/include
+ ${LIBDIR}/freetype/include/freetype2
)
set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
Modified: branches/cycles/release/scripts/modules/bpy/__init__.py
===================================================================
--- branches/cycles/release/scripts/modules/bpy/__init__.py 2011-06-29 19:10:05 UTC (rev 37958)
+++ branches/cycles/release/scripts/modules/bpy/__init__.py 2011-06-29 19:14:37 UTC (rev 37959)
@@ -22,24 +22,29 @@
Give access to blender data and utility functions.
"""
+__all__ = (
+ "app",
+ "context",
+ "data",
+ "ops",
+ "path",
+ "props",
+ "types",
+ "utils",
+)
+
+
# internal blender C module
-import _bpy
-from _bpy import types, props, app
+from _bpy import types, props, app, data, context
-data = _bpy.data
-context = _bpy.context
-
# python modules
-from . import utils, path
-from . import ops as _ops_module
+from . import utils, path, ops
# fake operator module
-ops = _ops_module.ops_fake_module
+ops = ops.ops_fake_module
-import sys as _sys
-
-
def _main():
+ import sys as _sys
# Possibly temp. addons path
from os.path import join, dirname, normpath
@@ -59,3 +64,5 @@
_main()
+
+del _main
\ No newline at end of file
Modified: branches/cycles/release/scripts/modules/console/intellisense.py
===================================================================
--- branches/cycles/release/scripts/modules/console/intellisense.py 2011-06-29 19:10:05 UTC (rev 37958)
+++ branches/cycles/release/scripts/modules/console/intellisense.py 2011-06-29 19:14:37 UTC (rev 37959)
@@ -53,7 +53,7 @@
re.UNICODE)
-def complete(line, cursor, namespace, private=True):
+def complete(line, cursor, namespace, private):
"""Returns a list of possible completions:
* name completion
@@ -82,6 +82,9 @@
if RE_MODULE.match(line):
from . import complete_import
matches = complete_import.complete(line)
+ if not private:
+ matches[:] = [m for m in matches if m[:1] != "_"]
+ matches.sort()
else:
from . import complete_namespace
matches = complete_namespace.complete(word, namespace, private)
@@ -130,11 +133,15 @@
else:
# causes blender bug [#27495] since string keys may contain '.'
# scrollback = ' '.join([m.split('.')[-1] for m in matches])
+
+ # add white space to align with the cursor
+ white_space = " " + (" " * (cursor + len(prefix)))
word_prefix = word + prefix
- scrollback = ' '.join(
- [m[len(word_prefix):]
+ scrollback = '\n'.join(
+ [white_space + m[len(word_prefix):]
if (word_prefix and m.startswith(word_prefix))
- else m.split('.')[-1]
+ else
+ white_space + m.split('.')[-1]
for m in matches])
no_calltip = True
Modified: branches/cycles/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- branches/cycles/release/scripts/startup/bl_ui/space_userpref.py 2011-06-29 19:10:05 UTC (rev 37958)
+++ branches/cycles/release/scripts/startup/bl_ui/space_userpref.py 2011-06-29 19:14:37 UTC (rev 37959)
@@ -876,6 +876,19 @@
def module_get(mod_name):
return USERPREF_PT_addons._addons_fake_modules[mod_name]
+ @staticmethod
+ def is_user_addon(mod, user_addon_paths):
+ if not user_addon_paths:
+ user_script_path = bpy.utils.user_script_path()
+ if user_script_path is not None:
+ user_addon_paths.append(os.path.join(user_script_path(), "addons"))
+ user_addon_paths.append(os.path.join(bpy.utils.resource_path('USER'), "scripts", "addons"))
+
+ for path in user_addon_paths:
+ if bpy.path.is_subdir(mod.__file__, path):
+ return True
+ return False
+
def draw(self, context):
layout = self.layout
@@ -900,6 +913,9 @@
search = context.window_manager.addon_search.lower()
support = context.window_manager.addon_support
+ # initialized on demand
+ user_addon_paths = []
+
for mod, info in addons:
module_name = mod.__name__
@@ -969,19 +985,24 @@
split = colsub.row().split(percentage=0.15)
split.label(text="Warning:")
split.label(text=' ' + info["warning"], icon='ERROR')
- if info["wiki_url"] or info["tracker_url"]:
+
+ user_addon = __class__.is_user_addon(mod, user_addon_paths)
+ tot_row = bool(info["wiki_url"]) + bool(info["tracker_url"]) + bool(user_addon)
+
+ if tot_row:
split = colsub.row().split(percentage=0.15)
split.label(text="Internet:")
if info["wiki_url"]:
split.operator("wm.url_open", text="Link to the Wiki", icon='HELP').url = info["wiki_url"]
if info["tracker_url"]:
split.operator("wm.url_open", text="Report a Bug", icon='URL').url = info["tracker_url"]
+ if user_addon:
+ split.operator("wm.addon_remove", text="Remove", icon='CANCEL').module = mod.__name__
- if info["wiki_url"] and info["tracker_url"]:
+ for i in range(4 - tot_row):
split.separator()
- else:
- split.separator()
- split.separator()
+
+
# Append missing scripts
# First collect scripts that are used but have no script file.
@@ -1186,6 +1207,54 @@
return {'RUNNING_MODAL'}
+class WM_OT_addon_remove(bpy.types.Operator):
+ "Disable an addon"
+ bl_idname = "wm.addon_remove"
+ bl_label = "Remove Add-On"
+
+ module = StringProperty(name="Module", description="Module name of the addon to remove")
+
+ @staticmethod
+ def path_from_addon(module):
+ for mod in addon_utils.modules(USERPREF_PT_addons._addons_fake_modules):
+ if mod.__name__ == module:
+ filepath = mod.__file__
+ if os.path.exists(filepath):
+ if os.path.splitext(os.path.basename(filepath))[0] == "__init__":
+ return os.path.dirname(filepath), True
+ else:
+ return filepath, False
+ return None, False
+
+ def execute(self, context):
+ path, isdir = __class__.path_from_addon(self.module)
+ if path is None:
+ self.report('WARNING', "Addon path %r could not be found" % path)
+ return {'CANCELLED'}
+
+ # incase its enabled
+ addon_utils.disable(self.module)
+
+ import shutil
+ if isdir:
+ shutil.rmtree(path)
+ else:
+ os.remove(path)
+
+ context.area.tag_redraw()
+ return {'FINISHED'}
+
+ # lame confirmation check
+ def draw(self, context):
+ self.layout.label(text="Remove Addon: %r?" % self.module)
+ path, isdir = __class__.path_from_addon(self.module)
+ self.layout.label(text="Path: %r" % path)
+
+ def invoke(self, context, event):
+ wm = context.window_manager
+ return wm.invoke_props_dialog(self, width=600)
+
+
class WM_OT_addon_expand(bpy.types.Operator):
"Display more information on this add-on"
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list