diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-19 14:39:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-19 14:39:40 +0400 |
commit | 737648a0bf6aa38707adf0d444902cab981f86cf (patch) | |
tree | 9911809833f690eec95ef9e259729d29160d7a02 /source/blender/makesrna | |
parent | 5d15d8d2eebc98d7122e811dae2979b9a6c38b9d (diff) | |
parent | 90ef435145416313596cafa6f8c4c6c6aebe4e44 (diff) |
Merging r42648 through r42722 from trunk into soc-2011-tomato
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 10 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 18 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 17 |
5 files changed, 20 insertions, 34 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index c588dc9c8ac..c15758eed1f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -64,9 +64,13 @@ EnumPropertyItem nodetree_type_items[] = { EnumPropertyItem node_socket_type_items[] = { - {SOCK_FLOAT, "VALUE", 0, "Value", ""}, - {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, - {SOCK_RGBA, "RGBA", 0, "RGBA", ""}, + {SOCK_FLOAT, "VALUE", 0, "Value", ""}, + {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, + {SOCK_RGBA, "RGBA", 0, "RGBA", ""}, + {SOCK_SHADER, "SHADER", 0, "Shader", ""}, + {SOCK_BOOLEAN, "BOOLEAN", 0, "Boolean", ""}, + {SOCK_MESH, "MESH", 0, "Mesh", ""}, + {SOCK_INT, "INT", 0, "Int", ""}, {0, NULL, 0, NULL, NULL}}; EnumPropertyItem node_math_items[] = { diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h index d8fabad824e..19082ea4689 100644 --- a/source/blender/makesrna/intern/rna_nodetree_types.h +++ b/source/blender/makesrna/intern/rna_nodetree_types.h @@ -40,6 +40,7 @@ DefNode( ShaderNode, SH_NODE_VALTORGB, def_colorramp, "VALTO DefNode( ShaderNode, SH_NODE_RGBTOBW, 0, "RGBTOBW", RGBToBW, "RGB to BW", "" ) DefNode( ShaderNode, SH_NODE_TEXTURE, def_texture, "TEXTURE", Texture, "Texture", "" ) DefNode( ShaderNode, SH_NODE_NORMAL, 0, "NORMAL", Normal, "Normal", "" ) +DefNode( ShaderNode, SH_NODE_GAMMA, 0, "GAMMA", Gamma, "Gamma", "" ) DefNode( ShaderNode, SH_NODE_GEOMETRY, def_sh_geometry, "GEOMETRY", Geometry, "Geometry", "" ) DefNode( ShaderNode, SH_NODE_MAPPING, def_sh_mapping, "MAPPING", Mapping, "Mapping", "" ) DefNode( ShaderNode, SH_NODE_CURVE_VEC, def_vector_curve, "CURVE_VEC", VectorCurve, "Vector Curve", "" ) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index f920cfb5aec..f9bb0b36a3f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -174,7 +174,7 @@ static void rna_Object_matrix_local_get(PointerRNA *ptr, float values[16]) if(ob->parent) { float invmat[4][4]; /* for inverse of parent's matrix */ invert_m4_m4(invmat, ob->parent->obmat); - mul_m4_m4m4((float(*)[4])values, ob->obmat, invmat); + mult_m4_m4m4((float(*)[4])values, invmat, ob->obmat); } else { copy_m4_m4((float(*)[4])values, ob->obmat); @@ -191,7 +191,7 @@ static void rna_Object_matrix_local_set(PointerRNA *ptr, const float values[16]) if(ob->parent) { float invmat[4][4]; invert_m4_m4(invmat, ob->parentinv); - mul_m4_m4m4(ob->obmat, (float(*)[4])values, invmat); + mult_m4_m4m4(ob->obmat, invmat, (float(*)[4])values); } else { copy_m4_m4(ob->obmat, (float(*)[4])values); @@ -809,11 +809,11 @@ static void rna_MaterialSlot_link_set(PointerRNA *ptr, int value) if(value) { ob->matbits[index]= 1; - ob->colbits |= (1<<index); + /* ob->colbits |= (1<<index); */ /* DEPRECATED */ } else { ob->matbits[index]= 0; - ob->colbits &= ~(1<<index); + /* ob->colbits &= ~(1<<index); */ /* DEPRECATED */ } } diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index e06bc206807..877da130357 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -191,13 +191,12 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ if( tmpcu->mat ) { for( i = tmpcu->totcol; i-- > 0; ) { /* are we an object material or data based? */ - if (ob->colbits & 1<<i) - tmpmesh->mat[i] = ob->mat[i]; - else - tmpmesh->mat[i] = tmpcu->mat[i]; - if (tmpmesh->mat[i]) + tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : tmpcu->mat[i]; + + if (tmpmesh->mat[i]) { tmpmesh->mat[i]->id.us++; + } } } break; @@ -230,12 +229,11 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ if( origmesh->mat ) { for( i = origmesh->totcol; i-- > 0; ) { /* are we an object material or data based? */ - if (ob->colbits & 1<<i) - tmpmesh->mat[i] = ob->mat[i]; - else - tmpmesh->mat[i] = origmesh->mat[i]; - if (tmpmesh->mat[i]) + tmpmesh->mat[i] = ob->matbits[i] ? ob->mat[i] : origmesh->mat[i]; + + if (tmpmesh->mat[i]) { tmpmesh->mat[i]->id.us++; + } } } } diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index f0a008b4939..a7f45d867dd 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2000,23 +2000,6 @@ static void rna_def_space_sequencer(BlenderRNA *brna) RNA_def_property_enum_items(prop, proxy_render_size_items); RNA_def_property_ui_text(prop, "Proxy render size", "Draw preview using full resolution or different proxy resolutions"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); - - - /* not sure we need rna access to these but adding anyway */ - prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "xof"); - RNA_def_property_ui_text(prop, "X Offset", "Offset image horizontally from the view center"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); - - prop= RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "yof"); - RNA_def_property_ui_text(prop, "Y Offset", "Offset image vertically from the view center"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); - - prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "zoom"); - RNA_def_property_ui_text(prop, "Zoom", "Display zoom level"); - RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL); } static void rna_def_space_text(BlenderRNA *brna) |