svn merge -r39384:39433 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Tue, 16 Aug 2011 06:53:03 +0000 (06:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 16 Aug 2011 06:53:03 +0000 (06:53 +0000)
41 files changed:
intern/ghost/intern/GHOST_WindowWin32.cpp
release/scripts/modules/bpy_extras/io_utils.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/texture.c
source/blender/blenlib/BLI_utildefines.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/object/object_edit.c
source/blender/editors/render/render_update.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_text/text_python.c
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/filter.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_wm.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna_anim.c
source/blender/render/intern/source/rayshade.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c

index 1ba51376ff92a54837bb111bfe28dffb705990a3..0c8c0adf0413e46d1cf2737f32e63ca42349bcb8 100644 (file)
@@ -612,7 +612,6 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
                wp.showCmd = SW_SHOWMINIMIZED;
                break;
        case GHOST_kWindowStateMaximized:
-               ShowWindow(m_hWnd, SW_HIDE);
                wp.showCmd = SW_SHOWMAXIMIZED;
                SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
                break;
@@ -629,12 +628,12 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
                break;
        case GHOST_kWindowStateNormal:
        default:
-               ShowWindow(m_hWnd, SW_HIDE);
                wp.showCmd = SW_SHOWNORMAL;
                SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
                break;
        }
-       return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
+       SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /*Clears window cache for SetWindowLongPtr */
+       return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
 }
 
 
index bb4e95c051f0422cbf8cd22d1f4da566db140841..6271c1f77b598ff7f85a62940392426f5d1bc7fb 100644 (file)
@@ -439,7 +439,7 @@ def path_reference_copy(copy_set, report=print):
             shutil.copy(file_src, file_dst)
 
 
-def unique_name(key, name, name_dict, name_max=-1, clean_func=None):
+def unique_name(key, name, name_dict, name_max=-1, clean_func=None, sep="."):
     """
     Helper function for storing unique names which may have special characters
     stripped and restricted to a maximum length.
@@ -456,6 +456,9 @@ def unique_name(key, name, name_dict, name_max=-1, clean_func=None):
     :type name_dict: dict
     :arg clean_func: Function to call on *name* before creating a unique value.
     :type clean_func: function
+    :arg sep: Separator to use when between the name and a number when a
+       duplicate name is found.
+    :type sep: string
     """
     name_new = name_dict.get(key)
     if name_new is None:
@@ -466,14 +469,15 @@ def unique_name(key, name, name_dict, name_max=-1, clean_func=None):
 
         if name_max == -1:
             while name_new in name_dict_values:
-                name_new = "%s.%03d" % (name_new_orig, count)
+                name_new = "%s%s%03d" % (name_new_orig, sep, count)
                 count += 1
         else:
             name_new = name_new[:name_max]
             while name_new in name_dict_values:
                 count_str = "%03d" % count
-                name_new = "%.*s.%s" % (name_max - (len(count_str) + 1),
+                name_new = "%.*s%s%s" % (name_max - (len(count_str) + 1),
                                         name_new_orig,
+                                        sep,
                                         count_str,
                                         )
                 count += 1
index 67c2f5d001bd5d3ff9737696cbb35b5b4e538b22..8afd6c104e072c31d788f861be35cac2ec016705 100644 (file)
@@ -813,39 +813,26 @@ def main(context,
     global RotMatStepRotation
     main_consts()
 
-    # TODO, all selected meshes
-    '''
-    # objects = context.selected_editable_objects
-    objects = []
-
-    # we can will tag them later.
-    obList =  [ob for ob in objects if ob.type == 'MESH']
-
-    # Face select object may not be selected.
-    ob = context.active_object
-
-    if ob and (not ob.select) and ob.type == 'MESH':
-        # Add to the list
-        obList =[ob]
-    del objects
-    '''
+    # Create the variables.
+    USER_PROJECTION_LIMIT = projection_limit
+    USER_ONLY_SELECTED_FACES = True
+    USER_SHARE_SPACE = 1 # Only for hole filling.
+    USER_STRETCH_ASPECT = 1 # Only for hole filling.
+    USER_ISLAND_MARGIN = island_margin # Only for hole filling.
+    USER_FILL_HOLES = 0
+    USER_FILL_HOLES_QUALITY = 50 # Only for hole filling.
+    USER_VIEW_INIT = 0 # Only for hole filling.
     
-    # quick workaround
-    obList =  [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
+    is_editmode = (context.active_object.mode == 'EDIT')
+    if is_editmode:
+        obList =  [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
+    else:
+        obList =  [ob for ob in context.selected_editable_objects if ob and ob.type == 'MESH']
+        USER_ONLY_SELECTED_FACES = False
 
     if not obList:
         raise('error, no selected mesh objects')
 
-    # Create the variables.
-    USER_PROJECTION_LIMIT = projection_limit
-    USER_ONLY_SELECTED_FACES = (1)
-    USER_SHARE_SPACE = (1) # Only for hole filling.
-    USER_STRETCH_ASPECT = (1) # Only for hole filling.
-    USER_ISLAND_MARGIN = island_margin # Only for hole filling.
-    USER_FILL_HOLES = (0)
-    USER_FILL_HOLES_QUALITY = (50) # Only for hole filling.
-    USER_VIEW_INIT = (0) # Only for hole filling.
-
     # Reuse variable
     if len(obList) == 1:
         ob = "Unwrap %i Selected Mesh"
@@ -906,8 +893,8 @@ def main(context,
 
         if USER_ONLY_SELECTED_FACES:
             meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select]
-        #else:
-        #      meshFaces = map(thickface, me.faces)
+        else:
+               meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces)]
 
         if not meshFaces:
             continue
@@ -922,7 +909,7 @@ def main(context,
         # meshFaces = []
 
         # meshFaces.sort( lambda a, b: cmp(b.area , a.area) ) # Biggest first.
-        meshFaces.sort( key = lambda a: -a.area )
+        meshFaces.sort(key=lambda a: -a.area)
 
         # remove all zero area faces
         while meshFaces and meshFaces[-1].area <= SMALL_NUM:
index d595b32c71011fb6401245e23a3ce9bd954bc979..6a81ff5830ea624a5e67cb7f0d59560f23e4351c 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-from bpy.types import Menu, Operator
+from bpy.types import Menu, Operator, OperatorProperties
 import os
 
 
index d39be9d683c6e645b1c53763597d8e38adad2d89..667e085011152abf25bb2a53be06d664d1bc553a 100644 (file)
@@ -301,6 +301,7 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node
        for (fcu= adt->drivers.first; fcu; fcu= fcu->next) {
                ChannelDriver *driver= fcu->driver;
                DriverVar *dvar;
+               int isdata_fcu = isdata || (fcu->rna_path && strstr(fcu->rna_path, "modifiers["));
                
                /* loop over variables to get the target relationships */
                for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
@@ -320,14 +321,14 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node
                                                        ( ((dtar->rna_path) && strstr(dtar->rna_path, "pose.bones[")) || 
                                                          ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) )) 
                                                {
-                                                       dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+                                                       dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
                                                }
                                                /* check if ob data */
                                                else if (dtar->rna_path && strstr(dtar->rna_path, "data."))
-                                                       dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+                                                       dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
                                                /* normal */
                                                else
-                                                       dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver");
+                                                       dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver");
                                        }
                                }
                        }
