Вот я вызываю рендер кадра:
- Код: Выделить всё
bpy.ops.render.render(animation=False)
Добавлено спустя 17 минут:
Вопрос закрыт.
Список разделов › Blender 3D › Плагины
bpy.ops.render.render(animation=False)
snode = context.space_data
if snode.tree_type == 'MyNodeTree':
return
import bpy
def draw(self, context):
self.layout.prop_search(context.object, 'image', bpy.data, 'images', text='')
bpy.types.Object.image = bpy.props.StringProperty()
bpy.types.VIEW3D_HT_header.append(draw)
через self.layout.template_IDPavel писал(а):, я пока не знаю, как сделать список с возможностью удалять и создавать изображения,
template_ID(bpy.context.space_data, 'image')
- это просто параметр с типом Image в окне, такой же, как в любом другом объекте, например в ноде Image Texture итд., соответственно, что тебе нужно? получить доступ до параметра c типом Image (ты же планируешь те картинки как-то использовать, а не просто смотреть, например присваивать объектам, стучи туда) если хочешь просто смотреть)) ни на что не влиять, тогда создай свой параметр с типом Image, например в пропс в сцене.Pavel писал(а): bpy.context.space_data
import bpy
def update(self, context):
image = bpy.data.images.get(self.image)
if image:
self.image_file_name = image.name
self.image_file_path = image.filepath
print(self.image_file_name)
print(self.image_file_path)
print(79 * '#')
def draw(self, context):
self.layout.prop_search(context.scene, 'image', bpy.data, 'images', text='')
bpy.types.Scene.image = bpy.props.StringProperty(update=update)
bpy.types.Scene.image_file_name = bpy.props.StringProperty()
bpy.types.Scene.image_file_path = bpy.props.StringProperty()
bpy.types.VIEW3D_HT_header.append(draw)
import bpy
def update(self, context):
image = bpy.data.images.get(self.image)
if image:
self.image_file_name = image.name
self.image_file_path = image.filepath
print(self.image_file_name)
print(self.image_file_path)
print(79 * '#')
class TestPanel(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = 'Test'
bl_label = 'Test'
def draw(self, context):
self.layout.prop_search(context.scene, 'image', bpy.data, 'images', text='')
bpy.types.Scene.image = bpy.props.StringProperty(update=update)
bpy.types.Scene.image_file_name = bpy.props.StringProperty()
bpy.types.Scene.image_file_path = bpy.props.StringProperty()
bpy.utils.register_class(TestPanel)
Сейчас этот раздел просматривают: 1 гость