Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-02-07 20:55:54 +0300
committerHans Goudey <h.goudey@me.com>2022-02-07 20:56:48 +0300
commitfe1816f67fbc6aaf383ec77847d668367335d093 (patch)
treeb89fc16a38a498c8b8ca96f9c50ee1a765d167fe /source/blender/editors
parentb8c764c5d1fa241a284b985936a96efe0ee23a0f (diff)
Curves: Rename "Hair" types, variables, and functions to "Curves"
Based on discussions from T95355 and T94193, the plan is to use the name "Curves" to describe the data-block container for multiple curves. Eventually this will replace the existing "Curve" data-block. However, it will be a while before the curve data-block can be replaced so in order to distinguish the two curve types in the UI, "Hair Curves" will be used, but eventually changed back to "Curves". This patch renames "hair-related" files, functions, types, and variable names to this convention. A deep rename is preferred to keep code consistent and to avoid any "hair" terminology from leaking, since the new data-block is meant for all curve types, not just hair use cases. The downside of this naming is that the difference between "Curve" and "Curves" has become important. That was considered during design discussons and deemed acceptable, especially given the non-permanent nature of the somewhat common conflict. Some points of interest: - All DNA compatibility is lost, just like rBf59767ff9729. - I renamed `ID_HA` to `ID_CV` so there is no complete mismatch. - `hair_curves` is used where necessary to distinguish from the existing "curves" plural. - I didn't rename any of the cycles/rendering code function names, since that is also used by the old hair particle system. Differential Revision: https://developer.blender.org/D14007
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c38
-rw-r--r--source/blender/editors/animation/anim_filter.c14
-rw-r--r--source/blender/editors/include/ED_anim_api.h2
-rw-r--r--source/blender/editors/include/UI_icons.h8
-rw-r--r--source/blender/editors/interface/interface_icons.c4
-rw-r--r--source/blender/editors/interface/interface_templates.c6
-rw-r--r--source/blender/editors/object/CMakeLists.txt2
-rw-r--r--source/blender/editors/object/object_add.c24
-rw-r--r--source/blender/editors/object/object_intern.h2
-rw-r--r--source/blender/editors/object/object_modifier.c6
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/object/object_relations.c4
-rw-r--r--source/blender/editors/render/render_opengl.cc2
-rw-r--r--source/blender/editors/space_buttons/CMakeLists.txt2
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c16
-rw-r--r--source/blender/editors/space_info/info_stats.cc2
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.cc8
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.hh2
-rw-r--r--source/blender/editors/space_outliner/outliner_select.cc2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.cc12
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.cc10
-rw-r--r--source/blender/editors/space_outliner/tree/tree_element_id.cc2
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c2
23 files changed, 87 insertions, 85 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 5afb9334612..a697fd2fc96 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -35,8 +35,8 @@
#include "DNA_armature_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_camera_types.h"
+#include "DNA_curves_types.h"
#include "DNA_gpencil_types.h"
-#include "DNA_hair_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_light_types.h"
@@ -700,8 +700,8 @@ static int acf_object_icon(bAnimListElem *ale)
return ICON_OUTLINER_OB_FONT;
case OB_SURF:
return ICON_OUTLINER_OB_SURFACE;
- case OB_HAIR:
- return ICON_OUTLINER_OB_HAIR;
+ case OB_CURVES:
+ return ICON_OUTLINER_OB_CURVES;
case OB_POINTCLOUD:
return ICON_OUTLINER_OB_POINTCLOUD;
case OB_VOLUME:
@@ -2813,15 +2813,15 @@ static bAnimChannelType ACF_DSSPK = {
/* Hair Expander ------------------------------------------- */
/* TODO: just get this from RNA? */
-static int acf_dshair_icon(bAnimListElem *UNUSED(ale))
+static int acf_dscurves_icon(bAnimListElem *UNUSED(ale))
{
- return ICON_HAIR_DATA;
+ return ICON_CURVES_DATA;
}
/* Get the appropriate flag(s) for the setting when it is valid. */
-static int acf_dshair_setting_flag(bAnimContext *UNUSED(ac),
- eAnimChannel_Settings setting,
- bool *neg)
+static int acf_dscurves_setting_flag(bAnimContext *UNUSED(ac),
+ eAnimChannel_Settings setting,
+ bool *neg)
{
/* clear extra return data first */
*neg = false;
@@ -2846,22 +2846,24 @@ static int acf_dshair_setting_flag(bAnimContext *UNUSED(ac),
}
/* get pointer to the setting */
-static void *acf_dshair_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings setting, short *type)
+static void *acf_dscurves_setting_ptr(bAnimListElem *ale,
+ eAnimChannel_Settings setting,
+ short *type)
{
- Hair *hair = (Hair *)ale->data;
+ Curves *curves = (Curves *)ale->data;
/* clear extra return data first */
*type = 0;
switch (setting) {
case ACHANNEL_SETTING_EXPAND: /* expanded */
- return GET_ACF_FLAG_PTR(hair->flag, type);
+ return GET_ACF_FLAG_PTR(curves->flag, type);
case ACHANNEL_SETTING_SELECT: /* selected */
case ACHANNEL_SETTING_MUTE: /* muted (for NLA only) */
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
- if (hair->adt) {
- return GET_ACF_FLAG_PTR(hair->adt->flag, type);
+ if (curves->adt) {
+ return GET_ACF_FLAG_PTR(curves->adt->flag, type);
}
return NULL;
@@ -2870,9 +2872,9 @@ static void *acf_dshair_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings se
}
}
-/* hair expander type define */
+/* Curves expander type define */
static bAnimChannelType ACF_DSHAIR = {
- "Hair Expander", /* type name */
+ "Curves Expander", /* type name */
ACHANNEL_ROLE_EXPANDER, /* role */
acf_generic_dataexpand_color, /* backdrop color */
@@ -2882,11 +2884,11 @@ static bAnimChannelType ACF_DSHAIR = {
acf_generic_idblock_name, /* name */
acf_generic_idblock_name_prop, /* name prop */
- acf_dshair_icon, /* icon */
+ acf_dscurves_icon, /* icon */
acf_generic_dataexpand_setting_valid, /* has setting */
- acf_dshair_setting_flag, /* flag for setting */
- acf_dshair_setting_ptr /* pointer for setting */
+ acf_dscurves_setting_flag, /* flag for setting */
+ acf_dscurves_setting_ptr /* pointer for setting */
};
/* PointCloud Expander ------------------------------------------- */
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index c1a09b9d21f..3307385b84a 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -47,8 +47,8 @@
#include "DNA_brush_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_camera_types.h"
+#include "DNA_curves_types.h"
#include "DNA_gpencil_types.h"
-#include "DNA_hair_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_layer_types.h"
@@ -791,10 +791,10 @@ static bAnimListElem *make_new_animlistelem(void *data,
break;
}
case ANIMTYPE_DSHAIR: {
- Hair *hair = (Hair *)data;
- AnimData *adt = hair->adt;
+ Curves *curves = (Curves *)data;
+ AnimData *adt = curves->adt;
- ale->flag = FILTER_HAIR_OBJD(hair);
+ ale->flag = FILTER_CURVES_OBJD(curves);
ale->key_data = (adt) ? adt->action : NULL;
ale->datatype = ALE_ACT;
@@ -2616,16 +2616,16 @@ static size_t animdata_filter_ds_obdata(
expanded = FILTER_SPK_OBJD(spk);
break;
}
- case OB_HAIR: /* ---------- Hair ----------- */
+ case OB_CURVES: /* ---------- Curves ----------- */
{
- Hair *hair = (Hair *)ob->data;
+ Curves *curves = (Curves *)ob->data;
if (ads->filterflag2 & ADS_FILTER_NOHAIR) {
return 0;
}
type = ANIMTYPE_DSHAIR;
- expanded = FILTER_HAIR_OBJD(hair);
+ expanded = FILTER_CURVES_OBJD(curves);
break;
}
case OB_POINTCLOUD: /* ---------- PointCloud ----------- */
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 3294316f880..04a892ab411 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -378,7 +378,7 @@ typedef enum eAnimFilter_Flags {
#define FILTER_MESH_OBJD(me) (CHECK_TYPE_INLINE(me, Mesh *), ((me->flag & ME_DS_EXPAND)))
#define FILTER_LATTICE_OBJD(lt) (CHECK_TYPE_INLINE(lt, Lattice *), ((lt->flag & LT_DS_EXPAND)))
#define FILTER_SPK_OBJD(spk) (CHECK_TYPE_INLINE(spk, Speaker *), ((spk->flag & SPK_DS_EXPAND)))
-#define FILTER_HAIR_OBJD(ha) (CHECK_TYPE_INLINE(ha, Hair *), ((ha->flag & HA_DS_EXPAND)))
+#define FILTER_CURVES_OBJD(ha) (CHECK_TYPE_INLINE(ha, Curves *), ((ha->flag & HA_DS_EXPAND)))
#define FILTER_POINTS_OBJD(pt) (CHECK_TYPE_INLINE(pt, PointCloud *), ((pt->flag & PT_DS_EXPAND)))
#define FILTER_VOLUME_OBJD(vo) (CHECK_TYPE_INLINE(vo, Volume *), ((vo->flag & VO_DS_EXPAND)))
#define FILTER_SIMULATION_OBJD(sim) \
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index 4cf606bf98d..05353de2f92 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -752,9 +752,9 @@ DEF_ICON_BLANK(257)
DEF_ICON_BLANK(257b)
/* ADDITIONAL OBJECT TYPES */
-DEF_ICON_OBJECT(OUTLINER_OB_HAIR)
-DEF_ICON_OBJECT_DATA(OUTLINER_DATA_HAIR)
-DEF_ICON_OBJECT_DATA(HAIR_DATA)
+DEF_ICON_OBJECT(OUTLINER_OB_CURVES)
+DEF_ICON_OBJECT_DATA(OUTLINER_DATA_CURVES)
+DEF_ICON_OBJECT_DATA(CURVES_DATA)
DEF_ICON_OBJECT(OUTLINER_OB_POINTCLOUD)
DEF_ICON_OBJECT_DATA(OUTLINER_DATA_POINTCLOUD)
DEF_ICON_OBJECT_DATA(POINTCLOUD_DATA)
@@ -840,7 +840,7 @@ DEF_ICON(MATPLANE)
DEF_ICON(MATSPHERE)
DEF_ICON(MATCUBE)
DEF_ICON(MONKEY)
-DEF_ICON(HAIR)
+DEF_ICON(CURVES)
DEF_ICON(ALIASED)
DEF_ICON(ANTIALIASED)
DEF_ICON(MAT_SPHERE_SKY)
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index c0d6b8a1a6c..d7d3288a68d 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -2335,8 +2335,8 @@ int UI_icon_from_idcode(const int idcode)
return ICON_TEXT;
case ID_VF:
return ICON_FONT_DATA;
- case ID_HA:
- return ICON_HAIR_DATA;
+ case ID_CV:
+ return ICON_CURVES_DATA;
case ID_PT:
return ICON_POINTCLOUD_DATA;
case ID_VO:
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index d605847c270..1f81dd21b83 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -792,8 +792,8 @@ static const char *template_id_browse_tip(const StructRNA *type)
return N_("Browse Workspace to be linked");
case ID_LP:
return N_("Browse LightProbe to be linked");
- case ID_HA:
- return N_("Browse Hair Data to be linked");
+ case ID_CV:
+ return N_("Browse Hair Curves Data to be linked");
case ID_PT:
return N_("Browse Point Cloud Data to be linked");
case ID_VO:
@@ -874,7 +874,7 @@ static uiBut *template_id_def_new_but(uiBlock *block,
BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE,
BLT_I18NCONTEXT_ID_WORKSPACE,
BLT_I18NCONTEXT_ID_LIGHTPROBE,
- BLT_I18NCONTEXT_ID_HAIR,
+ BLT_I18NCONTEXT_ID_CURVES,
BLT_I18NCONTEXT_ID_POINTCLOUD,
BLT_I18NCONTEXT_ID_VOLUME,
BLT_I18NCONTEXT_ID_SIMULATION, );
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt
index a953c7d7f89..df76e605ebb 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -88,7 +88,7 @@ endif()
if(WITH_EXPERIMENTAL_FEATURES)
add_definitions(-DWITH_SIMULATION_DATABLOCK)
add_definitions(-DWITH_POINT_CLOUD)
- add_definitions(-DWITH_HAIR_NODES)
+ add_definitions(-DWITH_NEW_CURVES_TYPE)
endif()
blender_add_lib(bf_editor_object "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 0f1b0f5bdc0..d1deb6824ea 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -62,6 +62,7 @@
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_curve.h"
+#include "BKE_curves.h"
#include "BKE_displist.h"
#include "BKE_duplilist.h"
#include "BKE_effect.h"
@@ -69,7 +70,6 @@
#include "BKE_gpencil_curve.h"
#include "BKE_gpencil_geom.h"
#include "BKE_gpencil_modifier.h"
-#include "BKE_hair.h"
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_layer.h"
@@ -1894,18 +1894,18 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot)
/** \} */
/* -------------------------------------------------------------------- */
-/** \name Add Hair Operator
+/** \name Add Hair Curves Operator
* \{ */
-static bool object_hair_add_poll(bContext *C)
+static bool object_hair_curves_add_poll(bContext *C)
{
- if (!U.experimental.use_new_hair_type) {
+ if (!U.experimental.use_new_curves_type) {
return false;
}
return ED_operator_objectmode(C);
}
-static int object_hair_add_exec(bContext *C, wmOperator *op)
+static int object_hair_curves_add_exec(bContext *C, wmOperator *op)
{
ushort local_view_bits;
float loc[3], rot[3];
@@ -1913,22 +1913,22 @@ static int object_hair_add_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- Object *object = ED_object_add_type(C, OB_HAIR, NULL, loc, rot, false, local_view_bits);
+ Object *object = ED_object_add_type(C, OB_CURVES, NULL, loc, rot, false, local_view_bits);
object->dtx |= OB_DRAWBOUNDOX; /* TODO: remove once there is actual drawing. */
return OPERATOR_FINISHED;
}
-void OBJECT_OT_hair_add(wmOperatorType *ot)
+void OBJECT_OT_hair_curves_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Add Hair";
- ot->description = "Add a hair object to the scene";
- ot->idname = "OBJECT_OT_hair_add";
+ ot->name = "Add Hair Curves";
+ ot->description = "Add a hair curves object to the scene";
+ ot->idname = "OBJECT_OT_hair_curves_add";
/* api callbacks */
- ot->exec = object_hair_add_exec;
- ot->poll = object_hair_add_poll;
+ ot->exec = object_hair_curves_add_exec;
+ ot->poll = object_hair_curves_add_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index f478f5004d4..ddd44fb9ded 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -129,7 +129,7 @@ void OBJECT_OT_light_add(struct wmOperatorType *ot);
void OBJECT_OT_effector_add(struct wmOperatorType *ot);
void OBJECT_OT_camera_add(struct wmOperatorType *ot);
void OBJECT_OT_speaker_add(struct wmOperatorType *ot);
-void OBJECT_OT_hair_add(struct wmOperatorType *ot);
+void OBJECT_OT_hair_curves_add(struct wmOperatorType *ot);
void OBJECT_OT_pointcloud_add(struct wmOperatorType *ot);
/**
* Only used as menu.
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 775fac96d57..af428512cfd 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -53,12 +53,12 @@
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_curve.h"
+#include "BKE_curves.h"
#include "BKE_displist.h"
#include "BKE_editmesh.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_gpencil_modifier.h"
-#include "BKE_hair.h"
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_lib_id.h"
@@ -132,8 +132,8 @@ static void object_force_modifier_update_for_bind(Depsgraph *depsgraph, Object *
else if (ob->type == OB_GPENCIL) {
BKE_gpencil_modifiers_calc(depsgraph, scene_eval, ob_eval);
}
- else if (ob->type == OB_HAIR) {
- BKE_hair_data_update(depsgraph, scene_eval, ob);
+ else if (ob->type == OB_CURVES) {
+ BKE_curves_data_update(depsgraph, scene_eval, ob);
}
else if (ob->type == OB_POINTCLOUD) {
BKE_pointcloud_data_update(depsgraph, scene_eval, ob);
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 03a36006fea..a9a429e7e6f 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -105,7 +105,7 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_light_add);
WM_operatortype_append(OBJECT_OT_camera_add);
WM_operatortype_append(OBJECT_OT_speaker_add);
- WM_operatortype_append(OBJECT_OT_hair_add);
+ WM_operatortype_append(OBJECT_OT_hair_curves_add);
WM_operatortype_append(OBJECT_OT_pointcloud_add);
WM_operatortype_append(OBJECT_OT_volume_add);
WM_operatortype_append(OBJECT_OT_volume_import);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 57a0fe0a39d..8678bf9bd92 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -63,11 +63,11 @@
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_curve.h"
+#include "BKE_curves.h"
#include "BKE_displist.h"
#include "BKE_editmesh.h"
#include "BKE_fcurve.h"
#include "BKE_gpencil.h"
-#include "BKE_hair.h"
#include "BKE_idprop.h"
#include "BKE_idtype.h"
#include "BKE_lattice.h"
@@ -1872,7 +1872,7 @@ static void single_obdata_users(
ob->data,
BKE_id_copy_ex(bmain, ob->data, NULL, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS));
break;
- case OB_HAIR:
+ case OB_CURVES:
ob->data = ID_NEW_SET(
ob->data,
BKE_id_copy_ex(bmain, ob->data, NULL, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS));
diff --git a/source/blender/editors/render/render_opengl.cc b/source/blender/editors/render/render_opengl.cc
index c4ce8bac126..fb6742c9fd5 100644
--- a/source/blender/editors/render/render_opengl.cc
+++ b/source/blender/editors/render/render_opengl.cc
@@ -635,7 +635,7 @@ static int gather_frames_to_render_for_id(LibraryIDLinkCallbackData *cb_data)
case ID_MC: /* MovieClip */
case ID_MSK: /* Mask */
case ID_LP: /* LightProbe */
- case ID_HA: /* Hair */
+ case ID_CV: /* Curves */
case ID_PT: /* PointCloud */
case ID_VO: /* Volume */
case ID_SIM: /* Simulation */
diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt
index e2b2579c256..14cc03e3120 100644
--- a/source/blender/editors/space_buttons/CMakeLists.txt
+++ b/source/blender/editors/space_buttons/CMakeLists.txt
@@ -48,7 +48,7 @@ endif()
if(WITH_EXPERIMENTAL_FEATURES)
add_definitions(-DWITH_SIMULATION_DATABLOCK)
add_definitions(-DWITH_POINT_CLOUD)
- add_definitions(-DWITH_HAIR_NODES)
+ add_definitions(-DWITH_NEW_CURVES_TYPE)
endif()
blender_add_lib(bf_editor_space_buttons "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index f5107cb13fd..b83396b10d9 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -273,8 +273,8 @@ static bool buttons_context_path_data(ButsContextPath *path, int type)
if (RNA_struct_is_a(ptr->type, &RNA_GreasePencil) && (ELEM(type, -1, OB_GPENCIL))) {
return true;
}
-#ifdef WITH_HAIR_NODES
- if (RNA_struct_is_a(ptr->type, &RNA_Hair) && (ELEM(type, -1, OB_HAIR))) {
+#ifdef WITH_NEW_CURVES_TYPE
+ if (RNA_struct_is_a(ptr->type, &RNA_Curves) && (ELEM(type, -1, OB_CURVES))) {
return true;
}
#endif
@@ -314,7 +314,7 @@ static bool buttons_context_path_modifier(ButsContextPath *path)
OB_SURF,
OB_LATTICE,
OB_GPENCIL,
- OB_HAIR,
+ OB_CURVES,
OB_POINTCLOUD,
OB_VOLUME)) {
ModifierData *md = BKE_object_active_modifier(ob);
@@ -845,8 +845,8 @@ const char *buttons_context_dir[] = {
"line_style",
"collection",
"gpencil",
-#ifdef WITH_HAIR_NODES
- "hair",
+#ifdef WITH_NEW_CURVES_TYPE
+ "curves",
#endif
#ifdef WITH_POINT_CLOUD
"pointcloud",
@@ -941,9 +941,9 @@ int /*eContextResult*/ buttons_context(const bContext *C,
set_pointer_type(path, result, &RNA_LightProbe);
return CTX_RESULT_OK;
}
-#ifdef WITH_HAIR_NODES
- if (CTX_data_equals(member, "hair")) {
- set_pointer_type(path, result, &RNA_Hair);
+#ifdef WITH_NEW_CURVES_TYPE
+ if (CTX_data_equals(member, "curves")) {
+ set_pointer_type(path, result, &RNA_Curves);
return CTX_RESULT_OK;
}
#endif
diff --git a/source/blender/editors/space_info/info_stats.cc b/source/blender/editors/space_info/info_stats.cc
index 005ae0214cd..a1eacc2bc3a 100644
--- a/source/blender/editors/space_info/info_stats.cc
+++ b/source/blender/editors/space_info/info_stats.cc
@@ -219,7 +219,7 @@ static void stats_object(Object *ob,
}
break;
}
- case OB_HAIR:
+ case OB_CURVES:
case OB_POINTCLOUD:
case OB_VOLUME: {
break;
diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 259fdd4e009..13c273d1ec9 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -2632,8 +2632,8 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
case OB_LIGHTPROBE:
data.icon = ICON_OUTLINER_OB_LIGHTPROBE;
break;
- case OB_HAIR:
- data.icon = ICON_OUTLINER_OB_HAIR;
+ case OB_CURVES:
+ data.icon = ICON_OUTLINER_OB_CURVES;
break;
case OB_POINTCLOUD:
data.icon = ICON_OUTLINER_OB_POINTCLOUD;
@@ -2746,8 +2746,8 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
case ID_GR:
data.icon = ICON_OUTLINER_COLLECTION;
break;
- case ID_HA:
- data.icon = ICON_OUTLINER_DATA_HAIR;
+ case ID_CV:
+ data.icon = ICON_OUTLINER_DATA_CURVES;
break;
case ID_PT:
data.icon = ICON_OUTLINER_DATA_POINTCLOUD;
diff --git a/source/blender/editors/space_outliner/outliner_intern.hh b/source/blender/editors/space_outliner/outliner_intern.hh
index bd288241a63..efbd8a32716 100644
--- a/source/blender/editors/space_outliner/outliner_intern.hh
+++ b/source/blender/editors/space_outliner/outliner_intern.hh
@@ -145,7 +145,7 @@ typedef struct TreeElementIcon {
ID_GD, \
ID_LS, \
ID_LP, \
- ID_HA, \
+ ID_CV, \
ID_PT, \
ID_VO, \
ID_SIM) || /* Only in 'blendfile' mode ... :/ */ \
diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc
index ebb4e529b04..f256475c0da 100644
--- a/source/blender/editors/space_outliner/outliner_select.cc
+++ b/source/blender/editors/space_outliner/outliner_select.cc
@@ -1198,7 +1198,7 @@ static void outliner_set_properties_tab(bContext *C, TreeElement *te, TreeStoreE
case ID_AR:
case ID_GD:
case ID_LP:
- case ID_HA:
+ case ID_CV:
case ID_PT:
case ID_VO:
context = BCONTEXT_DATA;
diff --git a/source/blender/editors/space_outliner/outliner_tools.cc b/source/blender/editors/space_outliner/outliner_tools.cc
index 3b8c284cd65..337649834a4 100644
--- a/source/blender/editors/space_outliner/outliner_tools.cc
+++ b/source/blender/editors/space_outliner/outliner_tools.cc
@@ -29,8 +29,8 @@
#include "DNA_armature_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_curves_types.h"
#include "DNA_gpencil_types.h"
-#include "DNA_hair_types.h"
#include "DNA_light_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_material_types.h"
@@ -164,7 +164,7 @@ static void get_element_operation_type(
case ID_CF:
case ID_WS:
case ID_LP:
- case ID_HA:
+ case ID_CV:
case ID_PT:
case ID_VO:
case ID_SIM:
@@ -262,10 +262,10 @@ static void unlink_material_fn(bContext *UNUSED(C),
totcol = mb->totcol;
matar = mb->mat;
}
- else if (GS(tsep->id->name) == ID_HA) {
- Hair *hair = (Hair *)tsep->id;
- totcol = hair->totcol;
- matar = hair->mat;
+ else if (GS(tsep->id->name) == ID_CV) {
+ Curves *curves = (Curves *)tsep->id;
+ totcol = curves->totcol;
+ matar = curves->mat;
}
else if (GS(tsep->id->name) == ID_PT) {
PointCloud *pointcloud = (PointCloud *)tsep->id;
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc
index 4e16fe64988..60f5437ad88 100644
--- a/source/blender/editors/space_outliner/outliner_tree.cc
+++ b/source/blender/editors/space_outliner/outliner_tree.cc
@@ -32,9 +32,9 @@
#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_curves_types.h"
#include "DNA_gpencil_modifier_types.h"
#include "DNA_gpencil_types.h"
-#include "DNA_hair_types.h"
#include "DNA_key_types.h"
#include "DNA_light_types.h"
#include "DNA_lightprobe_types.h"
@@ -773,10 +773,10 @@ static void outliner_add_id_contents(SpaceOutliner *space_outliner,
}
break;
}
- case ID_HA: {
- Hair *hair = (Hair *)id;
- if (outliner_animdata_test(hair->adt)) {
- outliner_add_element(space_outliner, &te->subtree, hair, te, TSE_ANIM_DATA, 0);
+ case ID_CV: {
+ Curves *curves = (Curves *)id;
+ if (outliner_animdata_test(curves->adt)) {
+ outliner_add_element(space_outliner, &te->subtree, curves, te, TSE_ANIM_DATA, 0);
}
break;
}
diff --git a/source/blender/editors/space_outliner/tree/tree_element_id.cc b/source/blender/editors/space_outliner/tree/tree_element_id.cc
index afbbd171cf4..3289cb8ac76 100644
--- a/source/blender/editors/space_outliner/tree/tree_element_id.cc
+++ b/source/blender/editors/space_outliner/tree/tree_element_id.cc
@@ -69,7 +69,7 @@ std::unique_ptr<TreeElementID> TreeElementID::createFromID(TreeElement &legacy_t
case ID_LP:
case ID_GD:
case ID_WS:
- case ID_HA:
+ case ID_CV:
case ID_PT:
case ID_VO:
case ID_SIM:
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 243d4033cbc..bfc18eed847 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -1764,7 +1764,7 @@ static void view3d_panel_transform(const bContext *C, Panel *panel)
v3d_transform_butsR(col, &obptr);
/* Dimensions and editmode are mostly the same check. */
- if (OB_TYPE_SUPPORT_EDITMODE(ob->type) || ELEM(ob->type, OB_VOLUME, OB_HAIR, OB_POINTCLOUD)) {
+ if (OB_TYPE_SUPPORT_EDITMODE(ob->type) || ELEM(ob->type, OB_VOLUME, OB_CURVES, OB_POINTCLOUD)) {
View3D *v3d = CTX_wm_view3d(C);
v3d_object_dimension_buts(NULL, col, v3d, ob);
}