Revision: 32731
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32731
Author:   lukastoenne
Date:     2010-10-27 10:53:40 +0200 (Wed, 27 Oct 2010)

Log Message:
-----------
Disabled type adaptation for property sockets. Dynamic property sockets are 
initially added with SOCK_ANY type, which by default makes them adaptable 
(could use a more general overhaul).

Modified Paths:
--------------
    
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_get_data.c
    
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_set_data.c

Modified: 
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_get_data.c
===================================================================
--- 
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_get_data.c
 2010-10-27 08:48:10 UTC (rev 32730)
+++ 
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_get_data.c
 2010-10-27 08:53:40 UTC (rev 32731)
@@ -131,7 +131,7 @@
        if (prop) {
                sock = nodeAddOutputSocket(node, RNA_property_ui_name(prop), 
sim_rna_socket_type(prop), defaults, min, max);
                /* disable context adaptation (context is set explicitly) */
-               sock->flag &= ~SOCK_ADAPT_CONTEXT;
+               sock->flag &= ~SOCK_ADAPT_CONTEXT & ~SOCK_ADAPT_TYPE;
                /* associate with the property */
                sockdata = (SimDataNodeSocket*)sock->storage;
                sockdata->type = SIM_DATA_RNA;
@@ -140,7 +140,7 @@
        else if (data->type && RNA_struct_is_ID(data->type)) {
                sock = nodeAddOutputSocket(node, identifier, SOCK_ANY, 
defaults, min, max);
                /* disable context adaptation (context is set explicitly) */
-               sock->flag &= ~SOCK_ADAPT_CONTEXT;
+               sock->flag &= ~SOCK_ADAPT_CONTEXT & ~SOCK_ADAPT_TYPE;
                /* associate with the property */
                sockdata = (SimDataNodeSocket*)sock->storage;
                sockdata->type = SIM_DATA_IDPROP;
@@ -149,7 +149,7 @@
        else if (data->type && RNA_struct_is_a(data->type, &RNA_NParticle)) {
                sock = nodeAddOutputSocket(node, identifier, SOCK_ANY, 
defaults, min, max);
                /* disable context adaptation (context is set explicitly) */
-               sock->flag &= ~SOCK_ADAPT_CONTEXT;
+               sock->flag &= ~SOCK_ADAPT_CONTEXT & ~SOCK_ADAPT_TYPE;
                /* associate with the property */
                sockdata = (SimDataNodeSocket*)sock->storage;
                sockdata->type = SIM_DATA_PARPROP;

Modified: 
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_set_data.c
===================================================================
--- 
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_set_data.c
 2010-10-27 08:48:10 UTC (rev 32730)
+++ 
branches/particles-2010/source/blender/nodes/intern/simulation/nodes/SIM_set_data.c
 2010-10-27 08:53:40 UTC (rev 32731)
@@ -127,7 +127,7 @@
                sock = nodeAddInputSocket(node, RNA_property_ui_name(prop), 
sim_rna_socket_type(prop), defaults, min, max);
                sim_rna_socket_set_defaults(prop, sock);
                /* disable context adaptation (context is set explicitly) */
-               sock->flag &= ~SOCK_ADAPT_CONTEXT;
+               sock->flag &= ~SOCK_ADAPT_CONTEXT & ~SOCK_ADAPT_TYPE;
                /* associate with the property */
                sockdata = (SimDataNodeSocket*)sock->storage;
                sockdata->type = SIM_DATA_RNA;
@@ -136,7 +136,7 @@
        else if (data->type && RNA_struct_is_ID(data->type)) {
                sock = nodeAddInputSocket(node, identifier, SOCK_ANY, defaults, 
min, max);
                /* disable context adaptation (context is set explicitly) */
-               sock->flag &= ~SOCK_ADAPT_CONTEXT;
+               sock->flag &= ~SOCK_ADAPT_CONTEXT & ~SOCK_ADAPT_TYPE;
                /* associate with the property */
                sockdata = (SimDataNodeSocket*)sock->storage;
                sockdata->type = SIM_DATA_IDPROP;
@@ -145,7 +145,7 @@
        else if (data->type && RNA_struct_is_a(data->type, &RNA_NParticle)) {
                sock = nodeAddInputSocket(node, identifier, SOCK_ANY, defaults, 
min, max);
                /* disable context adaptation (context is set explicitly) */
-               sock->flag &= ~SOCK_ADAPT_CONTEXT;
+               sock->flag &= ~SOCK_ADAPT_CONTEXT & ~SOCK_ADAPT_TYPE;
                /* associate with the property */
                sockdata = (SimDataNodeSocket*)sock->storage;
                sockdata->type = SIM_DATA_PARPROP;


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to