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
public class Solution { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
int[] alicesTriplet = new int[3]; | |
int[] bobsTriplet = new int[3]; | |
int alicesTotal = 0; | |
int bobsTotal = 0; |
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 render(engine, scene): | |
try: | |
session = engine._session | |
xoff, yoff = session["offset"] | |
_htiles = {} # highlighted tiles | |
session["peak"] = 0 # memory peak usage | |
def display_callback(x, y, width, height, buffer, data): | |
_x = x - xoff |
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
name = _Name(ob.name) | |
color_node = None | |
if color_node is None: | |
for tuple in lights: | |
if tuple[0] == node: | |
tuple[1]['color'] = ('RGBA', (arnold.AI_TYPE_RGBA, *lamp.color)) | |
else: | |
arnold.AiNodeLink(color_node, "color", node) #TODO: Refactor for Dict() | |
for tuple in lights: | |
i = 1 |
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 _AiNode(node, prefix, nodes, mat): | |
""" | |
Args: | |
node (ArnoldNode): node. | |
prefix (str): node name prefix. | |
nodes (dict): created nodes {Node: AiNode}. | |
Returns: | |
arnold.AiNode or None | |
""" | |
if not isinstance(node, ArnoldNode): |
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 random | |
from gpu_extras.batch import batch_for_shader | |
from gpu_extras.presets import draw_circle_2d | |
vertex_shader = ''' | |
uniform mat4 ModelViewProjectionMatrix; | |
/* Keep in sync with intern/opencolorio/gpu_shader_display_transform_vertex.glsl */ | |
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 = [] |
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
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
# -*- 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
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 = {} |
OlderNewer