Skip to content

Commit

Permalink
Merge pull request #72 from Simarilius-uk/main
Browse files Browse the repository at this point in the history
Update Parallaxscreen  and tv_advertisement to Blender 4
  • Loading branch information
Simarilius-uk authored Nov 19, 2023
2 parents d190302 + 3f0b903 commit b04c328
Show file tree
Hide file tree
Showing 4 changed files with 348 additions and 128 deletions.
12 changes: 10 additions & 2 deletions i_scene_cp77_gltf/main/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,18 @@ def bsdf_socket_names():
return socket_names

def get_inputs(tree):
return ([x for x in tree.interface.items_tree if (x.item_type == 'SOCKET' and x.in_out == 'INPUT')])
vers=bpy.app.version
if vers[0]<4:
return tree.inputs
else:
return ([x for x in tree.interface.items_tree if (x.item_type == 'SOCKET' and x.in_out == 'INPUT')])

def get_outputs(tree):
return ([x for x in tree.interface.items_tree if (x.item_type == 'SOCKET' and x.in_out == 'OUTPUT')])
vers=bpy.app.version
if vers[0]<4:
return tree.inputs
else:
return ([x for x in tree.interface.items_tree if (x.item_type == 'SOCKET' and x.in_out == 'OUTPUT')])

def bsdf_socket_names():
socket_names={}
Expand Down
4 changes: 2 additions & 2 deletions i_scene_cp77_gltf/main/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def create(self,materialIndex):
meshDecalParallax.create(rawMat["Data"],bpyMat)

case "base\\fx\\shaders\\parallaxscreen.mt" :
meshDecalParallax = ParallaxScreen(self.BasePath,self.image_format,self.ProjPath)
meshDecalParallax.create(rawMat["Data"],bpyMat)
parallaxScreen = ParallaxScreen(self.BasePath,self.image_format,self.ProjPath)
parallaxScreen.create(rawMat["Data"],bpyMat)

case "base\\materials\\speedtree_3d_v8_twosided.mt" | "base\\materials\\speedtree_3d_v8_onesided.mt" | "base\\materials\\speedtree_3d_v8_seams.mt":
speedtree = SpeedTree(self.BasePath,self.image_format, self.ProjPath)
Expand Down
Loading

0 comments on commit b04c328

Please sign in to comment.