This file contains hidden or 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 gpu | |
import bgl | |
import numpy as np | |
from gpu_extras.batch import batch_for_shader | |
import barnold.props as props | |
from array import array | |
class GPU: | |
def __init__(self, engine, scene, width, height, offset_x, offset_y, rect): |
This file contains hidden or 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 bgl | |
import numpy as np | |
import barnold.props as props | |
import ctypes | |
class GPU: | |
def __init__(self, engine, scene, width, height, offset_x, offset_y, rect): | |
self._width = width | |
self._height = height |
This file contains hidden or 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 bgl | |
import numpy as np | |
import barnold.props as props | |
class GPU: | |
def __init__(self, engine, scene, width, height, offset_x, offset_y, rect): | |
self._width = width | |
self._height = height | |
self.buffer = bgl.Buffer(bgl.GL_SHORT, rect.shape, rect) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
__author__ = "Ildar Nikolaev" | |
__email__ = "[email protected]" | |
import sys | |
import numpy | |
import mmap | |
import platform | |
import os |
This file contains hidden or 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 ctypes | |
import itertools | |
import collections | |
import numpy | |
import math | |
import time | |
import re | |
from contextlib import contextmanager | |
import traceback | |
import contextlib as cl |
This file contains hidden or 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
def view_draw(engine, depsgraph, region, space_data, region_data): | |
#print(">>> view_draw [%f]:" % time.clock(), engine) | |
try: | |
region = bpy.context.region | |
v3d = bpy.context.space_data | |
rv3d = bpy.context.region_data | |
data = {} | |
_camera = {} |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
__authors__ = "Tyler Furby, Jared Webber" | |
import os | |
import sys | |
import ctypes | |
import itertools | |
import collections | |
import numpy |
This file contains hidden or 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 ctypes | |
import itertools | |
import collections | |
import numpy | |
import math | |
import time | |
import re | |
from contextlib import contextmanager | |
import traceback | |
import contextlib as cl |
This file contains hidden or 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 ctypes | |
import itertools | |
import collections | |
import numpy | |
import math | |
import time | |
import re | |
from contextlib import contextmanager | |
import traceback |
This file contains hidden or 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
if mesh.materials: | |
_Name = _CleanNames("M", itertools.count()) | |
if mesh.materials[0].use_nodes: | |
for _node in mesh.materials[0].node_tree.nodes: | |
if isinstance(_node, nt.ArnoldNodeOutput) and _node.is_active: | |
for input in _node.inputs: | |
if input.is_linked: | |
# Displacement Mapping (Arnold needs map to be a pointer to the array of nodes pointing to displacement) | |
if input.identifier == "disp_map": | |
dispnodes = [] |
NewerOlder