Skip to content

Commit

Permalink
Update to Blender 4.3
Browse files Browse the repository at this point in the history
Signed-off-by: Andrej Orsula <[email protected]>
  • Loading branch information
AndrejOrsula committed Nov 25, 2024
1 parent ecf96c2 commit e376372
Show file tree
Hide file tree
Showing 16 changed files with 3,375 additions and 363 deletions.
21 changes: 21 additions & 0 deletions model/object/lunar_rock_procgen/geometry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import bpy
import mathutils


# initialize random__normal_ node group
Expand All @@ -9,6 +10,7 @@ def random__normal__node_group():

random__normal_.color_tag = "NONE"
random__normal_.description = ""
random__normal_.default_group_node_width = 140

# random__normal_ interface
# Socket Value
Expand Down Expand Up @@ -285,6 +287,7 @@ def random__uniform__node_group():

random__uniform_.color_tag = "NONE"
random__uniform_.description = ""
random__uniform_.default_group_node_width = 140

# random__uniform_ interface
# Socket Value
Expand Down Expand Up @@ -381,6 +384,7 @@ def lunarrock_node_group():

lunarrock.color_tag = "GEOMETRY"
lunarrock.description = ""
lunarrock.default_group_node_width = 140

lunarrock.is_modifier = True

Expand Down Expand Up @@ -599,6 +603,7 @@ def lunarrock_node_group():
# node Reroute.001
reroute_001 = lunarrock.nodes.new("NodeReroute")
reroute_001.name = "Reroute.001"
reroute_001.socket_idname = "NodeSocketFloat"
# node Transform Geometry
transform_geometry = lunarrock.nodes.new("GeometryNodeTransform")
transform_geometry.name = "Transform Geometry"
Expand All @@ -611,6 +616,7 @@ def lunarrock_node_group():
# node Reroute.002
reroute_002 = lunarrock.nodes.new("NodeReroute")
reroute_002.name = "Reroute.002"
reroute_002.socket_idname = "NodeSocketInt"
# node Attribute Statistic
attribute_statistic = lunarrock.nodes.new("GeometryNodeAttributeStatistic")
attribute_statistic.name = "Attribute Statistic"
Expand All @@ -632,6 +638,7 @@ def lunarrock_node_group():
# node Reroute.003
reroute_003 = lunarrock.nodes.new("NodeReroute")
reroute_003.name = "Reroute.003"
reroute_003.socket_idname = "NodeSocketGeometry"
# node Vector Math.002
vector_math_002 = lunarrock.nodes.new("ShaderNodeVectorMath")
vector_math_002.name = "Vector Math.002"
Expand Down Expand Up @@ -745,6 +752,7 @@ def lunarrock_node_group():
# node Reroute.005
reroute_005 = lunarrock.nodes.new("NodeReroute")
reroute_005.name = "Reroute.005"
reroute_005.socket_idname = "NodeSocketFloat"
# node Group.003
group_003 = lunarrock.nodes.new("GeometryNodeGroup")
group_003.name = "Group.003"
Expand Down Expand Up @@ -774,9 +782,11 @@ def lunarrock_node_group():
# node Reroute.006
reroute_006 = lunarrock.nodes.new("NodeReroute")
reroute_006.name = "Reroute.006"
reroute_006.socket_idname = "NodeSocketFloat"
# node Reroute
reroute = lunarrock.nodes.new("NodeReroute")
reroute.name = "Reroute"
reroute.socket_idname = "NodeSocketVectorXYZ"
# node Group.007
group_007 = lunarrock.nodes.new("GeometryNodeGroup")
group_007.name = "Group.007"
Expand Down Expand Up @@ -979,6 +989,7 @@ def lunarrock_node_group():
# node Reroute.010
reroute_010 = lunarrock.nodes.new("NodeReroute")
reroute_010.name = "Reroute.010"
reroute_010.socket_idname = "NodeSocketBool"
# node Cube.001
cube_001 = lunarrock.nodes.new("GeometryNodeMeshCube")
cube_001.name = "Cube.001"
Expand All @@ -1002,6 +1013,7 @@ def lunarrock_node_group():
# node Reroute.004
reroute_004 = lunarrock.nodes.new("NodeReroute")
reroute_004.name = "Reroute.004"
reroute_004.socket_idname = "NodeSocketGeometry"
# node Frame.004
frame_004 = lunarrock.nodes.new("NodeFrame")
frame_004.name = "Frame.004"
Expand All @@ -1011,9 +1023,11 @@ def lunarrock_node_group():
# node Reroute.012
reroute_012 = lunarrock.nodes.new("NodeReroute")
reroute_012.name = "Reroute.012"
reroute_012.socket_idname = "NodeSocketFloatDistance"
# node Reroute.013
reroute_013 = lunarrock.nodes.new("NodeReroute")
reroute_013.name = "Reroute.013"
reroute_013.socket_idname = "NodeSocketFloatDistance"
# node Transform Geometry.003
transform_geometry_003 = lunarrock.nodes.new("GeometryNodeTransform")
transform_geometry_003.name = "Transform Geometry.003"
Expand Down Expand Up @@ -1060,6 +1074,7 @@ def lunarrock_node_group():
# node Reroute.015
reroute_015 = lunarrock.nodes.new("NodeReroute")
reroute_015.name = "Reroute.015"
reroute_015.socket_idname = "NodeSocketFloat"
# node Separate XYZ
separate_xyz = lunarrock.nodes.new("ShaderNodeSeparateXYZ")
separate_xyz.name = "Separate XYZ"
Expand All @@ -1071,21 +1086,27 @@ def lunarrock_node_group():
# node Reroute.017
reroute_017 = lunarrock.nodes.new("NodeReroute")
reroute_017.name = "Reroute.017"
reroute_017.socket_idname = "NodeSocketVectorXYZ"
# node Reroute.018
reroute_018 = lunarrock.nodes.new("NodeReroute")
reroute_018.name = "Reroute.018"
reroute_018.socket_idname = "NodeSocketVectorXYZ"
# node Reroute.019
reroute_019 = lunarrock.nodes.new("NodeReroute")
reroute_019.name = "Reroute.019"
reroute_019.socket_idname = "NodeSocketVectorXYZ"
# node Reroute.020
reroute_020 = lunarrock.nodes.new("NodeReroute")
reroute_020.name = "Reroute.020"
reroute_020.socket_idname = "NodeSocketFloat"
# node Reroute.021
reroute_021 = lunarrock.nodes.new("NodeReroute")
reroute_021.name = "Reroute.021"
reroute_021.socket_idname = "NodeSocketBool"
# node Reroute.022
reroute_022 = lunarrock.nodes.new("NodeReroute")
reroute_022.name = "Reroute.022"
reroute_022.socket_idname = "NodeSocketFloatDistance"
# node Frame.005
frame_005 = lunarrock.nodes.new("NodeFrame")
frame_005.name = "Frame.005"
Expand Down
50 changes: 28 additions & 22 deletions model/object/lunar_rock_procgen/material.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import bpy
import mathutils

