[Bf-blender-cvs] [80459eabc2a] cycles_procedural_api: rename NODE_PUBLIC* macros to NODE_SOCKET*
Kévin Dietrich
noreply at git.blender.org
Mon Oct 26 23:27:04 CET 2020
Commit: 80459eabc2a91a4e3239295361fb45acf5f880e4
Author: Kévin Dietrich
Date: Mon Oct 12 17:59:04 2020 +0200
Branches: cycles_procedural_api
https://developer.blender.org/rB80459eabc2a91a4e3239295361fb45acf5f880e4
rename NODE_PUBLIC* macros to NODE_SOCKET*
===================================================================
M intern/cycles/graph/node.h
M intern/cycles/render/background.h
M intern/cycles/render/camera.h
M intern/cycles/render/film.h
M intern/cycles/render/geometry.h
M intern/cycles/render/hair.h
M intern/cycles/render/integrator.h
M intern/cycles/render/light.h
M intern/cycles/render/mesh.h
M intern/cycles/render/nodes.h
M intern/cycles/render/object.h
M intern/cycles/render/shader.h
M intern/cycles/render/volume.h
===================================================================
diff --git a/intern/cycles/graph/node.h b/intern/cycles/graph/node.h
index e36a9da8ce0..6915318496f 100644
--- a/intern/cycles/graph/node.h
+++ b/intern/cycles/graph/node.h
@@ -31,7 +31,7 @@ struct Transform;
/* Note: in the following macros we use "type const &" instead of "const type &"
* to avoid issues when pasting a pointer type. */
-#define NODE_PUBLIC_API_BASE_METHODS(type_, name, string_name) \
+#define NODE_SOCKET_API_BASE_METHODS(type_, name, string_name) \
const SocketType *get_##name##_socket() const \
{ \
static const SocketType *socket = type->find_input(ustring(string_name)); \
@@ -53,31 +53,31 @@ struct Transform;
return get_socket_value<type_>(this, *socket); \
}
-#define NODE_PUBLIC_API_BASE(type_, name, string_name) \
+#define NODE_SOCKET_API_BASE(type_, name, string_name) \
protected: \
type_ name; \
\
public: \
- NODE_PUBLIC_API_BASE_METHODS(type_, name, string_name)
+ NODE_SOCKET_API_BASE_METHODS(type_, name, string_name)
-#define NODE_PUBLIC_API(type_, name) \
- NODE_PUBLIC_API_BASE(type_, name, #name) \
+#define NODE_SOCKET_API(type_, name) \
+ NODE_SOCKET_API_BASE(type_, name, #name) \
void set_##name(type_ value) \
{ \
const SocketType *socket = get_##name##_socket(); \
this->set(*socket, value); \
}
-#define NODE_PUBLIC_API_ARRAY(type_, name) \
- NODE_PUBLIC_API_BASE(type_, name, #name) \
+#define NODE_SOCKET_API_ARRAY(type_, name) \
+ NODE_SOCKET_API_BASE(type_, name, #name) \
void set_##name(type_ &value) \
{ \
const SocketType *socket = get_##name##_socket(); \
this->set(*socket, value); \
}
-#define NODE_PUBLIC_API_STRUCT_MEMBER(type_, name, member) \
- NODE_PUBLIC_API_BASE_METHODS(type_, name##_##member, #name "." #member) \
+#define NODE_SOCKET_API_STRUCT_MEMBER(type_, name, member) \
+ NODE_SOCKET_API_BASE_METHODS(type_, name##_##member, #name "." #member) \
void set_##name##_##member(type_ value) \
{ \
const SocketType *socket = get_##name##_##member##_socket(); \
diff --git a/intern/cycles/render/background.h b/intern/cycles/render/background.h
index d6ae49d12bf..e89ffbc2445 100644
--- a/intern/cycles/render/background.h
+++ b/intern/cycles/render/background.h
@@ -32,20 +32,20 @@ class Background : public Node {
public:
NODE_DECLARE
- NODE_PUBLIC_API(float, ao_factor)
- NODE_PUBLIC_API(float, ao_distance)
+ NODE_SOCKET_API(float, ao_factor)
+ NODE_SOCKET_API(float, ao_distance)
- NODE_PUBLIC_API(bool, use_shader)
- NODE_PUBLIC_API(bool, use_ao)
+ NODE_SOCKET_API(bool, use_shader)
+ NODE_SOCKET_API(bool, use_ao)
- NODE_PUBLIC_API(uint, visibility)
- NODE_PUBLIC_API(Shader *, shader)
+ NODE_SOCKET_API(uint, visibility)
+ NODE_SOCKET_API(Shader *, shader)
- NODE_PUBLIC_API(bool, transparent)
- NODE_PUBLIC_API(bool, transparent_glass)
- NODE_PUBLIC_API(float, transparent_roughness_threshold)
+ NODE_SOCKET_API(bool, transparent)
+ NODE_SOCKET_API(bool, transparent_glass)
+ NODE_SOCKET_API(float, transparent_roughness_threshold)
- NODE_PUBLIC_API(float, volume_step_size)
+ NODE_SOCKET_API(float, volume_step_size)
Background();
~Background();
diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h
index a9d9da7fe30..ce83f5ed8b6 100644
--- a/intern/cycles/render/camera.h
+++ b/intern/cycles/render/camera.h
@@ -73,92 +73,92 @@ class Camera : public Node {
};
/* motion blur */
- NODE_PUBLIC_API(float, shuttertime)
- NODE_PUBLIC_API(MotionPosition, motion_position)
- NODE_PUBLIC_API_ARRAY(array<float>, shutter_curve)
+ NODE_SOCKET_API(float, shuttertime)
+ NODE_SOCKET_API(MotionPosition, motion_position)
+ NODE_SOCKET_API_ARRAY(array<float>, shutter_curve)
size_t shutter_table_offset;
/* ** Rolling shutter effect. ** */
/* Defines rolling shutter effect type. */
- NODE_PUBLIC_API(RollingShutterType, rolling_shutter_type)
+ NODE_SOCKET_API(RollingShutterType, rolling_shutter_type)
/* Specifies exposure time of scanlines when using
* rolling shutter effect.
*/
- NODE_PUBLIC_API(float, rolling_shutter_duration)
+ NODE_SOCKET_API(float, rolling_shutter_duration)
/* depth of field */
- NODE_PUBLIC_API(float, focaldistance)
- NODE_PUBLIC_API(float, aperturesize)
- NODE_PUBLIC_API(uint, blades)
- NODE_PUBLIC_API(float, bladesrotation)
+ NODE_SOCKET_API(float, focaldistance)
+ NODE_SOCKET_API(float, aperturesize)
+ NODE_SOCKET_API(uint, blades)
+ NODE_SOCKET_API(float, bladesrotation)
/* type */
- NODE_PUBLIC_API(CameraType, camera_type)
- NODE_PUBLIC_API(float, fov)
+ NODE_SOCKET_API(CameraType, camera_type)
+ NODE_SOCKET_API(float, fov)
/* panorama */
- NODE_PUBLIC_API(PanoramaType, panorama_type)
- NODE_PUBLIC_API(float, fisheye_fov)
- NODE_PUBLIC_API(float, fisheye_lens)
- NODE_PUBLIC_API(float, latitude_min)
- NODE_PUBLIC_API(float, latitude_max)
- NODE_PUBLIC_API(float, longitude_min)
- NODE_PUBLIC_API(float, longitude_max)
+ NODE_SOCKET_API(PanoramaType, panorama_type)
+ NODE_SOCKET_API(float, fisheye_fov)
+ NODE_SOCKET_API(float, fisheye_lens)
+ NODE_SOCKET_API(float, latitude_min)
+ NODE_SOCKET_API(float, latitude_max)
+ NODE_SOCKET_API(float, longitude_min)
+ NODE_SOCKET_API(float, longitude_max)
/* panorama stereo */
- NODE_PUBLIC_API(StereoEye, stereo_eye)
- NODE_PUBLIC_API(bool, use_spherical_stereo)
- NODE_PUBLIC_API(float, interocular_distance)
- NODE_PUBLIC_API(float, convergence_distance)
- NODE_PUBLIC_API(bool, use_pole_merge)
- NODE_PUBLIC_API(float, pole_merge_angle_from)
- NODE_PUBLIC_API(float, pole_merge_angle_to)
+ NODE_SOCKET_API(StereoEye, stereo_eye)
+ NODE_SOCKET_API(bool, use_spherical_stereo)
+ NODE_SOCKET_API(float, interocular_distance)
+ NODE_SOCKET_API(float, convergence_distance)
+ NODE_SOCKET_API(bool, use_pole_merge)
+ NODE_SOCKET_API(float, pole_merge_angle_from)
+ NODE_SOCKET_API(float, pole_merge_angle_to)
/* anamorphic lens bokeh */
- NODE_PUBLIC_API(float, aperture_ratio)
+ NODE_SOCKET_API(float, aperture_ratio)
/* sensor */
- NODE_PUBLIC_API(float, sensorwidth)
- NODE_PUBLIC_API(float, sensorheight)
+ NODE_SOCKET_API(float, sensorwidth)
+ NODE_SOCKET_API(float, sensorheight)
/* clipping */
- NODE_PUBLIC_API(float, nearclip)
- NODE_PUBLIC_API(float, farclip)
+ NODE_SOCKET_API(float, nearclip)
+ NODE_SOCKET_API(float, farclip)
/* screen */
BoundBox2D viewplane;
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewplane, left)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewplane, right)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewplane, bottom)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewplane, top)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, left)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, right)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, bottom)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewplane, top)
/* width and height change during preview, so we need these for calculating dice rates. */
- NODE_PUBLIC_API(int, full_width)
- NODE_PUBLIC_API(int, full_height)
+ NODE_SOCKET_API(int, full_width)
+ NODE_SOCKET_API(int, full_height)
/* controls how fast the dicing rate falls off for geometry out side of view */
- NODE_PUBLIC_API(float, offscreen_dicing_scale)
+ NODE_SOCKET_API(float, offscreen_dicing_scale)
/* border */
BoundBox2D border;
- NODE_PUBLIC_API_STRUCT_MEMBER(float, border, left)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, border, right)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, border, bottom)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, border, top)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, border, left)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, border, right)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, border, bottom)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, border, top)
BoundBox2D viewport_camera_border;
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewport_camera_border, left)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewport_camera_border, right)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewport_camera_border, bottom)
- NODE_PUBLIC_API_STRUCT_MEMBER(float, viewport_camera_border, top)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, left)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, right)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, bottom)
+ NODE_SOCKET_API_STRUCT_MEMBER(float, viewport_camera_border, top)
/* transformation */
- NODE_PUBLIC_API(Transform, matrix)
+ NODE_SOCKET_API(Transform, matrix)
/* motion */
- NODE_PUBLIC_API_ARRAY(array<Transform>, motion)
- NODE_PUBLIC_API(bool, use_perspective_motion)
- NODE_PUBLIC_API(float, fov_pre)
- NODE_PUBLIC_API(float, fov_post)
+ NODE_SOCKET_API_ARRAY(array<Transform>, motion)
+ NODE_SOCKET_API(bool, use_perspective_motion)
+ NODE_SOCKET_API(float, fov_pre)
+ NODE_SOCKET_API(float, fov_post)
/* computed camera parameters */
ProjectionTransform screentoworld;
diff --git a/intern/cycles/render/film.h b/intern/cycles/render/film.h
index 1f077500bfb..462a7275491 100644
--- a/intern/cycles/render/film.h
+++ b/intern/cycles/render/film.h
@@ -60,27 +60,27 @@ class Film : public Node {
public:
NODE_DECLARE
- NODE_PUBLIC_API(float, exposure)
- NODE_PUBLIC_API(bool, denoising_data_pass)
- NODE_PUBLIC_API(bool, denoising_clean_pass)
- NODE_PUBLIC_API(bool, denoising_prefiltered_pass)
- NODE_PUBLIC_API(int, denoising_flags)
- NODE_PUBLIC_API(float, pass_alpha_threshold)
+ NODE_SOCKET_API(float, exposure)
+ NODE_SOCKET_API(bool, denoising_data_pass)
+ NODE_SOCKET_API(bool, denoising_clean_pass)
+ NODE_SOCKET_API(bool, denoising_prefiltered_pass)
+ NODE_SOCKET_API(int, denoising_flags)
+ NODE_SOCKET_API(float, pass_alpha_threshold)
- NODE_PUBLIC_API(PassType, display_pass)
+ NODE_SOCKET_API(PassType, display_pass)
- NODE_PUBLIC_API(FilterType, filter_type)
- NODE_PUBLIC_API(float, filter_width)
+ NODE_SOCKET_API(FilterType, filter_type)
+ NODE_SOCKET_API(float, filter_width)
- NODE_PUBLIC_API(float, mist_start)
- NODE_PUBLIC_API(float, mist_depth)
- NODE_PUBLIC_API(float, mist_falloff)
+ NODE_SOCKET_API(float, mist_start)
+ NODE_SOCKET_API(float, mist_depth)
+ NODE_SOCKET_API(float, mist_falloff)
- NODE_PUBLIC_API(bool
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list