[Bf-blender-cvs] [13abacaaf34] master: Particles: show which nodes are only mockups in the Add menu

Jacques Lucke noreply at git.blender.org
Sat Jul 25 21:02:14 CEST 2020


Commit: 13abacaaf342b3cff9b29e92f346bee2e5b6e6c4
Author: Jacques Lucke
Date:   Sat Jul 25 21:01:57 2020 +0200
Branches: master
https://developer.blender.org/rB13abacaaf342b3cff9b29e92f346bee2e5b6e6c4

Particles: show which nodes are only mockups in the Add menu

More nodes will be implemented step by step. I don't remove/disable these nodes,
so that it is still possible to add them.

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

M	release/scripts/startup/nodeitems_builtins.py

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

diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index 60eb0194a9a..56a3cd17948 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -475,49 +475,55 @@ texture_node_categories = [
     ]),
 ]
 
+def not_implemented_node(idname):
+    NodeType = getattr(bpy.types, idname)
+    name = NodeType.bl_rna.name
+    label = f"{name} (mockup)"
+    return NodeItem(idname, label=label)
+
 simulation_node_categories = [
     # Simulation Nodes
     SimulationNodeCategory("SIM_OUTPUT", "Output", items=[
         NodeItem("SimulationNodeParticleSimulation"),
     ]),
     SimulationNodeCategory("SIM_INPUTS", "Input", items=[
-        NodeItem("SimulationNodeTime"),
-        NodeItem("SimulationNodeParticleAttribute"),
+        not_implemented_node("SimulationNodeTime"),
+        not_implemented_node("SimulationNodeParticleAttribute"),
         NodeItem("FunctionNodeGroupInstanceID"),
         NodeItem("ShaderNodeValue"),
         NodeItem("FunctionNodeObjectTransforms"),
     ]),
     SimulationNodeCategory("SIM_EMITTERS", "Emitters", items=[
         NodeItem("SimulationNodeParticleMeshEmitter"),
-        NodeItem("SimulationNodeEmitParticles"),
+        not_implemented_node("SimulationNodeEmitParticles"),
     ]),
     SimulationNodeCategory("SIM_EVENTS", "Events", items=[
-        NodeItem("SimulationNodeParticleBirthEvent"),
-        NodeItem("SimulationNodeParticleTimeStepEvent"),
-        NodeItem("SimulationNodeParticleMeshCollisionEvent"),
+        not_implemented_node("SimulationNodeParticleBirthEvent"),
+        not_implemented_node("SimulationNodeParticleTimeStepEvent"),
+        not_implemented_node("SimulationNodeParticleMeshCollisionEvent"),
     ]),
     SimulationNodeCategory("SIM_FORCES", "Forces", items=[
         NodeItem("SimulationNodeForce"),
     ]),
     SimulationNodeCategory("SIM_EXECUTE", "Execute", items=[
-        NodeItem("SimulationNodeSetParticleAttribute"),
-        NodeItem("SimulationNodeExecuteCondition"),
-        NodeItem("SimulationNodeMultiExecute"),
+        not_implemented_node("SimulationNodeSetParticleAttribute"),
+        not_implemented_node("SimulationNodeExecuteCondition"),
+        not_implemented_node("SimulationNodeMultiExecute"),
     ]),
     SimulationNodeCategory("SIM_NOISE", "Noise", items=[
-        NodeItem("ShaderNodeTexNoise"),
-        NodeItem("ShaderNodeTexWhiteNoise"),
+        not_implemented_node("ShaderNodeTexNoise"),
+        not_implemented_node("ShaderNodeTexWhiteNoise"),
     ]),
     SimulationNodeCategory("SIM_COLOR", "Color", items=[
-        NodeItem("ShaderNodeMixRGB"),
-        NodeItem("ShaderNodeInvert"),
-        NodeItem("ShaderNodeHueSaturation"),
-        NodeItem("ShaderNodeGamma"),
-        NodeItem("ShaderNodeBrightContrast"),
+        not_implemented_node("ShaderNodeMixRGB"),
+        not_implemented_node("ShaderNodeInvert"),
+        not_implemented_node("ShaderNodeHueSaturation"),
+        not_implemented_node("ShaderNodeGamma"),
+        not_implemented_node("ShaderNodeBrightContrast"),
     ]),
     SimulationNodeCategory("SIM_CONVERTER", "Converter", items=[
         NodeItem("ShaderNodeMapRange"),
-        NodeItem("ShaderNodeClamp"),
+        not_implemented_node("ShaderNodeClamp"),
         NodeItem("ShaderNodeMath"),
         NodeItem("ShaderNodeValToRGB"),
         NodeItem("ShaderNodeVectorMath"),
@@ -525,11 +531,11 @@ simulation_node_categories = [
         NodeItem("ShaderNodeCombineRGB"),
         NodeItem("ShaderNodeSeparateXYZ"),
         NodeItem("ShaderNodeCombineXYZ"),
-        NodeItem("ShaderNodeSeparateHSV"),
-        NodeItem("ShaderNodeCombineHSV"),
+        not_implemented_node("ShaderNodeSeparateHSV"),
+        not_implemented_node("ShaderNodeCombineHSV"),
         NodeItem("FunctionNodeBooleanMath"),
         NodeItem("FunctionNodeFloatCompare"),
-        NodeItem("FunctionNodeSwitch"),
+        not_implemented_node("FunctionNodeSwitch"),
         NodeItem("FunctionNodeCombineStrings"),
     ]),
     SimulationNodeCategory("SIM_GROUP", "Group", items=node_group_items),



More information about the Bf-blender-cvs mailing list