Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fc1943s committed Jan 4, 2025
1 parent bceaf30 commit 1e92a73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
10 changes: 6 additions & 4 deletions apps/spiral/temp/blender/build.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import bpy

# 1) Clear default scene
Expand Down Expand Up @@ -40,13 +41,14 @@
# Create a sun light
bpy.ops.object.light_add(type='SUN', location=(10, 10, 10))
light_obj = bpy.context.active_object
light_obj.data.energy = 3
light_obj.data.energy = 6
light_obj.data.use_shadow = False

# 5) Set rendering options (Cycles, resolution)
bpy.context.scene.render.engine = 'CYCLES'
bpy.context.scene.render.resolution_x = 1024
bpy.context.scene.render.resolution_y = 1024
bpy.context.scene.render.resolution_x = 2048
bpy.context.scene.render.resolution_y = 2048

# Render and save
bpy.context.scene.render.filepath = f"spiral_blender.png"
bpy.context.scene.render.filepath = os.path.join(".", f"spiral_blender.png")
bpy.ops.render.render(write_still=True)
7 changes: 6 additions & 1 deletion scripts/core.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,18 @@ function EnsureSymbolicLink([string] $Path, [string] $Target) {
}
if ($Target.StartsWith(".") -or $Target.StartsWith("/")) {
$Target = [IO.Path]::GetFullPath((Join-Path $Location $Target))

$LinkTarget = (Get-Item $Target).Target
if ($LinkTarget) {
$Target = $LinkTarget
}
}

$Parent = Split-Path $Path

if (-Not (Test-Path $Parent)) {
Write-Output "Creating parent directory: $Parent"
New-Item $Parent -ItemType Directory
New-Item $Parent -ItemType Directory | Out-Null
}

if (Test-Path $Path) {
Expand Down

0 comments on commit 1e92a73

Please sign in to comment.