This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
images = [] | |
for image in bpy.data.images: | |
images.append((image.name, list(image.size), image.size[0] * image.size[1])) | |
images.sort(key=lambda elem: elem[2], reverse=True) | |
print("\nlargest images:") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
OLD_DEFAULT_ID = -1 | |
NEW_DEFAULT_ID = 0 | |
# Object IDs | |
for obj in bpy.data.objects: | |
if obj.luxcore.id == OLD_DEFAULT_ID: | |
obj.luxcore.id = NEW_DEFAULT_ID | |
print("Changed ID of object", obj.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
for obj in bpy.context.selected_objects: | |
if obj.data and obj.type == "MESH": | |
vcols = obj.data.vertex_colors | |
if vcols: | |
print("%s: removing %d vertex color layers" % (obj.name, len(vcols))) | |
else: | |
print("%s: no vertex colors" % obj.name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "exifparser.h" | |
#include <QFile> | |
#include <QDataStream> | |
#include <QtEndian> | |
#include <QDebug> | |
#include <vector> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bl_info = { | |
'name': 'Node Test', | |
'category': 'User', | |
'author': 'Julian Jarecki', | |
'blender': (2, 79, 0), | |
# 'location': 'File > Export', | |
'description': "Test custom Nodes and sockets", | |
} | |
import bpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
tex_type_map = { | |
"IMAGE": "LuxCoreNodeTexImagemap", | |
} | |
def new_node(bl_idname, node_tree, previous_node, output=0, input=0): | |
node = node_tree.nodes.new(bl_idname) | |
node.location = (previous_node.location.x - 250, previous_node.location.y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import sleep | |
import array | |
# I assume that pyluxcore and all required libraries are in the same | |
# directory as this Python script. Obviously you can also move it to | |
# a dedicated module, like I did in BlendLuxCore. | |
import pyluxcore | |
WIDTH = 800 | |
HEIGHT = 600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
An addon that can create LuxCore imagemap nodes from Cycles materials. | |
Installation: https://docs.blender.org/manual/en/dev/preferences/addons.html#header | |
Or copy into a text editor and click "Run Script". | |
The addon adds a button called "Create Image Nodes" in the properties window, scene tab. | |
""" | |
import bpy |