• S sverchok
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 148
    • Задачи 148
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 21
    • Запросы на слияние 21
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • nikitronn
  • sverchok
  • Wiki
  • Macros

Macros · Изменения

История страницы
Created Macros (markdown) создал Апр 24, 2017 по автору Dealga McArdle's avatar Dealga McArdle
Скрыть пробелы
Построчно Рядом
Macros.md 0 → 100644
Просмотреть страницу @4047755a
### Macros!
Macros as bits of code that you wish to execute often.
![image](https://cloud.githubusercontent.com/assets/619340/25071250/9c8f10ba-22b2-11e7-9e95-87387a8693c0.png)
### Usage
- `ctrl+space` will trigger a new search bar.
- The search database is loaded with
- All nodes (shows Node Name (bl_label) and Description
- Several default macros ( shown by `>` )
- `obj vd` (single object to vdmk2)
- `objs vd` (multi object to vdmk2)
- `sn petal` (auto loads petalsine in snlite)
- `zen` (the zen of sverchok, shows [my tumblr post about the zen of it all](http://blenderpython.tumblr.com/post/91951323209/zen-of-sverchok))
- (optionally) User Driven Macros ( shown by `<` )
These need to be created by the user in `/datafiles/sverchok/user_macros/macros.py` .
to find where you should place these `macros.py`, run this from the TextEditor, and see what it prints
```python
import os
import bpy
datafiles = os.path.join(bpy.utils.user_resource('DATAFILES', path='sverchok', create=True))
print(datafiles)
```
output
```text
# ubuntu
/home/username/.config/blender/2.78/datafiles/sverchok
# windows
C:\Users\username\AppData\Roaming\Blender Foundation\Blender\2.78\datafiles\sverchok
```
##### macros.py
```python
"""
This file demonstrates a few features that can be used in a macro
"""
def domo_esta(self, context):
""" info about domo esta /// will ignore this"""
active_node = context.active_node
print('mouse:', context.space_data.cursor_location)
if active_node:
print(active_node.name)
print(active_node.location)
print(active_node.bl_idname)
def domo_esta4(self, context, a=10, b=140):
""" info about domo esta4 """
print(a, b)
```
That produces this when you type `<`
![image](https://cloud.githubusercontent.com/assets/619340/25123290/347b45a8-2428-11e7-88b8-f41cc9683ac7.png)
Клонировать репозиторий
  • ArchiCAD
  • Circlify
  • Contributing
  • Custom Defaults
  • Dependencies
  • FAQ
  • FreeCAD
  • GeomDL
  • Git Practices
  • HighLevelNode
  • Home
  • How to build Sverchok documentation with images included
  • Install Development version
  • Installation
  • Interface overview
Просмотреть все страницы