[Bf-blender-cvs] [a96af792598] builtin-simulation-nodes: Merge branch 'functions' into builtin-simulation-nodes

Jacques Lucke noreply at git.blender.org
Mon Apr 6 11:22:55 CEST 2020


Commit: a96af792598373b5677a015f05be1581c465b983
Author: Jacques Lucke
Date:   Mon Apr 6 11:22:32 2020 +0200
Branches: builtin-simulation-nodes
https://developer.blender.org/rBa96af792598373b5677a015f05be1581c465b983

Merge branch 'functions' into builtin-simulation-nodes

===================================================================



===================================================================

diff --cc source/blender/blenloader/intern/readfile.c
index 385b47deacf,f771a859459..7d4fe2118cb
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -3585,19 -3570,19 +3584,19 @@@ static void lib_link_ntree(FileData *fd
  
      node->id = newlibadr(fd, lib, node->id);
  
-     for (bNodeSocket *sock = node->inputs.first; sock; sock = sock->next) {
+     LISTBASE_FOREACH (bNodeSocket *, sock, &node->inputs) {
 -      IDP_LibLinkProperty(sock->prop, fd);
 +      lib_link_node_socket(fd, lib, sock);
      }
-     for (bNodeSocket *sock = node->outputs.first; sock; sock = sock->next) {
+     LISTBASE_FOREACH (bNodeSocket *, sock, &node->outputs) {
 -      IDP_LibLinkProperty(sock->prop, fd);
 +      lib_link_node_socket(fd, lib, sock);
      }
    }
  
-   for (bNodeSocket *sock = ntree->inputs.first; sock; sock = sock->next) {
+   LISTBASE_FOREACH (bNodeSocket *, sock, &ntree->inputs) {
 -    IDP_LibLinkProperty(sock->prop, fd);
 +    lib_link_node_socket(fd, lib, sock);
    }
-   for (bNodeSocket *sock = ntree->outputs.first; sock; sock = sock->next) {
+   LISTBASE_FOREACH (bNodeSocket *, sock, &ntree->outputs) {
 -    IDP_LibLinkProperty(sock->prop, fd);
 +    lib_link_node_socket(fd, lib, sock);
    }
  
    /* Set node->typeinfo pointers. This is done in lib linking, after the
diff --cc source/blender/makesrna/intern/rna_nodetree.c
index e618924d4fa,024ed879d34..1ba43136dab
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@@ -1883,53 -1782,9 +1883,53 @@@ static StructRNA *rna_TextureNode_regis
    /* update while blender is running */
    WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
  
-   return nt->ext.srna;
+   return nt->rna_ext.srna;
  }
  
 +static StructRNA *rna_SimulationNode_register(Main *bmain,
 +                                              ReportList *reports,
 +                                              void *data,
 +                                              const char *identifier,
 +                                              StructValidateFunc validate,
 +                                              StructCallbackFunc call,
 +                                              StructFreeFunc free)
 +{
 +  bNodeType *nt = rna_Node_register_base(
 +      bmain, reports, &RNA_SimulationNode, data, identifier, validate, call, free);
 +  if (!nt) {
 +    return NULL;
 +  }
 +
 +  nodeRegisterType(nt);
 +
 +  /* update while blender is running */
 +  WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
 +
 +  return nt->ext.srna;
 +}
 +
 +static StructRNA *rna_FunctionNode_register(Main *bmain,
 +                                            ReportList *reports,
 +                                            void *data,
 +                                            const char *identifier,
 +                                            StructValidateFunc validate,
 +                                            StructCallbackFunc call,
 +                                            StructFreeFunc free)
 +{
 +  bNodeType *nt = rna_Node_register_base(
 +      bmain, reports, &RNA_FunctionNode, data, identifier, validate, call, free);
 +  if (!nt) {
 +    return NULL;
 +  }
 +
 +  nodeRegisterType(nt);
 +
 +  /* update while blender is running */
 +  WM_main_add_notifier(NC_NODE | NA_EDITED, NULL);
 +
 +  return nt->ext.srna;
 +}
 +
  static IDProperty *rna_Node_idprops(PointerRNA *ptr, bool create)
  {
    bNode *node = ptr->data;



More information about the Bf-blender-cvs mailing list