Point Cloud: expose in Python API for release, now that Cycles uses it
Previously it was only part of experimental features in beta, however now renderers can render point clouds generated by geometry nodes. Adding or converting a point cloud object directly is still hidden by default, since there is no good way to edit it.
This commit is contained in:
parent
ec1b0c2014
commit
932d8dba52
|
@ -70,6 +70,7 @@ set(DEFSRC
|
|||
rna_packedfile.c
|
||||
rna_palette.c
|
||||
rna_particle.c
|
||||
rna_pointcloud.c
|
||||
rna_pose.c
|
||||
rna_render.c
|
||||
rna_rigidbody.c
|
||||
|
@ -100,11 +101,9 @@ set(DEFSRC
|
|||
|
||||
if(WITH_EXPERIMENTAL_FEATURES)
|
||||
add_definitions(-DWITH_SIMULATION_DATABLOCK)
|
||||
add_definitions(-DWITH_POINT_CLOUD)
|
||||
add_definitions(-DWITH_HAIR_NODES)
|
||||
list(APPEND DEFSRC
|
||||
rna_hair.c
|
||||
rna_pointcloud.c
|
||||
rna_simulation.c
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -4401,9 +4401,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
|
|||
{"rna_packedfile.c", NULL, RNA_def_packedfile},
|
||||
{"rna_palette.c", NULL, RNA_def_palette},
|
||||
{"rna_particle.c", NULL, RNA_def_particle},
|
||||
#ifdef WITH_POINT_CLOUD
|
||||
{"rna_pointcloud.c", NULL, RNA_def_pointcloud},
|
||||
#endif
|
||||
{"rna_pose.c", "rna_pose_api.c", RNA_def_pose},
|
||||
{"rna_curveprofile.c", NULL, RNA_def_profile},
|
||||
{"rna_lightprobe.c", NULL, RNA_def_lightprobe},
|
||||
|
|
|
@ -423,11 +423,9 @@ short RNA_type_to_ID_code(const StructRNA *type)
|
|||
if (base_type == &RNA_PaintCurve) {
|
||||
return ID_PC;
|
||||
}
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
if (base_type == &RNA_PointCloud) {
|
||||
return ID_PT;
|
||||
}
|
||||
# endif
|
||||
if (base_type == &RNA_LightProbe) {
|
||||
return ID_LP;
|
||||
}
|
||||
|
@ -533,11 +531,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
|
|||
case ID_PC:
|
||||
return &RNA_PaintCurve;
|
||||
case ID_PT:
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
return &RNA_PointCloud;
|
||||
# else
|
||||
return &RNA_ID;
|
||||
# endif
|
||||
case ID_LP:
|
||||
return &RNA_LightProbe;
|
||||
case ID_SCE:
|
||||
|
|
|
@ -491,9 +491,7 @@ void RNA_def_main_lightprobes(BlenderRNA *brna, PropertyRNA *cprop);
|
|||
#ifdef WITH_HAIR_NODES
|
||||
void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
#endif
|
||||
#ifdef WITH_POINT_CLOUD
|
||||
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
#endif
|
||||
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
#ifdef WITH_SIMULATION_DATABLOCK
|
||||
void RNA_def_main_simulations(BlenderRNA *brna, PropertyRNA *cprop);
|
||||
|
|
|
@ -129,9 +129,7 @@ RNA_MAIN_LISTBASE_FUNCS_DEF(objects)
|
|||
RNA_MAIN_LISTBASE_FUNCS_DEF(paintcurves)
|
||||
RNA_MAIN_LISTBASE_FUNCS_DEF(palettes)
|
||||
RNA_MAIN_LISTBASE_FUNCS_DEF(particles)
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
RNA_MAIN_LISTBASE_FUNCS_DEF(pointclouds)
|
||||
# endif
|
||||
RNA_MAIN_LISTBASE_FUNCS_DEF(scenes)
|
||||
RNA_MAIN_LISTBASE_FUNCS_DEF(screens)
|
||||
RNA_MAIN_LISTBASE_FUNCS_DEF(shapekeys)
|
||||
|
@ -394,14 +392,12 @@ void RNA_def_main(BlenderRNA *brna)
|
|||
# ifdef WITH_HAIR_NODES
|
||||
{"hairs", "Hair", "rna_Main_hairs_begin", "Hairs", "Hair data-blocks", RNA_def_main_hairs},
|
||||
# endif
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
{"pointclouds",
|
||||
"PointCloud",
|
||||
"rna_Main_pointclouds_begin",
|
||||
"Point Clouds",
|
||||
"Point cloud data-blocks",
|
||||
RNA_def_main_pointclouds},
|
||||
# endif
|
||||
{"volumes",
|
||||
"Volume",
|
||||
"rna_Main_volumes_begin",
|
||||
|
|
|
@ -778,7 +778,6 @@ static Hair *rna_Main_hairs_new(Main *bmain, const char *name)
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
static PointCloud *rna_Main_pointclouds_new(Main *bmain, const char *name)
|
||||
{
|
||||
char safe_name[MAX_ID_NAME - 2];
|
||||
|
@ -791,7 +790,6 @@ static PointCloud *rna_Main_pointclouds_new(Main *bmain, const char *name)
|
|||
|
||||
return pointcloud;
|
||||
}
|
||||
# endif
|
||||
|
||||
static Volume *rna_Main_volumes_new(Main *bmain, const char *name)
|
||||
{
|
||||
|
@ -866,9 +864,7 @@ RNA_MAIN_ID_TAG_FUNCS_DEF(lightprobes, lightprobes, ID_LP)
|
|||
# ifdef WITH_HAIR_NODES
|
||||
RNA_MAIN_ID_TAG_FUNCS_DEF(hairs, hairs, ID_HA)
|
||||
# endif
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
RNA_MAIN_ID_TAG_FUNCS_DEF(pointclouds, pointclouds, ID_PT)
|
||||
# endif
|
||||
RNA_MAIN_ID_TAG_FUNCS_DEF(volumes, volumes, ID_VO)
|
||||
# ifdef WITH_SIMULATION_DATABLOCK
|
||||
RNA_MAIN_ID_TAG_FUNCS_DEF(simulations, simulations, ID_SIM)
|
||||
|
@ -2319,7 +2315,6 @@ void RNA_def_main_hairs(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
StructRNA *srna;
|
||||
|
@ -2366,7 +2361,6 @@ void RNA_def_main_pointclouds(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
parm = RNA_def_boolean(func, "value", 0, "Value", "");
|
||||
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
||||
}
|
||||
# endif
|
||||
|
||||
void RNA_def_main_volumes(BlenderRNA *brna, PropertyRNA *cprop)
|
||||
{
|
||||
|
|
|
@ -620,11 +620,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr)
|
|||
return &RNA_ID;
|
||||
# endif
|
||||
case OB_POINTCLOUD:
|
||||
# ifdef WITH_POINT_CLOUD
|
||||
return &RNA_PointCloud;
|
||||
# else
|
||||
return &RNA_ID;
|
||||
# endif
|
||||
case OB_VOLUME:
|
||||
return &RNA_Volume;
|
||||
default:
|
||||
|
|
|
@ -236,7 +236,6 @@ endif()
|
|||
|
||||
if(WITH_EXPERIMENTAL_FEATURES)
|
||||
add_definitions(-DWITH_SIMULATION_DATABLOCK)
|
||||
add_definitions(-DWITH_POINT_CLOUD)
|
||||
add_definitions(-DWITH_HAIR_NODES)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue