Merging r39397 through r39434 from trunk into soc-2011-tomato

This commit is contained in:
Sergey Sharybin 2011-08-16 07:56:44 +00:00
commit 215da938ff
32 changed files with 122 additions and 133 deletions

@ -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;
}

@ -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

@ -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:

@ -302,6 +302,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) {
@ -321,14 +322,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");
}
}
}

@ -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

@ -714,6 +714,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)

@ -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);

@ -183,6 +183,12 @@
# 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

@ -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

@ -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;

@ -1697,7 +1697,7 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
/* ctrl+c in mesh editmode */
static void mesh_copy_menu(EditMesh *em, wmOperator *op)
static void UNUSED_FUNCTION(mesh_copy_menu)(EditMesh *em, wmOperator *op)
{
EditSelection *ese;
int ret;

@ -3895,7 +3895,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot)
/* XXX old bevel not ported yet */
static void bevel_menu(EditMesh *em)
static void UNUSED_FUNCTION(bevel_menu)(EditMesh *em)
{
BME_Mesh *bm;
BME_TransData_Head *td;

@ -721,7 +721,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;
@ -1343,7 +1343,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;
@ -1616,7 +1616,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;
@ -1691,7 +1691,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;
@ -1732,7 +1732,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;
@ -1751,7 +1751,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;

@ -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)

@ -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)

@ -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;

@ -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";

@ -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;

@ -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;

@ -76,10 +76,6 @@
/* 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;}
@ -245,7 +241,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;
@ -868,7 +864,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);
@ -880,7 +876,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) {
@ -895,7 +891,7 @@ static void touch_seq_files(Scene *scene)
}
SEQ_END
waitcursor(0);
WM_cursor_wait(0);
}
/*
@ -923,7 +919,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);
@ -964,7 +960,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;
@ -3008,12 +3004,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);

@ -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);

@ -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;

@ -350,7 +350,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);

@ -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) {

@ -281,7 +281,7 @@ typedef struct ParameterList {
typedef struct ParameterIterator {
struct ParameterList *parms;
PointerRNA funcptr;
/* PointerRNA funcptr; */ /*UNUSED*/
void *data;
int size, offset;

@ -4509,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;

@ -2025,7 +2025,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");

@ -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);

@ -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[];

@ -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.");
}
}

@ -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);
}

@ -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));