index d6a9d950015094cc768f3f6e79189f9e4d41e306..13e13fbc3ffa651d9f43df005f8d149efd9a7cc7 100644 (file)
@@ -1002,7 +1002,7 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar)
        
        /* get property to read from, and get value as appropriate */
        if (RNA_path_resolve_full(&id_ptr, dtar->rna_path, &ptr, &prop, &index)) {
-               if(RNA_property_array_check(&ptr, prop)) {
+               if(RNA_property_array_check(prop)) {
                        /* array */
                        if (index < RNA_property_array_length(&ptr, prop)) {    
                                switch (RNA_property_type(prop)) {
index c02b5dda9ce0b8f5fc8bbbf5e2aa038a707b7305..bd238e72d0c6f66e9d5592cf2b5c60866156fdb3 100644 (file)
@@ -1582,7 +1582,7 @@ void BKE_nla_tweakmode_exit (AnimData *adt)
 
 /* Baking Tools ------------------------------------------- */
 
-static void BKE_nla_bake (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
+static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimData *adt, int UNUSED(flag))
 {
 
        /* verify that data is valid 
index 13469e0b58bcb0a0c93cf942d8af9dd2ac04bf25..5f1a6c911bc511b8a77149d9ca34267e739a8476 100644 (file)
@@ -3243,7 +3243,7 @@ static int node_animation_properties(bNodeTree *ntree, bNode *node)
                int driven, len=1, index;
                prop = (PropertyRNA *)link;
                
-               if (RNA_property_array_check(&ptr, prop))
+               if (RNA_property_array_check(prop))
                        len = RNA_property_array_length(&ptr, prop);
                
                for (index=0; index<len; index++) {
@@ -3261,7 +3261,7 @@ static int node_animation_properties(bNodeTree *ntree, bNode *node)
                RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
                prop = RNA_struct_find_property(&ptr, "default_value");
                
-               if (RNA_property_array_check(&ptr, prop))
+               if (RNA_property_array_check(prop))
                        len = RNA_property_array_length(&ptr, prop);
                
                for (index=0; index<len; index++) {
index d6a152a52809cb308ea9a59cf6836bbefd23cc73..3aebbea789f34673a91e2b8f6aa624aafba434a6 100644 (file)
@@ -699,6 +699,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range)
                        seq->len = 0;
                }
                seq->strip->len = seq->len;
+               break;
        case SEQ_SOUND:
 #ifdef WITH_AUDASPACE
                if(!seq->sound)
index 036ba34d0c8e361f1941b58f24fa83d6ffffb8b9..493baebd1973273a9834c0e2af3524f60892863f 100644 (file)
@@ -1005,7 +1005,7 @@ void autotexname(Tex *tex)
 
 Tex *give_current_object_texture(Object *ob)
 {
-       Material *ma;
+       Material *ma, *node_ma;
        Tex *tex= NULL;
        
        if(ob==NULL) return NULL;
@@ -1015,6 +1015,10 @@ Tex *give_current_object_texture(Object *ob)
                tex= give_current_lamp_texture(ob->data);
        } else {
                ma= give_current_material(ob, ob->actcol);
+
+               if((node_ma=give_node_material(ma)))
+                       ma= node_ma;
+
                tex= give_current_material_texture(ma);
        }
        
@@ -1080,17 +1084,6 @@ Tex *give_current_material_texture(Material *ma)
                        tex= (Tex *)node->id;
                        ma= NULL;
                }
-               else {
-                       node= nodeGetActiveID(ma->nodetree, ID_MA);
-                       if(node) {
-                               ma= (Material*)node->id;
-                               if(ma) {
-                                       mtex= ma->mtex[(int)(ma->texact)];
-                                       if(mtex) tex= mtex->tex;
-                               }
-                       }
-               }
-               return tex;
        }
 
        if(ma) {
@@ -1165,11 +1158,6 @@ void set_current_material_texture(Material *ma, Tex *newtex)
                        id_us_plus(&newtex->id);
                        ma= NULL;
                }
-               else {
-                       node= nodeGetActiveID(ma->nodetree, ID_MA);
-                       if(node)
-                               ma= (Material*)node->id;
-               }
        }
        if(ma) {
                int act= (int)ma->texact;
@@ -1198,16 +1186,8 @@ int has_current_material_texture(Material *ma)
        if(ma && ma->use_nodes && ma->nodetree) {
                node= nodeGetActiveID(ma->nodetree, ID_TE);
 
-               if(node) {
+               if(node)
                        return 1;
-               }
-               else {
-                       node= nodeGetActiveID(ma->nodetree, ID_MA);
-                       if(node)
-                               ma= (Material*)node->id;
-                       else
-                               ma= NULL;
-               }
        }
 
        return (ma != NULL);
index 88816d78967e245419e5992624ed15cb393f5585..f5ec314c1c279feb336af6eeff7f4dee0b4c45dc 100644 (file)
 #  define UNUSED(x) UNUSED_ ## x
 #endif
 
+#ifdef __GNUC__
+#  define UNUSED_FUNCTION(x) __attribute__((__unused__)) UNUSED_ ## x
+#else
+#  define UNUSED_FUNCTION(x) UNUSED_ ## x
+#endif
+
 #ifdef __GNUC__
 #  define WARN_UNUSED  __attribute__((warn_unused_result))
 #else
index 432ba7c59cf342510ec23259a0d72d45dbe59fa2..dd685c606d2b4f8d8a9ddccadb9ca23129d00ee6 100644 (file)
@@ -128,8 +128,8 @@ int BLI_ghash_remove (GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFr
                        if (valfreefp) valfreefp(e->val);
                        BLI_mempool_free(gh->entrypool, e);
 
-
-                       e= n;
+                       /* correct but 'e' isnt used before return */
+                       /* e= n; */ /*UNUSED*/
                        if (p)
                                p->next = n;
                        else
index 3d6888d87dcd6bbb32f5ef76f2a176367e1c17ae..69b7fff36074f9534697f17b39b80f034a2fff51 100644 (file)
@@ -1000,7 +1000,7 @@ static short pose_propagate_get_refVal (Object *ob, FCurve *fcu, float *value)
        
        /* resolve the property... */
        if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
-               if (RNA_property_array_check(&ptr, prop)) {
+               if (RNA_property_array_check(prop)) {
                        /* array */
                        if (fcu->array_index < RNA_property_array_length(&ptr, prop)) {
                                found= TRUE;
index 8475090b468618eb2409bbcc6f03444bee0636b5..242210e01bbc86cf59d3d7db77bdc0ce9633be11 100644 (file)
@@ -213,7 +213,7 @@ struct uiBut {
 
        BIFIconID icon;
        char lock;
-       char dt;
+       char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied from the block */
        char changed; /* could be made into a single flag */
        unsigned char unit_type; /* so buttons can support unit systems which are not RNA */
        short modifier_key;
@@ -306,7 +306,8 @@ struct uiBlock {
        void *drawextra_arg2;
 
        int flag;
-       char direction, dt;
+       char direction;
+       char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied to buttons */
        short auto_open;
        double auto_open_last;
 
index df654cf364590ea0ebaf79b6ea13825dfefcc02d..4810b3fdf54627083969f426f35c3adca67f8014 100644 (file)
@@ -367,7 +367,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                unit= UI_UNIT_X*0.75;
                butw= unit;
                buth= unit;
-               
+
                if(ptr->type == &RNA_Armature) {
                        bArmature *arm= (bArmature *)ptr->data;
                        layer_used= arm->layer_used;
@@ -379,7 +379,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                        for(a=0; a<colbuts; a++) {
                                if(layer_used & (1<<(a+b*colbuts))) icon= ICON_LAYER_USED;
                                else icon= ICON_BLANK1;
-                                       
+
                                but= uiDefAutoButR(block, ptr, prop, a+b*colbuts, "", icon, x + butw*a, y+buth, butw, buth);
                                if(subtype == PROP_LAYER_MEMBER)
                                        uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+b*colbuts));
@@ -387,7 +387,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                        for(a=0; a<colbuts; a++) {
                                if(layer_used & (1<<(a+len/2+b*colbuts))) icon= ICON_LAYER_USED;
                                else icon= ICON_BLANK1;
-                               
+
                                but= uiDefAutoButR(block, ptr, prop, a+len/2+b*colbuts, "", icon, x + butw*a, y, butw, buth);
                                if(subtype == PROP_LAYER_MEMBER)
                                        uiButSetFunc(but, ui_layer_but_cb, but, SET_INT_IN_POINTER(a+len/2+b*colbuts));
@@ -422,35 +422,46 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
                uiDefButR_prop(block, BUT_NORMAL, 0, name, x, y, UI_UNIT_X*3, UI_UNIT_Y*3, ptr, prop, 0, 0, 0, -1, -1, NULL);
        }
        else {
-               if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) && !expand)
+               /* note, this block of code is a bit arbitrary and has just been made
+                * to work with common cases, but may need to be re-worked */
+
+               /* special case, boolean array in a menu, this could be used in a more generic way too */
+               if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) && !expand) {
                        uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, 0, 0, w, UI_UNIT_Y);
+               }
+               else {
+                       int *boolarr= NULL;
 
-               if(!ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) || expand) {
-                       /* layout for known array subtypes */
-                       char str[3];
+                       /* even if 'expand' is fale, expanding anyway */
 
-                       for(a=0; a<len; a++) {
-                               str[0]= RNA_property_array_item_char(prop, a);
+                       /* layout for known array subtypes */
+                       char str[3]= {'\0'};
 
-                               if(str[0]) {
-                                       if (icon_only) {
-                                               str[0] = '\0';
-                                       }
-                                       else if(type == PROP_BOOLEAN) {
-                                               str[1]= '\0';
-                                       }
-                                       else {
-                                               str[1]= ':';
-                                               str[2]= '\0';
-                                       }
+                       if(!icon_only) {
+                               if(type != PROP_BOOLEAN) {
+                                       str[1]= ':';
                                }
+                       }
+
+                       /* show checkboxes for rna on a non-emboss block (menu for eg) */
+                       if(type == PROP_BOOLEAN && ELEM(layout->root->block->dt, UI_EMBOSSN, UI_EMBOSSP)) {
+                               boolarr= MEM_callocN(sizeof(int)*len, "ui_item_array");
+                               RNA_property_boolean_get_array(ptr, prop, boolarr);
+                       }
 
+                       for(a=0; a<len; a++) {
+                               if(!icon_only) str[0]= RNA_property_array_item_char(prop, a);
+                               if(boolarr) icon= boolarr[a] ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
                                but= uiDefAutoButR(block, ptr, prop, a, str, icon, 0, 0, w, UI_UNIT_Y);
                                if(slider && but->type==NUM)
                                        but->type= NUMSLI;
                                if(toggle && but->type==OPTION)
                                        but->type= TOG;
                        }
+
+                       if(boolarr) {
+                               MEM_freeN(boolarr);
+                       }
                }
        }
 
@@ -951,13 +962,14 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
        uiBut *but;
        PropertyType type;
        char namestr[UI_MAX_NAME_STR];
-       int len, w, h, slider, toggle, expand, icon_only, no_bg;
+       int len, is_array, w, h, slider, toggle, expand, icon_only, no_bg;
 
        uiBlockSetCurLayout(block, layout);
 
        /* retrieve info */
        type= RNA_property_type(prop);
-       len= RNA_property_array_length(ptr, prop);
+       is_array= RNA_property_array_check(prop);
+       len= (is_array) ? RNA_property_array_length(ptr, prop) : 0;
 
        /* set name and icon */
        if(!name)
@@ -967,14 +979,16 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
        
        if(ELEM4(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_POINTER))
                name= ui_item_name_add_colon(name, namestr);
-       else if(type == PROP_BOOLEAN && len && index == RNA_NO_INDEX)
+       else if(type == PROP_BOOLEAN && is_array && index == RNA_NO_INDEX)
                name= ui_item_name_add_colon(name, namestr);
        else if(type == PROP_ENUM && index != RNA_ENUM_VALUE)
                name= ui_item_name_add_colon(name, namestr);
 
        if(layout->root->type == UI_LAYOUT_MENU) {
-               if(type == PROP_BOOLEAN)
-                       icon= (RNA_property_boolean_get(ptr, prop))? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
+               if(type == PROP_BOOLEAN && ((is_array == FALSE) || (index != RNA_NO_INDEX))) {
+                       if(is_array) icon= (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
+                       else         icon= (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT;
+               }
                else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) {
                        int enum_value= RNA_property_enum_get(ptr, prop);
                        if(RNA_property_flag(prop) & PROP_ENUM_FLAG) {
@@ -999,7 +1013,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
                uiBlockSetEmboss(block, UI_EMBOSSN);
        
        /* array property */
-       if(index == RNA_NO_INDEX && len > 0)
+       if(index == RNA_NO_INDEX && is_array)
                ui_item_array(layout, block, name, icon, ptr, prop, len, 0, 0, w, h, expand, slider, toggle, icon_only);
        /* enum item */
        else if(type == PROP_ENUM && index == RNA_ENUM_VALUE) {
index f7460e77030a8f026971acb6c1d4dfc0ef7d4263..8bce27e366b0a58e427c53f781f0efdd38a403f2 100644 (file)
@@ -1188,7 +1188,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
        uiBut *bt;
        uiSafetyRct *saferct;
        rctf butrct;
-       float aspect;
+       /*float aspect;*/ /*UNUSED*/
        int xsize, ysize, xof=0, yof=0, center;
        short dir1= 0, dir2=0;
        
@@ -1223,7 +1223,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
                }
        }
        
-       aspect= (float)(block->maxx - block->minx + 4);
+       /*aspect= (float)(block->maxx - block->minx + 4);*/ /*UNUSED*/
        ui_block_to_window_fl(butregion, but->block, &block->minx, &block->miny);
        ui_block_to_window_fl(butregion, but->block, &block->maxx, &block->maxy);
 
@@ -1232,7 +1232,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
        
        xsize= block->maxx - block->minx+4; // 4 for shadow
        ysize= block->maxy - block->miny+4;
-       aspect/= (float)xsize;
+       /*aspect/= (float)xsize;*/ /*UNUSED*/
 
        if(but) {
                int left=0, right=0, top=0, down=0;
index f660dbb9eddf250206ce6abe477642e8b0917532..a3f56192cb5ef55649a51eb2e83f31390af87f42 100644 (file)
@@ -143,7 +143,7 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Proper
 
                if(label_align != '\0') {
                        PropertyType type = RNA_property_type(prop);
-                       int is_boolean = (type == PROP_BOOLEAN && !RNA_property_array_check(ptr, prop));
+                       int is_boolean = (type == PROP_BOOLEAN && !RNA_property_array_check(prop));
 
                        name= RNA_property_ui_name(prop);
 
index 05677633f753cf0d70d4f2599c479aefff15fac2..7f1355af801a408f42724ac20f3d8510b80c3b44 100644 (file)
@@ -724,7 +724,7 @@ static void spot_interactive(Object *ob, int mode)
 }
 #endif
 
-static void special_editmenu(Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(special_editmenu)(Scene *scene, View3D *v3d)
 {
 // XXX static short numcuts= 2;
        Object *ob= OBACT;
@@ -1346,7 +1346,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
        DAG_ids_flush_update(bmain, 0);
 }
 
-static void copy_attr_menu(Main *bmain, Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v3d)
 {
        Object *ob;
        short event;
@@ -1619,7 +1619,7 @@ void OBJECT_OT_shade_smooth(wmOperatorType *ot)
 
 /* ********************** */
 
-static void image_aspect(Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(image_aspect)(Scene *scene, View3D *v3d)
 {
        /* all selected objects with an image map: scale in image aspect */
        Base *base;
@@ -1694,7 +1694,7 @@ static int vergbaseco(const void *a1, const void *a2)
 }
 
 
-static void auto_timeoffs(Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(auto_timeoffs)(Scene *scene, View3D *v3d)
 {
        Base *base, **basesort, **bs;
        float start, delta;
@@ -1735,7 +1735,7 @@ static void auto_timeoffs(Scene *scene, View3D *v3d)
 
 }
 
-static void ofs_timeoffs(Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(ofs_timeoffs)(Scene *scene, View3D *v3d)
 {
        float offset=0.0f;
 
@@ -1754,7 +1754,7 @@ static void ofs_timeoffs(Scene *scene, View3D *v3d)
 }
 
 
-static void rand_timeoffs(Scene *scene, View3D *v3d)
+static void UNUSED_FUNCTION(rand_timeoffs)(Scene *scene, View3D *v3d)
 {
        Base *base;
        float rand_ofs=0.0f;
index b6fb60ac4f729aef734462f9f53c045d1b246579..85e1eb016d70dd912e16da7e63da7d0951f302d9 100644 (file)
@@ -58,6 +58,7 @@
 
 #include "GPU_material.h"
 
+#include "ED_node.h"
 #include "ED_render.h"
 
 #include "render_intern.h"     // own include
@@ -115,6 +116,8 @@ static void texture_changed(Main *bmain, Tex *tex)
        Material *ma;
        Lamp *la;
        World *wo;
+       Scene *scene;
+       bNode *node;
 
        /* icons */
        BKE_icon_changed(BKE_icon_getid(&tex->id));
@@ -146,6 +149,16 @@ static void texture_changed(Main *bmain, Tex *tex)
 
                BKE_icon_changed(BKE_icon_getid(&wo->id));
        }
+
+       /* find compositing nodes */
+       for(scene=bmain->scene.first; scene; scene=scene->id.next) {
+               if(scene->use_nodes && scene->nodetree) {
+                       for(node=scene->nodetree->nodes.first; node; node=node->next) {
+                               if(node->id == &tex->id)
+                                       ED_node_changed_update(&scene->id, node);
+                       }
+               }
+       }
 }
 
 static void lamp_changed(Main *bmain, Lamp *la)
index d4253495e976e2e000e2296c3ec6835787758efa..4dd97c63d40942eb1caf9096136dde72a583877f 100644 (file)
@@ -1159,6 +1159,13 @@ int file_filename_exec(bContext *C, wmOperator *UNUSED(unused))
        return OPERATOR_FINISHED;
 }
 
+/* TODO, directory operator is non-functional while a library is loaded
+ * until this is properly supported just disable it. */
+static int file_directory_poll(bContext *C)
+{
+       return ED_operator_file_active(C) && filelist_lib(CTX_wm_space_file(C)->files) == NULL;
+}
+
 void FILE_OT_directory(struct wmOperatorType *ot)
 {
        /* identifiers */
@@ -1169,7 +1176,7 @@ void FILE_OT_directory(struct wmOperatorType *ot)
        /* api callbacks */
        ot->invoke= file_directory_invoke;
        ot->exec= file_directory_exec;
-       ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
+       ot->poll= file_directory_poll; /* <- important, handler is on window level */
 }
 
 void FILE_OT_refresh(struct wmOperatorType *ot)
index 6736230e84fc28568112a1f9b864be312bb0b67c..d8be312cf398958d3c51fc8cce6e9a3af37a6201 100644 (file)
@@ -602,28 +602,6 @@ short filelist_changed(struct FileList* filelist)
        return filelist->changed;
 }
 
-static struct ImBuf * filelist_loadimage(struct FileList* filelist, int index)
-{
-       ImBuf *imb = NULL;
-       int fidx = 0;
-       
-       if ( (index < 0) || (index >= filelist->numfiltered) ) {
-               return NULL;
-       }
-       fidx = filelist->fidx[index];
-       imb = filelist->filelist[fidx].image;
-       if (!imb)
-       {
-               if ( (filelist->filelist[fidx].flags & IMAGEFILE) || (filelist->filelist[fidx].flags & MOVIEFILE) ) {
-                       imb = IMB_thumb_read(filelist->filelist[fidx].path, THB_NORMAL);
-               } 
-               if (imb) {
-                       filelist->filelist[fidx].image = imb;
-               } 
-       }
-       return imb;
-}
-
 struct ImBuf * filelist_getimage(struct FileList* filelist, int index)
 {
        ImBuf* ibuf = NULL;
index 77c91b28a634215718df8bed19cd293598b453d1..af99087b0b89393ba6c059b764aabc9d097dc39d 100644 (file)
@@ -951,7 +951,7 @@ static int nlaedit_bake_exec (bContext *C, wmOperator *UNUSED(op))
        return OPERATOR_FINISHED;
 }
 
-static void NLA_OT_bake (wmOperatorType *ot)
+void NLA_OT_bake (wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Bake Strips";
index 984e944321e7b3b22f88e93dc2862b82c5538cbf..e8fc13e340ee094be99872d4502ccdb58d1b8533 100644 (file)
@@ -1641,7 +1641,7 @@ void NODE_OT_link_viewer(wmOperatorType *ot)
 
 
 /* return 0, nothing done */
-static int node_mouse_groupheader(SpaceNode *snode)
+static int UNUSED_FUNCTION(node_mouse_groupheader)(SpaceNode *snode)
 {
        bNode *gnode;
        float mx=0, my=0;
index c571fa1de6c518c772447b3aeef8f256e8a32a39..620a936a944d6f558b84a7e470103aae1040a0f2 100644 (file)
@@ -660,8 +660,8 @@ int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, TreeElement
 {
 
        switch(te->idcode) {
-               case ID_OB:
-                       return tree_element_set_active_object(C, scene, soops, te, set);
+               /* Note: no ID_OB: objects are handled specially to allow multiple
+                  selection. See do_outliner_item_activate. */
                case ID_MA:
                        return tree_element_active_material(C, scene, soops, te, set);
                case ID_WO:
index 98687bb90e01c67bc69635f43b7065fb0161311d..dc84289a8de17f6ab7c0a473dc5b752fe34e0f9f 100644 (file)
@@ -702,7 +702,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
 
 static Sequence *special_seq_update= 0;
 
-static void set_special_seq_update(int val)
+static void UNUSED_FUNCTION(set_special_seq_update)(int val)
 {
 //     int x;
 
index 447426aed13f1e5665793de51ef86fe5ce5c3848..5429f0ee98fd3b68da5b82ed27b6e8fb981624ed 100644 (file)
 /* own include */
 #include "sequencer_intern.h"
 
-static void error(const char *UNUSED(dummy)) {}
-static void waitcursor(int UNUSED(val)) {}
-static void activate_fileselect(int UNUSED(d1), const char *UNUSED(d2), const char *UNUSED(d3), void *UNUSED(d4)) {}
-static int pupmenu(const char *UNUSED(dummy)) {return 0;}
 static int okee(const char *UNUSED(dummy)) {return 0;}
 
 
@@ -139,7 +135,7 @@ void seq_rectf(Sequence *seq, rctf *rectf)
        rectf->ymax= seq->machine+SEQ_STRIP_OFSTOP;
 }
 
-static void change_plugin_seq(Scene *scene, char *str) /* called from fileselect */
+static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* called from fileselect */
 {
        Editing *ed= seq_give_editing(scene, FALSE);
        struct SeqEffectHandle sh;
@@ -762,7 +758,7 @@ static int insert_gap(Scene *scene, int gap, int cfra)
        return done;
 }
 
-static void touch_seq_files(Scene *scene)
+static void UNUSED_FUNCTION(touch_seq_files)(Scene *scene)
 {
        Sequence *seq;
        Editing *ed= seq_give_editing(scene, FALSE);
@@ -774,7 +770,7 @@ static void touch_seq_files(Scene *scene)
 
        if(okee("Touch and print selected movies")==0) return;
 
-       waitcursor(1);
+       WM_cursor_wait(1);
 
        SEQP_BEGIN(ed, seq) {
                if(seq->flag & SELECT) {
@@ -789,7 +785,7 @@ static void touch_seq_files(Scene *scene)
        }
        SEQ_END
 
-       waitcursor(0);
+       WM_cursor_wait(0);
 }
 
 /*
@@ -817,7 +813,7 @@ static void set_filter_seq(Scene *scene)
 }
 */
 
-static void seq_remap_paths(Scene *scene)
+static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene)
 {
        Sequence *seq, *last_seq = seq_active_get(scene);
        Editing *ed= seq_give_editing(scene, FALSE);
@@ -858,7 +854,7 @@ static void seq_remap_paths(Scene *scene)
 }
 
 
-static void no_gaps(Scene *scene)
+static void UNUSED_FUNCTION(no_gaps)(Scene *scene)
 {
        Editing *ed= seq_give_editing(scene, FALSE);
        int cfra, first= 0, done;
@@ -2870,12 +2866,15 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
        else {
                /* lame, set rna filepath */
                PointerRNA seq_ptr;
+               PropertyRNA *prop;
                char filepath[FILE_MAX];
 
                RNA_pointer_create(&scene->id, &RNA_Sequence, seq, &seq_ptr);
 
                RNA_string_get(op->ptr, "filepath", filepath);
-               RNA_string_set(&seq_ptr, "filepath", filepath);
+               prop= RNA_struct_find_property(&seq_ptr, "filepath");
+               RNA_property_string_set(&seq_ptr, prop, filepath);
+               RNA_property_update(C, &seq_ptr, prop);
        }
 
        WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
index 8d5f372f55e8b81c062d6630b8f62e03f27335c9..0ac23765167a2cc4e3df688c80ea93cfa3b57531 100644 (file)
@@ -159,7 +159,7 @@ void select_surround_from_last(Scene *scene)
 #endif
 
 
-static void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */
+static void UNUSED_FUNCTION(select_single_seq)(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */
 {
        Editing *ed= seq_give_editing(scene, FALSE);
        
index 6e6f131655baab9e5f092c2d76701e1d51cd25d4..51b4b8381715fb1fe1033673ccc288f5b347d453 100644 (file)
@@ -43,6 +43,7 @@
 #include "BKE_text.h"
 
 #include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
 
 #include "WM_types.h"
 
@@ -192,7 +193,7 @@ static void confirm_suggestion(Text *text, int skipleft)
 // XXX
 static int doc_scroll= 0;
 
-static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val)
+static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned short evnt, short val)
 {
        ARegion *ar= NULL; // XXX
        int qual= 0; // XXX
@@ -375,7 +376,7 @@ static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short
                ; // XXX redraw_alltext();
 #endif
 
-static short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val)
+static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned short evnt, short val)
 {
        Text *text;
        TextMarker *marker, *mrk, *nxt;
index 919b0eb0c29e736b20f044988ed91277523d7551..8b0104fcdca56994ab5f99a824e554bac6020948 100644 (file)
@@ -355,7 +355,7 @@ struct anim * IMB_open_anim( const char * name, int ib_flags) {
 
        anim = (struct anim*)MEM_callocN(sizeof(struct anim), "anim struct");
        if (anim != NULL) {
-               strcpy(anim->name, name);  /* fixme: possible buffer overflow here? */
+               BLI_strncpy(anim->name, name, sizeof(anim->name));
                anim->ib_flags = ib_flags;
        }
        return(anim);
index 1644e653df4aa87826999835ee81f3974d25f4cf..3f391b91c0fd47f40b8a0414752881f1430c3afb 100644 (file)
@@ -371,11 +371,15 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter)
        float weight[25];
 
        /* build a weights buffer */
-       n= 2;
-       k= 0;
+       n= 1;
+       /*k= 0;
        for(i = -n; i <= n; i++)
                for(j = -n; j <= n; j++)
                        weight[k++] = sqrt((float) i * i + j * j);
+                       */
+       weight[0]=1; weight[1]=2; weight[2]=1;
+       weight[3]=2; weight[4]=0; weight[5]=2;
+       weight[6]=1; weight[7]=2; weight[8]=1;
 
        /* run passes */
        for(r = 0; cannot_early_out == 1 && r < filter; r++) {
@@ -393,10 +397,10 @@ void IMB_filter_extend(struct ImBuf *ibuf, char *mask, int filter)
                                        float acc[4]={0,0,0,0};
                                        k = 0;
 
-                                       if (check_pixel_assigned(srcbuf, srcmask, filter_make_index(x-1, y, width, height), depth, is_float) ||
+                                       /*if (check_pixel_assigned(srcbuf, srcmask, filter_make_index(x-1, y, width, height), depth, is_float) ||
                                                check_pixel_assigned(srcbuf, srcmask, filter_make_index(x+1, y, width, height), depth, is_float) ||
                                                check_pixel_assigned(srcbuf, srcmask, filter_make_index(x, y-1, width, height), depth, is_float) ||
-                                               check_pixel_assigned(srcbuf, srcmask, filter_make_index(x, y+1, width, height), depth, is_float)) {
+                                               check_pixel_assigned(srcbuf, srcmask, filter_make_index(x, y+1, width, height), depth, is_float))*/ {
                                                for(i= -n; i<=n; i++) {
                                                        for(j=-n; j<=n; j++) {
                                                                if(i != 0 || j != 0) {
index 0033a1ff437d0d4a89ac0036837aef4fb86474ce..81deb0c279627be7140c98346587367fd217ce50 100644 (file)
@@ -654,7 +654,7 @@ int RNA_property_flag(PropertyRNA *prop);
 void *RNA_property_py_data_get(PropertyRNA *prop);
 
 int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop);
-int RNA_property_array_check(PointerRNA *ptr, PropertyRNA *prop);
+int RNA_property_array_check(PropertyRNA *prop);
 int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dimension);
 int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[]);
 char RNA_property_array_item_char(PropertyRNA *prop, int index);
index ec213d6a496cbbe13b5e975a662d5ba5a5f96f28..f8199074f27bac48e9b4fcfb02faaa4e837311fe 100644 (file)
@@ -281,7 +281,7 @@ typedef struct ParameterList {
 
 typedef struct ParameterIterator {
        struct ParameterList *parms;
-       PointerRNA funcptr;
+       /* PointerRNA funcptr; */ /*UNUSED*/
        void *data;
        int size, offset;
 
index f1056c86a4cb1d0c9380bccdb1a5b3f405497611..88447f6dd770b3b1dcd9bc8bc15b6a2abba56f03 100644 (file)
@@ -288,7 +288,7 @@ static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
        }
 }
 
-static int rna_ensure_property_array_check(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
+static int rna_ensure_property_array_check(PropertyRNA *prop)
 {
        if(prop->magic == RNA_MAGIC) {
                return (prop->getlength || prop->totarraylength) ? 1:0;
@@ -765,9 +765,9 @@ int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
        return rna_ensure_property_array_length(ptr, prop);
 }
 
-int RNA_property_array_check(PointerRNA *ptr, PropertyRNA *prop)
+int RNA_property_array_check(PropertyRNA *prop)
 {
-       return rna_ensure_property_array_check(ptr, prop);
+       return rna_ensure_property_array_check(prop);
 }
 
 /* used by BPY to make an array from the python object */
@@ -1399,6 +1399,7 @@ int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) == 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr)))
                return IDP_Int(idprop);
@@ -1414,6 +1415,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) == 0);
 
        /* just incase other values are passed */
        if(value) value= 1;
@@ -1440,6 +1442,7 @@ void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *val
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
                if(prop->arraydimension == 0)
@@ -1463,6 +1466,7 @@ int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_boolean_get_array(ptr, prop, tmp);
@@ -1486,6 +1490,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
                if(prop->arraydimension == 0)
@@ -1519,6 +1524,7 @@ void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int inde
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_boolean_get_array(ptr, prop, tmp);
@@ -1541,6 +1547,7 @@ int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
        BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) == 0);
 
        return bprop->defaultvalue;
 }
@@ -1550,6 +1557,7 @@ void RNA_property_boolean_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA
        BooleanPropertyRNA *bprop= (BooleanPropertyRNA*)prop;
        
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(prop->arraydimension == 0)
                values[0]= bprop->defaultvalue;
@@ -1565,6 +1573,7 @@ int RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_boolean_get_default_array(ptr, prop, tmp);
@@ -1588,6 +1597,7 @@ int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
+       BLI_assert(RNA_property_array_check(prop) == 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr)))
                return IDP_Int(idprop);
@@ -1603,6 +1613,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
+       BLI_assert(RNA_property_array_check(prop) == 0);
        /* useful to check on bad values but set function should clamp */
        /* BLI_assert(RNA_property_int_clamp(ptr, prop, &value) == 0); */
 
@@ -1628,6 +1639,7 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
                if(prop->arraydimension == 0)
@@ -1688,6 +1700,7 @@ int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_int_get_array(ptr, prop, tmp);
@@ -1711,6 +1724,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
                if(prop->arraydimension == 0)
@@ -1744,6 +1758,7 @@ void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, i
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_int_get_array(ptr, prop, tmp);
@@ -1772,6 +1787,7 @@ void RNA_property_int_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *pr
        IntPropertyRNA *iprop= (IntPropertyRNA*)prop;
        
        BLI_assert(RNA_property_type(prop) == PROP_INT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(prop->arraydimension == 0)
                values[0]= iprop->defaultvalue;
@@ -1808,6 +1824,7 @@ float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) == 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
                if(idprop->type == IDP_FLOAT)
@@ -1827,6 +1844,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) == 0);
        /* useful to check on bad values but set function should clamp */
        /* BLI_assert(RNA_property_float_clamp(ptr, prop, &value) == 0); */
 
@@ -1858,6 +1876,7 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
        int i;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
                if(prop->arraydimension == 0)
@@ -1923,6 +1942,7 @@ float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_float_get_array(ptr, prop, tmp);
@@ -1948,6 +1968,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
        int i;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if((idprop=rna_idproperty_check(&prop, ptr))) {
                if(prop->arraydimension == 0) {
@@ -1991,6 +2012,7 @@ void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index,
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_float_get_array(ptr, prop, tmp);
@@ -2013,6 +2035,7 @@ float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
        FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) == 0);
 
        return fprop->defaultvalue;
 }
@@ -2022,6 +2045,7 @@ void RNA_property_float_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *
        FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
        
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(prop->arraydimension == 0)
                values[0]= fprop->defaultvalue;
@@ -2037,6 +2061,7 @@ float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
        int len= rna_ensure_property_array_length(ptr, prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
+       BLI_assert(RNA_property_array_check(prop) != 0);
 
        if(len <= RNA_MAX_ARRAY_LENGTH) {
                RNA_property_float_get_default_array(ptr, prop, tmp);
@@ -4484,7 +4509,8 @@ int  RNA_parameter_list_ret_count(ParameterList *parms)
 
 void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter)
 {
-       RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr);
+       /* may be useful but unused now */
+       /* RNA_pointer_create(NULL, &RNA_Function, parms->func, &iter->funcptr); */ /*UNUSED*/
 
        iter->parms= parms;
        iter->parm= parms->func->cont.properties.first;
index 04399505781585b13efde8988912766aeaf40973..ddf06c79d6b254437f388bef1d0ab329afa853f3 100644 (file)
@@ -2026,7 +2026,14 @@ static void rna_def_object(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Input Matrix", "Matrix access to location, rotation and scale (including deltas), before constraints and parenting are applied.");
        RNA_def_property_float_funcs(prop, "rna_Object_matrix_basis_get", "rna_Object_matrix_basis_set", NULL);
        RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
-       
+
+       /*parent_inverse*/
+       prop= RNA_def_property(srna, "matrix_parent_inverse", PROP_FLOAT, PROP_MATRIX);
+       RNA_def_property_float_sdna(prop, NULL, "parentinv");
+       RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
+       RNA_def_property_ui_text(prop, "Matrix", "Inverse of object's parent matrix at time of parenting");
+       RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
+
        /* collections */
        prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "Constraint");
index 307cf0e175add145871a4bbf490ec584328f7f9b..93adf808f8318102fd8b175792aedce4f3191a12 100644 (file)
@@ -1746,6 +1746,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", KMI_INACTIVE);
        RNA_def_property_ui_text(prop, "Active", "Activate or deactivate item");
        RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1);
+       RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
 
        prop= RNA_def_property(srna, "is_user_modified", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", KMI_USER_MODIFIED);
index 4447a0476f4f87c8dec518f8eae67fc8d20bd69c..ba8145c27737a989fb1a66b55f0b85d62a700e70 100644 (file)
@@ -856,7 +856,7 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self)
                if(type==PROP_COLLECTION) {
                        len= pyrna_prop_collection_length(self);
                }
-               else if (RNA_property_array_check(&self->ptr, self->prop)) {
+               else if (RNA_property_array_check(self->prop)) {
                        len= pyrna_prop_array_length((BPy_PropertyArrayRNA *)self);
                }
 
@@ -1224,7 +1224,7 @@ PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop)
        PyObject *ret;
        int type= RNA_property_type(prop);
 
-       if (RNA_property_array_check(ptr, prop)) {
+       if (RNA_property_array_check(prop)) {
                return pyrna_py_from_array(ptr, prop);
        }
 
@@ -1369,7 +1369,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
        int type= RNA_property_type(prop);
 
 
-       if (RNA_property_array_check(ptr, prop)) {
+       if (RNA_property_array_check(prop)) {
                /* done getting the length */
                if(pyrna_py_to_array(ptr, prop, data, value, error_prefix) == -1) {
                        return -1;
@@ -4088,7 +4088,7 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat
        int type= RNA_property_type(prop);
        int flag= RNA_property_flag(prop);
 
-       if(RNA_property_array_check(ptr, prop)) {
+       if(RNA_property_array_check(prop)) {
                int a, len;
 
                if (flag & PROP_DYNAMIC) {
@@ -5519,7 +5519,7 @@ PyObject *pyrna_prop_CreatePyObject(PointerRNA *ptr, PropertyRNA *prop)
 {
        BPy_PropertyRNA *pyrna;
 
-       if (RNA_property_array_check(ptr, prop) == 0) {
+       if (RNA_property_array_check(prop) == 0) {
                PyTypeObject *type;
 
                if (RNA_property_type(prop) != PROP_COLLECTION) {
index 30d83e196ba1858fc752ed9b8be98297c4ab7db0..8bde1db96ca12bbf2174c03bb09abff905688de1 100644 (file)
@@ -107,7 +107,7 @@ static int pyrna_struct_anim_args_parse(PointerRNA *ptr, const char *error_prefi
                return -1;
        }
 
-       if(RNA_property_array_check(&r_ptr, prop) == 0) {
+       if(RNA_property_array_check(prop) == 0) {
                if((*index) == -1) {
                        *index= 0;
                }
index 34d3adcf15bbedb471e3e5274dbe5a449c2c68b7..d62f411a7c5062f04e66d93592ee2eabc9e87813 100644 (file)
@@ -1679,7 +1679,7 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int
 
 /* not used, test function for ambient occlusion (yaf: pathlight) */
 /* main problem; has to be called within shading loop, giving unwanted recursion */
-static int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr)
+static int UNUSED_FUNCTION(ray_trace_shadow_rad)(ShadeInput *ship, ShadeResult *shr)
 {
        static int counter=0, only_one= 0;
        extern float hashvectf[];
index 20f9d2237c2d9e0905c6f89ba077cdf286467557..6b3a574b6b69b1d5a981392413bdeeb0cb1c479e 100644 (file)
@@ -450,7 +450,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
 /* called on startup,  (context entirely filled with NULLs) */
 /* or called for 'New File' */
 /* op can be NULL */
-int WM_read_homefile(bContext *C, ReportList *reports, short from_memory)
+int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory)
 {
        ListBase wmbase;
        char tstr[FILE_MAXDIR+FILE_MAXFILE];
@@ -466,7 +466,6 @@ int WM_read_homefile(bContext *C, ReportList *reports, short from_memory)
                } else {
                        tstr[0] = '\0';
                        from_memory = 1;
-                       BKE_report(reports, RPT_INFO, "Config directory with "STRINGIFY(BLENDER_STARTUP_FILE)" file not found.");
                }
        }
        
index 2dfe4d8ccdc57d9ace36a507bd85b3ec6f3d083e..6887aa4c7173e67cc0c56aa4cc5a8175422a0b83 100644 (file)
@@ -106,6 +106,9 @@ static int wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b)
             (a->ptr && b->ptr && IDP_EqualsProperties(a->ptr->data, b->ptr->data))))
                return 0;
        
+       if((a->flag & KMI_INACTIVE) != (b->flag & KMI_INACTIVE))
+               return 0;
+       
        return (a->propvalue == b->propvalue);
 }
 
index 105b2e8189ac405058b310c267e8a570bb18cc6d..1beb5b3dda3f0ae9121fb5a50684ed7106a60cce 100644 (file)
@@ -2010,8 +2010,6 @@ static void WM_OT_save_mainfile(wmOperatorType *ot)
 
 static int wm_collada_export_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {      
-       int selected = 0;
-
        if(!RNA_property_is_set(op->ptr, "filepath")) {
                char filepath[FILE_MAX];
                BLI_strncpy(filepath, G.main->name, sizeof(filepath));