Cleanup: clang-format
This commit is contained in:
@@ -127,9 +127,9 @@ void version_node_input_socket_name(bNodeTree *ntree,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void version_node_output_socket_name(bNodeTree *ntree,
|
void version_node_output_socket_name(bNodeTree *ntree,
|
||||||
const int node_type,
|
const int node_type,
|
||||||
const char *old_name,
|
const char *old_name,
|
||||||
const char *new_name)
|
const char *new_name)
|
||||||
{
|
{
|
||||||
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
|
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
|
||||||
if (node->type == node_type) {
|
if (node->type == node_type) {
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
#include "basic_engine.h"
|
#include "basic_engine.h"
|
||||||
#include "basic_private.h"
|
#include "basic_private.h"
|
||||||
|
|
||||||
|
|
||||||
#define BASIC_ENGINE "BLENDER_BASIC"
|
#define BASIC_ENGINE "BLENDER_BASIC"
|
||||||
|
|
||||||
/* *********** LISTS *********** */
|
/* *********** LISTS *********** */
|
||||||
@@ -107,14 +106,14 @@ static void basic_cache_init(void *vedata)
|
|||||||
BASIC_shaders_pointcloud_depth_conservative_sh_get(draw_ctx->sh_cfg) :
|
BASIC_shaders_pointcloud_depth_conservative_sh_get(draw_ctx->sh_cfg) :
|
||||||
BASIC_shaders_pointcloud_depth_sh_get(draw_ctx->sh_cfg);
|
BASIC_shaders_pointcloud_depth_sh_get(draw_ctx->sh_cfg);
|
||||||
DRW_PASS_CREATE(psl->depth_pass_pointcloud[i], state | clip_state | infront_state);
|
DRW_PASS_CREATE(psl->depth_pass_pointcloud[i], state | clip_state | infront_state);
|
||||||
stl->g_data->depth_pointcloud_shgrp[i] = grp = DRW_shgroup_create(sh, psl->depth_pass_pointcloud[i]);
|
stl->g_data->depth_pointcloud_shgrp[i] = grp = DRW_shgroup_create(
|
||||||
|
sh, psl->depth_pass_pointcloud[i]);
|
||||||
DRW_shgroup_uniform_vec2(grp, "sizeViewport", DRW_viewport_size_get(), 1);
|
DRW_shgroup_uniform_vec2(grp, "sizeViewport", DRW_viewport_size_get(), 1);
|
||||||
DRW_shgroup_uniform_vec2(grp, "sizeViewportInv", DRW_viewport_invert_size_get(), 1);
|
DRW_shgroup_uniform_vec2(grp, "sizeViewportInv", DRW_viewport_invert_size_get(), 1);
|
||||||
|
|
||||||
stl->g_data->depth_hair_shgrp[i] = grp = DRW_shgroup_create(
|
stl->g_data->depth_hair_shgrp[i] = grp = DRW_shgroup_create(
|
||||||
BASIC_shaders_depth_sh_get(draw_ctx->sh_cfg), psl->depth_pass[i]);
|
BASIC_shaders_depth_sh_get(draw_ctx->sh_cfg), psl->depth_pass[i]);
|
||||||
|
|
||||||
|
|
||||||
sh = DRW_state_is_select() ? BASIC_shaders_depth_conservative_sh_get(draw_ctx->sh_cfg) :
|
sh = DRW_state_is_select() ? BASIC_shaders_depth_conservative_sh_get(draw_ctx->sh_cfg) :
|
||||||
BASIC_shaders_depth_sh_get(draw_ctx->sh_cfg);
|
BASIC_shaders_depth_sh_get(draw_ctx->sh_cfg);
|
||||||
state |= DRW_STATE_CULL_BACK;
|
state |= DRW_STATE_CULL_BACK;
|
||||||
|
|||||||
@@ -151,4 +151,3 @@ class DefaultDrawingMode : public AbstractDrawingMode {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace blender::draw::image_engine
|
} // namespace blender::draw::image_engine
|
||||||
|
|
||||||
|
|||||||
@@ -31,4 +31,3 @@ extern DrawEngineType draw_engine_image_type;
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -194,4 +194,3 @@ void IMAGE_shader_library_ensure(void);
|
|||||||
void IMAGE_shader_free(void);
|
void IMAGE_shader_free(void);
|
||||||
|
|
||||||
} // namespace blender::draw::image_engine
|
} // namespace blender::draw::image_engine
|
||||||
|
|
||||||
|
|||||||
@@ -180,4 +180,3 @@ class SpaceImageAccessor : public AbstractSpaceAccessor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace blender::draw::image_engine
|
} // namespace blender::draw::image_engine
|
||||||
|
|
||||||
|
|||||||
@@ -136,4 +136,3 @@ class SpaceNodeAccessor : public AbstractSpaceAccessor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // namespace blender::draw::image_engine
|
} // namespace blender::draw::image_engine
|
||||||
|
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
|
|
||||||
#include "intern/draw_manager_testing.h"
|
#include "intern/draw_manager_testing.h"
|
||||||
|
|
||||||
|
#include "engines/basic/basic_private.h"
|
||||||
#include "engines/eevee/eevee_private.h"
|
#include "engines/eevee/eevee_private.h"
|
||||||
#include "engines/gpencil/gpencil_engine.h"
|
#include "engines/gpencil/gpencil_engine.h"
|
||||||
#include "engines/image/image_private.hh"
|
#include "engines/image/image_private.hh"
|
||||||
#include "engines/overlay/overlay_private.h"
|
#include "engines/overlay/overlay_private.h"
|
||||||
#include "engines/workbench/workbench_private.h"
|
#include "engines/workbench/workbench_private.h"
|
||||||
#include "engines/basic/basic_private.h"
|
|
||||||
#include "intern/draw_shader.h"
|
#include "intern/draw_shader.h"
|
||||||
|
|
||||||
namespace blender::draw {
|
namespace blender::draw {
|
||||||
|
|||||||
@@ -1030,8 +1030,8 @@ static int armature_parent_clear_exec(bContext *C, wmOperator *op)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int armature_parent_clear_invoke(bContext *C,
|
static int armature_parent_clear_invoke(bContext *C,
|
||||||
wmOperator *UNUSED(op),
|
wmOperator *UNUSED(op),
|
||||||
const wmEvent *UNUSED(event))
|
const wmEvent *UNUSED(event))
|
||||||
{
|
{
|
||||||
// False when no selected bones are connected to the active bone.
|
// False when no selected bones are connected to the active bone.
|
||||||
bool enable_disconnect = false;
|
bool enable_disconnect = false;
|
||||||
@@ -1066,7 +1066,8 @@ static int armature_parent_clear_invoke(bContext *C,
|
|||||||
|
|
||||||
uiLayout *row_disconnect = uiLayoutRow(layout, false);
|
uiLayout *row_disconnect = uiLayoutRow(layout, false);
|
||||||
uiLayoutSetEnabled(row_disconnect, enable_disconnect);
|
uiLayoutSetEnabled(row_disconnect, enable_disconnect);
|
||||||
uiItemEnumO(row_disconnect, "ARMATURE_OT_parent_clear", NULL, 0, "type", ARM_PAR_CLEAR_DISCONNECT);
|
uiItemEnumO(
|
||||||
|
row_disconnect, "ARMATURE_OT_parent_clear", NULL, 0, "type", ARM_PAR_CLEAR_DISCONNECT);
|
||||||
|
|
||||||
UI_popup_menu_end(C, pup);
|
UI_popup_menu_end(C, pup);
|
||||||
|
|
||||||
|
|||||||
@@ -1006,8 +1006,7 @@ static void rna_def_pointcache_common(StructRNA *srna)
|
|||||||
prop = RNA_def_property(srna, "is_frame_skip", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "is_frame_skip", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_FRAMES_SKIPPED);
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_FRAMES_SKIPPED);
|
||||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||||
RNA_def_property_ui_text(
|
RNA_def_property_ui_text(prop, "", "Some frames were skipped while baking/saving that cache");
|
||||||
prop, "", "Some frames were skipped while baking/saving that cache");
|
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
||||||
RNA_def_property_string_sdna(prop, NULL, "name");
|
RNA_def_property_string_sdna(prop, NULL, "name");
|
||||||
|
|||||||
@@ -1471,15 +1471,12 @@ static void rna_def_panel(BlenderRNA *brna)
|
|||||||
RNA_def_property_string_sdna(prop, NULL, "type->category");
|
RNA_def_property_string_sdna(prop, NULL, "type->category");
|
||||||
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
|
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
|
||||||
RNA_def_property_ui_text(
|
RNA_def_property_ui_text(
|
||||||
prop,
|
prop, "", "The category (tab) in which the panel will be displayed, when applicable");
|
||||||
"",
|
|
||||||
"The category (tab) in which the panel will be displayed, when applicable");
|
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "bl_owner_id", PROP_STRING, PROP_NONE);
|
prop = RNA_def_property(srna, "bl_owner_id", PROP_STRING, PROP_NONE);
|
||||||
RNA_def_property_string_sdna(prop, NULL, "type->owner_id");
|
RNA_def_property_string_sdna(prop, NULL, "type->owner_id");
|
||||||
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
|
RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
|
||||||
RNA_def_property_ui_text(
|
RNA_def_property_ui_text(prop, "", "The ID owning the data displayed in the panel, if any");
|
||||||
prop, "", "The ID owning the data displayed in the panel, if any");
|
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
|
prop = RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
|
||||||
RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
|
RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ static void geo_node_collection_info_declare(NodeDeclarationBuilder &b)
|
|||||||
b.add_input<decl::Bool>(N_("Reset Children"))
|
b.add_input<decl::Bool>(N_("Reset Children"))
|
||||||
.description(
|
.description(
|
||||||
N_("Reset the transforms of every child instance in the output. Only used when Separate "
|
N_("Reset the transforms of every child instance in the output. Only used when Separate "
|
||||||
"Children is enabled"));
|
"Children is enabled"));
|
||||||
b.add_output<decl::Geometry>(N_("Geometry"));
|
b.add_output<decl::Geometry>(N_("Geometry"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,13 +35,11 @@ static void geo_node_curve_primitive_spiral_declare(NodeDeclarationBuilder &b)
|
|||||||
b.add_input<decl::Float>(N_("Start Radius"))
|
b.add_input<decl::Float>(N_("Start Radius"))
|
||||||
.default_value(1.0f)
|
.default_value(1.0f)
|
||||||
.subtype(PROP_DISTANCE)
|
.subtype(PROP_DISTANCE)
|
||||||
.description(
|
.description(N_("Horizontal Distance from the Z axis at the start of the spiral"));
|
||||||
N_("Horizontal Distance from the Z axis at the start of the spiral"));
|
|
||||||
b.add_input<decl::Float>(N_("End Radius"))
|
b.add_input<decl::Float>(N_("End Radius"))
|
||||||
.default_value(2.0f)
|
.default_value(2.0f)
|
||||||
.subtype(PROP_DISTANCE)
|
.subtype(PROP_DISTANCE)
|
||||||
.description(
|
.description(N_("Horizontal Distance from the Z axis at the end of the spiral"));
|
||||||
N_("Horizontal Distance from the Z axis at the end of the spiral"));
|
|
||||||
b.add_input<decl::Float>(N_("Height"))
|
b.add_input<decl::Float>(N_("Height"))
|
||||||
.default_value(2.0f)
|
.default_value(2.0f)
|
||||||
.subtype(PROP_DISTANCE)
|
.subtype(PROP_DISTANCE)
|
||||||
|
|||||||
@@ -27,9 +27,8 @@ static void geo_node_object_info_declare(NodeDeclarationBuilder &b)
|
|||||||
{
|
{
|
||||||
b.add_input<decl::Object>(N_("Object")).hide_label();
|
b.add_input<decl::Object>(N_("Object")).hide_label();
|
||||||
b.add_input<decl::Bool>(N_("As Instance"))
|
b.add_input<decl::Bool>(N_("As Instance"))
|
||||||
.description(
|
.description(N_("Output the entire object as single instance. "
|
||||||
N_("Output the entire object as single instance. "
|
"This allows instancing non-geometry object types"));
|
||||||
"This allows instancing non-geometry object types"));
|
|
||||||
b.add_output<decl::Vector>(N_("Location"));
|
b.add_output<decl::Vector>(N_("Location"));
|
||||||
b.add_output<decl::Vector>(N_("Rotation"));
|
b.add_output<decl::Vector>(N_("Rotation"));
|
||||||
b.add_output<decl::Vector>(N_("Scale"));
|
b.add_output<decl::Vector>(N_("Scale"));
|
||||||
|
|||||||
Reference in New Issue
Block a user