svn merge ^/trunk/blender -r42116:42139
authorCampbell Barton <ideasman42@gmail.com>
Thu, 24 Nov 2011 20:01:45 +0000 (20:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 24 Nov 2011 20:01:45 +0000 (20:01 +0000)
43 files changed:
build_files/buildbot/master.cfg
build_files/buildbot/slave_pack.py
build_files/scons/tools/btools.py
doc/python_api/examples/bge.texture.1.py
intern/cycles/SConscript
intern/cycles/blender/CMakeLists.txt
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/addon/xml.py
release/scripts/modules/addon_utils.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/console/complete_calltip.py
release/scripts/presets/camera/Nikon_D3S.py [moved from release/scripts/presets/camera/Nikon_D35.py with 100% similarity]
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/space_clip.py
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/image.c
source/blender/blenlib/intern/DLRB_tree.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/object/object_add.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/gpu/CMakeLists.txt
source/blender/imbuf/intern/jpeg.c
source/blender/makesdna/DNA_curve_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_scene.c
source/blender/python/mathutils/mathutils_Euler.c
source/blender/python/mathutils/mathutils_Matrix.c
source/blender/python/mathutils/mathutils_Quaternion.c
source/blender/windowmanager/intern/wm_operators.c
source/gameengine/VideoTexture/Texture.cpp
source/tests/pep8.py

index 5aa5a43abf75785768ea9330572f083f727cfe09..23751f7dcd49a6a072c58a70fac979580cb2d791 100644 (file)
@@ -75,14 +75,14 @@ def svn_step(branch=''):
         return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
 
 
-def lib_svn_step(dir):
-    return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
+def lib_svn_step(libdir):
+    return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + libdir, mode='update', defaultBranch='trunk', workdir='lib/' + libdir)
 
 # generic builder
 
 
-def generic_builder(id, libdir='', branch=''):
-    filename = 'buildbot_upload_' + id + '.zip'
+def generic_builder(idname, libdir='', branch=''):
+    filename = 'buildbot_upload_' + idname + '.zip'
     compile_script = '../blender/build_files/buildbot/slave_compile.py'
     test_script = '../blender/build_files/buildbot/slave_test.py'
     pack_script = '../blender/build_files/buildbot/slave_pack.py'
@@ -93,10 +93,10 @@ def generic_builder(id, libdir='', branch=''):
     if libdir != '':
         f.addStep(lib_svn_step(libdir))
 
-    f.addStep(Compile(command=['python', compile_script, id]))
-    f.addStep(Test(command=['python', test_script, id]))
-    f.addStep(ShellCommand(name='package', command=['python', pack_script, id, branch], description='packaging', descriptionDone='packaged'))
-    if id.find('cmake') != -1:
+    f.addStep(Compile(command=['python', compile_script, idname]))
+    f.addStep(Test(command=['python', test_script, idname]))
+    f.addStep(ShellCommand(name='package', command=['python', pack_script, idname, branch], description='packaging', descriptionDone='packaged'))
+    if 'cmake' in idname:
         f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
     else:
         f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024, workdir='install'))
index af8d99893b4409687529e9fd984e5b2ed2864dc6..94640803aae8e564d86b0a565afaeb13606c091a 100644 (file)
@@ -84,12 +84,12 @@ if builder.find('scons') != -1:
         sys.exit(retcode)
 
 # clean release directory if it already exists
-dir = 'release'
+release_dir = 'release'
 
-if os.path.exists(dir):
-    for f in os.listdir(dir):
-        if os.path.isfile(os.path.join(dir, f)):
-            os.remove(os.path.join(dir, f))
+if os.path.exists(release_dir):
+    for f in os.listdir(release_dir):
+        if os.path.isfile(os.path.join(release_dir, f)):
+            os.remove(os.path.join(release_dir, f))
 
 # create release package
 try:
@@ -99,16 +99,16 @@ except Exception, ex:
     sys.exit(1)
 
 # find release directory, must exist this time
-if not os.path.exists(dir):
-    sys.stderr.write("Failed to find release directory.\n")
+if not os.path.exists(release_dir):
+    sys.stderr.write("Failed to find release directory %r.\n" % release_dir)
     sys.exit(1)
 
 # find release package
 file = None
 filepath = None
 
-for f in os.listdir(dir):
-    rf = os.path.join(dir, f)
+for f in os.listdir(release_dir):
+    rf = os.path.join(release_dir, f)
     if os.path.isfile(rf) and f.startswith('blender'):
         file = f
         filepath = rf
