[Bf-blender-cvs] [87d20d7c923] functions: remove leftovers from initial simulation node tree
Jacques Lucke
noreply at git.blender.org
Mon Mar 2 11:01:45 CET 2020
Commit: 87d20d7c923352075f4cc460552e410c9d42bd52
Author: Jacques Lucke
Date: Fri Feb 28 13:42:46 2020 +0100
Branches: functions
https://developer.blender.org/rB87d20d7c923352075f4cc460552e410c9d42bd52
remove leftovers from initial simulation node tree
===================================================================
M source/blender/blenkernel/intern/node.c
M source/blender/editors/space_node/CMakeLists.txt
M source/blender/editors/space_node/drawnode.c
M source/blender/makesdna/DNA_node_types.h
M source/blender/makesrna/RNA_access.h
M source/blender/simulations/CMakeLists.txt
D source/blender/simulations/nodes/SIM_node_tree.h
D source/blender/simulations/nodes/my_test_node.cc
D source/blender/simulations/nodes/simulation_node_tree.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 644a0b46916..9e52f7ea939 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -68,8 +68,6 @@
#include "NOD_shader.h"
#include "NOD_texture.h"
-#include "nodes/SIM_node_tree.h"
-
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
@@ -4114,7 +4112,6 @@ void init_nodesystem(void)
register_node_tree_type_cmp();
register_node_tree_type_sh();
register_node_tree_type_tex();
- register_node_tree_type_sim();
register_node_type_frame();
register_node_type_reroute();
diff --git a/source/blender/editors/space_node/CMakeLists.txt b/source/blender/editors/space_node/CMakeLists.txt
index 3f12d6309bd..f8c30f9a688 100644
--- a/source/blender/editors/space_node/CMakeLists.txt
+++ b/source/blender/editors/space_node/CMakeLists.txt
@@ -30,7 +30,6 @@ set(INC
../../render/extern/include
../../compositor
../../windowmanager
- ../../simulations/nodes
../../../../intern/glew-mx
../../../../intern/guardedalloc
)
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index c6a0ac5a2a4..8633ebca8d6 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -72,8 +72,6 @@
#include "NOD_shader.h"
#include "NOD_texture.h"
-#include "SIM_node_tree.h"
-
/* ****************** SOCKET BUTTON DRAW FUNCTIONS ***************** */
static void node_socket_button_label(bContext *UNUSED(C),
@@ -3241,7 +3239,6 @@ void ED_node_init_butfuncs(void)
ntreeType_Composite->ui_icon = ICON_NODE_COMPOSITING;
ntreeType_Shader->ui_icon = ICON_NODE_MATERIAL;
ntreeType_Texture->ui_icon = ICON_NODE_TEXTURE;
- ntreeType_Simulation->ui_icon = ICON_PARTICLES; /* TODO: new icon */
}
void ED_init_custom_node_type(bNodeType *ntype)
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index b6308111d68..44d44b92499 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -497,7 +497,6 @@ typedef struct bNodeTree {
#define NTREE_SHADER 0
#define NTREE_COMPOSIT 1
#define NTREE_TEXTURE 2
-#define NTREE_SIMULATION 3
/* ntree->init, flag */
#define NTREE_TYPE_INIT 1
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index bd6f9148d1e..f645d3c8b75 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -547,7 +547,6 @@ extern StructRNA RNA_ShrinkwrapConstraint;
extern StructRNA RNA_ShrinkwrapModifier;
extern StructRNA RNA_SimpleDeformModifier;
extern StructRNA RNA_SimplifyGpencilModifier;
-extern StructRNA RNA_SimulationNodeTree;
extern StructRNA RNA_SkinModifier;
extern StructRNA RNA_SmoothGpencilModifier;
extern StructRNA RNA_SmoothModifier;
diff --git a/source/blender/simulations/CMakeLists.txt b/source/blender/simulations/CMakeLists.txt
index ca7232b6f89..331b0c6f85b 100644
--- a/source/blender/simulations/CMakeLists.txt
+++ b/source/blender/simulations/CMakeLists.txt
@@ -7,8 +7,6 @@ set(INC
../depsgraph
../functions
../imbuf
- ../blentranslation
- ../editors/include
../../../intern/guardedalloc
)
@@ -57,10 +55,6 @@ set(SRC
bparticles/particle_set.cpp
bparticles/force_interface.hpp
bparticles/force_interface.cpp
-
- nodes/SIM_node_tree.h
- nodes/simulation_node_tree.cc
- nodes/my_test_node.cc
)
set(LIB
diff --git a/source/blender/simulations/nodes/SIM_node_tree.h b/source/blender/simulations/nodes/SIM_node_tree.h
deleted file mode 100644
index c89934c9345..00000000000
--- a/source/blender/simulations/nodes/SIM_node_tree.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __SIM_NODE_TREE_H__
-#define __SIM_NODE_TREE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-extern struct bNodeTreeType *ntreeType_Simulation;
-
-void register_node_tree_type_sim(void);
-void register_node_type_my_test_node(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __SIM_NODE_TREE_H__ */
diff --git a/source/blender/simulations/nodes/my_test_node.cc b/source/blender/simulations/nodes/my_test_node.cc
deleted file mode 100644
index 8c4bbf79dd0..00000000000
--- a/source/blender/simulations/nodes/my_test_node.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-#include <cstring>
-
-#include "BKE_node.h"
-#include "SIM_node_tree.h"
-
-#include "BLI_vector.h"
-#include "BLI_string_ref.h"
-using BLI::StringRef;
-using BLI::StringRefNull;
-using BLI::Vector;
-
-class SocketDecl {
- public:
- bNodeTree *m_ntree;
- bNode *m_node;
-
- virtual void build() const = 0;
-};
-
-class InputSocketDecl : public SocketDecl {
-};
-
-class InputMockupSocketDecl : public InputSocketDecl {
- public:
- StringRefNull m_ui_name;
- StringRefNull m_identifier;
- StringRefNull m_idname;
-
- void build() const override
- {
- nodeAddSocket(
- m_ntree, m_node, SOCK_IN, m_idname.data(), m_identifier.data(), m_ui_name.data());
- }
-};
-
-class NodeDecl {
- private:
- Vector<SocketDecl *> m_inputs;
- Vector<SocketDecl *> m_outputs;
-};
-
-static void init_node(bNodeTree *ntree, bNode *node)
-{
- InputMockupSocketDecl decl;
- decl.m_ntree = ntree;
- decl.m_node = node;
- decl.m_ui_name = "Hello World";
- decl.m_identifier = "myid";
- decl.m_idname = "NodeSocketFloat";
- decl.build();
-}
-
-void register_node_type_my_test_node()
-{
- static bNodeType ntype = {0};
- ntype.minwidth = 20;
- ntype.minheight = 20;
- ntype.maxwidth = 1000;
- ntype.maxheight = 1000;
- ntype.height = 100;
- ntype.width = 140;
-
- strcpy(ntype.idname, "MyTestNode");
- strcpy(ntype.ui_name, "My Test Node");
- strcpy(ntype.ui_description, "My Test Node Description");
- ntype.type = NODE_CUSTOM;
-
- ntype.initfunc = init_node;
- ntype.poll = [](bNodeType *UNUSED(ntype), bNodeTree *UNUSED(ntree)) { return true; };
-
- nodeRegisterType(&ntype);
-}
diff --git a/source/blender/simulations/nodes/simulation_node_tree.cc b/source/blender/simulations/nodes/simulation_node_tree.cc
deleted file mode 100644
index 574e9fc9616..00000000000
--- a/source/blender/simulations/nodes/simulation_node_tree.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <cstring>
-
-#include "SIM_node_tree.h"
-#include "BKE_node.h"
-#include "MEM_guardedalloc.h"
-#include "BLT_translation.h"
-#include "RNA_access.h"
-
-bNodeTreeType *ntreeType_Simulation;
-
-void register_node_tree_type_sim()
-{
- bNodeTreeType *tt = ntreeType_Simulation = (bNodeTreeType *)MEM_callocN(
- sizeof(bNodeTreeType), "simulation node tree type");
- tt->type = NTREE_SIMULATION;
- strcpy(tt->idname, "SimulationNodeTree");
- strcpy(tt->ui_name, N_("Simulation Editor"));
- strcpy(tt->ui_description, N_("Simulation nodes"));
- tt->ui_icon = 0; /* Defined in drawnode.c */
- tt->ext.srna = &RNA_SimulationNodeTree;
-
- ntreeTypeAdd(tt);
-
- register_node_type_my_test_node();
-}
More information about the Bf-blender-cvs
mailing list