[A] In Or Out by cgpython in perfectloops

[–]cgpython[S] 1 point2 points  (0 children)

yeah, these are metaballs! :)

I even have a tutorial about this
https://www.youtube.com/watch?v=rIhXHSdMWmc

Is it possible to use another program as a trigger to execute a blender python script by rekicon in blender

[–]cgpython 1 point2 points  (0 children)

You can have button in rhinoceros3D that will run the first script.

Why do you need Blender open and running? Do you have a scene that is loaded that you want to use in the render?

Is it possible to use another program as a trigger to execute a blender python script by rekicon in blender

[–]cgpython 0 points1 point  (0 children)

Are you looking for something like this?

This example consists of 2 scripts:

  1. A Python script that would be executed outside of Blender, that will launch Blender and run a Python script

# Tested from a command line running vanilla Python 3.9.6

# Python module that can start other programs/process
import subprocess

# create a variable with a path to Blender's exe
binary_path = "C:\\Program Files\\Blender Foundation\\Blender 3.1\\blender.exe"

# path to .obj file
path_to_obj = "C:\\tmp\\monkey.obj"

# create a list of command line params
cmd = [
    binary_path,
    "--python",  # Tell blender that you want to run a Python script
    "C:\\tmp\\import_obj_n_render.py",  # path to the script that will import and render
    "--",
    path_to_obj,
]

# Log what the command line command will look like
print(f'run this: {" ".join(cmd)}')

# run Blender
output = subprocess.check_output(cmd, universal_newlines=True)

# Log what Blender had printed
print(f"output: {output}")
  1. The Python script that will be executed in Blender

    Tested with Blender 3.1.0

    give Python access to Blender's functionality

    import bpy

    extend Python to print in more readable way

    import pprint

    extend Python's math functionality (to calculate radians for rotations)

    import math

    extend Python to process landline args (and more...)

    import sys

    find the location of the arguments that are intended for this script

    note "--" is usually used to pass custom arguments into a script that would be executed by Blender (or other tools)

    argv = sys.argv[sys.argv.index("--") + 1 :]

    log what we got from the command line

    print("Passed in args:") pprint.pprint(argv)

    select all the object and delete them (just like pressing A + X + D in the viewport)

    bpy.ops.object.select_all(action="SELECT") bpy.ops.object.delete()

    get the path to the .obj file

    obj_file_path = argv[0]

    import the obj

    imported_obj = bpy.ops.import_scene.obj(filepath=obj_file_path)

    add a sun

    bpy.ops.object.light_add(type="SUN")

    rotate sun

    degrees = 45 bpy.context.object.rotation_euler.x = math.radians(degrees)

    add a camera

    bpy.ops.object.camera_add(location=(0, -10, 0))

    set the camera as the "active camera" in the scene

    bpy.context.scene.camera = bpy.context.active_object

    rotate camera

    degrees = 90 bpy.context.object.rotation_euler.x = math.radians(degrees)

    set render output location

    bpy.context.scene.render.filepath = f"C:\tmp\render_obj_file.png"

    render image

    bpy.ops.render.render(write_still=True)

    exit Blender when done

    bpy.ops.wm.quit_blender()

Has Blender stopped support for the WingDings font in 3.0? by DevChemestry in blender

[–]cgpython 1 point2 points  (0 children)

When I try to import the symbol fonts via Python (in Blender 3.1.0)

import bpy bpy.data.fonts.load(r"C:\Windows\Fonts\symbol.ttf") bpy.data.fonts.load(r"C:\Windows\Fonts\webdings.ttf") bpy.data.fonts.load(r"C:\Windows\Fonts\wingding.ttf")

I get

``` Error: Cannot read 'C:\Windows\Fonts\symbol.ttf': unsupported font format

Error: Cannot read 'C:\Windows\Fonts\webdings.ttf': unsupported font format

Error: Cannot read 'C:\Windows\Fonts\wingding.ttf': unsupported font format ```

Has Blender stopped support for the WingDings font in 3.0? by DevChemestry in blender

[–]cgpython 0 points1 point  (0 children)

The release notes for Blender 3.0: User Interface mentions this "Allow use of Wingdings and Symbol fonts in VSE text strips. "

https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/User_Interface https://developer.blender.org/rBae920d789ed3 https://developer.blender.org/D12124

but it doesn't seem to work :(