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
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
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 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
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; |
NewerOlder