Blender  V3.3
Functions
services.cpp File Reference
#include <string.h>
#include "scene/colorspace.h"
#include "scene/mesh.h"
#include "scene/object.h"
#include "scene/pointcloud.h"
#include "scene/scene.h"
#include "kernel/osl/closures.h"
#include "kernel/osl/globals.h"
#include "kernel/osl/services.h"
#include "kernel/osl/shader.h"
#include "util/foreach.h"
#include "util/log.h"
#include "kernel/device/cpu/compat.h"
#include "kernel/device/cpu/globals.h"
#include "kernel/device/cpu/image.h"
#include "kernel/util/differential.h"
#include "kernel/integrator/state.h"
#include "kernel/integrator/state_flow.h"
#include "kernel/geom/geom.h"
#include "kernel/bvh/bvh.h"
#include "kernel/camera/camera.h"
#include "kernel/camera/projection.h"
#include "kernel/integrator/path_state.h"
#include "kernel/integrator/shader_eval.h"
#include "kernel/util/color.h"

Go to the source code of this file.

Functions

static CCL_NAMESPACE_BEGIN void copy_matrix (OSL::Matrix44 &m, const Transform &tfm)
 
static void copy_matrix (OSL::Matrix44 &m, const ProjectionTransform &tfm)
 
static bool set_attribute_float2 (float2 f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float2 (float2 f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float3 (float3 f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float3 (float3 f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float4 (float4 f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float4 (float4 f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float (float f[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float (float f, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_int (int i, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_string (ustring str, TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_float3_3 (float3 P[3], TypeDesc type, bool derivatives, void *val)
 
static bool set_attribute_matrix (const Transform &tfm, TypeDesc type, void *val)
 
static bool get_primitive_attribute (const KernelGlobalsCPU *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, const TypeDesc &type, bool derivatives, void *val)
 
static bool get_mesh_attribute (const KernelGlobalsCPU *kg, const ShaderData *sd, const OSLGlobals::Attribute &attr, const TypeDesc &type, bool derivatives, void *val)
 
static bool get_object_attribute (const OSLGlobals::Attribute &attr, TypeDesc type, bool derivatives, void *val)
 

Function Documentation

◆ copy_matrix() [1/2]

static void copy_matrix ( OSL::Matrix44 &  m,
const ProjectionTransform tfm 
)
static

Definition at line 63 of file services.cpp.

References projection_transpose(), and t.

◆ copy_matrix() [2/2]

static CCL_NAMESPACE_BEGIN void copy_matrix ( OSL::Matrix44 &  m,
const Transform tfm 
)
static

◆ get_mesh_attribute()

static bool get_mesh_attribute ( const KernelGlobalsCPU kg,
const ShaderData sd,
const OSLGlobals::Attribute attr,
const TypeDesc &  type,
bool  derivatives,
void val 
)
static

◆ get_object_attribute()

static bool get_object_attribute ( const OSLGlobals::Attribute attr,
TypeDesc  type,
bool  derivatives,
void val 
)
static

◆ get_primitive_attribute()

static bool get_primitive_attribute ( const KernelGlobalsCPU kg,
const ShaderData sd,
const OSLGlobals::Attribute attr,
const TypeDesc &  type,
bool  derivatives,
void val 
)
static

◆ set_attribute_float() [1/2]

static bool set_attribute_float ( float  f,
TypeDesc  type,
bool  derivatives,
void val 
)
static

Definition at line 660 of file services.cpp.

References set_attribute_float(), and type.

◆ set_attribute_float() [2/2]

static bool set_attribute_float ( float  f[3],
TypeDesc  type,
bool  derivatives,
void val 
)
static

◆ set_attribute_float2() [1/2]

static bool set_attribute_float2 ( float2  f,
TypeDesc  type,
bool  derivatives,
void val 
)
static

Definition at line 455 of file services.cpp.

References make_float2, set_attribute_float2(), and type.

◆ set_attribute_float2() [2/2]

static bool set_attribute_float2 ( float2  f[3],
TypeDesc  type,
bool  derivatives,
void val 
)
static

◆ set_attribute_float3() [1/2]

static bool set_attribute_float3 ( float3  f,
TypeDesc  type,
bool  derivatives,
void val 
)
static

Definition at line 523 of file services.cpp.

References make_float3, set_attribute_float3(), and type.

◆ set_attribute_float3() [2/2]

static bool set_attribute_float3 ( float3  f[3],
TypeDesc  type,
bool  derivatives,
void val 
)
static

◆ set_attribute_float3_3()

static bool set_attribute_float3_3 ( float3  P[3],
TypeDesc  type,
bool  derivatives,
void val 
)
static

Definition at line 706 of file services.cpp.

References P(), Freestyle::Nature::POINT, and type.

Referenced by OSLRenderServices::get_object_standard_attribute().

◆ set_attribute_float4() [1/2]

static bool set_attribute_float4 ( float4  f,
TypeDesc  type,
bool  derivatives,
void val 
)
static

Definition at line 593 of file services.cpp.

References set_attribute_float4(), type, and zero_float4().

◆ set_attribute_float4() [2/2]

static bool set_attribute_float4 ( float4  f[3],
TypeDesc  type,
bool  derivatives,
void val 
)
static

◆ set_attribute_int()

static bool set_attribute_int ( int  i,
TypeDesc  type,
bool  derivatives,
void val 
)
static

◆ set_attribute_matrix()

static bool set_attribute_matrix ( const Transform tfm,
TypeDesc  type,
void val 
)
static

Definition at line 734 of file services.cpp.

References copy_matrix(), and type.

Referenced by get_mesh_attribute().

◆ set_attribute_string()

static bool set_attribute_string ( ustring  str,
TypeDesc  type,
bool  derivatives,
void val 
)
static

Definition at line 688 of file services.cpp.

References str, type, and OSLRenderServices::u_empty.

Referenced by OSLRenderServices::get_object_standard_attribute().