Coder Social home page Coder Social logo

package_blender's Introduction

Blender Nexss PROGRAMMER package

Note: IF you wish to render in EEVEE you must render it with display/OpenGL

You can render results in Blender directly from nexss PROGRAMMER.

Start Scripting in Blender

  • Enable Python Tooltips -> Edit -> Preferences -> Interface -> [Display] Python Tooltip
  • Info Panel shows history of commands executed
  • CTRL + T - shows properties
  • ALT + P run Script on active text-editor

Examples

nexss .\my.py --nxsCompiler="blender --background"

Links

2.8 vs 2.7

Parameters

  • width
  • height
  • objectName - Name of object in the scene to modify
  • renderData - String which contains data to render, otherwise it contains datetime stamp.
  • renderFilename
  • colorMode [‘BW’, ‘RGB’, ‘RGBA’]
  • compression (0-100)

more here: Blender image format settings

Create custom Scene

  1. Create new scene and save it as eg. myfile.blend
  2. Create eg. Text Object and rename it to NEXSSEDIT or you need to pass parameter of objectName.

Config file

To run your python script in blender make compiler option with scene file: blender eg

files:
  - name: src/yourScript.py
    compiler: blender yourBlenderScene.blend --background

Modify code to your needs

nore here: https://github.com/nexssp/cli/blob/master/nexss-package/help.md

# This will copy package to your current folder.
# You can use it like: nexss Blender (the same as global package)
# Now you can adjust the copied code to your needs.
nexss pkg add Blender --copyPackage --saveNexss --forceNexss

Credits

Languages/Technologies used for this Nexss PROGRAMMER package:

  • NodeJS
  • Python
  • Blender

Tips and Tricks

Open info panel to display operations by doing changes in the blender. You can paste them to the script.

Scripting in Blender

Snippets

Execute script

# nexss
# NORE: Blender render does not allow for custom arguments (-- but for now it is not implemented in nexss PROGRAMMER), you need to pass it through pipe eg. or in _nexss.yml in data section.

echo {"ObjectName": "NexssEdit"} | nexss Blender

# In Blender
blender --background --python myscript.py
blender myscene.blend --background --python myscript.py
import bpy
import os

filename = os.path.join(os.path.dirname(bpy.data.filepath), "myscript.py")
exec(compile(open(filename).read(), filename, 'exec'))

Loading Script as module

import myscript
import importlib

importlib.reload(myscript)
myscript.main()

Adding search path

import sys
import os
import bpy

blend_dir = os.path.dirname(bpy.data.filepath)
if blend_dir not in sys.path:
   sys.path.append(blend_dir)

import myscript
import importlib
importlib.reload(myscript)
myscript.main()

Blender Related

Useful Links

Blender Nation - Blender Scripts
https://docs.blender.org/api/current/info_tips_and_tricks.html HDRI Heaven
https://texture.ninja
Supercharge Blender 2.8

Useful shortcuts

Blender Hot Keys References
CTRL + ALT + SHIFT + C -> Cursor
Shift + S - SNAP - cursor to selection etc

Bevel Edge - CTRL + B, OR use vertex group - + and Assign, then add modifier
Bevel Vertex - CTRL + SHIFT + B

Collections
M - Move to collection
NUM+, NUM- - shows/shrink collections menu

SHIFT + SPACE special menu for each functionality . - , -

  • U - for unwraping (while face selected/edit mode) - make island margin 0.3!

  • TAB - Edit mode

  • CTRL + TAB - Vertext mode, Sculpt mode, Texture pain, Vertex Paint

  • CTRL + H - Hook Object Options

  • 1,2,3 - Vertices, Edge and Face mode while editing

  • / - show only selected object

  • K - Knife tool

  • Q - quick favourites

  • T - Toolbar

  • N - Properties

  • ` - change view menu (camera, top,left,right...)

  • Z - change view menu

  • SHIFT + D - duplicate

  • ALT + D - duplicate linked.

  • SHIFT + Z - Wireframe mode

  • ALT + Z _ XRAY mode

  • SHIFT + R - Repeat last action

  • CTRL + R - edge loop

  • ALT + R - Reset rotation

  • SHIFT + SPACE - Play animation

  • CTRL + SPACE - Full screen of current

  • CTRL + ALT + NUM0 - snam the view to the camera.(also select border and g for moving)

  • ALT + A - scale faces ??? (on skin modifier)

CTRL + M+X+X - flip camera

Interesting add ons for Blender

Node Wrangler

Adds new shortcuts in the node view

  • CTRL + T - adds texture mapping nodes
  • CTRL + X - remove node and keep connections
  • CTRL + SHIFT + CLICK - preview node

Loop Tools

right click on edit -> loop tools

ArchiMesh -> Add -> Mesh -> Archimesh

Simplify Curves

For animation graph - simplyfy curves / smoother anim

package_blender's People

Contributors

mapoart avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

blendercn-org

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.