diff options
author | Jacques Lucke <jacques@blender.org> | 2020-10-20 13:07:42 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-10-20 13:07:42 +0300 |
commit | 6ced026ae1547ac28c88516a0d061315aeacc913 (patch) | |
tree | 60c61867746df72e8cf87efd47d5d27fbbb27109 /source/blender/makesrna | |
parent | 63a9f24b55d0b5d84d625bdbb44d498fb1f2ae01 (diff) |
Simulation: remove particle nodes with outdated design
The design for how we approach the "Everything Nodes" project
has changed. We will focus on a different part of the project initially.
While future me will likely refer back to some of the code I remove here,
there is no point in keeping this code around in master currently.
It would just confuse other developers working on the project.
This does not remove the simulation modifier and data block. Those are
just cleaned up, so that the boilerplate code can be reused in the future.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 60 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 100 |
2 files changed, 0 insertions, 160 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 9e0597f000b..e42dfb83885 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1531,51 +1531,6 @@ static void rna_ParticleInstanceModifier_particle_system_set(PointerRNA *ptr, CLAMP_MIN(psmd->psys, 1); } -# ifdef WITH_PARTICLE_NODES -static void rna_SimulationModifier_simulation_update(Main *bmain, Scene *scene, PointerRNA *ptr) -{ - SimulationModifierData *smd = ptr->data; - if (smd->simulation != NULL) { - DEG_id_tag_update(&smd->simulation->id, ID_RECALC_ALL); - } - rna_Modifier_dependency_update(bmain, scene, ptr); -} - -static void rna_SimulationModifier_data_path_get(PointerRNA *ptr, char *value) -{ - SimulationModifierData *smd = ptr->data; - - if (smd->data_path) { - strcpy(value, smd->data_path); - } - else { - value[0] = '\0'; - } -} - -static int rna_SimulationModifier_data_path_length(PointerRNA *ptr) -{ - SimulationModifierData *smd = ptr->data; - return smd->data_path ? strlen(smd->data_path) : 0; -} - -static void rna_SimulationModifier_data_path_set(PointerRNA *ptr, const char *value) -{ - SimulationModifierData *smd = ptr->data; - - if (smd->data_path) { - MEM_freeN(smd->data_path); - } - - if (value[0]) { - smd->data_path = BLI_strdup(value); - } - else { - smd->data_path = NULL; - } -} -# endif - /** * Special set callback that just changes the first bit of the expansion flag. * This way the expansion state of all the sub-panels is not changed by RNA. @@ -6968,7 +6923,6 @@ static void rna_def_modifier_weightednormal(BlenderRNA *brna) static void rna_def_modifier_simulation(BlenderRNA *brna) { StructRNA *srna; - PropertyRNA *prop; srna = RNA_def_struct(brna, "SimulationModifier", "Modifier"); RNA_def_struct_ui_text(srna, "Simulation Modifier", ""); @@ -6977,20 +6931,6 @@ static void rna_def_modifier_simulation(BlenderRNA *brna) RNA_define_lib_overridable(true); - prop = RNA_def_property(srna, "simulation", PROP_POINTER, PROP_NONE); - RNA_def_property_ui_text(prop, "Simulation", "Simulation to access"); - RNA_def_property_flag(prop, PROP_EDITABLE); - RNA_def_property_update(prop, 0, "rna_SimulationModifier_simulation_update"); - - prop = RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE); - RNA_def_property_string_funcs(prop, - "rna_SimulationModifier_data_path_get", - "rna_SimulationModifier_data_path_length", - "rna_SimulationModifier_data_path_set"); - RNA_def_property_ui_text( - prop, "Data Path", "Identifier of the simulation component that should be accessed"); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); - RNA_define_lib_overridable(false); } # endif diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 8c99a4cc1a1..0b8764f8a77 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -84,21 +84,6 @@ static const EnumPropertyItem node_socket_type_items[] = { {SOCK_SHADER, "SHADER", 0, "Shader", ""}, {SOCK_OBJECT, "OBJECT", 0, "Object", ""}, {SOCK_IMAGE, "IMAGE", 0, "Image", ""}, - {SOCK_EMITTERS, "EMITTERS", 0, "Emitters", ""}, - {SOCK_EVENTS, "EVENTS", 0, "Events", ""}, - {SOCK_FORCES, "FORCES", 0, "Forces", ""}, - {SOCK_CONTROL_FLOW, "CONTROL_FLOW", 0, "Control Flow", ""}, - {0, NULL, 0, NULL, NULL}, -}; - -static const EnumPropertyItem particle_attribute_socket_type_items[] = { - {SOCK_FLOAT, "FLOAT", 0, "Float", ""}, - {SOCK_INT, "INT", 0, "Int", ""}, - {SOCK_BOOLEAN, "BOOLEAN", 0, "Boolean", ""}, - {SOCK_VECTOR, "VECTOR", 0, "Vector", ""}, - {SOCK_RGBA, "RGBA", 0, "Color", ""}, - {SOCK_OBJECT, "OBJECT", 0, "Object", ""}, - {SOCK_IMAGE, "IMAGE", 0, "Image", ""}, {0, NULL, 0, NULL, NULL}, }; @@ -3758,15 +3743,6 @@ static void rna_CompositorNodeScale_update(Main *bmain, Scene *scene, PointerRNA rna_Node_update(bmain, scene, ptr); } -static void rna_SimulationNode_socket_update(Main *bmain, Scene *scene, PointerRNA *ptr) -{ - bNodeTree *ntree = (bNodeTree *)ptr->owner_id; - bNode *node = (bNode *)ptr->data; - - nodeUpdate(ntree, node); - rna_Node_update(bmain, scene, ptr); -} - static PointerRNA rna_ShaderNodePointDensity_psys_get(PointerRNA *ptr) { bNode *node = ptr->data; @@ -8164,82 +8140,6 @@ static void def_tex_bricks(StructRNA *srna) RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); } -/* -- Simulation Nodes --------------------------------------------------------- */ - -static void def_sim_particle_time_step_event(StructRNA *srna) -{ - static const EnumPropertyItem mode_items[] = { - {NODE_PARTICLE_TIME_STEP_EVENT_BEGIN, - "BEGIN", - 0, - "Begin", - "Execute for every particle at the beginning of each time step"}, - {NODE_PARTICLE_TIME_STEP_EVENT_END, - "END", - 0, - "End", - "Execute for every particle at the end of each time step"}, - {0, NULL, 0, NULL, NULL}, - }; - - PropertyRNA *prop; - - prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, mode_items); - RNA_def_property_ui_text(prop, "Mode", "When in each time step is the event triggered"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update"); -} - -static void def_sim_particle_attribute(StructRNA *srna) -{ - PropertyRNA *prop; - - prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, particle_attribute_socket_type_items); - RNA_def_property_ui_text( - prop, - "Data Type", - "Expected type of the attribute. A default value is returned if the type is not correct"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_SimulationNode_socket_update"); -} - -static void def_sim_set_particle_attribute(StructRNA *srna) -{ - PropertyRNA *prop; - - prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, particle_attribute_socket_type_items); - RNA_def_property_ui_text( - prop, - "Data Type", - "Expected type of the attribute. Nothing is done if the type is not correct"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_SimulationNode_socket_update"); -} - -static void def_sim_time(StructRNA *srna) -{ - static const EnumPropertyItem mode_items[] = { - {NODE_SIM_INPUT_SIMULATION_TIME, - "SIMULATION_TIME", - 0, - "Simulation Time", - "Time since start of simulation"}, - {NODE_SIM_INPUT_SCENE_TIME, "SCENE_TIME", 0, "Scene Time", "Time shown in the timeline"}, - {0, NULL, 0, NULL, NULL}, - }; - - PropertyRNA *prop; - - prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "custom1"); - RNA_def_property_enum_items(prop, mode_items); - RNA_def_property_ui_text(prop, "Mode", "The time to output"); - RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_SimulationNode_socket_update"); -} - /* -------------------------------------------------------------------------- */ static void rna_def_shader_node(BlenderRNA *brna) |