[Bf-blender-cvs] [ee58e62f23b] functions: rename Surface Location to Surface Hook
Jacques Lucke
noreply at git.blender.org
Wed Dec 4 15:04:16 CET 2019
Commit: ee58e62f23b6ca4dea33618de3b5e00bbd103f99
Author: Jacques Lucke
Date: Wed Dec 4 15:04:10 2019 +0100
Branches: functions
https://developer.blender.org/rBee58e62f23b6ca4dea33618de3b5e00bbd103f99
rename Surface Location to Surface Hook
===================================================================
M release/scripts/startup/nodes/bparticle_nodes/particle_inputs.py
M release/scripts/startup/nodes/function_nodes/object_mesh.py
M release/scripts/startup/nodes/sockets.py
M release/scripts/startup/nodes/types.py
R060 source/blender/blenkernel/BKE_surface_location.h source/blender/blenkernel/BKE_surface_hook.h
M source/blender/blenkernel/CMakeLists.txt
M source/blender/blenkernel/intern/shrinkwrap.c
R064 source/blender/blenkernel/intern/surface_location.cc source/blender/blenkernel/intern/surface_hook.cc
M source/blender/functions/intern/cpp_types.cc
M source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc
M source/blender/functions/intern/inlined_tree_multi_function_network/mappings_sockets.cc
M source/blender/functions/intern/multi_functions/mixed.cc
M source/blender/functions/intern/multi_functions/mixed.h
M source/blender/simulations/bparticles/emitters.cpp
M source/blender/simulations/bparticles/node_frontend.cpp
===================================================================
diff --git a/release/scripts/startup/nodes/bparticle_nodes/particle_inputs.py b/release/scripts/startup/nodes/bparticle_nodes/particle_inputs.py
index 576eda9a488..45336819ae5 100644
--- a/release/scripts/startup/nodes/bparticle_nodes/particle_inputs.py
+++ b/release/scripts/startup/nodes/bparticle_nodes/particle_inputs.py
@@ -13,4 +13,4 @@ class ParticleInfoNode(bpy.types.Node, SimulationNode):
builder.fixed_output("position", "Position", "Vector")
builder.fixed_output("velocity", "Velocity", "Vector")
builder.fixed_output("birth_time", "Birth Time", "Float")
- builder.fixed_output("emit_location", "Emit Location", "Surface Location")
+ builder.fixed_output("emit_location", "Emit Hook", "Surface Hook")
diff --git a/release/scripts/startup/nodes/function_nodes/object_mesh.py b/release/scripts/startup/nodes/function_nodes/object_mesh.py
index 5b18ff87c0a..358181e656a 100644
--- a/release/scripts/startup/nodes/function_nodes/object_mesh.py
+++ b/release/scripts/startup/nodes/function_nodes/object_mesh.py
@@ -27,7 +27,7 @@ class ClosestLocationOnObjectNode(bpy.types.Node, FunctionNode):
def declaration(self, builder):
builder.fixed_input("object", "Object", "Object")
builder.fixed_input("position", "Position", "Vector")
- builder.fixed_output("closest_point", "Closest Location", "Surface Location")
+ builder.fixed_output("closest_hook", "Closest Hook", "Surface Hook")
class GetPositionOnSurfaceNode(bpy.types.Node, FunctionNode):
@@ -35,7 +35,7 @@ class GetPositionOnSurfaceNode(bpy.types.Node, FunctionNode):
bl_label = "Get Position on Surface"
def declaration(self, builder):
- builder.fixed_input("location", "Location", "Surface Location")
+ builder.fixed_input("surface_hook", "Surface Hook", "Surface Hook")
builder.fixed_output("position", "Position", "Vector")
@@ -44,7 +44,7 @@ class GetNormalOnSurfaceNode(bpy.types.Node, FunctionNode):
bl_label = "Get Normal on Surface"
def declaration(self, builder):
- builder.fixed_input("location", "Location", "Surface Location")
+ builder.fixed_input("surface_hook", "Surface Hook", "Surface Hook")
builder.fixed_output("normal", "Normal", "Vector")
@@ -58,7 +58,7 @@ class GetWeightOnSurfaceNode(bpy.types.Node, FunctionNode):
)
def declaration(self, builder):
- builder.fixed_input("location", "Location", "Surface Location")
+ builder.fixed_input("surface_hook", "Surface Hook", "Surface Hook")
builder.fixed_output("weight", "Weight", "Float")
def draw(self, layout):
@@ -75,7 +75,7 @@ class GetImageColorOnSurfaceNode(bpy.types.Node, FunctionNode):
)
def declaration(self, builder: NodeBuilder):
- builder.fixed_input("location", "Location", "Surface Location")
+ builder.fixed_input("surface_hook", "Surface Hook", "Surface Hook")
builder.fixed_output("color", "Color", "Color")
def draw(self, layout):
diff --git a/release/scripts/startup/nodes/sockets.py b/release/scripts/startup/nodes/sockets.py
index cae9fa23c61..3e6e06f3553 100644
--- a/release/scripts/startup/nodes/sockets.py
+++ b/release/scripts/startup/nodes/sockets.py
@@ -177,10 +177,10 @@ ColorListSocket = create_simple_data_socket(
"fn_ColorListSocket", "Color List", (0.8, 0.8, 0.2, 0.5))
TextListSocket = create_simple_data_socket(
"fn_TextListSocket", "Text List", (0.8, 0.8, 0.8, 0.5))
-SurfaceLocationSocket = create_simple_data_socket(
- "fn_SurfaceLocationSocket", "Surface Location", (0.2, 0.8, 0.2, 1.0))
-SurfaceLocationListSocket = create_simple_data_socket(
- "fn_SurfaceLocationListSocket", "Surface Location List", (0.2, 0.8, 0.2, 0.5))
+SurfaceHookSocket = create_simple_data_socket(
+ "fn_SurfaceHookSocket", "Surface Hook", (0.2, 0.8, 0.2, 1.0))
+SurfaceHookListSocket = create_simple_data_socket(
+ "fn_SurfaceHookListSocket", "Surface Hook List", (0.2, 0.8, 0.2, 0.5))
class ExecuteSocket(bpy.types.NodeSocket, BaseSocket):
bl_idname = "fn_ExecuteSocket"
diff --git a/release/scripts/startup/nodes/types.py b/release/scripts/startup/nodes/types.py
index 6125c6674c7..bd4fb9448ba 100644
--- a/release/scripts/startup/nodes/types.py
+++ b/release/scripts/startup/nodes/types.py
@@ -10,6 +10,6 @@ type_infos.insert_data_type(s.BooleanSocket, s.BooleanListSocket)
type_infos.insert_data_type(s.ObjectSocket, s.ObjectListSocket)
type_infos.insert_data_type(s.ColorSocket, s.ColorListSocket)
type_infos.insert_data_type(s.TextSocket, s.TextListSocket)
-type_infos.insert_data_type(s.SurfaceLocationSocket, s.SurfaceLocationListSocket)
+type_infos.insert_data_type(s.SurfaceHookSocket, s.SurfaceHookListSocket)
type_infos.insert_conversion_group(["Boolean", "Integer", "Float"])
diff --git a/source/blender/blenkernel/BKE_surface_location.h b/source/blender/blenkernel/BKE_surface_hook.h
similarity index 60%
rename from source/blender/blenkernel/BKE_surface_location.h
rename to source/blender/blenkernel/BKE_surface_hook.h
index 8d55f0e2216..5bff23dbb96 100644
--- a/source/blender/blenkernel/BKE_surface_location.h
+++ b/source/blender/blenkernel/BKE_surface_hook.h
@@ -1,5 +1,5 @@
-#ifndef __BKE_SURFACE_LOCATION_H__
-#define __BKE_SURFACE_LOCATION_H__
+#ifndef __BKE_SURFACE_HOOK_H__
+#define __BKE_SURFACE_HOOK_H__
#include "BLI_utildefines.h"
#include "BLI_math_cxx.h"
@@ -10,7 +10,7 @@ namespace BKE {
using BLI::float3;
-namespace SurfaceLocationType {
+namespace SurfaceHookType {
enum Enum {
None,
MeshObject,
@@ -20,9 +20,9 @@ enum Enum {
/**
* References a point on a surface. If the surface moves, the point moves with it.
*/
-class SurfaceLocation {
+class SurfaceHook {
private:
- SurfaceLocationType::Enum m_type;
+ SurfaceHookType::Enum m_type;
/**
* Used to identify the object if m_type is MeshObject.
@@ -36,47 +36,47 @@ class SurfaceLocation {
float3 m_bary_coords;
public:
- SurfaceLocation() : m_type(SurfaceLocationType::None)
+ SurfaceHook() : m_type(SurfaceHookType::None)
{
}
- SurfaceLocation(ObjectIDHandle object_handle, uint32_t triangle_index, float3 bary_coords)
- : m_type(SurfaceLocationType::MeshObject),
+ SurfaceHook(ObjectIDHandle object_handle, uint32_t triangle_index, float3 bary_coords)
+ : m_type(SurfaceHookType::MeshObject),
m_object_handle(object_handle),
m_triangle_index(triangle_index),
m_bary_coords(bary_coords)
{
}
- SurfaceLocationType::Enum type() const
+ SurfaceHookType::Enum type() const
{
return m_type;
}
bool is_valid() const
{
- return m_type != SurfaceLocationType::None;
+ return m_type != SurfaceHookType::None;
}
ObjectIDHandle object_handle() const
{
- BLI_assert(m_type == SurfaceLocationType::MeshObject);
+ BLI_assert(m_type == SurfaceHookType::MeshObject);
return m_object_handle;
}
uint32_t triangle_index() const
{
- BLI_assert(m_type == SurfaceLocationType::MeshObject);
+ BLI_assert(m_type == SurfaceHookType::MeshObject);
return m_triangle_index;
}
float3 bary_coords() const
{
- BLI_assert(m_type == SurfaceLocationType::MeshObject);
+ BLI_assert(m_type == SurfaceHookType::MeshObject);
return m_bary_coords;
}
};
} // namespace BKE
-#endif /* __BKE_SURFACE_LOCATION_H__ */
+#endif /* __BKE_SURFACE_HOOK_H__ */
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index a5a453bfc43..806b0191766 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -220,7 +220,7 @@ set(SRC
intern/subdiv_stats.c
intern/subdiv_topology.c
intern/subsurf_ccg.c
- intern/surface_location.cc
+ intern/surface_hook.cc
intern/text.c
intern/text_suggestions.c
intern/texture.c
@@ -360,7 +360,7 @@ set(SRC
BKE_subdiv_mesh.h
BKE_subdiv_topology.h
BKE_subsurf.h
- BKE_surface_location.h
+ BKE_surface_hook.h
BKE_text.h
BKE_text_suggestions.h
BKE_texture.h
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index c6cac2057d6..ea9206895f6 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -721,7 +721,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
/*
* Shrinkwrap Target Surface Project mode
*
- * It uses Newton's method to find a surface location with its
+ * It uses Newton's method to find a Surface Hook with its
* smooth normal pointing at the original point.
*
* The equation system on barycentric weights and normal multiplier:
diff --git a/source/blender/blenkernel/intern/surface_location.cc b/source/blender/blenkernel/intern/surface_hook.cc
similarity index 64%
rename from source/blender/blenkernel/intern/surface_location.cc
rename to source/blender/blenkernel/intern/surface_hook.cc
index 2588c19c30b..b8ff99cf505 100644
--- a/source/blender/blenkernel/intern/surface_location.cc
+++ b/source/blender/blenkernel/intern/surface_hook.cc
@@ -1,4 +1,4 @@
-#include "BKE_surface_location.h"
+#include "BKE_surface_hook.h"
#include "BLI_hash.h"
diff --git a/source/blender/functions/intern/cpp_types.cc b/source/blender/functions/intern/cpp_types.cc
index 3c748db5172..7d37630b109 100644
--- a/source/blender/functions/intern/cpp_types.cc
+++ b/source/blender/functions/intern/cpp_types.cc
@@ -3,7 +3,7 @@
#include "BLI_math_cxx.h"
-#include "BKE_surface_location.h"
+#include "BKE_surface_hook.h"
namespace FN {
@@ -100,6 +100,6 @@ MAKE_CPP_TYPE(int32, int32_t)
MAKE_CPP_TYPE(rgba_f, BLI::rgba_f)
MAKE_CPP_TYPE(float3, BLI::float3)
MAKE_CPP_TYPE(string, std::string)
-MAKE_CPP_TYPE(SurfaceLocation, BKE::SurfaceLocation)
+MAKE_CPP_TYPE(SurfaceHook, BKE::SurfaceHook)
} // namespace FN
diff --git a/source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc b/source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc
index 18627164f8a..65ff29856c0 100644
--- a/source/blender/functions/intern/inlined_tree_multi_function_network/mappings_nodes.cc
+++ b/source/blen
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list