index 4c826b12e89b850f094913d05cd57a5602b5efad..1ddbfcb96082332980b56f6195f3846e640e021d 100644 (file)
@@ -544,6 +544,7 @@ def read_opts(env, cfg, args):
 
     localopts.AddVariables(
         (BoolVariable('WITH_BF_CYCLES', 'Build with the Cycles engine', True)),
+        (BoolVariable('WITH_BF_CYCLES_BINARIES', 'Build with precompiled CUDA binaries', False)),
 
         (BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
         (BoolVariable('WITH_BF_STATICOIIO', 'Staticly link to OpenImageIO', False)),
index 4be6f51de67cf2aefed4333f3f15e7bdcfe891ec..918ffc9772d66e9a8ae33d09841588c424651b5a 100644 (file)
@@ -11,13 +11,13 @@ from bge import texture
 
 def createTexture(cont):
     """Create a new Dynamic Texture"""
-    object = cont.owner
+    obj = cont.owner
 
     # get the reference pointer (ID) of the internal texture
-    ID = texture.materialID(object, 'IMoriginal.png')
+    ID = texture.materialID(obj, 'IMoriginal.png')
 
     # create a texture object
-    object_texture = texture.Texture(object, ID)
+    object_texture = texture.Texture(obj, ID)
 
     # create a new source with an external image
     url = logic.expandPath("//newtexture.jpg")
index 4d45a6875a97f097b0c5d1912a09fd7f88c5ead4..ecd22f654e8fc6030ebdac5bf9b9ac35c8d9fe22 100644 (file)
@@ -22,6 +22,9 @@ defs.append('WITH_OPENCL')
 defs.append('WITH_MULTI')
 defs.append('WITH_CUDA')
 
+if env['WITH_BF_CYCLES_BINARIES']:
+    defs.append('WITH_CUDA_BINARIES')
+
 incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
 incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna'.split())
 incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())
index e81f02f2090f7287520feb848ba22e5ba4989b99..b96048acf054fb1db502b5e21465dc759cb0afbb 100644 (file)
@@ -6,7 +6,7 @@ set(INC
        ../kernel/svm
        ../util
        ../subd
-       ../../../intern/guardedalloc
+       ../../guardedalloc
        ../../../source/blender/makesdna
        ../../../source/blender/makesrna
        ../../../source/blender/blenloader
index 0c7deb01ed8c4ab25edee700fc734edc37796886..21d49b03ea3ea763736ff1ea6ce89cefee2ea6c6 100644 (file)
 # <pep8 compliant>
 
 import bpy
-from bpy.props import *
+from bpy.props import (EnumProperty,
+                       FloatProperty,
+                       IntProperty,
+                       PointerProperty)
 
 import math
 
index f3ed3b677fb5f35055181c615aef2e4b16781cdd..224e44c287aa2c0785006d0f14da413aa3435bae 100644 (file)
@@ -349,7 +349,7 @@ def find_node(material, nodetype):
         ntree = material.node_tree
 
         for node in ntree.nodes:
-            if hasattr(node, 'type') and node.type == nodetype:
+            if getattr(node, "type", None) == nodetype:
                 return node
 
     return None
@@ -363,14 +363,14 @@ def find_node_input(node, name):
     return None
 
 
-def panel_node_draw(layout, id, output_type, input_name):
-    if not id.node_tree:
-        layout.prop(id, "use_nodes", icon='NODETREE')
+def panel_node_draw(layout, id_data, output_type, input_name):
+    if not id_data.node_tree:
+        layout.prop(id_data, "use_nodes", icon='NODETREE')
         return False
 
-    ntree = id.node_tree
+    ntree = id_data.node_tree
 
-    node = find_node(id, output_type)
+    node = find_node(id_data, output_type)
     if not node:
         layout.label(text="No output node.")
     else:
index e64023f046b8031a11c85e7db7861daa56f9ce5f..f17051d92dc18a5d97d0eb31576600301953bbdd 100644 (file)
@@ -61,12 +61,12 @@ class ExportCyclesXML(bpy.types.Operator, ExportHelper):
 
         # get mesh
         scene = context.scene
-        object = context.object
+        obj = context.object
 
-        if not object:
+        if not obj:
             raise Exception("No active object")
 
-        mesh = object.to_mesh(scene, True, 'PREVIEW')
+        mesh = obj.to_mesh(scene, True, 'PREVIEW')
 
         if not mesh:
             raise Exception("No mesh data in active object")
index bcde4ce1e18d36451e947e5d6376236934953831..de662b47c4dc65444724c6f38d7daccefd34c22d 100644 (file)
@@ -171,7 +171,9 @@ def modules(module_cache):
                     mod = None
 
             if mod is None:
-                mod = fake_module(mod_name, mod_path, force_support=force_support)
+                mod = fake_module(mod_name,
+                                  mod_path,
+                                  force_support=force_support)
                 if mod:
                     module_cache[mod_name] = mod
 
index 6eb16bd7e7ac53cbc719ad3c83c6e0fdf8ae9c9a..cf3e92bdcbfe7834864bc5b7aa821e0fc5798e63 100644 (file)
@@ -263,7 +263,7 @@ def user_script_path():
         return None
 
 
-def script_paths(subdir=None, user_pref=True, all=False):
+def script_paths(subdir=None, user_pref=True, check_all=False):
     """
     Returns a list of valid script paths.
 
@@ -271,9 +271,9 @@ def script_paths(subdir=None, user_pref=True, all=False):
     :type subdir: string
     :arg user_pref: Include the user preference script path.
     :type user_pref: bool
-    :arg all: Include local, user and system paths rather just the paths
+    :arg check_all: Include local, user and system paths rather just the paths
        blender uses.
-    :type all: bool
+    :type check_all: bool
     :return: script paths.
     :rtype: list
     """
@@ -286,7 +286,7 @@ def script_paths(subdir=None, user_pref=True, all=False):
     else:
         user_script_path = None
 
-    if all:
+    if check_all:
         # all possible paths
         base_paths = tuple(_os.path.join(resource_path(res), "scripts")
                            for res in ('LOCAL', 'USER', 'SYSTEM'))
@@ -343,7 +343,7 @@ def preset_paths(subdir):
     :rtype: list
     """
     dirs = []
-    for path in script_paths("presets", all=True):
+    for path in script_paths("presets", check_all=True):
         directory = _os.path.join(path, subdir)
         if not directory.startswith(path):
             raise Exception("invalid subdir given %r" % subdir)
@@ -432,9 +432,9 @@ def keyconfig_set(filepath):
     keyconfigs_old = keyconfigs[:]
 
     try:
-        file = open(filepath)
-        exec(compile(file.read(), filepath, 'exec'), {"__file__": filepath})
-        file.close()
+        keyfile = open(filepath)
+        exec(compile(keyfile.read(), filepath, 'exec'), {"__file__": filepath})
+        keyfile.close()
     except:
         import traceback
         traceback.print_exc()
index 29187297707eafb96d7ee5f3c6ec7efc9f043a04..3404bb792faad8b92583cb557ce1cd34df78ef18 100644 (file)
@@ -72,7 +72,7 @@ def reduce_spaces(text):
     return RE_SPACE.sub(' ', text)
 
 
-def get_doc(object):
+def get_doc(obj):
     """Get the doc string or comments for an object.
 
     :param object: object
@@ -82,7 +82,7 @@ def get_doc(object):
     >>> get_doc(abs)
     'abs(number) -> number\\n\\nReturn the absolute value of the argument.'
     """
-    result = inspect.getdoc(object) or inspect.getcomments(object)
+    result = inspect.getdoc(obj) or inspect.getcomments(obj)
     return result and RE_EMPTY_LINE.sub('', result.rstrip()) or ''
 
 
index a74e20d8264ffb2f9ad72e70566695f90f180111..e34fd7f538aa9f267ce033c9025f19119234cc67 100644 (file)
@@ -458,15 +458,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         layout.separator()
 
         layout.prop(md, "use_normals")
-        
+
         split = layout.split()
-        
+
         col = split.column()
         col.prop(md, "use_foam")
         sub = col.row()
         sub.active = md.use_foam
         sub.prop(md, "foam_coverage", text="Coverage")
-        
+
         col = split.column()
         col.active = md.use_foam
         col.label("Foam Data Layer Name:")
index 57df602f19a08492b2a783ca1ec63f5ec4a7d12e..d5350e81a88a9fb033d5c0ded105edb72baae0e4 100644 (file)
@@ -456,7 +456,7 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
         file_format = rd.image_settings.file_format
 
         layout.prop(rd, "filepath", text="")
-        
+
         flow = layout.column_flow()
         flow.prop(rd, "use_overwrite")
         flow.prop(rd, "use_placeholder")
index e0e7e88f620a4f1a2af7f5f29ad05d54a71c23c9..b04d81b6b2a6aeaab2b24bb3e239796a30ac8a7e 100644 (file)
@@ -475,7 +475,7 @@ class CLIP_PT_stabilization(Panel):
 
     def draw_header(self, context):
         stab = context.space_data.clip.tracking.stabilization
-        
+
         self.layout.prop(stab, "use_2d_stabilization", text="")
 
     def draw(self, context):
index 96c0371baf33895fa6752f4addd71744ae21a23c..9ff42bc706b90544ab152ea7c460c0c752eb51ac 100644 (file)
@@ -53,6 +53,7 @@ void  BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *re
 int            BKE_alphatest_ibuf(struct ImBuf *ibuf);
 int            BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
 int            BKE_write_ibuf(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+int     BKE_write_ibuf_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
 void   BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, char imtype, const short use_ext, const short use_frames);
 int            BKE_add_image_extension(char *string, const char imtype);
 char   BKE_ftype_to_imtype(const int ftype);
index 4793e83df53f1a308dce5f235878e695573f56f3..140f596f78c0a3f052f8d1ffa6494c67a60636b1 100644 (file)
@@ -2301,14 +2301,16 @@ CCGError ccgSubSurf_stitchFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, in
        /* zero */
        for (i=0; i<numEffectedV; i++) {
                CCGVert *v = effectedV[i];
-               VertDataZero(VERT_getCo(v, lvl));
+               if(v->numFaces)
+                       VertDataZero(VERT_getCo(v, lvl));
        }
 
        for (i=0; i<numEffectedE; i++) {
                CCGEdge *e = effectedE[i];
 
-               for (x=0; x<edgeSize; x++)
-                       VertDataZero(EDGE_getCo(e, lvl, x));
+               if(e->numFaces)
+                       for (x=0; x<edgeSize; x++)
+                               VertDataZero(EDGE_getCo(e, lvl, x));
        }
 
        /* add */
@@ -2349,7 +2351,8 @@ CCGError ccgSubSurf_stitchFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, in
        /* average */
        for (i=0; i<numEffectedV; i++) {
                CCGVert *v = effectedV[i];
-               VertDataMulN(VERT_getCo(v, lvl), 1.0f/v->numFaces);
+               if(v->numFaces)
+                       VertDataMulN(VERT_getCo(v, lvl), 1.0f/v->numFaces);
        }
 
        for (i=0; i<numEffectedE; i++) {
@@ -2358,8 +2361,9 @@ CCGError ccgSubSurf_stitchFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, in
                VertDataCopy(EDGE_getCo(e, lvl, 0), VERT_getCo(e->v0, lvl));
                VertDataCopy(EDGE_getCo(e, lvl, edgeSize-1), VERT_getCo(e->v1, lvl));
 
-               for (x=1; x<edgeSize-1; x++)
-                       VertDataMulN(EDGE_getCo(e, lvl, x), 1.0f/e->numFaces);
+               if(e->numFaces)
+                       for (x=1; x<edgeSize-1; x++)
+                               VertDataMulN(EDGE_getCo(e, lvl, x), 1.0f/e->numFaces);
        }
 
        /* copy */
index 5f1a5f739736e721c3b91eaef383abbd2eca25cd..ccafb65312af2055567195f1c3cd77f4aa4c6ac4 100644 (file)
@@ -170,6 +170,7 @@ Curve *add_curve(const char *name, int type)
        cu->texflag= CU_AUTOSPACE;
        cu->smallcaps_scale= 0.75f;
        cu->twist_mode= CU_TWIST_MINIMUM;       // XXX: this one seems to be the best one in most cases, at least for curve deform...
+       cu->type= type;
        
        cu->bb= unit_boundbox();
        
@@ -304,16 +305,23 @@ ListBase *curve_editnurbs(Curve *cu)
 short curve_type(Curve *cu)
 {
        Nurb *nu;
+       int type= cu->type;
+
        if(cu->vfont) {
                return OB_FONT;
        }
-       for (nu= cu->nurb.first; nu; nu= nu->next) {
-               if(nu->pntsv>1) {
-                       return OB_SURF;
+
+       if(!cu->type) {
+               type= OB_CURVE;
+
+               for (nu= cu->nurb.first; nu; nu= nu->next) {
+                       if(nu->pntsv>1) {
+                               type= OB_SURF;
+                       }
                }
        }
-       
-       return OB_CURVE;
+
+       return type;
 }
 
 void update_curve_dimension(Curve *cu)
index 964e15f494d3f00682e2e144805452fe141d3727..034177e2b5d6ec23401eb21977bcad33ab5a9377 100644 (file)
@@ -1483,6 +1483,8 @@ int BKE_alphatest_ibuf(ImBuf *ibuf)
        return FALSE;
 }
 
+/* note: imf->planes is ignored here, its assumed the image channels
+ * are already set */
 int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf)
 {
        char imtype= imf->imtype;
@@ -1577,7 +1579,6 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf)
                /* R_IMF_IMTYPE_JPEG90, etc. default we save jpegs */
                if(quality < 10) quality= 90;
                ibuf->ftype= JPG|quality;
-               if(ibuf->planes==32) ibuf->planes= 24;  /* unsupported feature only confuses other s/w */
        }
        
        BLI_make_existing_file(name);
@@ -1590,6 +1591,29 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf)
        return(ok);
 }
 
+/* same as BKE_write_ibuf_as but crappy workaround not to perminantly modify
+ * _some_, values in the imbuf */
+int BKE_write_ibuf_as(ImBuf *ibuf, const char *name, ImageFormatData *imf,
+                      const short save_copy)
+{
+       ImBuf ibuf_back= *ibuf;
+       int ok;
+
+       /* all data is rgba anyway,
+        * this just controls how to save for some formats */
+       ibuf->planes= imf->planes;
+
+       ok= BKE_write_ibuf(ibuf, name, imf);
+
+       if (save_copy) {
+               /* note that we are not restoring _all_ settings */
+               ibuf->planes= ibuf_back.planes;
+               ibuf->ftype=  ibuf_back.ftype;
+       }
+
+       return ok;
+}
+
 int BKE_write_ibuf_stamp(Scene *scene, struct Object *camera, ImBuf *ibuf, const char *name, struct ImageFormatData *imf)
 {
        if(scene && scene->r.stamp & R_STAMP_ALL)
index 4507d70e3394facdf68fc2740d08a652db1e84c6..b7df06bbf24442a44b51c2c3065e319457a0daa4 100644 (file)
@@ -287,20 +287,28 @@ static DLRBT_Node *get_grandparent (DLRBT_Node *node)
                return NULL;
 }
 
-/* get the 'uncle' - the sibling of the parent - of the given node */
-static DLRBT_Node *get_uncle (DLRBT_Node *node)
+/* get the sibling node (e.g. if node is left child of parent, return right child of parent) */
+static DLRBT_Node *get_sibling(DLRBT_Node *node)
 {
-       DLRBT_Node *gpn= get_grandparent(node);
-       
-       /* return the child of the grandparent which isn't the node's parent */
-       if (gpn) {
-               if (gpn->left == node->parent)
-                       return gpn->right;
+       if (node && node->parent) {
+               if (node == node->parent->left)
+                       return node->parent->right;
                else
-                       return gpn->left;
+                       return node->parent->left;
        }
+
+       /* sibling not found */
+       return NULL;
+}
+
+/* get the 'uncle' - the sibling of the parent - of the given node */
+static DLRBT_Node *get_uncle (DLRBT_Node *node)
+{
+       if (node)
+               /* return the child of the grandparent which isn't the node's parent */
+               return get_sibling(node->parent);
        
-       /* not found */
+       /* uncle not found */
        return NULL;
 }
 
index ecf8fc706b95dbb96380c59ec7f02ce06a2c066b..ae0becc840b7ce63a48419aa262a7ab6f853782e 100644 (file)
@@ -656,12 +656,17 @@ void BLI_pbvh_free(PBVH *bvh)
                        /* if pbvh was deformed, new memory was allocated for verts/faces -- free it */
 
                        MEM_freeN(bvh->verts);
-                       MEM_freeN(bvh->faces);
+                       if(bvh->faces)
+                               MEM_freeN(bvh->faces);
                }
        }
 
-       MEM_freeN(bvh->nodes);
-       MEM_freeN(bvh->prim_indices);
+       if(bvh->nodes)
+               MEM_freeN(bvh->nodes);
+
+       if(bvh->prim_indices)
+               MEM_freeN(bvh->prim_indices);
+
        MEM_freeN(bvh);
 }
 
@@ -1127,6 +1132,9 @@ void BLI_pbvh_update(PBVH *bvh, int flag, float (*face_nors)[3])
        PBVHNode **nodes;
        int totnode;
 
+       if(!bvh->nodes)
+               return;
+
        BLI_pbvh_search_gather(bvh, update_search_cb, SET_INT_IN_POINTER(flag),
                &nodes, &totnode);
 
index df5429960c3a3c078d8edf9c81be591eb411a209..78efc686da472e793df069a908b4c306807802ba 100644 (file)
@@ -1666,7 +1666,8 @@ static void write_customdata(WriteData *wd, ID *id, int count, CustomData *data,
                                writestruct(wd, DATA, structname, datasize, layer->data);
                        }
                        else
-                               printf("error: this CustomDataLayer must not be written to file\n");
+                               printf("%s error: layer '%s':%d - can't be written to file\n",
+                                      __func__, structname, layer->type);
                }
        }
 
index ec6958c841512875534d8b6efbe24d632d922238..d1f11d60999f2df3159e09428c46d362c0f9d60a 100644 (file)
@@ -122,6 +122,7 @@ typedef struct uiLayout uiLayout;
 #define UI_RETURN_OK        2       /* choice made */
 #define UI_RETURN_OUT       4       /* left the menu */
 #define UI_RETURN_UPDATE    8       /* update the button that opened */
+#define UI_RETURN_POPUP_OK  16      /* popup is ok to be handled */
 
        /* block->flag bits 12-15 are identical to but->flag bits */
 
@@ -278,6 +279,30 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
 #define UI_SCROLL_NO_OUTLINE   4
 void uiWidgetScrollDraw(struct uiWidgetColors *wcol, struct rcti *rect, struct rcti *slider, int state);
 
+/* Callbacks
+ *
+ * uiBlockSetHandleFunc/ButmFunc are for handling events through a callback.
+ * HandleFunc gets the retval passed on, and ButmFunc gets a2. The latter is
+ * mostly for compatibility with older code.
+ *
+ * uiButSetCompleteFunc is for tab completion.
+ *
+ * uiButSearchFunc is for name buttons, showing a popup with matches
+ *
+ * uiBlockSetFunc and uiButSetFunc are callbacks run when a button is used,
+ * in case events, operators or RNA are not sufficient to handle the button.
+ *
+ * uiButSetNFunc will free the argument with MEM_freeN. */
+
+typedef struct uiSearchItems uiSearchItems;
+
+typedef void (*uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2);
+typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr);
+typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2);
+typedef void (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg);
+typedef void (*uiButSearchFunc)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items);
+typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
+
 /* Menu Callbacks */
 
 typedef void (*uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1);
@@ -313,7 +338,7 @@ typedef void (*uiBlockCancelFunc)(void *arg1);
 
 void uiPupBlock(struct bContext *C, uiBlockCreateFunc func, void *arg);
 void uiPupBlockO(struct bContext *C, uiBlockCreateFunc func, void *arg, const char *opname, int opcontext);
-void uiPupBlockEx(struct bContext *C, uiBlockCreateFunc func, uiBlockCancelFunc cancel_func, void *arg);
+void uiPupBlockEx(struct bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg);
 /* void uiPupBlockOperator(struct bContext *C, uiBlockCreateFunc func, struct wmOperator *op, int opcontext); */ /* UNUSED */
 
 void uiPupBlockClose(struct bContext *C, uiBlock *block);
@@ -529,30 +554,6 @@ void uiSetButLink(struct uiBut *but,  void **poin,  void ***ppoin,  short *tot,
 void uiComposeLinks(uiBlock *block);
 uiBut *uiFindInlink(uiBlock *block, void *poin);
 
-/* Callbacks
- *
- * uiBlockSetHandleFunc/ButmFunc are for handling events through a callback.
- * HandleFunc gets the retval passed on, and ButmFunc gets a2. The latter is
- * mostly for compatibility with older code.
- *
- * uiButSetCompleteFunc is for tab completion.
- *
- * uiButSearchFunc is for name buttons, showing a popup with matches
- *
- * uiBlockSetFunc and uiButSetFunc are callbacks run when a button is used,
- * in case events, operators or RNA are not sufficient to handle the button.
- *
- * uiButSetNFunc will free the argument with MEM_freeN. */
-
-typedef struct uiSearchItems uiSearchItems;
-
-typedef void (*uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2);
-typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr);
-typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2);
-typedef void (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg);
-typedef void (*uiButSearchFunc)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items);
-typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
-               
                /* use inside searchfunc to add items */
 int            uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int iconid);
                /* bfunc gets search item *poin as arg2, or if NULL the old string */
index 1ed05bc54f06be4a4d213d85e5df093cb4403c86..da94fd9237a8967c21b2153f67fc6e5c540863c3 100644 (file)
@@ -377,37 +377,6 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad)
        glDisable( GL_LINE_SMOOTH );
 }
 
-/* plain fake antialiased unfilled round rectangle */
-#if 0 /* UNUSED 2.5 */
-static void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad, float asp)
-{
-       float color[4], alpha;
-       float raddiff;
-       int i, passes=4;
-       
-       /* get the color and divide up the alpha */
-       glGetFloatv(GL_CURRENT_COLOR, color);
-       alpha = 1; //color[3];
-       color[3]= 0.5*alpha/(float)passes;
-       glColor4fv(color);
-       
-       /* set the 'jitter amount' */
-       raddiff = (1/(float)passes) * asp;
-       
-       glEnable( GL_BLEND );
-       
-       /* draw lots of lines on top of each other */
-       for (i=passes; i>=(-passes); i--) {
-               uiDrawBox(GL_LINE_LOOP, minx, miny, maxx, maxy, rad+(i*raddiff));
-       }
-       
-       glDisable( GL_BLEND );
-       
-       color[3] = alpha;
-       glColor4fv(color);
-}
-#endif
-
 /* (old, used in outliner) plain antialiased filled box */
 void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad)
 {
index 1ba6acf367a405d06dff227d80359a4d8133d707..a0b0d34ab442660f97f3fcb07b8bb00b1fdfeb62 100644 (file)
@@ -5861,14 +5861,14 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut *
        menu= data->menu;
 
        /* copy over return values from the closing menu */
-       if(menu->menuretval == UI_RETURN_OK || menu->menuretval == UI_RETURN_UPDATE) {
+       if((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_UPDATE)) {
                if(but->type == COL)
                        copy_v3_v3(data->vec, menu->retvec);
                else if(ELEM3(but->type, MENU, ICONROW, ICONTEXTROW))
                        data->value= menu->retvalue;
        }
 
-       if(menu->menuretval == UI_RETURN_UPDATE) {
+       if(menu->menuretval & UI_RETURN_UPDATE) {
                if(data->interactive) ui_apply_button(C, but->block, but, data, 1);
                else ui_check_but(but);
 
@@ -5876,13 +5876,13 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut *
        }
        
        /* now change button state or exit, which will close the submenu */
-       if(ELEM(menu->menuretval, UI_RETURN_OK, UI_RETURN_CANCEL)) {
+       if((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_CANCEL)) {
                if(menu->menuretval != UI_RETURN_OK)
                        data->cancel= 1;
 
                button_activate_exit(C, data, but, 1, 0);
        }
-       else if(menu->menuretval == UI_RETURN_OUT) {
+       else if(menu->menuretval & UI_RETURN_OUT) {
                if(event->type==MOUSEMOVE && ui_mouse_inside_button(data->region, but, event->x, event->y)) {
                        button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT);
                }
@@ -6330,7 +6330,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
                                /* enter will always close this block, we let the event
                                 * get handled by the button if it is activated, otherwise we cancel */
                                if(!ui_but_find_activated(ar))
-                                       menu->menuretval= UI_RETURN_CANCEL;
+                                       menu->menuretval= UI_RETURN_CANCEL | UI_RETURN_POPUP_OK;
                        }
                        else {
                                ui_mouse_motion_towards_check(block, menu, mx, my);
@@ -6370,7 +6370,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
         * buttons inside this region. disabled inside check .. not sure
         * anymore why it was there? but it meant enter didn't work
         * for example when mouse was not over submenu */
-       if((/*inside &&*/ (!menu->menuretval || menu->menuretval == UI_RETURN_UPDATE) && retval == WM_UI_HANDLER_CONTINUE) || event->type == TIMER) {
+       if((/*inside &&*/ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && retval == WM_UI_HANDLER_CONTINUE) || event->type == TIMER) {
                but= ui_but_find_activated(ar);
 
                if(but) {
@@ -6419,14 +6419,14 @@ static int ui_handle_menu_return_submenu(bContext *C, wmEvent *event, uiPopupBlo
        if(submenu->menuretval) {
                /* first decide if we want to close our own menu cascading, if
                 * so pass on the sub menu return value to our own menu handle */
-               if(ELEM(submenu->menuretval, UI_RETURN_OK, UI_RETURN_CANCEL)) {
+               if((submenu->menuretval & UI_RETURN_OK) || (submenu->menuretval & UI_RETURN_CANCEL)) {
                        if(!(block->flag & UI_BLOCK_KEEP_OPEN)) {
                                menu->menuretval= submenu->menuretval;
                                menu->butretval= data->retval;
                        }
                }
 
-               update= (submenu->menuretval == UI_RETURN_UPDATE);
+               update= (submenu->menuretval & UI_RETURN_UPDATE);
 
                /* now let activated button in this menu exit, which
                 * will actually close the submenu too */
@@ -6599,7 +6599,7 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata)
                ui_popup_block_free(C, menu);
                UI_remove_popup_handlers(&CTX_wm_window(C)->modalhandlers, menu);
 
-               if(temp.menuretval == UI_RETURN_OK) {
+               if((temp.menuretval & UI_RETURN_OK) || (temp.menuretval & UI_RETURN_POPUP_OK)) {
                        if(temp.popup_func)
                                temp.popup_func(C, temp.popup_arg, temp.retvalue);
                        if(temp.optype)
index d117a7f4e6e50be2e7b137449ed6c24cb0209875..58c3c0130b8d4bc96f4e5ca9b8695e8a531520ea 100644 (file)
@@ -2603,7 +2603,7 @@ void uiPupBlock(bContext *C, uiBlockCreateFunc func, void *arg)
        uiPupBlockO(C, func, arg, NULL, 0);
 }
 
-void uiPupBlockEx(bContext *C, uiBlockCreateFunc func, uiBlockCancelFunc cancel_func, void *arg)
+void uiPupBlockEx(bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg)
 {
        wmWindow *window= CTX_wm_window(C);
        uiPopupBlockHandle *handle;
@@ -2613,7 +2613,7 @@ void uiPupBlockEx(bContext *C, uiBlockCreateFunc func, uiBlockCancelFunc cancel_
        handle->retvalue= 1;
 
        handle->popup_arg= arg;
-       // handle->popup_func= operator_cb;
+       handle->popup_func= popup_func;
        handle->cancel_func= cancel_func;
        // handle->opcontext= opcontext;
        
index 3caafe308d05f4703dbd2be09ced5a9a614a6fdb..0e9dbaf3022d3286df2706bed7079ec9d20012d1 100644 (file)
@@ -124,6 +124,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name, short uifont_id
        style->buttonspacex= 8;
        style->buttonspacey= 2;
        style->panelspace= 8;
+       style->panelouter= 4;
        
        return style;
 }
index 00c59c48c1c187a755a7feee05b5b9118211eafd..b168a9c4cf317aae01faa9beb3b9505ed92493d4 100644 (file)
@@ -1374,6 +1374,7 @@ static int convert_exec(bContext *C, wmOperator *op)
                                makeDispListCurveTypes(scene, newob, 0);
 
                        newob->type= OB_CURVE;
+                       cu->type= OB_CURVE;
 
                        if(cu->vfont) {
                                cu->vfont->id.us--;
index bff2d82e04152c464fbf0fedf77468be3ef4935d..0efc89e802a11d7967eb51a59aad921ea5841009 100644 (file)
@@ -1075,7 +1075,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
                        BKE_image_release_renderresult(scene, ima);
                }
                else {
-                       if (BKE_write_ibuf(ibuf, simopts->filepath, &simopts->im_format)) {
+                       if (BKE_write_ibuf_as(ibuf, simopts->filepath, &simopts->im_format, save_copy)) {
                                ok= TRUE;
                        }
                }
index 024db35a084910ecbf2ff137f8c40b6768ea1332..02a8b5cc9fba586069aec9fc523cc5f621863491 100644 (file)
@@ -933,15 +933,16 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
        if(snode->nodetree) {
                bNode *node;
                
-               /* init ui blocks for opened node group trees first 
-                * so they're in the correct depth stack order */
+               node_uiblocks_init(C, snode->nodetree);
+               
+               /* uiBlocks must be initialized in drawing order for correct event clipping.
+                * Node group internal blocks added after the main group block.
+                */
                for(node= snode->nodetree->nodes.first; node; node= node->next) {
                        if(node->flag & NODE_GROUP_EDIT)
                                node_uiblocks_init(C, (bNodeTree *)node->id);
                }
                
-               node_uiblocks_init(C, snode->nodetree);
-               
                node_update_nodetree(C, snode->nodetree, 0.0f, 0.0f);
                node_draw_nodetree(C, ar, snode, snode->nodetree);
                
index c4412d3d8f2f3c6b83099aad15c01218879f79ee..1f49a4d526beaac5c401269d03f146eaa9408531 100644 (file)
@@ -1382,142 +1382,6 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) // VIEW3
 }
 #endif
 
-#if 0 // XXX not used
-static void delete_sketch_armature(bContext *C, void *arg1, void *arg2)
-{
-       BIF_deleteSketch(C);
-}
-
-static void convert_sketch_armature(bContext *C, void *arg1, void *arg2)
-{
-       BIF_convertSketch(C);
-}
-
-static void assign_template_sketch_armature(bContext *C, void *arg1, void *arg2)
-{
-       int index = *(int*)arg1;
-       BIF_setTemplate(C, index);
-}
-
-
-static int view3d_panel_bonesketch_spaces_poll(const bContext *C, PanelType *pt)
-{
-       Object *obedit = CTX_data_edit_object(C);
-
-       /* replace with check call to sketching lib */
-       return (obedit && obedit->type == OB_ARMATURE);
-}
-static void view3d_panel_bonesketch_spaces(const bContext *C, Panel *pa)
-{
-       Scene *scene = CTX_data_scene(C);
-       static int template_index;
-       static char joint_label[128];
-       uiBlock *block;
-       uiBut *but;
-       char *bone_name;
-       int yco = 130;
-       int nb_joints;
-       static char subdiv_tooltip[4][64] = {
-               "Subdivide arcs based on a fixed number of bones",
-               "Subdivide arcs in bones of equal length",
-               "Subdivide arcs based on correlation",
-               "Retarget template to stroke"
-               };
-
-       
-       block= uiLayoutAbsoluteBlock(pa->layout);
-       uiBlockSetHandleFunc(block, do_view3d_region_buttons, NULL);
-
-       uiBlockBeginAlign(block);
-       
-       /* use real flag instead of 1 */
-       uiDefButBitC(block, TOG, BONE_SKETCHING, B_REDR, "Use Bone Sketching", 10, yco, 160, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Use sketching to create and edit bones, (Ctrl snaps to mesh volume)");
-       uiDefButBitC(block, TOG, BONE_SKETCHING_ADJUST, B_REDR, "A", 170, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Adjust strokes by drawing near them");
-       uiDefButBitC(block, TOG, BONE_SKETCHING_QUICK, B_REDR, "Q", 190, yco, 20, 20, &scene->toolsettings->bone_sketching, 0, 0, 0, 0, "Automatically convert and delete on stroke end");
-       yco -= 20;
-       
-       but = uiDefBut(block, BUT, B_REDR, "Convert", 10,yco,100,20, 0, 0, 0, 0, 0, "Convert sketch to armature");
-       uiButSetFunc(but, convert_sketch_armature, NULL, NULL);
-
-       but = uiDefBut(block, BUT, B_REDR, "Delete", 110,yco,100,20, 0, 0, 0, 0, 0, "Delete sketch");
-       uiButSetFunc(but, delete_sketch_armature, NULL, NULL);
-       yco -= 20;
-       
-       uiBlockEndAlign(block);
-
-       uiBlockBeginAlign(block);
-       
-       uiDefButC(block, MENU, B_REDR, "Subdivision Method%t|Length%x1|Adaptative%x2|Fixed%x0|Template%x3", 10,yco,60,19, &scene->toolsettings->bone_sketching_convert, 0, 0, 0, 0, subdiv_tooltip[(unsigned char)scene->toolsettings->bone_sketching_convert]);
-
-       switch(scene->toolsettings->bone_sketching_convert)
-       {
-       case SK_CONVERT_CUT_LENGTH:
-               uiDefButF(block, NUM, B_REDR,                                   "Lim:",         70, yco, 140, 19, &scene->toolsettings->skgen_length_limit,0.1,50.0, 10, 0,             "Maximum length of the subdivided bones");
-               yco -= 20;
-               break;
-       case SK_CONVERT_CUT_ADAPTATIVE:
-               uiDefButF(block, NUM, B_REDR,                                   "Thres:",                       70, yco, 140, 19, &scene->toolsettings->skgen_correlation_limit,0.0, 1.0, 0.01, 0,      "Correlation threshold for subdivision");
-               yco -= 20;
-               break;
-       default:
-       case SK_CONVERT_CUT_FIXED:
-               uiDefButC(block, NUM, B_REDR,                                   "Num:",         70, yco, 140, 19, &scene->toolsettings->skgen_subdivision_number,1, 100, 1, 5,  "Number of subdivided bones");
-               yco -= 20;
-               break;
-       case SK_CONVERT_RETARGET:
-               uiDefButC(block, ROW, B_NOP, "No",                      70,  yco, 40,19, &scene->toolsettings->skgen_retarget_roll, 0, 0, 0, 0,                                                                 "No special roll treatment");
-               uiDefButC(block, ROW, B_NOP, "View",            110,  yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_VIEW, 0, 0,                            "Roll bones perpendicular to view");
-               uiDefButC(block, ROW, B_NOP, "Joint",           160, yco, 50,19, &scene->toolsettings->skgen_retarget_roll, 0, SK_RETARGET_ROLL_JOINT, 0, 0,                            "Roll bones relative to joint bend");
-               yco -= 30;
-
-               uiBlockEndAlign(block);
-
-               uiBlockBeginAlign(block);
-               /* button here to select what to do (copy or not), template, ...*/
-
-               BIF_makeListTemplates(C);
-               template_index = BIF_currentTemplate(C);
-               
-               but = uiDefButI(block, MENU, B_REDR, BIF_listTemplates(C), 10,yco,200,19, &template_index, 0, 0, 0, 0, "Template");
-               uiButSetFunc(but, assign_template_sketch_armature, &template_index, NULL);
-               
-               yco -= 20;
-               
-               uiDefButF(block, NUM, B_NOP,                                                    "A:",                   10, yco, 66,19, &scene->toolsettings->skgen_retarget_angle_weight, 0, 10, 1, 0,         "Angle Weight");
-               uiDefButF(block, NUM, B_NOP,                                                    "L:",                   76, yco, 67,19, &scene->toolsettings->skgen_retarget_length_weight, 0, 10, 1, 0,                "Length Weight");
-               uiDefButF(block, NUM, B_NOP,                                                    "D:",           143,yco, 67,19, &scene->toolsettings->skgen_retarget_distance_weight, 0, 10, 1, 0,              "Distance Weight");
-               yco -= 20;
-               
-               uiDefBut(block, TEX,B_REDR,"S:",                                                        10,  yco, 90, 20, scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace &S with");
-               uiDefBut(block, TEX,B_REDR,"N:",                                                        100, yco, 90, 20, scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace &N with");
-               uiDefIconButBitC(block, TOG, SK_RETARGET_AUTONAME, B_NOP, ICON_AUTO,190,yco,20,20, &scene->toolsettings->skgen_retarget_options, 0, 0, 0, 0, "Use Auto Naming");        
-               yco -= 20;
-
-               /* auto renaming magic */
-               uiBlockEndAlign(block);
-               
-               nb_joints = BIF_nbJointsTemplate(C);
-
-               if (nb_joints == -1)
-               {
-                       //XXX
-                       //nb_joints = G.totvertsel;
-               }
-               
-               bone_name = BIF_nameBoneTemplate(C);
-               
-               BLI_snprintf(joint_label, 32, "%i joints: %s", nb_joints, bone_name);
-               
-               uiDefBut(block, LABEL, 1, joint_label,                                  10, yco, 200, 20, NULL, 0.0, 0.0, 0, 0, "");
-               yco -= 20;
-               break;
-       }
-
-       uiBlockEndAlign(block);
-}
-
-#endif // XXX not used
-
 void view3d_buttons_register(ARegionType *art)
 {
        PanelType *pt;
index 4488442815d19be4a6b0741164bc504c5c0b6c26..01afc0e24eb5c9892911f6c620cf7572374821ad 100644 (file)
@@ -31,8 +31,11 @@ set(INC
        ../imbuf
        ../makesdna
        ../makesrna
-       ../nodes        # For node muting stuff...
-       ../nodes/intern # For node muting stuff...
+
+       # For node muting stuff...
+       ../nodes
+       ../nodes/intern
+
        ../../../intern/guardedalloc
        ../../../intern/smoke/extern
 )
index 5a40de0a65e280973e94fcc22082a15d57d89fa8..a43a8672651c1defbba95c67cdff2d8501851374 100644 (file)
@@ -572,8 +572,12 @@ static int init_jpeg(FILE * outfile, struct jpeg_compress_struct * cinfo, struct
 
        cinfo->in_color_space = JCS_RGB;
        if (ibuf->planes == 8) cinfo->in_color_space = JCS_GRAYSCALE;
+#if 0
+       /* just write RGBA as RGB,
+        * unsupported feature only confuses other s/w */
+
        if (ibuf->planes == 32) cinfo->in_color_space = JCS_UNKNOWN;
-       
+#endif
        switch(cinfo->in_color_space){
        case JCS_RGB:
                cinfo->input_components = 3;
index d189a692083c24d87eb9238bda5f83a76eeaee5e..236d6dd47320f460d0fb5db8419141d445d982bb 100644 (file)
@@ -186,7 +186,9 @@ typedef struct Curve {
        float size[3];
        float rot[3];
 
-       short texflag, pad1; /* keep a short because of give_obdata_texspace() */
+       short type;     /* creation-time type of curve datablock */
+
+       short texflag; /* keep a short because of give_obdata_texspace() */
        short drawflag, twist_mode;
        float twist_smooth, smallcaps_scale;
 
index a25ed938c0f3dc46f26150e319e6e1caa0ec03a3..198a66499aeb712b286d6d45c0d3ee73ed6caee9 100644 (file)
@@ -112,8 +112,9 @@ typedef struct uiStyle {
        short buttonspacex;
        short buttonspacey;
        short panelspace;
+       short panelouter;
 
-       short pad[2];
+       short pad;
 } uiStyle;
 
 typedef struct uiWidgetColors {
index 947e4d53d8b8cd394d7fca642bb73549193d94a3..1ee24a508b633b0a148df5046125be9befbe62ee 100644 (file)
@@ -2790,27 +2790,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
        RNA_def_property_range(prop, 1.0f, 200.0f);
        RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
        RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
-       
-       /* JPEG and AVI JPEG */
-
-#if 0 /* moved */
-
-       prop= RNA_def_property(srna, "file_quality", PROP_INT, PROP_PERCENTAGE);
-       RNA_def_property_int_sdna(prop, NULL, "quality");
-       RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
-       RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies, compression for PNG's");
-       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
-#endif
-
-       /* Tiff */
-       
-#if 0 /* replaced, use generic */
-       prop= def_property(srna, "use_tiff_16bit", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
-       RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
-       RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-#endif
 
 #ifdef WITH_QUICKTIME
        /* QuickTime */
index a1e18432b4bada2e4c86479a3de89b66d04b7c3f..9bf6687fb5ee1341c487a17357eda4004f0ac768 100644 (file)
@@ -241,7 +241,7 @@ static PyObject *Euler_rotate(EulerObject * self, PyObject *value)
                return NULL;
 
        eulO_to_mat3(self_rmat, self->eul, self->order);
-       mul_m3_m3m3(rmat, self_rmat, other_rmat);
+       mul_m3_m3m3(rmat, other_rmat, self_rmat);
 
        mat3_to_compatible_eulO(self->eul, self->eul, self->order, rmat);
 
index f5e1218aaa363bff522493f3ef1fe48492550cdd..2f62f7141cf59af4185c66abff6dea79e8971e01 100644 (file)
@@ -1041,7 +1041,7 @@ static PyObject *Matrix_rotate(MatrixObject *self, PyObject *value)
        }
 
        matrix_as_3x3(self_rmat, self);
-       mul_m3_m3m3(rmat, self_rmat, other_rmat);
+       mul_m3_m3m3(rmat, other_rmat, self_rmat);
 
        copy_m3_m3((float (*)[3])(self->contigPtr), rmat);
 
index 0b24db708e26e72f56eca5727d87b26a48262fa9..44cd28a7c3d0eaf152fa55cff1c8fce1442820ae 100644 (file)
@@ -312,7 +312,7 @@ static PyObject *Quaternion_rotate(QuaternionObject *self, PyObject *value)
 
        length= normalize_qt_qt(tquat, self->quat);
        quat_to_mat3(self_rmat, tquat);
-       mul_m3_m3m3(rmat, self_rmat, other_rmat);
+       mul_m3_m3m3(rmat, other_rmat, self_rmat);
 
        mat3_to_quat(self->quat, rmat);
        mul_qt_fl(self->quat, length); /* maintain length after rotating */
index 0c538865501c9af3fc388041cacabae64c163009..26f59189e47e484dad55f6f9df8e3d0dbd47e8ba 100644 (file)
@@ -1072,6 +1072,15 @@ static void wm_operator_ui_popup_cancel(void *userData)
        MEM_freeN(data);
 }
 
+static void wm_operator_ui_popup_ok(struct bContext *C, void *arg, int retval)
+{
+       wmOpPopUp *data= arg;
+       wmOperator *op= data->op;
+
+       if(op && retval > 0)
+               WM_operator_call(C, op);
+}
+
 int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
 {
        wmOpPopUp *data= MEM_callocN(sizeof(wmOpPopUp), "WM_operator_ui_popup");
@@ -1079,7 +1088,7 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
        data->width= width;
        data->height= height;
        data->free_op= TRUE; /* if this runs and gets registered we may want not to free it */
-       uiPupBlockEx(C, wm_operator_ui_create, wm_operator_ui_popup_cancel, data);
+       uiPupBlockEx(C, wm_operator_ui_create, NULL, wm_operator_ui_popup_cancel, data);
        return OPERATOR_RUNNING_MODAL;
 }
 
@@ -1110,7 +1119,7 @@ int WM_operator_props_dialog_popup(bContext *C, wmOperator *op, int width, int h
        data->free_op= TRUE; /* if this runs and gets registered we may want not to free it */
 
        /* op is not executed until popup OK but is clicked */
-       uiPupBlockEx(C, wm_block_dialog_create, wm_operator_ui_popup_cancel, data);
+       uiPupBlockEx(C, wm_block_dialog_create, wm_operator_ui_popup_ok, wm_operator_ui_popup_cancel, data);
 
        return OPERATOR_RUNNING_MODAL;
 }
index e1ddd7fce1e2c5342ceadd46c5695383130c5a6e..40e9f899ef098a95e573cb863681eccf619d9aef 100644 (file)
@@ -329,7 +329,17 @@ PyObject * Texture_refresh (Texture * self, PyObject * args)
                                        // get texture size
                                        short * orgSize = self->m_source->m_image->getSize();
                                        // calc scaled sizes
-                                       short size[] = {ImageBase::calcSize(orgSize[0]), ImageBase::calcSize(orgSize[1])};
+                                       short size[2];
+                                       if (GLEW_ARB_texture_non_power_of_two)
+                                       {
+                                               size[0] = orgSize[0];
+                                               size[1] = orgSize[1];
+                                       }
+                                       else
+                                       {
+                                               size[0] = ImageBase::calcSize(orgSize[0]);
+                                               size[1] = ImageBase::calcSize(orgSize[1]);
+                                       }
                                        // scale texture if needed
                                        if (size[0] != orgSize[0] || size[1] != orgSize[1])
                                        {
index 0c7c90a238286c0c5a4815644e0eaab10a2e8cd9..4b957f2090706a83be36b5a75782c8cd24713436 100644 (file)
@@ -122,12 +122,13 @@ def main():
                   "W0232,"  # class has no __init__, Operator/Panel/Menu etc
                   "W0142,"  # Used * or ** magic
                             # even needed in some cases
-                  "R0903,"  # bake_action] Too many statements (68/50)
+                  "R0902,"  # Too many instance attributes
+                  "R0903,"  # Too many statements
                   "R0911,"  # Too many return statements
                   "R0912,"  # Too many branches
                   "R0913,"  # Too many arguments
                   "R0914,"  # Too many local variables
-                  "R0915,"  # bake_action] Too many statements (68/50)
+                  "R0915,"  # Too many statements
                   " "
                   "--include-ids=y "
                   "--output-format=parseable "