Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-10-21 12:39:42 +0300
committerJacques Lucke <jacques@blender.org>2020-10-21 12:39:42 +0300
commit9255ce9247696d588a45c722de11d0c5a68cae39 (patch)
tree654116308dae934d22e370d5ad34cab200328ab5 /release
parenta0ce0154e792bf5425e21b301d0b4a9f452d1c01 (diff)
Nodes: rename Simulation to Geometry node tree
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/__init__.py1
-rw-r--r--release/scripts/startup/bl_operators/simulation.py41
-rw-r--r--release/scripts/startup/bl_ui/space_node.py8
-rw-r--r--release/scripts/startup/nodeitems_builtins.py20
4 files changed, 12 insertions, 58 deletions
diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py
index c927cc184a3..c5baa659668 100644
--- a/release/scripts/startup/bl_operators/__init__.py
+++ b/release/scripts/startup/bl_operators/__init__.py
@@ -42,7 +42,6 @@ _modules = [
"rigidbody",
"screen_play_rendered_anim",
"sequencer",
- "simulation",
"userpref",
"uvcalc_follow_active",
"uvcalc_lightmap",
diff --git a/release/scripts/startup/bl_operators/simulation.py b/release/scripts/startup/bl_operators/simulation.py
deleted file mode 100644
index 0981baa5941..00000000000
--- a/release/scripts/startup/bl_operators/simulation.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-
-
-class NewSimulation(bpy.types.Operator):
- """Create a new simulation data block and edit it in the opened simulation editor"""
-
- bl_idname = "simulation.new"
- bl_label = "New Simulation"
- bl_options = {'REGISTER', 'UNDO'}
-
- @classmethod
- def poll(cls, context):
- return context.area.type == 'NODE_EDITOR' and context.space_data.tree_type == 'SimulationNodeTree'
-
- def execute(self, context):
- simulation = bpy.data.simulations.new("Simulation")
- context.space_data.simulation = simulation
- return {'FINISHED'}
-
-
-classes = (
- NewSimulation,
-)
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index c0c38c02c63..a0f5d1b549d 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -151,13 +151,9 @@ class NODE_HT_header(Header):
if snode_id:
layout.prop(snode_id, "use_nodes")
- elif snode.tree_type == 'SimulationNodeTree':
+ elif snode.tree_type == 'GeometryNodeTree':
row = layout.row(align=True)
- row.prop(snode, "simulation", text="")
- row.operator("simulation.new", text="", icon='ADD')
- simulation = snode.simulation
- if simulation:
- row.prop(snode.simulation, "use_fake_user", text="")
+ # TODO: Add header for geometry node trees.
else:
# Custom node tree is edited as independent ID block
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index 8d2b6198fd5..2250137b6ef 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -58,11 +58,11 @@ class TextureNodeCategory(SortedNodeCategory):
context.space_data.tree_type == 'TextureNodeTree')
-class SimulationNodeCategory(SortedNodeCategory):
+class GeometryNodeCategory(SortedNodeCategory):
@classmethod
def poll(cls, context):
return (context.space_data.type == 'NODE_EDITOR' and
- context.space_data.tree_type == 'SimulationNodeTree')
+ context.space_data.tree_type == 'GeometryNodeTree')
# menu entry for node group tools
@@ -77,11 +77,11 @@ node_tree_group_type = {
'CompositorNodeTree': 'CompositorNodeGroup',
'ShaderNodeTree': 'ShaderNodeGroup',
'TextureNodeTree': 'TextureNodeGroup',
- 'SimulationNodeTree': 'SimulationNodeGroup',
+ 'GeometryNodeTree': 'GeometryNodeGroup',
}
-# generic node group items generator for shader, compositor, simulation and texture node groups
+# generic node group items generator for shader, compositor, geometry and texture node groups
def node_group_items(context):
if context is None:
return
@@ -483,10 +483,10 @@ def not_implemented_node(idname):
return NodeItem(idname, label=label)
-simulation_node_categories = [
- # Simulation Nodes
- SimulationNodeCategory("SIM_GROUP", "Group", items=node_group_items),
- SimulationNodeCategory("SIM_LAYOUT", "Layout", items=[
+geometry_node_categories = [
+ # Geometry Nodes
+ GeometryNodeCategory("SIM_GROUP", "Group", items=node_group_items),
+ GeometryNodeCategory("SIM_LAYOUT", "Layout", items=[
NodeItem("NodeFrame"),
NodeItem("NodeReroute"),
]),
@@ -497,14 +497,14 @@ def register():
nodeitems_utils.register_node_categories('SHADER', shader_node_categories)
nodeitems_utils.register_node_categories('COMPOSITING', compositor_node_categories)
nodeitems_utils.register_node_categories('TEXTURE', texture_node_categories)
- nodeitems_utils.register_node_categories('SIMULATION', simulation_node_categories)
+ nodeitems_utils.register_node_categories('GEOMETRY', geometry_node_categories)
def unregister():
nodeitems_utils.unregister_node_categories('SHADER')
nodeitems_utils.unregister_node_categories('COMPOSITING')
nodeitems_utils.unregister_node_categories('TEXTURE')
- nodeitems_utils.unregister_node_categories('SIMULATION')
+ nodeitems_utils.unregister_node_categories('GEOMETRY')
if __name__ == "__main__":