Node: Gabor Noise Texture #110802
|
@ -49,7 +49,6 @@ class World {
|
|||
Instance &inst_;
|
||||
|
||||
DefaultWorldNodeTree default_tree;
|
||||
bool has_volume_ = false;
|
||||
|
||||
/* Used to detect if world change. */
|
||||
::World *prev_original_world = nullptr;
|
||||
|
|
|
@ -83,7 +83,6 @@ bool ArmatureExporter::add_instance_controller(Object *ob)
|
|||
}
|
||||
|
||||
/* write root bone URLs */
|
||||
Bone *bone;
|
||||
LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) {
|
||||
write_bone_URLs(ins, ob_arm, bone);
|
||||
}
|
||||
|
|
|
@ -154,7 +154,6 @@ BCSample &BCAnimationSampler::sample_object(Object *ob, int frame_index, bool fo
|
|||
#endif
|
||||
|
||||
if (ob->type == OB_ARMATURE) {
|
||||
bPoseChannel *pchan;
|
||||
LISTBASE_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
|
||||
Bone *bone = pchan->bone;
|
||||
Matrix bmat;
|
||||
|
@ -222,7 +221,6 @@ bool BCAnimationSampler::is_animated_by_constraint(Object *ob,
|
|||
ListBase *conlist,
|
||||
std::set<Object *> &animated_objects)
|
||||
{
|
||||
bConstraint *con;
|
||||
LISTBASE_FOREACH (bConstraint *, con, conlist) {
|
||||
ListBase targets = {nullptr, nullptr};
|
||||
|
||||
|
@ -231,7 +229,6 @@ bool BCAnimationSampler::is_animated_by_constraint(Object *ob,
|
|||
}
|
||||
|
||||
if (BKE_constraint_targets_get(con, &targets)) {
|
||||
bConstraintTarget *ct;
|
||||
Object *obtar;
|
||||
bool found = false;
|
||||
|
||||
|
|
|
@ -70,7 +70,6 @@ bool ControllerExporter::add_instance_controller(Object *ob)
|
|||
}
|
||||
|
||||
/* write root bone URLs */
|
||||
Bone *bone;
|
||||
LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) {
|
||||
write_bone_URLs(ins, ob_arm, bone);
|
||||
}
|
||||
|
@ -424,7 +423,6 @@ std::string ControllerExporter::add_joints_source(Object *ob_arm,
|
|||
std::string source_id = controller_id + JOINTS_SOURCE_ID_SUFFIX;
|
||||
|
||||
int totjoint = 0;
|
||||
bDeformGroup *def;
|
||||
LISTBASE_FOREACH (bDeformGroup *, def, defbase) {
|
||||
if (is_bone_defgroup(ob_arm, def)) {
|
||||
totjoint++;
|
||||
|
|
|
@ -198,7 +198,6 @@ void SceneExporter::writeNode(Object *ob)
|
|||
|
||||
ListBase targets = {nullptr, nullptr};
|
||||
if (BKE_constraint_targets_get(con, &targets)) {
|
||||
bConstraintTarget *ct;
|
||||
Object *obtar;
|
||||
|
||||
LISTBASE_FOREACH (bConstraintTarget *, ct, &targets) {
|
||||
|
|
|
@ -253,7 +253,6 @@ Object *bc_get_assigned_armature(Object *ob)
|
|||
ob_arm = ob->parent;
|
||||
}
|
||||
else {
|
||||
ModifierData *mod;
|
||||
LISTBASE_FOREACH (ModifierData *, mod, &ob->modifiers) {
|
||||
if (mod->type == eModifierType_Armature) {
|
||||
ob_arm = ((ArmatureModifierData *)mod)->object;
|
||||
|
@ -435,8 +434,6 @@ bool bc_is_leaf_bone(Bone *bone)
|
|||
|
||||
EditBone *bc_get_edit_bone(bArmature *armature, char *name)
|
||||
{
|
||||
EditBone *eBone;
|
||||
|
||||
LISTBASE_FOREACH (EditBone *, eBone, armature->edbo) {
|
||||
if (STREQ(name, eBone->name)) {
|
||||
return eBone;
|
||||
|
@ -765,7 +762,6 @@ static bool has_custom_props(Bone *bone, bool enabled, std::string key)
|
|||
|
||||
void bc_enable_fcurves(bAction *act, char *bone_name)
|
||||
{
|
||||
FCurve *fcu;
|
||||
char prefix[200];
|
||||
|
||||
if (bone_name) {
|
||||
|
|
|
@ -49,8 +49,8 @@ void USD_unregister_hook(struct USDHook *hook)
|
|||
USDHook *USD_find_hook_name(const char name[])
|
||||
{
|
||||
/* sanity checks */
|
||||
if (g_usd_hooks.empty() || (name == NULL) || (name[0] == 0)) {
|
||||
return NULL;
|
||||
if (g_usd_hooks.empty() || (name == nullptr) || (name[0] == 0)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
USDHookList::iterator hook_iter = std::find_if(
|
||||
|
@ -58,7 +58,7 @@ USDHook *USD_find_hook_name(const char name[])
|
|||
return strcmp(hook->idname, name) == 0;
|
||||
});
|
||||
|
||||
return (hook_iter == g_usd_hooks.end()) ? NULL : *hook_iter;
|
||||
return (hook_iter == g_usd_hooks.end()) ? nullptr : *hook_iter;
|
||||
}
|
||||
|
||||
namespace blender::io::usd {
|
||||
|
@ -81,7 +81,7 @@ struct USDSceneExportContext {
|
|||
|
||||
USDSceneExportContext(pxr::UsdStageRefPtr in_stage, Depsgraph *depsgraph) : stage(in_stage)
|
||||
{
|
||||
RNA_pointer_create(NULL, &RNA_Depsgraph, depsgraph, &depsgraph_ptr);
|
||||
RNA_pointer_create(nullptr, &RNA_Depsgraph, depsgraph, &depsgraph_ptr);
|
||||
}
|
||||
|
||||
pxr::UsdStageRefPtr get_stage()
|
||||
|
@ -259,7 +259,7 @@ class OnMaterialExportInvoker : public USDHookInvoker {
|
|||
pxr::UsdShadeMaterial &usd_material)
|
||||
: hook_context_(stage), usd_material_(usd_material)
|
||||
{
|
||||
RNA_pointer_create(NULL, &RNA_Material, material, &material_ptr_);
|
||||
RNA_pointer_create(nullptr, &RNA_Material, material, &material_ptr_);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
@ -267,9 +267,9 @@ void set_normal_texture_range(pxr::UsdShadeShader &usd_shader, const InputSpec &
|
|||
}
|
||||
|
||||
/* Create USD Shade Material network from Blender viewport display settings. */
|
||||
void create_usd_viewport_material(const USDExporterContext &usd_export_context,
|
||||
Material *material,
|
||||
pxr::UsdShadeMaterial &usd_material)
|
||||
static void create_usd_viewport_material(const USDExporterContext &usd_export_context,
|
||||
Material *material,
|
||||
pxr::UsdShadeMaterial &usd_material)
|
||||
{
|
||||
/* Construct the shader. */
|
||||
pxr::SdfPath shader_path = usd_material.GetPath().AppendChild(usdtokens::preview_shader);
|
||||
|
|
|
@ -4751,7 +4751,7 @@ static RNAProcessItem PROCESS_ITEMS[] = {
|
|||
{"rna_sound.cc", "rna_sound_api.cc", RNA_def_sound},
|
||||
{"rna_ui.cc", "rna_ui_api.cc", RNA_def_ui},
|
||||
#ifdef WITH_USD
|
||||
{"rna_usd.cc", NULL, RNA_def_usd},
|
||||
{"rna_usd.cc", nullptr, RNA_def_usd},
|
||||
#endif
|
||||
{"rna_userdef.cc", nullptr, RNA_def_userdef},
|
||||
{"rna_vfont.cc", "rna_vfont_api.cc", RNA_def_vfont},
|
||||
|
|
|
@ -27,11 +27,11 @@ static StructRNA *rna_USDHook_refine(PointerRNA *ptr)
|
|||
return (hook->rna_ext.srna) ? hook->rna_ext.srna : &RNA_USDHook;
|
||||
}
|
||||
|
||||
static bool rna_USDHook_unregister(Main *bmain, StructRNA *type)
|
||||
static bool rna_USDHook_unregister(Main * /* bmain */, StructRNA *type)
|
||||
{
|
||||
USDHook *hook = static_cast<USDHook *>(RNA_struct_blender_type_get(type));
|
||||
|
||||
if (hook == NULL) {
|
||||
if (hook == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ static bool rna_USDHook_unregister(Main *bmain, StructRNA *type)
|
|||
RNA_struct_free_extension(type, &hook->rna_ext);
|
||||
RNA_struct_free(&BLENDER_RNA, type);
|
||||
|
||||
WM_main_add_notifier(NC_WINDOW, NULL);
|
||||
WM_main_add_notifier(NC_WINDOW, nullptr);
|
||||
|
||||
/* unlink Blender-side data */
|
||||
USD_unregister_hook(hook);
|
||||
|
@ -58,16 +58,16 @@ static StructRNA *rna_USDHook_register(Main *bmain,
|
|||
StructFreeFunc free)
|
||||
{
|
||||
const char *error_prefix = "Registering USD hook class:";
|
||||
USDHook dummy_hook = {NULL};
|
||||
USDHook dummy_hook = {{0}};
|
||||
USDHook *hook;
|
||||
PointerRNA dummy_hook_ptr = {NULL};
|
||||
PointerRNA dummy_hook_ptr = {nullptr};
|
||||
|
||||
/* setup dummy type info to store static properties in */
|
||||
RNA_pointer_create(NULL, &RNA_USDHook, &dummy_hook, &dummy_hook_ptr);
|
||||
RNA_pointer_create(nullptr, &RNA_USDHook, &dummy_hook, &dummy_hook_ptr);
|
||||
|
||||
/* validate the python class */
|
||||
if (validate(&dummy_hook_ptr, data, NULL) != 0) {
|
||||
return NULL;
|
||||
if (validate(&dummy_hook_ptr, data, nullptr) != 0) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (strlen(identifier) >= sizeof(dummy_hook.idname)) {
|
||||
|
@ -77,7 +77,7 @@ static StructRNA *rna_USDHook_register(Main *bmain,
|
|||
error_prefix,
|
||||
identifier,
|
||||
(int)sizeof(dummy_hook.idname));
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/* check if we have registered this hook before, and remove it */
|
||||
|
@ -92,7 +92,7 @@ static StructRNA *rna_USDHook_register(Main *bmain,
|
|||
identifier,
|
||||
dummy_hook.idname,
|
||||
"could not be unregistered");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ static StructRNA *rna_USDHook_register(Main *bmain,
|
|||
/* add and register with other info as needed */
|
||||
USD_register_hook(hook);
|
||||
|
||||
WM_main_add_notifier(NC_WINDOW, NULL);
|
||||
WM_main_add_notifier(NC_WINDOW, nullptr);
|
||||
|
||||
/* return the struct-rna added */
|
||||
return hook->rna_ext.srna;
|
||||
|
@ -122,32 +122,30 @@ static void rna_def_usd_hook(BlenderRNA *brna)
|
|||
{
|
||||
StructRNA *srna;
|
||||
PropertyRNA *prop;
|
||||
FunctionRNA *func;
|
||||
PropertyRNA *parm;
|
||||
|
||||
srna = RNA_def_struct(brna, "USDHook", NULL);
|
||||
srna = RNA_def_struct(brna, "USDHook", nullptr);
|
||||
RNA_def_struct_ui_text(srna, "USD Hook", "Defines callback functions to extend USD IO");
|
||||
RNA_def_struct_sdna(srna, "USDHook");
|
||||
RNA_def_struct_refine_func(srna, "rna_USDHook_refine");
|
||||
RNA_def_struct_register_funcs(srna, "rna_USDHook_register", "rna_USDHook_unregister", NULL);
|
||||
RNA_def_struct_register_funcs(srna, "rna_USDHook_register", "rna_USDHook_unregister", nullptr);
|
||||
|
||||
///* Properties --------------------- */
|
||||
|
||||
RNA_define_verify_sdna(0); /* not in sdna */
|
||||
|
||||
prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "idname");
|
||||
RNA_def_property_string_sdna(prop, nullptr, "idname");
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
RNA_def_property_ui_text(prop, "ID Name", "");
|
||||
|
||||
prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "name");
|
||||
RNA_def_property_string_sdna(prop, nullptr, "name");
|
||||
RNA_def_property_ui_text(prop, "UI Name", "");
|
||||
RNA_def_struct_name_property(srna, prop);
|
||||
RNA_def_property_flag(prop, PROP_REGISTER);
|
||||
|
||||
prop = RNA_def_property(srna, "bl_description", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, NULL, "description");
|
||||
RNA_def_property_string_sdna(prop, nullptr, "description");
|
||||
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
|
||||
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
|
||||
RNA_def_property_ui_text(prop, "Description", "A short description of the USD hook");
|
||||
|
|
|
@ -3303,7 +3303,7 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
|
|||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, NULL, "transition");
|
||||
RNA_def_property_float_sdna(prop, nullptr, "transition");
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Transition Strip", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
|
Loading…
Reference in New Issue