mat = bpy.data.materials.new(name="LunarRock")
mat.use_nodes = True
Expand All @@ -12,6 +13,7 @@ def random_x4___mat_node_group():

random_x4___mat.color_tag = "NONE"
random_x4___mat.description = ""
random_x4___mat.default_group_node_width = 140

# random_x4___mat interface
# Socket 0
Expand Down Expand Up @@ -176,6 +178,7 @@ def rockshader_node_group():

rockshader.color_tag = "NONE"
rockshader.description = ""
rockshader.default_group_node_width = 140

# rockshader interface
# Socket BSDF
Expand Down Expand Up @@ -606,54 +609,56 @@ def rockshader_node_group():
principled_bsdf.inputs[3].default_value = 1.5
# Alpha
principled_bsdf.inputs[4].default_value = 1.0
# Subsurface Weight
# Diffuse Roughness
principled_bsdf.inputs[7].default_value = 0.0
# Subsurface Weight
principled_bsdf.inputs[8].default_value = 0.0
# Subsurface Radius
principled_bsdf.inputs[8].default_value = (
principled_bsdf.inputs[9].default_value = (
1.0,
0.20000000298023224,
0.10000000149011612,
)
# Subsurface Scale
principled_bsdf.inputs[9].default_value = 0.05000000074505806
principled_bsdf.inputs[10].default_value = 0.05000000074505806
# Subsurface Anisotropy
principled_bsdf.inputs[11].default_value = 0.0
principled_bsdf.inputs[12].default_value = 0.0
# Specular IOR Level
principled_bsdf.inputs[12].default_value = 0.5
principled_bsdf.inputs[13].default_value = 0.5
# Specular Tint
principled_bsdf.inputs[13].default_value = (1.0, 1.0, 1.0, 1.0)
principled_bsdf.inputs[14].default_value = (1.0, 1.0, 1.0, 1.0)
# Anisotropic
principled_bsdf.inputs[14].default_value = 0.0
# Anisotropic Rotation
principled_bsdf.inputs[15].default_value = 0.0
# Anisotropic Rotation
principled_bsdf.inputs[16].default_value = 0.0
# Tangent
principled_bsdf.inputs[16].default_value = (0.0, 0.0, 0.0)
principled_bsdf.inputs[17].default_value = (0.0, 0.0, 0.0)
# Transmission Weight
principled_bsdf.inputs[17].default_value = 0.0
# Coat Weight
principled_bsdf.inputs[18].default_value = 0.0
# Coat Weight
principled_bsdf.inputs[19].default_value = 0.0
# Coat Roughness
principled_bsdf.inputs[19].default_value = 0.029999999329447746
principled_bsdf.inputs[20].default_value = 0.029999999329447746
# Coat IOR
principled_bsdf.inputs[20].default_value = 1.5
principled_bsdf.inputs[21].default_value = 1.5
# Coat Tint
principled_bsdf.inputs[21].default_value = (1.0, 1.0, 1.0, 1.0)
principled_bsdf.inputs[22].default_value = (1.0, 1.0, 1.0, 1.0)
# Coat Normal
principled_bsdf.inputs[22].default_value = (0.0, 0.0, 0.0)
principled_bsdf.inputs[23].default_value = (0.0, 0.0, 0.0)
# Sheen Weight
principled_bsdf.inputs[23].default_value = 0.0
principled_bsdf.inputs[24].default_value = 0.0
# Sheen Roughness
principled_bsdf.inputs[24].default_value = 0.5
principled_bsdf.inputs[25].default_value = 0.5
# Sheen Tint
principled_bsdf.inputs[25].default_value = (1.0, 1.0, 1.0, 1.0)
# Emission Color
principled_bsdf.inputs[26].default_value = (1.0, 1.0, 1.0, 1.0)
# Emission Color
principled_bsdf.inputs[27].default_value = (1.0, 1.0, 1.0, 1.0)
# Emission Strength
principled_bsdf.inputs[27].default_value = 0.0
# Thin Film Thickness
principled_bsdf.inputs[28].default_value = 0.0
# Thin Film Thickness
principled_bsdf.inputs[29].default_value = 0.0
# Thin Film IOR
principled_bsdf.inputs[29].default_value = 1.3300000429153442
principled_bsdf.inputs[30].default_value = 1.3300000429153442

# node Math
math_1 = rockshader.nodes.new("ShaderNodeMath")
Expand Down Expand Up @@ -999,6 +1004,7 @@ def lunarrock_node_group():
lunarrock.nodes.remove(node)
lunarrock.color_tag = "NONE"
lunarrock.description = ""
lunarrock.default_group_node_width = 140

# lunarrock interface

Expand Down
21 changes: 21 additions & 0 deletions model/object/martian_rock_procgen/geometry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import bpy
import mathutils


# initialize random__normal_ node group
Expand All @@ -9,6 +10,7 @@ def random__normal__node_group():

random__normal_.color_tag = "NONE"
random__normal_.description = ""
random__normal_.default_group_node_width = 140

# random__normal_ interface
# Socket Value
Expand Down Expand Up @@ -285,6 +287,7 @@ def random__uniform__node_group():

random__uniform_.color_tag = "NONE"
random__uniform_.description = ""
random__uniform_.default_group_node_width = 140

# random__uniform_ interface
# Socket Value
Expand Down Expand Up @@ -381,6 +384,7 @@ def martianrock_node_group():

martianrock.color_tag = "GEOMETRY"
martianrock.description = ""
martianrock.default_group_node_width = 140

martianrock.is_modifier = True

Expand Down Expand Up @@ -599,6 +603,7 @@ def martianrock_node_group():
# node Reroute.001
reroute_001 = martianrock.nodes.new("NodeReroute")
reroute_001.name = "Reroute.001"
reroute_001.socket_idname = "NodeSocketFloat"
# node Transform Geometry
transform_geometry = martianrock.nodes.new("GeometryNodeTransform")
transform_geometry.name = "Transform Geometry"
Expand All @@ -611,6 +616,7 @@ def martianrock_node_group():
# node Reroute.002
reroute_002 = martianrock.nodes.new("NodeReroute")
reroute_002.name = "Reroute.002"
reroute_002.socket_idname = "NodeSocketInt"
# node Attribute Statistic
attribute_statistic = martianrock.nodes.new("GeometryNodeAttributeStatistic")
attribute_statistic.name = "Attribute Statistic"
Expand All @@ -632,6 +638,7 @@ def martianrock_node_group():
# node Reroute.003
reroute_003 = martianrock.nodes.new("NodeReroute")
reroute_003.name = "Reroute.003"
reroute_003.socket_idname = "NodeSocketGeometry"
# node Vector Math.002
vector_math_002 = martianrock.nodes.new("ShaderNodeVectorMath")
vector_math_002.name = "Vector Math.002"
Expand Down Expand Up @@ -745,6 +752,7 @@ def martianrock_node_group():
# node Reroute.005
reroute_005 = martianrock.nodes.new("NodeReroute")
reroute_005.name = "Reroute.005"
reroute_005.socket_idname = "NodeSocketFloat"
# node Group.003
group_003 = martianrock.nodes.new("GeometryNodeGroup")
group_003.name = "Group.003"
Expand Down Expand Up @@ -774,9 +782,11 @@ def martianrock_node_group():
# node Reroute.006
reroute_006 = martianrock.nodes.new("NodeReroute")
reroute_006.name = "Reroute.006"
reroute_006.socket_idname = "NodeSocketFloat"
# node Reroute
reroute = martianrock.nodes.new("NodeReroute")
reroute.name = "Reroute"
reroute.socket_idname = "NodeSocketVectorXYZ"
# node Group.007
group_007 = martianrock.nodes.new("GeometryNodeGroup")
group_007.name = "Group.007"
Expand Down Expand Up @@ -979,6 +989,7 @@ def martianrock_node_group():
# node Reroute.010
reroute_010 = martianrock.nodes.new("NodeReroute")
reroute_010.name = "Reroute.010"
reroute_010.socket_idname = "NodeSocketBool"
# node Cube.001
cube_001 = martianrock.nodes.new("GeometryNodeMeshCube")
cube_001.name = "Cube.001"
Expand All @@ -1002,6 +1013,7 @@ def martianrock_node_group():
# node Reroute.004
reroute_004 = martianrock.nodes.new("NodeReroute")
reroute_004.name = "Reroute.004"
reroute_004.socket_idname = "NodeSocketGeometry"
# node Frame.004
frame_004 = martianrock.nodes.new("NodeFrame")
frame_004.name = "Frame.004"
Expand All @@ -1011,9 +1023,11 @@ def martianrock_node_group():
# node Reroute.012
reroute_012 = martianrock.nodes.new("NodeReroute")
reroute_012.name = "Reroute.012"
reroute_012.socket_idname = "NodeSocketFloatDistance"
# node Reroute.013
reroute_013 = martianrock.nodes.new("NodeReroute")
reroute_013.name = "Reroute.013"
reroute_013.socket_idname = "NodeSocketFloatDistance"
# node Transform Geometry.003
transform_geometry_003 = martianrock.nodes.new("GeometryNodeTransform")
transform_geometry_003.name = "Transform Geometry.003"
Expand Down Expand Up @@ -1060,6 +1074,7 @@ def martianrock_node_group():
# node Reroute.015
reroute_015 = martianrock.nodes.new("NodeReroute")
reroute_015.name = "Reroute.015"
reroute_015.socket_idname = "NodeSocketFloat"
# node Separate XYZ
separate_xyz = martianrock.nodes.new("ShaderNodeSeparateXYZ")
separate_xyz.name = "Separate XYZ"
Expand All @@ -1071,21 +1086,27 @@ def martianrock_node_group():
# node Reroute.017
reroute_017 = martianrock.nodes.new("NodeReroute")
reroute_017.name = "Reroute.017"
reroute_017.socket_idname = "NodeSocketVectorXYZ"
# node Reroute.018
reroute_018 = martianrock.nodes.new("NodeReroute")
reroute_018.name = "Reroute.018"
reroute_018.socket_idname = "NodeSocketVectorXYZ"
# node Reroute.019
reroute_019 = martianrock.nodes.new("NodeReroute")
reroute_019.name = "Reroute.019"
reroute_019.socket_idname = "NodeSocketVectorXYZ"
# node Reroute.020
reroute_020 = martianrock.nodes.new("NodeReroute")
reroute_020.name = "Reroute.020"
reroute_020.socket_idname = "NodeSocketFloat"
# node Reroute.021
reroute_021 = martianrock.nodes.new("NodeReroute")
reroute_021.name = "Reroute.021"
reroute_021.socket_idname = "NodeSocketBool"
# node Reroute.022
reroute_022 = martianrock.nodes.new("NodeReroute")
reroute_022.name = "Reroute.022"
reroute_022.socket_idname = "NodeSocketFloatDistance"
# node Frame.005
frame_005 = martianrock.nodes.new("NodeFrame")
frame_005.name = "Frame.005"
Expand Down
Loading

0 comments on commit e376372

Please sign in to comment.