forked from bartvdbraak/blender
svn merge -r39384:39433 https://svn.blender.org/svnroot/bf-blender/trunk/blender
This commit is contained in:
commit
74ca6070b4
@ -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:
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
from bpy.types import Menu, Operator
|
||||
from bpy.types import Menu, Operator, OperatorProperties
|
||||
import os
|
||||
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
@ -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
|
||||
|
@ -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++) {
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -184,6 +184,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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, 0, 0, w, UI_UNIT_Y);
|
||||
/* 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;
|
||||
|
||||
/* even if 'expand' is fale, expanding anyway */
|
||||
|
||||
if(!ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) || expand) {
|
||||
/* layout for known array subtypes */
|
||||
char str[3];
|
||||
char str[3]= {'\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++) {
|
||||
str[0]= RNA_property_array_item_char(prop, a);
|
||||
|
||||
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) 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) {
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
||||
|
@ -75,10 +75,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;}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -281,7 +281,7 @@ typedef struct ParameterList {
|
||||
|
||||
typedef struct ParameterIterator {
|
||||
struct ParameterList *parms;
|
||||
PointerRNA funcptr;
|
||||
/* PointerRNA funcptr; */ /*UNUSED*/
|
||||
void *data;
|
||||
int size, offset;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user