Merge branch 'master' into sculpt-dev
This commit is contained in:
commit
fb5f6e762e
|
@ -1526,6 +1526,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
|||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEF -Wundef)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_FORMAT_SIGN -Wformat-signedness)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_RESTRICT -Wrestrict)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override)
|
||||
|
||||
# gcc 4.2 gives annoying warnings on every file with this
|
||||
if(NOT "${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.3")
|
||||
|
@ -1589,6 +1590,8 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_OVERLOADED_VIRTUAL -Wno-overloaded-virtual) # we get a lot of these, if its a problem a dev needs to look into it.
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
|
||||
# Apple Clang (tested on version 12) doesn't support this flag while LLVM Clang 11 does.
|
||||
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SUGGEST_OVERRIDE -Wno-suggest-override)
|
||||
|
||||
# gives too many unfixable warnings
|
||||
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_MACROS -Wunused-macros)
|
||||
|
|
|
@ -1088,8 +1088,6 @@ static int generate_file(AreaOrtho *ortho, AreaDiag *diag, const char *path, boo
|
|||
return 1;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Generating %s\n", path);
|
||||
|
||||
if (tga)
|
||||
write_tga(ortho, diag, fp, subsampling);
|
||||
else if (raw)
|
||||
|
|
|
@ -955,14 +955,21 @@ class OptiXDevice : public CUDADevice {
|
|||
// Create OptiX denoiser handle on demand when it is first used
|
||||
OptixDenoiserOptions denoiser_options = {};
|
||||
assert(task.denoising.input_passes >= 1 && task.denoising.input_passes <= 3);
|
||||
# if OPTIX_ABI_VERSION >= 47
|
||||
denoiser_options.guideAlbedo = task.denoising.input_passes >= 2;
|
||||
denoiser_options.guideNormal = task.denoising.input_passes >= 3;
|
||||
check_result_optix_ret(optixDenoiserCreate(
|
||||
context, OPTIX_DENOISER_MODEL_KIND_HDR, &denoiser_options, &denoiser));
|
||||
# else
|
||||
denoiser_options.inputKind = static_cast<OptixDenoiserInputKind>(
|
||||
OPTIX_DENOISER_INPUT_RGB + (task.denoising.input_passes - 1));
|
||||
# if OPTIX_ABI_VERSION < 28
|
||||
# if OPTIX_ABI_VERSION < 28
|
||||
denoiser_options.pixelFormat = OPTIX_PIXEL_FORMAT_FLOAT3;
|
||||
# endif
|
||||
# endif
|
||||
check_result_optix_ret(optixDenoiserCreate(context, &denoiser_options, &denoiser));
|
||||
check_result_optix_ret(
|
||||
optixDenoiserSetModel(denoiser, OPTIX_DENOISER_MODEL_KIND_HDR, NULL, 0));
|
||||
# endif
|
||||
|
||||
// OptiX denoiser handle was created with the requested number of input passes
|
||||
denoiser_input_passes = task.denoising.input_passes;
|
||||
|
@ -1032,10 +1039,34 @@ class OptiXDevice : public CUDADevice {
|
|||
# endif
|
||||
output_layers[0].format = OPTIX_PIXEL_FORMAT_FLOAT3;
|
||||
|
||||
# if OPTIX_ABI_VERSION >= 47
|
||||
OptixDenoiserLayer image_layers = {};
|
||||
image_layers.input = input_layers[0];
|
||||
image_layers.output = output_layers[0];
|
||||
|
||||
OptixDenoiserGuideLayer guide_layers = {};
|
||||
guide_layers.albedo = input_layers[1];
|
||||
guide_layers.normal = input_layers[2];
|
||||
# endif
|
||||
|
||||
// Finally run denonising
|
||||
OptixDenoiserParams params = {}; // All parameters are disabled/zero
|
||||
# if OPTIX_ABI_VERSION >= 47
|
||||
check_result_optix_ret(optixDenoiserInvoke(denoiser,
|
||||
0,
|
||||
NULL,
|
||||
¶ms,
|
||||
denoiser_state.device_pointer,
|
||||
scratch_offset,
|
||||
&guide_layers,
|
||||
&image_layers,
|
||||
1,
|
||||
overlap_offset.x,
|
||||
overlap_offset.y,
|
||||
denoiser_state.device_pointer + scratch_offset,
|
||||
scratch_size));
|
||||
# else
|
||||
check_result_optix_ret(optixDenoiserInvoke(denoiser,
|
||||
NULL,
|
||||
¶ms,
|
||||
denoiser_state.device_pointer,
|
||||
scratch_offset,
|
||||
|
@ -1046,6 +1077,7 @@ class OptiXDevice : public CUDADevice {
|
|||
output_layers,
|
||||
denoiser_state.device_pointer + scratch_offset,
|
||||
scratch_size));
|
||||
# endif
|
||||
|
||||
# if OPTIX_DENOISER_NO_PIXEL_STRIDE
|
||||
void *output_args[] = {&input_ptr,
|
||||
|
|
|
@ -457,7 +457,8 @@ template<size_t i0, size_t i1, size_t i2, size_t i3>
|
|||
__forceinline const ssei shuffle(const ssei &a, const ssei &b)
|
||||
{
|
||||
# ifdef __KERNEL_NEON__
|
||||
int32x4_t result = shuffle_neon<int32x4_t, i0, i1, i2, i3>(vreinterpretq_s32_m128i(a), vreinterpretq_s32_m128i(b));
|
||||
int32x4_t result = shuffle_neon<int32x4_t, i0, i1, i2, i3>(vreinterpretq_s32_m128i(a),
|
||||
vreinterpretq_s32_m128i(b));
|
||||
return vreinterpretq_m128i_s32(result);
|
||||
# else
|
||||
return _mm_castps_si128(
|
||||
|
|
|
@ -21,18 +21,12 @@
|
|||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Texture limits on devices. */
|
||||
#define TEX_NUM_MAX (INT_MAX >> 4)
|
||||
|
||||
/* Color to use when textures are not found. */
|
||||
#define TEX_IMAGE_MISSING_R 1
|
||||
#define TEX_IMAGE_MISSING_G 0
|
||||
#define TEX_IMAGE_MISSING_B 1
|
||||
#define TEX_IMAGE_MISSING_A 1
|
||||
|
||||
/* Texture type. */
|
||||
#define kernel_tex_type(tex) (tex & IMAGE_DATA_TYPE_MASK)
|
||||
|
||||
/* Interpolation types for textures
|
||||
* cuda also use texture space to store other objects */
|
||||
typedef enum InterpolationType {
|
||||
|
@ -45,9 +39,6 @@ typedef enum InterpolationType {
|
|||
INTERPOLATION_NUM_TYPES,
|
||||
} InterpolationType;
|
||||
|
||||
/* Texture types
|
||||
* Since we store the type in the lower bits of a flat index,
|
||||
* the shift and bit mask constant below need to be kept in sync. */
|
||||
typedef enum ImageDataType {
|
||||
IMAGE_DATA_TYPE_FLOAT4 = 0,
|
||||
IMAGE_DATA_TYPE_BYTE4 = 1,
|
||||
|
@ -75,9 +66,6 @@ typedef enum ImageAlphaType {
|
|||
IMAGE_ALPHA_NUM_TYPES,
|
||||
} ImageAlphaType;
|
||||
|
||||
#define IMAGE_DATA_TYPE_SHIFT 4
|
||||
#define IMAGE_DATA_TYPE_MASK 0xF
|
||||
|
||||
/* Extension types for textures.
|
||||
*
|
||||
* Defines how the image is extrapolated past its original bounds. */
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 81815ea92c2071a08566dc66d4a871b6e2f5c868
|
||||
Subproject commit 4cb833e84acfd2be5fa08ce75118ce9cb60643b8
|
|
@ -923,7 +923,7 @@ class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
|
|||
# Perform a "natural sort", so 20 comes after 3 (for example).
|
||||
files.sort(
|
||||
key=lambda file_path:
|
||||
tuple(int(t) if t.isdigit() else t for t in re.split("(\d+)", file_path[0].lower())),
|
||||
tuple(int(t) if t.isdigit() else t for t in re.split(r"(\d+)", file_path[0].lower())),
|
||||
)
|
||||
|
||||
col = layout.column(align=True)
|
||||
|
|
|
@ -41,10 +41,12 @@ url_manual_mapping = (
|
|||
("bpy.types.fluiddomainsettings.sndparticle_potential_max_wavecrest*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-max-wavecrest"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_potential_min_wavecrest*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-min-wavecrest"),
|
||||
("bpy.types.movietrackingsettings.refine_intrinsics_principal_point*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-refine-intrinsics-principal-point"),
|
||||
("bpy.types.cyclesrenderlayersettings.denoising_optix_input_passes*", "render/layers/denoising.html#bpy-types-cyclesrenderlayersettings-denoising-optix-input-passes"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_potential_max_energy*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-max-energy"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_potential_min_energy*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-potential-min-energy"),
|
||||
("bpy.types.movietrackingsettings.refine_intrinsics_focal_length*", "movie_clip/tracking/clip/toolbar/solve.html#bpy-types-movietrackingsettings-refine-intrinsics-focal-length"),
|
||||
("bpy.types.rigidbodyconstraint.rigidbodyconstraint.use_breaking*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-rigidbodyconstraint-use-breaking"),
|
||||
("bpy.types.cyclesrendersettings.preview_denoising_input_passes*", "render/cycles/render_settings/sampling.html#bpy-types-cyclesrendersettings-preview-denoising-input-passes"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_sampling_trappedair*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-sampling-trappedair"),
|
||||
("bpy.types.fluiddomainsettings.sndparticle_sampling_wavecrest*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-sndparticle-sampling-wavecrest"),
|
||||
("bpy.types.rigidbodyconstraint.use_override_solver_iterations*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-use-override-solver-iterations"),
|
||||
|
@ -107,6 +109,7 @@ url_manual_mapping = (
|
|||
("bpy.types.fluiddomainsettings.use_bubble_particles*", "physics/fluid/type/domain/liquid/particles.html#bpy-types-fluiddomainsettings-use-bubble-particles"),
|
||||
("bpy.types.linestylegeometrymodifier_simplification*", "render/freestyle/parameter_editor/line_style/modifiers/geometry/simplification.html#bpy-types-linestylegeometrymodifier-simplification"),
|
||||
("bpy.types.materialgpencilstyle.use_overlap_strokes*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-use-overlap-strokes"),
|
||||
("bpy.types.spacespreadsheet.geometry_component_type*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-geometry-component-type"),
|
||||
("bpy.types.toolsettings.use_gpencil_weight_data_add*", "grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-weight-data-add"),
|
||||
("bpy.types.view3doverlay.texture_paint_mode_opacity*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-texture-paint-mode-opacity"),
|
||||
("bpy.types.bakesettings.use_pass_ambient_occlusion*", "render/cycles/baking.html#bpy-types-bakesettings-use-pass-ambient-occlusion"),
|
||||
|
@ -139,6 +142,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.gpencil.vertex_color_brightness_contrast*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-vertex-color-brightness-contrast"),
|
||||
("bpy.ops.view3d.edit_mesh_extrude_individual_move*", "modeling/meshes/editing/face/extrude_faces.html#bpy-ops-view3d-edit-mesh-extrude-individual-move"),
|
||||
("bpy.ops.view3d.edit_mesh_extrude_manifold_normal*", "modeling/meshes/tools/extrude_manifold.html#bpy-ops-view3d-edit-mesh-extrude-manifold-normal"),
|
||||
("bpy.types.cyclesrendersettings.ao_bounces_render*", "render/cycles/render_settings/light_paths.html#bpy-types-cyclesrendersettings-ao-bounces-render"),
|
||||
("bpy.types.cyclesrendersettings.use_distance_cull*", "render/cycles/render_settings/simplify.html#bpy-types-cyclesrendersettings-use-distance-cull"),
|
||||
("bpy.types.fluiddomainsettings.cache_frame_offset*", "physics/fluid/type/domain/cache.html#bpy-types-fluiddomainsettings-cache-frame-offset"),
|
||||
("bpy.types.fluiddomainsettings.delete_in_obstacle*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-delete-in-obstacle"),
|
||||
|
@ -190,9 +194,11 @@ url_manual_mapping = (
|
|||
("bpy.types.rigidbodyconstraint.solver_iterations*", "physics/rigid_body/constraints/introduction.html#bpy-types-rigidbodyconstraint-solver-iterations"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_empty*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-empty"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_light*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-light"),
|
||||
("bpy.types.spacesequenceeditor.proxy_render_size*", "video_editing/preview/sidebar.html#bpy-types-spacesequenceeditor-proxy-render-size"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_offset*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-offset"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_source*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-source"),
|
||||
("bpy.types.toolsettings.gpencil_stroke_placement*", "grease_pencil/modes/draw/stroke_placement.html#bpy-types-toolsettings-gpencil-stroke-placement"),
|
||||
("bpy.types.toolsettings.use_keyframe_insert_auto*", "editors/timeline.html#bpy-types-toolsettings-use-keyframe-insert-auto"),
|
||||
("bpy.types.viewlayer.use_pass_cryptomatte_object*", "render/layers/passes.html#bpy-types-viewlayer-use-pass-cryptomatte-object"),
|
||||
("bpy.ops.armature.rigify_apply_selection_colors*", "addons/rigging/rigify/metarigs.html#bpy-ops-armature-rigify-apply-selection-colors"),
|
||||
("bpy.types.brushgpencilsettings.fill_layer_mode*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-layer-mode"),
|
||||
|
@ -206,6 +212,7 @@ url_manual_mapping = (
|
|||
("bpy.types.rendersettings.resolution_percentage*", "render/output/properties/dimensions.html#bpy-types-rendersettings-resolution-percentage"),
|
||||
("bpy.types.rendersettings_simplify_gpencil_tint*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-gpencil-tint"),
|
||||
("bpy.types.spaceoutliner.use_filter_object_mesh*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object-mesh"),
|
||||
("bpy.types.spacesequenceeditor.show_overexposed*", "video_editing/preview/sidebar.html#bpy-types-spacesequenceeditor-show-overexposed"),
|
||||
("bpy.types.toolsettings.use_gpencil_draw_onback*", "grease_pencil/modes/draw/introduction.html#bpy-types-toolsettings-use-gpencil-draw-onback"),
|
||||
("bpy.types.toolsettings.use_snap_align_rotation*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-align-rotation"),
|
||||
("bpy.types.viewlayer.use_pass_cryptomatte_asset*", "render/layers/passes.html#bpy-types-viewlayer-use-pass-cryptomatte-asset"),
|
||||
|
@ -236,11 +243,14 @@ url_manual_mapping = (
|
|||
("bpy.types.materialgpencilstyle.alignment_mode*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-alignment-mode"),
|
||||
("bpy.types.particlesettings.use_modifier_stack*", "physics/particles/emitter/emission.html#bpy-types-particlesettings-use-modifier-stack"),
|
||||
("bpy.types.rendersettings.simplify_subdivision*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-subdivision"),
|
||||
("bpy.types.spacegrapheditor.show_extrapolation*", "editors/graph_editor/introduction.html#bpy-types-spacegrapheditor-show-extrapolation"),
|
||||
("bpy.types.spaceoutliner.use_filter_collection*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-collection"),
|
||||
("bpy.types.spacesequenceeditor.display_channel*", "video_editing/preview/sidebar.html#bpy-types-spacesequenceeditor-display-channel"),
|
||||
("bpy.types.spacesequenceeditor.show_annotation*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-annotation"),
|
||||
("bpy.types.spacesequenceeditor.show_region_hud*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-region-hud"),
|
||||
("bpy.types.spacesequenceeditor.show_safe_areas*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-safe-areas"),
|
||||
("bpy.types.spacesequenceeditor.show_strip_name*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-strip-name"),
|
||||
("bpy.types.spacespreadsheet.show_only_selected*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-show-only-selected"),
|
||||
("bpy.types.toolsettings.use_snap_grid_absolute*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-grid-absolute"),
|
||||
("bpy.types.view3doverlay.show_face_orientation*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-show-face-orientation"),
|
||||
("bpy.ops.object.blenderkit_material_thumbnail*", "addons/3d_view/blenderkit.html#bpy-ops-object-blenderkit-material-thumbnail"),
|
||||
|
@ -275,6 +285,7 @@ url_manual_mapping = (
|
|||
("bpy.types.nodesocketinterface*.default_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-default-value"),
|
||||
("bpy.types.rendersettings.use_persistent_data*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-use-persistent-data"),
|
||||
("bpy.types.spaceoutliner.show_restrict_column*", "editors/outliner/interface.html#bpy-types-spaceoutliner-show-restrict-column"),
|
||||
("bpy.types.spacespreadsheet.object_eval_state*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-object-eval-state"),
|
||||
("bpy.types.toolsettings.transform_pivot_point*", "editors/3dview/controls/pivot_point/index.html#bpy-types-toolsettings-transform-pivot-point"),
|
||||
("bpy.types.toolsettings.use_proportional_edit*", "editors/3dview/controls/proportional_editing.html#bpy-types-toolsettings-use-proportional-edit"),
|
||||
("bpy.types.volumedisplay.interpolation_method*", "modeling/volumes/properties.html#bpy-types-volumedisplay-interpolation-method"),
|
||||
|
@ -294,6 +305,7 @@ url_manual_mapping = (
|
|||
("bpy.types.geometrynodealignrotationtovector*", "modeling/geometry_nodes/point/align_rotation_to_vector.html#bpy-types-geometrynodealignrotationtovector"),
|
||||
("bpy.types.greasepencil.curve_edit_threshold*", "grease_pencil/modes/edit/curve_editing.html#bpy-types-greasepencil-curve-edit-threshold"),
|
||||
("bpy.types.materialgpencilstyle.stroke_style*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-stroke-style"),
|
||||
("bpy.types.objectlineart.use_crease_override*", "scene_layout/object/properties/lineart.html#bpy-types-objectlineart-use-crease-override"),
|
||||
("bpy.types.rendersettings.preview_pixel_size*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-preview-pixel-size"),
|
||||
("bpy.types.rendersettings.use_crop_to_border*", "render/output/properties/dimensions.html#bpy-types-rendersettings-use-crop-to-border"),
|
||||
("bpy.types.rendersettings.use_file_extension*", "render/output/properties/output.html#bpy-types-rendersettings-use-file-extension"),
|
||||
|
@ -302,6 +314,7 @@ url_manual_mapping = (
|
|||
("bpy.types.spaceoutliner.use_filter_children*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-children"),
|
||||
("bpy.types.spaceoutliner.use_filter_complete*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-complete"),
|
||||
("bpy.types.spacesequenceeditor.show_metadata*", "video_editing/preview/introduction.html#bpy-types-spacesequenceeditor-show-metadata"),
|
||||
("bpy.types.spacespreadsheet.attribute_domain*", "editors/spreadsheet.html#bpy-types-spacespreadsheet-attribute-domain"),
|
||||
("bpy.types.spaceview3d.transform_orientation*", "editors/3dview/controls/orientation.html#bpy-types-spaceview3d-transform-orientation"),
|
||||
("bpy.types.spaceview3d.use_local_collections*", "editors/3dview/sidebar.html#bpy-types-spaceview3d-use-local-collections"),
|
||||
("bpy.types.toolsettings.use_snap_peel_object*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-peel-object"),
|
||||
|
@ -315,6 +328,7 @@ url_manual_mapping = (
|
|||
("bpy.types.brushgpencilsettings.fill_factor*", "grease_pencil/modes/draw/tools/fill.html#bpy-types-brushgpencilsettings-fill-factor"),
|
||||
("bpy.types.curve.bevel_factor_mapping_start*", "modeling/curves/properties/geometry.html#bpy-types-curve-bevel-factor-mapping-start"),
|
||||
("bpy.types.cyclesobjectsettings.dicing_rate*", "render/cycles/object_settings/adaptive_subdiv.html#bpy-types-cyclesobjectsettings-dicing-rate"),
|
||||
("bpy.types.cyclesrendersettings.use_fast_gi*", "render/cycles/render_settings/light_paths.html#bpy-types-cyclesrendersettings-use-fast-gi"),
|
||||
("bpy.types.fluiddomainsettings.adapt_margin*", "physics/fluid/type/domain/gas/adaptive_domain.html#bpy-types-fluiddomainsettings-adapt-margin"),
|
||||
("bpy.types.fluiddomainsettings.burning_rate*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-burning-rate"),
|
||||
("bpy.types.fluiddomainsettings.guide_parent*", "physics/fluid/type/domain/guides.html#bpy-types-fluiddomainsettings-guide-parent"),
|
||||
|
@ -335,6 +349,7 @@ url_manual_mapping = (
|
|||
("bpy.types.posebone.use_ik_rotation_control*", "animation/armatures/posing/bone_constraints/inverse_kinematics/introduction.html#bpy-types-posebone-use-ik-rotation-control"),
|
||||
("bpy.types.rendersettings.use_bake_multires*", "render/cycles/baking.html#bpy-types-rendersettings-use-bake-multires"),
|
||||
("bpy.types.scenegpencil.antialias_threshold*", "render/cycles/render_settings/grease_pencil.html#bpy-types-scenegpencil-antialias-threshold"),
|
||||
("bpy.types.spacesequenceeditor.overlay_type*", "video_editing/preview/sidebar.html#bpy-types-spacesequenceeditor-overlay-type"),
|
||||
("bpy.types.spacesequenceeditor.show_fcurves*", "video_editing/sequencer/navigating.html#bpy-types-spacesequenceeditor-show-fcurves"),
|
||||
("bpy.types.spaceuveditor.sticky_select_mode*", "editors/uv/selecting.html#bpy-types-spaceuveditor-sticky-select-mode"),
|
||||
("bpy.types.spaceview3d.show_object_viewport*", "editors/3dview/display/visibility.html#bpy-types-spaceview3d-show-object-viewport"),
|
||||
|
@ -353,6 +368,7 @@ url_manual_mapping = (
|
|||
("bpy.types.brush.disconnected_distance_max*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-disconnected-distance-max"),
|
||||
("bpy.types.brush.surface_smooth_iterations*", "sculpt_paint/sculpting/tools/smooth.html#bpy-types-brush-surface-smooth-iterations"),
|
||||
("bpy.types.brushgpencilsettings.pen_jitter*", "grease_pencil/modes/draw/tools/draw.html#bpy-types-brushgpencilsettings-pen-jitter"),
|
||||
("bpy.types.cyclesrendersettings.ao_bounces*", "render/cycles/render_settings/light_paths.html#bpy-types-cyclesrendersettings-ao-bounces"),
|
||||
("bpy.types.fluiddomainsettings.domain_type*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-domain-type"),
|
||||
("bpy.types.fluiddomainsettings.flame_smoke*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-flame-smoke"),
|
||||
("bpy.types.fluiddomainsettings.fluid_group*", "physics/fluid/type/domain/collections.html#bpy-types-fluiddomainsettings-fluid-group"),
|
||||
|
@ -373,6 +389,7 @@ url_manual_mapping = (
|
|||
("bpy.types.materialgpencilstyle.fill_style*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-fill-style"),
|
||||
("bpy.types.materialgpencilstyle.mix_factor*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-mix-factor"),
|
||||
("bpy.types.materialgpencilstyle.pass_index*", "grease_pencil/materials/properties.html#bpy-types-materialgpencilstyle-pass-index"),
|
||||
("bpy.types.nodesocketinterface.description*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-description"),
|
||||
("bpy.types.rendersettings.dither_intensity*", "render/output/properties/post_processing.html#bpy-types-rendersettings-dither-intensity"),
|
||||
("bpy.types.rendersettings.simplify_volumes*", "render/cycles/render_settings/simplify.html#bpy-types-rendersettings-simplify-volumes"),
|
||||
("bpy.types.rendersettings.use_render_cache*", "render/output/properties/output.html#bpy-types-rendersettings-use-render-cache"),
|
||||
|
@ -382,6 +399,7 @@ url_manual_mapping = (
|
|||
("bpy.types.sceneeevee.use_taa_reprojection*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-use-taa-reprojection"),
|
||||
("bpy.types.sequenceeditor.use_overlay_lock*", "video_editing/preview/sidebar.html#bpy-types-sequenceeditor-use-overlay-lock"),
|
||||
("bpy.types.spaceoutliner.use_filter_object*", "editors/outliner/interface.html#bpy-types-spaceoutliner-use-filter-object"),
|
||||
("bpy.types.spacesequenceeditor.use_proxies*", "video_editing/preview/sidebar.html#bpy-types-spacesequenceeditor-use-proxies"),
|
||||
("bpy.types.spaceuveditor.show_pixel_coords*", "editors/uv/sidebar.html#bpy-types-spaceuveditor-show-pixel-coords"),
|
||||
("bpy.types.spaceview3d.show_reconstruction*", "editors/3dview/display/overlays.html#bpy-types-spaceview3d-show-reconstruction"),
|
||||
("bpy.types.toolsettings.gpencil_selectmode*", "grease_pencil/selecting.html#bpy-types-toolsettings-gpencil-selectmode"),
|
||||
|
@ -431,6 +449,7 @@ url_manual_mapping = (
|
|||
("bpy.types.nodesocketinterface*.max_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-max-value"),
|
||||
("bpy.types.nodesocketinterface*.min_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-min-value"),
|
||||
("bpy.types.nodesocketinterface.hide_value*", "interface/controls/nodes/groups.html#bpy-types-nodesocketinterface-hide-value"),
|
||||
("bpy.types.objectlineart.crease_threshold*", "scene_layout/object/properties/lineart.html#bpy-types-objectlineart-crease-threshold"),
|
||||
("bpy.types.rendersettings.use_compositing*", "render/output/properties/post_processing.html#bpy-types-rendersettings-use-compositing"),
|
||||
("bpy.types.rendersettings.use_placeholder*", "render/output/properties/output.html#bpy-types-rendersettings-use-placeholder"),
|
||||
("bpy.types.shadernodesubsurfacescattering*", "render/shader_nodes/shader/sss.html#bpy-types-shadernodesubsurfacescattering"),
|
||||
|
@ -520,6 +539,7 @@ url_manual_mapping = (
|
|||
("bpy.types.rendersettings.use_overwrite*", "render/output/properties/output.html#bpy-types-rendersettings-use-overwrite"),
|
||||
("bpy.types.rendersettings.use_sequencer*", "render/output/properties/post_processing.html#bpy-types-rendersettings-use-sequencer"),
|
||||
("bpy.types.sceneeevee.volumetric_shadow*", "render/eevee/render_settings/volumetrics.html#bpy-types-sceneeevee-volumetric-shadow"),
|
||||
("bpy.types.sequenceeditor.overlay_frame*", "video_editing/preview/sidebar.html#bpy-types-sequenceeditor-overlay-frame"),
|
||||
("bpy.types.shadernodebsdfhairprincipled*", "render/shader_nodes/shader/hair_principled.html#bpy-types-shadernodebsdfhairprincipled"),
|
||||
("bpy.types.shadernodevectordisplacement*", "render/shader_nodes/vector/vector_displacement.html#bpy-types-shadernodevectordisplacement"),
|
||||
("bpy.types.spacegrapheditor.show_cursor*", "editors/graph_editor/introduction.html#bpy-types-spacegrapheditor-show-cursor"),
|
||||
|
@ -532,16 +552,19 @@ url_manual_mapping = (
|
|||
("bpy.types.toolsettings.use_snap_rotate*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-rotate"),
|
||||
("bpy.types.view3doverlay.display_handle*", "editors/3dview/display/overlays.html#bpy-types-view3doverlay-display-handle"),
|
||||
("bpy.types.volumedisplay.wireframe_type*", "modeling/volumes/properties.html#bpy-types-volumedisplay-wireframe-type"),
|
||||
("bpy.ops.anim.channels_editable_toggle*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-editable-toggle"),
|
||||
("bpy.ops.curve.normals_make_consistent*", "modeling/curves/editing/control_points.html#bpy-ops-curve-normals-make-consistent"),
|
||||
("bpy.ops.gpencil.frame_clean_duplicate*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-frame-clean-duplicate"),
|
||||
("bpy.ops.gpencil.stroke_simplify_fixed*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-simplify-fixed"),
|
||||
("bpy.ops.mesh.faces_select_linked_flat*", "modeling/meshes/selecting/linked.html#bpy-ops-mesh-faces-select-linked-flat"),
|
||||
("bpy.ops.mesh.primitive_ico_sphere_add*", "modeling/meshes/primitives.html#bpy-ops-mesh-primitive-ico-sphere-add"),
|
||||
("bpy.ops.object.gpencil_modifier_apply*", "grease_pencil/modifiers/introduction.html#bpy-ops-object-gpencil-modifier-apply"),
|
||||
("bpy.ops.object.material_slot_deselect*", "render/materials/assignment.html#bpy-ops-object-material-slot-deselect"),
|
||||
("bpy.ops.object.multires_external_save*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-external-save"),
|
||||
("bpy.ops.object.vertex_group_normalize*", "sculpt_paint/weight_paint/editing.html#bpy-ops-object-vertex-group-normalize"),
|
||||
("bpy.ops.object.visual_transform_apply*", "scene_layout/object/editing/apply.html#bpy-ops-object-visual-transform-apply"),
|
||||
("bpy.ops.outliner.collection_duplicate*", "editors/outliner/editing.html#bpy-ops-outliner-collection-duplicate"),
|
||||
("bpy.ops.pose.select_constraint_target*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-constraint-target"),
|
||||
("bpy.ops.sequencer.change_effect_input*", "video_editing/sequencer/editing.html#bpy-ops-sequencer-change-effect-input"),
|
||||
("bpy.ops.sequencer.strip_transform_fit*", "video_editing/sequencer/editing.html#bpy-ops-sequencer-strip-transform-fit"),
|
||||
("bpy.types.armature.rigify_colors_lock*", "addons/rigging/rigify/metarigs.html#bpy-types-armature-rigify-colors-lock"),
|
||||
|
@ -579,6 +602,7 @@ url_manual_mapping = (
|
|||
("bpy.types.sculpt.detail_refine_method*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-detail-refine-method"),
|
||||
("bpy.types.sculpt.symmetrize_direction*", "sculpt_paint/sculpting/tool_settings/symmetry.html#bpy-types-sculpt-symmetrize-direction"),
|
||||
("bpy.types.sequenceeditor.show_overlay*", "video_editing/preview/sidebar.html#bpy-types-sequenceeditor-show-overlay"),
|
||||
("bpy.types.sequenceeditor.use_prefetch*", "video_editing/preview/sidebar.html#bpy-types-sequenceeditor-use-prefetch"),
|
||||
("bpy.types.soundsequence.show_waveform*", "video_editing/sequencer/sidebar/strip.html#bpy-types-soundsequence-show-waveform"),
|
||||
("bpy.types.spaceoutliner.filter_invert*", "editors/outliner/interface.html#bpy-types-spaceoutliner-filter-invert"),
|
||||
("bpy.types.spacetexteditor.show_margin*", "editors/text_editor.html#bpy-types-spacetexteditor-show-margin"),
|
||||
|
@ -587,6 +611,9 @@ url_manual_mapping = (
|
|||
("bpy.types.toolsettings.use_snap_scale*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-scale"),
|
||||
("bpy.types.toolsettings.uv_select_mode*", "editors/uv/selecting.html#bpy-types-toolsettings-uv-select-mode"),
|
||||
("bpy.types.viewlayer.material_override*", "render/layers/introduction.html#bpy-types-viewlayer-material-override"),
|
||||
("bpy.ops.anim.channels_disable_toggle*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-disable-toggle"),
|
||||
("bpy.ops.anim.channels_fcurves_enable*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-fcurves-enable"),
|
||||
("bpy.ops.anim.channels_setting_toggle*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-setting-toggle"),
|
||||
("bpy.ops.clip.set_viewport_background*", "movie_clip/tracking/clip/editing/clip.html#bpy-ops-clip-set-viewport-background"),
|
||||
("bpy.ops.gpencil.interpolate_sequence*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-interpolate-sequence"),
|
||||
("bpy.ops.mesh.normals_make_consistent*", "modeling/meshes/editing/mesh/normals.html#bpy-ops-mesh-normals-make-consistent"),
|
||||
|
@ -609,12 +636,14 @@ url_manual_mapping = (
|
|||
("bpy.types.brush.topology_rake_factor*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-brush-topology-rake-factor"),
|
||||
("bpy.types.brush.use_pose_ik_anchored*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-use-pose-ik-anchored"),
|
||||
("bpy.types.clothsettings.use_pressure*", "physics/cloth/settings/physical_properties.html#bpy-types-clothsettings-use-pressure"),
|
||||
("bpy.types.compositornodeantialiasing*", "compositing/types/filter/anti_aliasing.html#bpy-types-compositornodeantialiasing"),
|
||||
("bpy.types.compositornodechannelmatte*", "compositing/types/matte/channel_key.html#bpy-types-compositornodechannelmatte"),
|
||||
("bpy.types.compositornodecolorbalance*", "compositing/types/color/color_balance.html#bpy-types-compositornodecolorbalance"),
|
||||
("bpy.types.compositornodekeyingscreen*", "compositing/types/matte/keying_screen.html#bpy-types-compositornodekeyingscreen"),
|
||||
("bpy.types.dynamicpaintcanvassettings*", "physics/dynamic_paint/canvas.html#bpy-types-dynamicpaintcanvassettings"),
|
||||
("bpy.types.fluidflowsettings.use_flow*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-use-flow"),
|
||||
("bpy.types.fmodifierfunctiongenerator*", "editors/graph_editor/fcurves/sidebar/modifiers.html#bpy-types-fmodifierfunctiongenerator"),
|
||||
("bpy.types.geometrynodeattributeclamp*", "modeling/geometry_nodes/attribute/attribute_clamp.html#bpy-types-geometrynodeattributeclamp"),
|
||||
("bpy.types.geometrynodecollectioninfo*", "modeling/geometry_nodes/input/collection_info.html#bpy-types-geometrynodecollectioninfo"),
|
||||
("bpy.types.geometrynodepointstovolume*", "modeling/geometry_nodes/volume/points_to_volume.html#bpy-types-geometrynodepointstovolume"),
|
||||
("bpy.types.geometrynodepointtranslate*", "modeling/geometry_nodes/point/point_translate.html#bpy-types-geometrynodepointtranslate"),
|
||||
|
@ -634,6 +663,7 @@ url_manual_mapping = (
|
|||
("bpy.types.toolsettings.snap_elements*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-snap-elements"),
|
||||
("bpy.types.toolsettings.use_snap_self*", "editors/3dview/controls/snapping.html#bpy-types-toolsettings-use-snap-self"),
|
||||
("bpy.types.viewlayer.active_aov_index*", "render/layers/passes.html#bpy-types-viewlayer-active-aov-index"),
|
||||
("bpy.ops.anim.channels_enable_toggle*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-enable-toggle"),
|
||||
("bpy.ops.gpencil.bake_mesh_animation*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-bake-mesh-animation"),
|
||||
("bpy.ops.gpencil.select_vertex_color*", "grease_pencil/selecting.html#bpy-ops-gpencil-select-vertex-color"),
|
||||
("bpy.ops.gpencil.set_active_material*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-set-active-material"),
|
||||
|
@ -646,6 +676,8 @@ url_manual_mapping = (
|
|||
("bpy.ops.mesh.shape_propagate_to_all*", "modeling/meshes/editing/vertex/propagate_shapes.html#bpy-ops-mesh-shape-propagate-to-all"),
|
||||
("bpy.ops.mesh.vert_connect_nonplanar*", "modeling/meshes/editing/mesh/cleanup.html#bpy-ops-mesh-vert-connect-nonplanar"),
|
||||
("bpy.ops.object.duplicates_make_real*", "scene_layout/object/editing/apply.html#bpy-ops-object-duplicates-make-real"),
|
||||
("bpy.ops.object.material_slot_assign*", "render/materials/assignment.html#bpy-ops-object-material-slot-assign"),
|
||||
("bpy.ops.object.material_slot_select*", "render/materials/assignment.html#bpy-ops-object-material-slot-select"),
|
||||
("bpy.ops.object.multires_unsubdivide*", "modeling/modifiers/generate/multiresolution.html#bpy-ops-object-multires-unsubdivide"),
|
||||
("bpy.ops.object.transforms_to_deltas*", "scene_layout/object/editing/apply.html#bpy-ops-object-transforms-to-deltas"),
|
||||
("bpy.ops.outliner.collection_disable*", "editors/outliner/editing.html#bpy-ops-outliner-collection-disable"),
|
||||
|
@ -662,6 +694,7 @@ url_manual_mapping = (
|
|||
("bpy.types.brush.use_cloth_collision*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-use-cloth-collision"),
|
||||
("bpy.types.brush.use_grab_silhouette*", "sculpt_paint/sculpting/tools/grab.html#bpy-types-brush-use-grab-silhouette"),
|
||||
("bpy.types.brush.use_primary_overlay*", "sculpt_paint/brush/cursor.html#bpy-types-brush-use-primary-overlay"),
|
||||
("bpy.types.brushtextureslot.map_mode*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot-map-mode"),
|
||||
("bpy.types.camera.passepartout_alpha*", "render/cameras.html#bpy-types-camera-passepartout-alpha"),
|
||||
("bpy.types.compositornodechromamatte*", "compositing/types/matte/chroma_key.html#bpy-types-compositornodechromamatte"),
|
||||
("bpy.types.compositornodedilateerode*", "compositing/types/filter/dilate_erode.html#bpy-types-compositornodedilateerode"),
|
||||
|
@ -673,6 +706,7 @@ url_manual_mapping = (
|
|||
("bpy.types.fluidflowsettings.density*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-density"),
|
||||
("bpy.types.geometrynodeattributefill*", "modeling/geometry_nodes/attribute/attribute_fill.html#bpy-types-geometrynodeattributefill"),
|
||||
("bpy.types.geometrynodeattributemath*", "modeling/geometry_nodes/attribute/attribute_math.html#bpy-types-geometrynodeattributemath"),
|
||||
("bpy.types.geometrynodemeshicosphere*", "modeling/geometry_nodes/mesh_primitives/icosphere.html#bpy-types-geometrynodemeshicosphere"),
|
||||
("bpy.types.geometrynodepointinstance*", "modeling/geometry_nodes/point/point_instance.html#bpy-types-geometrynodepointinstance"),
|
||||
("bpy.types.geometrynodepointseparate*", "modeling/geometry_nodes/point/point_separate.html#bpy-types-geometrynodepointseparate"),
|
||||
("bpy.types.light.use_custom_distance*", "render/eevee/lighting.html#bpy-types-light-use-custom-distance"),
|
||||
|
@ -730,6 +764,7 @@ url_manual_mapping = (
|
|||
("bpy.types.brush.use_connected_only*", "sculpt_paint/sculpting/tools/pose.html#bpy-types-brush-use-connected-only"),
|
||||
("bpy.types.brush.use_cursor_overlay*", "sculpt_paint/brush/cursor.html#bpy-types-brush-use-cursor-overlay"),
|
||||
("bpy.types.camera.show_passepartout*", "render/cameras.html#bpy-types-camera-show-passepartout"),
|
||||
("bpy.types.collection.lineart_usage*", "scene_layout/collections/properties.html#bpy-types-collection-lineart-usage"),
|
||||
("bpy.types.compositornodebokehimage*", "compositing/types/input/bokeh_image.html#bpy-types-compositornodebokehimage"),
|
||||
("bpy.types.compositornodecolormatte*", "compositing/types/matte/color_key.html#bpy-types-compositornodecolormatte"),
|
||||
("bpy.types.compositornodecolorspill*", "compositing/types/matte/color_spill.html#bpy-types-compositornodecolorspill"),
|
||||
|
@ -745,6 +780,8 @@ url_manual_mapping = (
|
|||
("bpy.types.functionnodefloatcompare*", "modeling/geometry_nodes/utilities/float_compare.html#bpy-types-functionnodefloatcompare"),
|
||||
("bpy.types.geometrynodeattributemix*", "modeling/geometry_nodes/attribute/attribute_mix.html#bpy-types-geometrynodeattributemix"),
|
||||
("bpy.types.geometrynodejoingeometry*", "modeling/geometry_nodes/geometry/join_geometry.html#bpy-types-geometrynodejoingeometry"),
|
||||
("bpy.types.geometrynodemeshcylinder*", "modeling/geometry_nodes/mesh_primitives/cylinder.html#bpy-types-geometrynodemeshcylinder"),
|
||||
("bpy.types.geometrynodemeshuvsphere*", "modeling/geometry_nodes/mesh_primitives/uv_sphere.html#bpy-types-geometrynodemeshuvsphere"),
|
||||
("bpy.types.geometrynodevolumetomesh*", "modeling/geometry_nodes/volume/volume_to_mesh.html#bpy-types-geometrynodevolumetomesh"),
|
||||
("bpy.types.image.use_half_precision*", "editors/image/image_settings.html#bpy-types-image-use-half-precision"),
|
||||
("bpy.types.imagepaint.interpolation*", "sculpt_paint/texture_paint/tool_settings/texture_slots.html#bpy-types-imagepaint-interpolation"),
|
||||
|
@ -767,6 +804,7 @@ url_manual_mapping = (
|
|||
("bpy.types.vertexweighteditmodifier*", "modeling/modifiers/modify/weight_edit.html#bpy-types-vertexweighteditmodifier"),
|
||||
("bpy.types.volumedisplay.slice_axis*", "modeling/volumes/properties.html#bpy-types-volumedisplay-slice-axis"),
|
||||
("bpy.ops.anim.channels_clean_empty*", "editors/nla/editing.html#bpy-ops-anim-channels-clean-empty"),
|
||||
("bpy.ops.armature.select_hierarchy*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-hierarchy"),
|
||||
("bpy.ops.clip.apply_solution_scale*", "movie_clip/tracking/clip/editing/reconstruction.html#bpy-ops-clip-apply-solution-scale"),
|
||||
("bpy.ops.clip.set_center_principal*", "movie_clip/tracking/clip/editing/clip.html#bpy-ops-clip-set-center-principal"),
|
||||
("bpy.ops.clip.setup_tracking_scene*", "movie_clip/tracking/clip/editing/clip.html#bpy-ops-clip-setup-tracking-scene"),
|
||||
|
@ -842,11 +880,13 @@ url_manual_mapping = (
|
|||
("bpy.types.viewlayer.use_freestyle*", "render/freestyle/view_layer.html#bpy-types-viewlayer-use-freestyle"),
|
||||
("bpy.types.volumedisplay.use_slice*", "modeling/volumes/properties.html#bpy-types-volumedisplay-use-slice"),
|
||||
("bpy.ops.armature.armature_layers*", "animation/armatures/bones/editing/change_layers.html#bpy-ops-armature-armature-layers"),
|
||||
("bpy.ops.armature.select_linked()*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-linked"),
|
||||
("bpy.ops.clip.stabilize_2d_select*", "movie_clip/tracking/clip/selecting.html#bpy-ops-clip-stabilize-2d-select"),
|
||||
("bpy.ops.gpencil.frame_clean_fill*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-frame-clean-fill"),
|
||||
("bpy.ops.gpencil.stroke_subdivide*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-subdivide"),
|
||||
("bpy.ops.gpencil.vertex_color_hsv*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-vertex-color-hsv"),
|
||||
("bpy.ops.gpencil.vertex_color_set*", "grease_pencil/modes/vertex_paint/editing.html#bpy-ops-gpencil-vertex-color-set"),
|
||||
("bpy.ops.graph.extrapolation_type*", "editors/graph_editor/channels.html#bpy-ops-graph-extrapolation-type"),
|
||||
("bpy.ops.graph.interpolation_type*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-interpolation-type"),
|
||||
("bpy.ops.mesh.dissolve_degenerate*", "modeling/meshes/editing/mesh/cleanup.html#bpy-ops-mesh-dissolve-degenerate"),
|
||||
("bpy.ops.mesh.face_split_by_edges*", "modeling/meshes/editing/face/weld_edges_faces.html#bpy-ops-mesh-face-split-by-edges"),
|
||||
|
@ -901,11 +941,13 @@ url_manual_mapping = (
|
|||
("bpy.types.cyclesmaterialsettings*", "render/cycles/material_settings.html#bpy-types-cyclesmaterialsettings"),
|
||||
("bpy.types.dopesheet.show_summary*", "editors/dope_sheet/introduction.html#bpy-types-dopesheet-show-summary"),
|
||||
("bpy.types.geometrynodeisviewport*", "modeling/geometry_nodes/input/is_viewport.html#bpy-types-geometrynodeisviewport"),
|
||||
("bpy.types.geometrynodemeshcircle*", "modeling/geometry_nodes/mesh_primitives/circle.html#bpy-types-geometrynodemeshcircle"),
|
||||
("bpy.types.geometrynodeobjectinfo*", "modeling/geometry_nodes/input/object_info.html#bpy-types-geometrynodeobjectinfo"),
|
||||
("bpy.types.geometrynodepointscale*", "modeling/geometry_nodes/point/point_scale.html#bpy-types-geometrynodepointscale"),
|
||||
("bpy.types.imagepaint.use_occlude*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-use-occlude"),
|
||||
("bpy.types.imagesequence.use_flip*", "video_editing/sequencer/sidebar/strip.html#bpy-types-imagesequence-use-flip"),
|
||||
("bpy.types.latticegpencilmodifier*", "grease_pencil/modifiers/deform/lattice.html#bpy-types-latticegpencilmodifier"),
|
||||
("bpy.types.lineartgpencilmodifier*", "grease_pencil/modifiers/generate/lineart.html#bpy-types-lineartgpencilmodifier"),
|
||||
("bpy.types.mesh.auto_smooth_angle*", "modeling/meshes/structure.html#bpy-types-mesh-auto-smooth-angle"),
|
||||
("bpy.types.objectsolverconstraint*", "animation/constraints/motion_tracking/object_solver.html#bpy-types-objectsolverconstraint"),
|
||||
("bpy.types.opacitygpencilmodifier*", "grease_pencil/modifiers/color/opacity.html#bpy-types-opacitygpencilmodifier"),
|
||||
|
@ -914,7 +956,6 @@ url_manual_mapping = (
|
|||
("bpy.types.sceneeevee.motion_blur*", "render/eevee/render_settings/motion_blur.html#bpy-types-sceneeevee-motion-blur"),
|
||||
("bpy.types.sceneeevee.taa_samples*", "render/eevee/render_settings/sampling.html#bpy-types-sceneeevee-taa-samples"),
|
||||
("bpy.types.sculpt.radial_symmetry*", "sculpt_paint/sculpting/tool_settings/symmetry.html#bpy-types-sculpt-radial-symmetry"),
|
||||
("bpy.types.sequenceeditor.overlay*", "video_editing/preview/sidebar.html#bpy-types-sequenceeditor-overlay"),
|
||||
("bpy.types.shadernodedisplacement*", "render/shader_nodes/vector/displacement.html#bpy-types-shadernodedisplacement"),
|
||||
("bpy.types.shadernodelightfalloff*", "render/shader_nodes/color/light_falloff.html#bpy-types-shadernodelightfalloff"),
|
||||
("bpy.types.shadernodeparticleinfo*", "render/shader_nodes/input/particle_info.html#bpy-types-shadernodeparticleinfo"),
|
||||
|
@ -926,6 +967,7 @@ url_manual_mapping = (
|
|||
("bpy.types.volumerender.step_size*", "modeling/volumes/properties.html#bpy-types-volumerender-step-size"),
|
||||
("bpy.types.weightednormalmodifier*", "modeling/modifiers/modify/weighted_normal.html#bpy-types-weightednormalmodifier"),
|
||||
("bpy.ops.armature.autoside_names*", "animation/armatures/bones/editing/naming.html#bpy-ops-armature-autoside-names"),
|
||||
("bpy.ops.armature.select_similar*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-similar"),
|
||||
("bpy.ops.clip.create_plane_track*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-create-plane-track"),
|
||||
("bpy.ops.curve.spline_weight_set*", "modeling/curves/editing/other.html#bpy-ops-curve-spline-weight-set"),
|
||||
("bpy.ops.gpencil.blank_frame_add*", "grease_pencil/animation/tools.html#bpy-ops-gpencil-blank-frame-add"),
|
||||
|
@ -976,7 +1018,7 @@ url_manual_mapping = (
|
|||
("bpy.types.brush.boundary_offset*", "sculpt_paint/sculpting/tools/boundary.html#bpy-types-brush-boundary-offset"),
|
||||
("bpy.types.brush.cloth_sim_limit*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-sim-limit"),
|
||||
("bpy.types.brush.use_custom_icon*", "sculpt_paint/brush/brush.html#bpy-types-brush-use-custom-icon"),
|
||||
("bpy.types.brushtextureslot.mask*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot-mask"),
|
||||
("bpy.types.brushtextureslot.mask*", "sculpt_paint/brush/texture_mask.html#bpy-types-brushtextureslot-mask"),
|
||||
("bpy.types.camerabackgroundimage*", "render/cameras.html#bpy-types-camerabackgroundimage"),
|
||||
("bpy.types.compositornodeboxmask*", "compositing/types/matte/box_mask.html#bpy-types-compositornodeboxmask"),
|
||||
("bpy.types.compositornodedefocus*", "compositing/types/filter/defocus.html#bpy-types-compositornodedefocus"),
|
||||
|
@ -1004,12 +1046,12 @@ url_manual_mapping = (
|
|||
("bpy.types.mirrorgpencilmodifier*", "grease_pencil/modifiers/generate/mirror.html#bpy-types-mirrorgpencilmodifier"),
|
||||
("bpy.types.movietrackingcamera.k*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera-k"),
|
||||
("bpy.types.offsetgpencilmodifier*", "grease_pencil/modifiers/deform/offset.html#bpy-types-offsetgpencilmodifier"),
|
||||
("bpy.types.particlefluidsettings*", "physics/particles/emitter/physics/fluid.html#bpy-types-particlefluidsettings"),
|
||||
("bpy.types.posebone.custom_shape*", "animation/armatures/bones/properties/display.html#bpy-types-posebone-custom-shape"),
|
||||
("bpy.types.rendersettings.tile_x*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-tile-x"),
|
||||
("bpy.types.rendersettings.tile_y*", "render/cycles/render_settings/performance.html#bpy-types-rendersettings-tile-y"),
|
||||
("bpy.types.rigifyselectioncolors*", "addons/rigging/rigify/metarigs.html#bpy-types-rigifyselectioncolors"),
|
||||
("bpy.types.sceneeevee.volumetric*", "render/eevee/render_settings/volumetrics.html#bpy-types-sceneeevee-volumetric"),
|
||||
("bpy.types.screen.show_statusbar*", "interface/window_system/topbar.html#bpy-types-screen-show-statusbar"),
|
||||
("bpy.types.sculpt.detail_percent*", "sculpt_paint/sculpting/tool_settings/dyntopo.html#bpy-types-sculpt-detail-percent"),
|
||||
("bpy.types.sculpt.gravity_object*", "sculpt_paint/sculpting/tool_settings/options.html#bpy-types-sculpt-gravity-object"),
|
||||
("bpy.types.shadernodebsdfdiffuse*", "render/shader_nodes/shader/diffuse.html#bpy-types-shadernodebsdfdiffuse"),
|
||||
|
@ -1017,7 +1059,6 @@ url_manual_mapping = (
|
|||
("bpy.types.shadernodeoutputlight*", "render/shader_nodes/output/light.html#bpy-types-shadernodeoutputlight"),
|
||||
("bpy.types.shadernodeoutputworld*", "render/shader_nodes/output/world.html#bpy-types-shadernodeoutputworld"),
|
||||
("bpy.types.shadernodetexgradient*", "render/shader_nodes/textures/gradient.html#bpy-types-shadernodetexgradient"),
|
||||
("bpy.types.shadernodetexmusgrave*", "render/shader_nodes/textures/musgrave.html#bpy-types-shadernodetexmusgrave"),
|
||||
("bpy.types.shadernodevectorcurve*", "render/shader_nodes/vector/curves.html#bpy-types-shadernodevectorcurve"),
|
||||
("bpy.types.shadernodevertexcolor*", "render/shader_nodes/input/vertex_color.html#bpy-types-shadernodevertexcolor"),
|
||||
("bpy.types.smoothgpencilmodifier*", "grease_pencil/modifiers/deform/smooth.html#bpy-types-smoothgpencilmodifier"),
|
||||
|
@ -1028,6 +1069,8 @@ url_manual_mapping = (
|
|||
("bpy.types.volumedisplay.density*", "modeling/volumes/properties.html#bpy-types-volumedisplay-density"),
|
||||
("bpy.types.volumerender.clipping*", "modeling/volumes/properties.html#bpy-types-volumerender-clipping"),
|
||||
("bpy.types.workspace.object_mode*", "interface/window_system/workspaces.html#bpy-types-workspace-object-mode"),
|
||||
("bpy.ops.anim.channels_collapse*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-collapse"),
|
||||
("bpy.ops.armature.select_mirror*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-mirror"),
|
||||
("bpy.ops.curve.switch_direction*", "modeling/curves/editing/segments.html#bpy-ops-curve-switch-direction"),
|
||||
("bpy.ops.gpencil.duplicate_move*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-duplicate-move"),
|
||||
("bpy.ops.gpencil.stroke_arrange*", "grease_pencil/modes/edit/stroke_menu.html#bpy-ops-gpencil-stroke-arrange"),
|
||||
|
@ -1044,6 +1087,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.paint.mask_box_gesture*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-paint-mask-box-gesture"),
|
||||
("bpy.ops.screen.region_quadview*", "editors/3dview/navigate/views.html#bpy-ops-screen-region-quadview"),
|
||||
("bpy.ops.sequencer.offset_clear*", "video_editing/sequencer/editing.html#bpy-ops-sequencer-offset-clear"),
|
||||
("bpy.ops.spreadsheet.toggle_pin*", "editors/spreadsheet.html#bpy-ops-spreadsheet-toggle-pin"),
|
||||
("bpy.ops.uv.follow_active_quads*", "modeling/meshes/editing/uv.html#bpy-ops-uv-follow-active-quads"),
|
||||
("bpy.types.arraygpencilmodifier*", "grease_pencil/modifiers/generate/array.html#bpy-types-arraygpencilmodifier"),
|
||||
("bpy.types.brush.use_persistent*", "sculpt_paint/sculpting/tools/layer.html#bpy-types-brush-use-persistent"),
|
||||
|
@ -1066,12 +1110,17 @@ url_manual_mapping = (
|
|||
("bpy.types.ffmpegsettings.audio*", "render/output/properties/output.html#bpy-types-ffmpegsettings-audio"),
|
||||
("bpy.types.followpathconstraint*", "animation/constraints/relationship/follow_path.html#bpy-types-followpathconstraint"),
|
||||
("bpy.types.gaussianblursequence*", "video_editing/sequencer/strips/effects/blur.html#bpy-types-gaussianblursequence"),
|
||||
("bpy.types.geometrynodemeshcone*", "modeling/geometry_nodes/mesh_primitives/cone.html#bpy-types-geometrynodemeshcone"),
|
||||
("bpy.types.geometrynodemeshcube*", "modeling/geometry_nodes/mesh_primitives/cube.html#bpy-types-geometrynodemeshcube"),
|
||||
("bpy.types.geometrynodemeshgrid*", "modeling/geometry_nodes/mesh_primitives/grid.html#bpy-types-geometrynodemeshgrid"),
|
||||
("bpy.types.geometrynodemeshline*", "modeling/geometry_nodes/mesh_primitives/line.html#bpy-types-geometrynodemeshline"),
|
||||
("bpy.types.gpencillayer.opacity*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-opacity"),
|
||||
("bpy.types.image.display_aspect*", "editors/image/sidebar.html#bpy-types-image-display-aspect"),
|
||||
("bpy.types.limitscaleconstraint*", "animation/constraints/transform/limit_scale.html#bpy-types-limitscaleconstraint"),
|
||||
("bpy.types.materialgpencilstyle*", "grease_pencil/materials/index.html#bpy-types-materialgpencilstyle"),
|
||||
("bpy.types.mesh.use_auto_smooth*", "modeling/meshes/structure.html#bpy-types-mesh-use-auto-smooth"),
|
||||
("bpy.types.meshtovolumemodifier*", "modeling/modifiers/generate/mesh_to_volume.html#bpy-types-meshtovolumemodifier"),
|
||||
("bpy.types.noisegpencilmodifier*", "grease_pencil/modifiers/deform/noise.html#bpy-types-noisegpencilmodifier"),
|
||||
("bpy.types.object.hide_viewport*", "scene_layout/object/properties/visibility.html#bpy-types-object-hide-viewport"),
|
||||
("bpy.types.posebone.rigify_type*", "addons/rigging/rigify/rig_types/index.html#bpy-types-posebone-rigify-type"),
|
||||
("bpy.types.preferencesfilepaths*", "editors/preferences/file_paths.html#bpy-types-preferencesfilepaths"),
|
||||
|
@ -1098,6 +1147,7 @@ url_manual_mapping = (
|
|||
("bpy.types.volume.sequence_mode*", "modeling/volumes/properties.html#bpy-types-volume-sequence-mode"),
|
||||
("bpy.types.volumetomeshmodifier*", "modeling/modifiers/generate/volume_to_mesh.html#bpy-types-volumetomeshmodifier"),
|
||||
("bpy.types.whitebalancemodifier*", "video_editing/sequencer/sidebar/modifiers.html#bpy-types-whitebalancemodifier"),
|
||||
("bpy.ops.anim.channels_ungroup*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-ungroup"),
|
||||
("bpy.ops.clip.clear_track_path*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-clear-track-path"),
|
||||
("bpy.ops.clip.set_scene_frames*", "movie_clip/tracking/clip/editing/clip.html#bpy-ops-clip-set-scene-frames"),
|
||||
("bpy.ops.curve.handle_type_set*", "modeling/curves/editing/control_points.html#bpy-ops-curve-handle-type-set"),
|
||||
|
@ -1123,6 +1173,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.outliner.id_operation*", "editors/outliner/editing.html#bpy-ops-outliner-id-operation"),
|
||||
("bpy.ops.paint.mask_flood_fill*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-paint-mask-flood-fill"),
|
||||
("bpy.ops.pose.quaternions_flip*", "animation/armatures/posing/editing/flip_quats.html#bpy-ops-pose-quaternions-flip"),
|
||||
("bpy.ops.pose.select_hierarchy*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-hierarchy"),
|
||||
("bpy.ops.pose.transforms_clear*", "animation/armatures/posing/editing/clear.html#bpy-ops-pose-transforms-clear"),
|
||||
("bpy.ops.preferences.copy_prev*", "editors/preferences/introduction.html#bpy-ops-preferences-copy-prev"),
|
||||
("bpy.ops.preferences.keyconfig*", "editors/preferences/keymap.html#bpy-ops-preferences-keyconfig"),
|
||||
|
@ -1167,12 +1218,13 @@ url_manual_mapping = (
|
|||
("bpy.types.kinematicconstraint*", "animation/constraints/tracking/ik_solver.html#bpy-types-kinematicconstraint"),
|
||||
("bpy.types.mesh.use_paint_mask*", "sculpt_paint/brush/introduction.html#bpy-types-mesh-use-paint-mask"),
|
||||
("bpy.types.movietrackingcamera*", "movie_clip/tracking/clip/sidebar/track/camera.html#bpy-types-movietrackingcamera"),
|
||||
("bpy.types.noisepencilmodifier*", "grease_pencil/modifiers/deform/noise.html#bpy-types-noisepencilmodifier"),
|
||||
("bpy.types.object.display_type*", "scene_layout/object/properties/display.html#bpy-types-object-display-type"),
|
||||
("bpy.types.objectlineart.usage*", "scene_layout/object/properties/lineart.html#bpy-types-objectlineart-usage"),
|
||||
("bpy.types.particledupliweight*", "physics/particles/emitter/vertex_groups.html#bpy-types-particledupliweight"),
|
||||
("bpy.types.poseboneconstraints*", "animation/armatures/posing/bone_constraints/index.html#bpy-types-poseboneconstraints"),
|
||||
("bpy.types.rigidbodyconstraint*", "physics/rigid_body/constraints/index.html#bpy-types-rigidbodyconstraint"),
|
||||
("bpy.types.rigifyarmaturelayer*", "addons/rigging/rigify/metarigs.html#bpy-types-rigifyarmaturelayer"),
|
||||
("bpy.types.scene.show_subframe*", "editors/timeline.html#bpy-types-scene-show-subframe"),
|
||||
("bpy.types.shadernodeaddshader*", "render/shader_nodes/shader/add.html#bpy-types-shadernodeaddshader"),
|
||||
("bpy.types.shadernodeattribute*", "render/shader_nodes/input/attribute.html#bpy-types-shadernodeattribute"),
|
||||
("bpy.types.shadernodeblackbody*", "render/shader_nodes/converter/blackbody.html#bpy-types-shadernodeblackbody"),
|
||||
|
@ -1195,9 +1247,13 @@ url_manual_mapping = (
|
|||
("bpy.types.viewlayer.use_solid*", "render/layers/introduction.html#bpy-types-viewlayer-use-solid"),
|
||||
("bpy.types.volume.frame_offset*", "modeling/volumes/properties.html#bpy-types-volume-frame-offset"),
|
||||
("bpy.types.windowmanager.addon*", "editors/preferences/addons.html#bpy-types-windowmanager-addon"),
|
||||
("bpy.ops.anim.channels_delete*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-delete"),
|
||||
("bpy.ops.anim.channels_expand*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-expand"),
|
||||
("bpy.ops.anim.keyframe_delete*", "animation/keyframes/editing.html#bpy-ops-anim-keyframe-delete"),
|
||||
("bpy.ops.anim.keyframe_insert*", "animation/keyframes/editing.html#bpy-ops-anim-keyframe-insert"),
|
||||
("bpy.ops.armature.bone_layers*", "animation/armatures/bones/editing/change_layers.html#bpy-ops-armature-bone-layers"),
|
||||
("bpy.ops.armature.select_less*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-less"),
|
||||
("bpy.ops.armature.select_more*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-more"),
|
||||
("bpy.ops.clip.add_marker_move*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-add-marker-move"),
|
||||
("bpy.ops.clip.bundles_to_mesh*", "movie_clip/tracking/clip/editing/reconstruction.html#bpy-ops-clip-bundles-to-mesh"),
|
||||
("bpy.ops.clip.detect_features*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-detect-features"),
|
||||
|
@ -1241,7 +1297,6 @@ url_manual_mapping = (
|
|||
("bpy.types.alphaundersequence*", "video_editing/sequencer/strips/effects/alpha_over_under_overdrop.html#bpy-types-alphaundersequence"),
|
||||
("bpy.types.armature.show_axes*", "animation/armatures/properties/display.html#bpy-types-armature-show-axes"),
|
||||
("bpy.types.armatureconstraint*", "animation/constraints/relationship/armature.html#bpy-types-armatureconstraint"),
|
||||
("bpy.types.compositornodeblur*", "compositing/types/filter/blur_node.html#bpy-types-compositornodeblur"),
|
||||
("bpy.types.compositornodecomb*", "editors/texture_node/types/color/combine_separate.html#bpy-types-compositornodecomb"),
|
||||
("bpy.types.compositornodecrop*", "compositing/types/distort/crop.html#bpy-types-compositornodecrop"),
|
||||
("bpy.types.compositornodeflip*", "compositing/types/distort/flip.html#bpy-types-compositornodeflip"),
|
||||
|
@ -1292,8 +1347,10 @@ url_manual_mapping = (
|
|||
("bpy.types.volume.frame_start*", "modeling/volumes/properties.html#bpy-types-volume-frame-start"),
|
||||
("bpy.types.volume.is_sequence*", "modeling/volumes/properties.html#bpy-types-volume-is-sequence"),
|
||||
("bpy.types.volumerender.space*", "modeling/volumes/properties.html#bpy-types-volumerender-space"),
|
||||
("bpy.ops.anim.channels_group*", "editors/graph_editor/channels.html#bpy-ops-anim-channels-group"),
|
||||
("bpy.ops.anim.keyframe_clear*", "animation/keyframes/editing.html#bpy-ops-anim-keyframe-clear"),
|
||||
("bpy.ops.armature.flip_names*", "animation/armatures/bones/editing/naming.html#bpy-ops-armature-flip-names"),
|
||||
("bpy.ops.armature.select_all*", "animation/armatures/bones/selecting.html#bpy-ops-armature-select-all"),
|
||||
("bpy.ops.clip.refine_markers*", "movie_clip/tracking/clip/editing/track.html#bpy-ops-clip-refine-markers"),
|
||||
("bpy.ops.clip.select_grouped*", "movie_clip/tracking/clip/selecting.html#bpy-ops-clip-select-grouped"),
|
||||
("bpy.ops.clip.track_to_empty*", "movie_clip/tracking/clip/editing/reconstruction.html#bpy-ops-clip-track-to-empty"),
|
||||
|
@ -1325,6 +1382,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.object.shade_smooth*", "scene_layout/object/editing/shading.html#bpy-ops-object-shade-smooth"),
|
||||
("bpy.ops.object.voxel_remesh*", "modeling/meshes/retopology.html#bpy-ops-object-voxel-remesh"),
|
||||
("bpy.ops.pose.armature_apply*", "animation/armatures/posing/editing/apply.html#bpy-ops-pose-armature-apply"),
|
||||
("bpy.ops.pose.select_grouped*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-grouped"),
|
||||
("bpy.ops.poselib.pose_remove*", "animation/armatures/posing/editing/pose_library.html#bpy-ops-poselib-pose-remove"),
|
||||
("bpy.ops.poselib.pose_rename*", "animation/armatures/posing/editing/pose_library.html#bpy-ops-poselib-pose-rename"),
|
||||
("bpy.ops.preferences.keyitem*", "editors/preferences/keymap.html#bpy-ops-preferences-keyitem"),
|
||||
|
@ -1360,6 +1418,7 @@ url_manual_mapping = (
|
|||
("bpy.types.gpencillayer.hide*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-hide"),
|
||||
("bpy.types.gpencillayer.lock*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer-lock"),
|
||||
("bpy.types.imagepaint.dither*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-types-imagepaint-dither"),
|
||||
("bpy.types.materialslot.link*", "render/materials/assignment.html#bpy-types-materialslot-link"),
|
||||
("bpy.types.mesh.texture_mesh*", "modeling/meshes/uv/uv_texture_spaces.html#bpy-types-mesh-texture-mesh"),
|
||||
("bpy.types.mesh.use_mirror_x*", "modeling/meshes/tools/tool_settings.html#bpy-types-mesh-use-mirror-x"),
|
||||
("bpy.types.mesh.use_mirror_y*", "modeling/meshes/tools/tool_settings.html#bpy-types-mesh-use-mirror-y"),
|
||||
|
@ -1374,6 +1433,7 @@ url_manual_mapping = (
|
|||
("bpy.types.scene.active_clip*", "scene_layout/scene/properties.html#bpy-types-scene-active-clip"),
|
||||
("bpy.types.scene.frame_start*", "render/output/properties/dimensions.html#bpy-types-scene-frame-start"),
|
||||
("bpy.types.sceneeevee.shadow*", "render/eevee/render_settings/shadows.html#bpy-types-sceneeevee-shadow"),
|
||||
("bpy.types.screen.use_follow*", "editors/timeline.html#bpy-types-screen-use-follow"),
|
||||
("bpy.types.sequencetransform*", "video_editing/sequencer/sidebar/strip.html#bpy-types-sequencetransform"),
|
||||
("bpy.types.shadernodecombine*", "render/shader_nodes/converter/combine_separate.html#bpy-types-shadernodecombine"),
|
||||
("bpy.types.shadernodefresnel*", "render/shader_nodes/input/fresnel.html#bpy-types-shadernodefresnel"),
|
||||
|
@ -1423,6 +1483,8 @@ url_manual_mapping = (
|
|||
("bpy.ops.object.select_less*", "scene_layout/object/selecting.html#bpy-ops-object-select-less"),
|
||||
("bpy.ops.object.select_more*", "scene_layout/object/selecting.html#bpy-ops-object-select-more"),
|
||||
("bpy.ops.object.track_clear*", "animation/constraints/interface/adding_removing.html#bpy-ops-object-track-clear"),
|
||||
("bpy.ops.pose.select_linked*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-linked"),
|
||||
("bpy.ops.pose.select_mirror*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-mirror"),
|
||||
("bpy.ops.poselib.apply_pose*", "animation/armatures/properties/pose_library.html#bpy-ops-poselib-apply-pose"),
|
||||
("bpy.ops.screen.repeat_last*", "interface/undo_redo.html#bpy-ops-screen-repeat-last"),
|
||||
("bpy.ops.sculpt.mask_expand*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-sculpt-mask-expand"),
|
||||
|
@ -1433,10 +1495,13 @@ url_manual_mapping = (
|
|||
("bpy.ops.wm.search_operator*", "interface/controls/templates/operator_search.html#bpy-ops-wm-search-operator"),
|
||||
("bpy.types.actionconstraint*", "animation/constraints/relationship/action.html#bpy-types-actionconstraint"),
|
||||
("bpy.types.addonpreferences*", "editors/preferences/addons.html#bpy-types-addonpreferences"),
|
||||
("bpy.types.arealight.spread*", "render/lights/light_object.html#bpy-types-arealight-spread"),
|
||||
("bpy.types.armaturemodifier*", "modeling/modifiers/deform/armature.html#bpy-types-armaturemodifier"),
|
||||
("bpy.types.brush.cloth_mass*", "sculpt_paint/sculpting/tools/cloth.html#bpy-types-brush-cloth-mass"),
|
||||
("bpy.types.brushtextureslot*", "sculpt_paint/brush/texture.html#bpy-types-brushtextureslot"),
|
||||
("bpy.types.colormixsequence*", "video_editing/sequencer/strips/effects/color_mix.html#bpy-types-colormixsequence"),
|
||||
("bpy.types.curve.dimensions*", "modeling/curves/properties/shape.html#bpy-types-curve-dimensions"),
|
||||
("bpy.types.curve.taper_mode*", "modeling/curves/properties/geometry.html#bpy-types-curve-taper-mode"),
|
||||
("bpy.types.curve.twist_mode*", "modeling/curves/properties/shape.html#bpy-types-curve-twist-mode"),
|
||||
("bpy.types.curve.use_radius*", "modeling/curves/properties/shape.html#bpy-types-curve-use-radius"),
|
||||
("bpy.types.decimatemodifier*", "modeling/modifiers/generate/decimate.html#bpy-types-decimatemodifier"),
|
||||
|
@ -1473,8 +1538,10 @@ url_manual_mapping = (
|
|||
("bpy.types.solidifymodifier*", "modeling/modifiers/generate/solidify.html#bpy-types-solidifymodifier"),
|
||||
("bpy.types.spacegrapheditor*", "editors/graph_editor/index.html#bpy-types-spacegrapheditor"),
|
||||
("bpy.types.spacepreferences*", "editors/preferences/index.html#bpy-types-spacepreferences"),
|
||||
("bpy.types.spacespreadsheet*", "editors/spreadsheet.html#bpy-types-spacespreadsheet"),
|
||||
("bpy.types.spaceview3d.lock*", "editors/3dview/sidebar.html#bpy-types-spaceview3d-lock"),
|
||||
("bpy.types.spaceview3d.show*", "editors/3dview/display/index.html#bpy-types-spaceview3d-show"),
|
||||
("bpy.types.sphfluidsettings*", "physics/particles/emitter/physics/fluid.html#bpy-types-sphfluidsettings"),
|
||||
("bpy.types.subtractsequence*", "video_editing/sequencer/strips/effects/subtract.html#bpy-types-subtractsequence"),
|
||||
("bpy.types.text.indentation*", "editors/text_editor.html#bpy-types-text-indentation"),
|
||||
("bpy.types.texture.contrast*", "render/materials/legacy_textures/colors.html#bpy-types-texture-contrast"),
|
||||
|
@ -1542,6 +1609,7 @@ url_manual_mapping = (
|
|||
("bpy.types.rigidbodyobject*", "physics/rigid_body/index.html#bpy-types-rigidbodyobject"),
|
||||
("bpy.types.scene.frame_end*", "render/output/properties/dimensions.html#bpy-types-scene-frame-end"),
|
||||
("bpy.types.sceneeevee.gtao*", "render/eevee/render_settings/ambient_occlusion.html#bpy-types-sceneeevee-gtao"),
|
||||
("bpy.types.screen.use_play*", "editors/timeline.html#bpy-types-screen-use-play"),
|
||||
("bpy.types.shadernodebevel*", "render/shader_nodes/input/bevel.html#bpy-types-shadernodebevel"),
|
||||
("bpy.types.shadernodeclamp*", "render/shader_nodes/converter/clamp.html#bpy-types-shadernodeclamp"),
|
||||
("bpy.types.shadernodegamma*", "render/shader_nodes/color/gamma.html#bpy-types-shadernodegamma"),
|
||||
|
@ -1645,6 +1713,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.object.join_uvs*", "scene_layout/object/editing/link_transfer/copy_uvmaps.html#bpy-ops-object-join-uvs"),
|
||||
("bpy.ops.outliner.delete*", "editors/outliner/editing.html#bpy-ops-outliner-delete"),
|
||||
("bpy.ops.pose.relax_rest*", "animation/armatures/posing/editing/in_betweens.html#bpy-ops-pose-relax-rest"),
|
||||
("bpy.ops.pose.select_all*", "animation/armatures/posing/selecting.html#bpy-ops-pose-select-all"),
|
||||
("bpy.ops.rigidbody.world*", "physics/rigid_body/world.html#bpy-ops-rigidbody-world"),
|
||||
("bpy.ops.sculpt.optimize*", "sculpt_paint/sculpting/editing/sculpt.html#bpy-ops-sculpt-optimize"),
|
||||
("bpy.ops.sequencer.split*", "video_editing/sequencer/editing.html#bpy-ops-sequencer-split"),
|
||||
|
@ -1680,6 +1749,7 @@ url_manual_mapping = (
|
|||
("bpy.types.nlastrip.name*", "editors/nla/sidebar.html#bpy-types-nlastrip-name"),
|
||||
("bpy.types.nodesmodifier*", "modeling/modifiers/generate/geometry_nodes.html#bpy-types-nodesmodifier"),
|
||||
("bpy.types.object.parent*", "scene_layout/object/editing/parent.html#bpy-types-object-parent"),
|
||||
("bpy.types.objectlineart*", "scene_layout/object/properties/lineart.html#bpy-types-objectlineart"),
|
||||
("bpy.types.oceanmodifier*", "modeling/modifiers/physics/ocean.html#bpy-types-oceanmodifier"),
|
||||
("bpy.types.particlebrush*", "physics/particles/mode.html#bpy-types-particlebrush"),
|
||||
("bpy.types.scene.gravity*", "physics/forces/gravity.html#bpy-types-scene-gravity"),
|
||||
|
@ -1710,6 +1780,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.gpencil.reveal*", "grease_pencil/properties/layers.html#bpy-ops-gpencil-reveal"),
|
||||
("bpy.ops.gpencil.select*", "grease_pencil/selecting.html#bpy-ops-gpencil-select"),
|
||||
("bpy.ops.graph.decimate*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-decimate"),
|
||||
("bpy.ops.material.paste*", "render/materials/assignment.html#bpy-ops-material-paste"),
|
||||
("bpy.ops.mesh.fill_grid*", "modeling/meshes/editing/face/grid_fill.html#bpy-ops-mesh-fill-grid"),
|
||||
("bpy.ops.mesh.intersect*", "modeling/meshes/editing/face/intersect_knife.html#bpy-ops-mesh-intersect"),
|
||||
("bpy.ops.mesh.mark_seam*", "modeling/meshes/editing/edge/edge_data.html#bpy-ops-mesh-mark-seam"),
|
||||
|
@ -1743,10 +1814,12 @@ url_manual_mapping = (
|
|||
("bpy.types.glowsequence*", "video_editing/sequencer/strips/effects/glow.html#bpy-types-glowsequence"),
|
||||
("bpy.types.gpencillayer*", "grease_pencil/properties/layers.html#bpy-types-gpencillayer"),
|
||||
("bpy.types.hookmodifier*", "modeling/modifiers/deform/hooks.html#bpy-types-hookmodifier"),
|
||||
("bpy.types.imagetexture*", "render/materials/legacy_textures/types/image_movie.html#bpy-types-imagetexture"),
|
||||
("bpy.types.latticepoint*", "animation/lattice.html#bpy-types-latticepoint"),
|
||||
("bpy.types.magictexture*", "render/materials/legacy_textures/types/magic.html#bpy-types-magictexture"),
|
||||
("bpy.types.maskmodifier*", "modeling/modifiers/generate/mask.html#bpy-types-maskmodifier"),
|
||||
("bpy.types.masksequence*", "video_editing/sequencer/strips/clip_mask.html#bpy-types-masksequence"),
|
||||
("bpy.types.materialslot*", "render/materials/assignment.html#bpy-types-materialslot"),
|
||||
("bpy.types.metasequence*", "video_editing/sequencer/meta.html#bpy-types-metasequence"),
|
||||
("bpy.types.object.color*", "scene_layout/object/properties/display.html#bpy-types-object-color"),
|
||||
("bpy.types.object.delta*", "scene_layout/object/properties/transforms.html#bpy-types-object-delta"),
|
||||
|
@ -1774,6 +1847,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.clip.set_axis*", "movie_clip/tracking/clip/editing/reconstruction.html#bpy-ops-clip-set-axis"),
|
||||
("bpy.ops.gpencil.paste*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-paste"),
|
||||
("bpy.ops.image.project*", "sculpt_paint/texture_paint/tool_settings/options.html#bpy-ops-image-project"),
|
||||
("bpy.ops.material.copy*", "render/materials/assignment.html#bpy-ops-material-copy"),
|
||||
("bpy.ops.mesh.decimate*", "modeling/meshes/editing/mesh/cleanup.html#bpy-ops-mesh-decimate"),
|
||||
("bpy.ops.mesh.dissolve*", "modeling/meshes/editing/mesh/delete.html#bpy-ops-mesh-dissolve"),
|
||||
("bpy.ops.mesh.rip_move*", "modeling/meshes/editing/vertex/rip_vertices.html#bpy-ops-mesh-rip-move"),
|
||||
|
@ -1786,6 +1860,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.render.opengl*", "editors/3dview/viewport_render.html#bpy-ops-render-opengl"),
|
||||
("bpy.ops.screen.header*", "interface/window_system/regions.html#bpy-ops-screen-header"),
|
||||
("bpy.ops.script.reload*", "advanced/operators.html#bpy-ops-script-reload"),
|
||||
("bpy.ops.sculpt.expand*", "sculpt_paint/sculpting/editing/mask.html#bpy-ops-sculpt-expand"),
|
||||
("bpy.ops.view3d.select*", "editors/3dview/selecting.html#bpy-ops-view3d-select"),
|
||||
("bpy.ops.wm.debug_menu*", "advanced/operators.html#bpy-ops-wm-debug-menu"),
|
||||
("bpy.ops.wm.properties*", "files/data_blocks.html#bpy-ops-wm-properties"),
|
||||
|
@ -1820,9 +1895,11 @@ url_manual_mapping = (
|
|||
("bpy.ops.gpencil.copy*", "grease_pencil/modes/edit/grease_pencil_menu.html#bpy-ops-gpencil-copy"),
|
||||
("bpy.ops.graph.delete*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-delete"),
|
||||
("bpy.ops.graph.mirror*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-mirror"),
|
||||
("bpy.ops.graph.reveal*", "editors/graph_editor/channels.html#bpy-ops-graph-reveal"),
|
||||
("bpy.ops.graph.sample*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-sample"),
|
||||
("bpy.ops.graph.smooth*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-smooth"),
|
||||
("bpy.ops.graph.unbake*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-unbake"),
|
||||
("bpy.ops.material.new*", "render/materials/assignment.html#bpy-ops-material-new"),
|
||||
("bpy.ops.object.align*", "scene_layout/object/editing/transform/align_objects.html#bpy-ops-object-align"),
|
||||
("bpy.ops.object.empty*", "modeling/empties.html#bpy-ops-object-empty"),
|
||||
("bpy.ops.object.quick*", "physics/introduction.html#bpy-ops-object-quick"),
|
||||
|
@ -1855,6 +1932,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.object.join*", "scene_layout/object/editing/join.html#bpy-ops-object-join"),
|
||||
("bpy.ops.object.text*", "modeling/texts/index.html#bpy-ops-object-text"),
|
||||
("bpy.ops.preferences*", "editors/preferences/index.html#bpy-ops-preferences"),
|
||||
("bpy.ops.spreadsheet*", "editors/spreadsheet.html#bpy-ops-spreadsheet"),
|
||||
("bpy.ops.uv.rip_move*", "modeling/meshes/uv/tools/rip.html#bpy-ops-uv-rip-move"),
|
||||
("bpy.ops.view3d.snap*", "scene_layout/object/editing/snap.html#bpy-ops-view3d-snap"),
|
||||
("bpy.ops.view3d.zoom*", "editors/3dview/navigate/navigation.html#bpy-ops-view3d-zoom"),
|
||||
|
@ -1883,6 +1961,7 @@ url_manual_mapping = (
|
|||
("bpy.ops.curve.spin*", "modeling/surfaces/editing/surface.html#bpy-ops-curve-spin"),
|
||||
("bpy.ops.graph.bake*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-bake"),
|
||||
("bpy.ops.graph.copy*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-copy"),
|
||||
("bpy.ops.graph.hide*", "editors/graph_editor/channels.html#bpy-ops-graph-hide"),
|
||||
("bpy.ops.graph.snap*", "editors/graph_editor/fcurves/editing.html#bpy-ops-graph-snap"),
|
||||
("bpy.ops.image.tile*", "modeling/meshes/uv/workflows/udims.html#bpy-ops-image-tile"),
|
||||
("bpy.ops.mesh.bevel*", "modeling/meshes/editing/edge/bevel.html#bpy-ops-mesh-bevel"),
|
||||
|
@ -1937,6 +2016,7 @@ url_manual_mapping = (
|
|||
("bpy.types.textbox*", "modeling/texts/properties.html#bpy-types-textbox"),
|
||||
("bpy.types.texture*", "render/materials/legacy_textures/index.html#bpy-types-texture"),
|
||||
("bpy.ops.armature*", "animation/armatures/index.html#bpy-ops-armature"),
|
||||
("bpy.ops.material*", "render/materials/index.html#bpy-ops-material"),
|
||||
("bpy.ops.nla.bake*", "animation/actions.html#bpy-ops-nla-bake"),
|
||||
("bpy.ops.nla.snap*", "editors/nla/editing.html#bpy-ops-nla-snap"),
|
||||
("bpy.ops.nla.swap*", "editors/nla/editing.html#bpy-ops-nla-swap"),
|
||||
|
@ -1954,6 +2034,7 @@ url_manual_mapping = (
|
|||
("bpy.types.object*", "scene_layout/object/index.html#bpy-types-object"),
|
||||
("bpy.types.region*", "interface/window_system/regions.html#bpy-types-region"),
|
||||
("bpy.types.render*", "render/index.html#bpy-types-render"),
|
||||
("bpy.types.screen*", "interface/index.html#bpy-types-screen"),
|
||||
("bpy.types.sculpt*", "sculpt_paint/sculpting/index.html#bpy-types-sculpt"),
|
||||
("bpy.types.shader*", "render/shader_nodes/shader/index.html#bpy-types-shader"),
|
||||
("bpy.types.spline*", "modeling/curves/properties/active_spline.html#bpy-types-spline"),
|
||||
|
@ -2005,6 +2086,7 @@ url_manual_mapping = (
|
|||
("bpy.types.mask*", "movie_clip/masking/index.html#bpy-types-mask"),
|
||||
("bpy.types.menu*", "interface/controls/buttons/menus.html#bpy-types-menu"),
|
||||
("bpy.types.mesh*", "modeling/meshes/index.html#bpy-types-mesh"),
|
||||
("bpy.types.node*", "interface/controls/nodes/index.html#bpy-types-node"),
|
||||
("bpy.types.pose*", "animation/armatures/posing/index.html#bpy-types-pose"),
|
||||
("bpy.types.text*", "editors/text_editor.html#bpy-types-text"),
|
||||
("bpy.ops.brush*", "sculpt_paint/brush/brush.html#bpy-ops-brush"),
|
||||
|
|
|
@ -286,19 +286,17 @@ class MATERIAL_PT_lineart(MaterialButtonsPanel, Panel):
|
|||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
|
||||
mat = context.material
|
||||
lineart = mat.lineart
|
||||
|
||||
layout.prop(lineart, "use_transparency")
|
||||
|
||||
if lineart.use_transparency:
|
||||
|
||||
layout.label(text="Transparency Masks:")
|
||||
|
||||
row = layout.row(align=True)
|
||||
for i in range(8):
|
||||
row.prop(lineart, "use_transparency_mask", text=str(i), index=i, toggle=True)
|
||||
row = layout.row(align=True, heading="Masks")
|
||||
row.active = lineart.use_transparency
|
||||
for i in range(8):
|
||||
row.prop(lineart, "use_transparency_mask", text=str(i), index=i, toggle=True)
|
||||
|
||||
|
||||
classes = (
|
||||
|
|
|
@ -329,7 +329,9 @@ class OBJECT_PT_lineart(ObjectButtonsPanel, Panel):
|
|||
|
||||
row = layout.row(heading="Override Crease")
|
||||
row.prop(lineart, "use_crease_override", text="")
|
||||
row.prop(lineart, "crease_threshold", slider=True, text="")
|
||||
subrow = row.row()
|
||||
subrow.active = lineart.use_crease_override
|
||||
subrow.prop(lineart, "crease_threshold", slider=True, text="")
|
||||
|
||||
|
||||
class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
|
||||
|
|
|
@ -92,16 +92,15 @@ class INFO_MT_area(Menu):
|
|||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("screen.area_dupli", icon='WINDOW')
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("screen.screen_full_area")
|
||||
layout.operator(
|
||||
"screen.screen_full_area",
|
||||
text="Toggle Fullscreen Area",
|
||||
icon='FULLSCREEN_ENTER',
|
||||
).use_hide_panels = True
|
||||
text="Toggle Fullscreen Area").use_hide_panels = True
|
||||
layout.operator("screen.area_dupli")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("screen.area_close")
|
||||
|
||||
|
||||
class INFO_MT_context_menu(Menu):
|
||||
|
|
|
@ -498,6 +498,7 @@ geometry_node_categories = [
|
|||
NodeItem("GeometryNodeAttributeSeparateXYZ"),
|
||||
NodeItem("GeometryNodeAttributeRemove"),
|
||||
NodeItem("GeometryNodeAttributeMapRange"),
|
||||
NodeItem("GeometryNodeAttributeTransfer"),
|
||||
]),
|
||||
GeometryNodeCategory("GEO_COLOR", "Color", items=[
|
||||
NodeItem("ShaderNodeValToRGB"),
|
||||
|
|
|
@ -94,6 +94,7 @@ class OutputAttribute {
|
|||
SaveFn save_;
|
||||
std::optional<fn::GVMutableArray_GSpan> optional_span_varray_;
|
||||
bool ignore_old_values_ = false;
|
||||
bool save_has_been_called_ = false;
|
||||
|
||||
public:
|
||||
OutputAttribute() = default;
|
||||
|
@ -109,6 +110,10 @@ class OutputAttribute {
|
|||
{
|
||||
}
|
||||
|
||||
OutputAttribute(OutputAttribute &&other) = default;
|
||||
|
||||
~OutputAttribute();
|
||||
|
||||
operator bool() const
|
||||
{
|
||||
return varray_.get() != nullptr;
|
||||
|
|
|
@ -112,7 +112,9 @@ bool BKE_scene_collections_object_remove(struct Main *bmain,
|
|||
struct Object *object,
|
||||
const bool free_us);
|
||||
void BKE_collections_object_remove_nulls(struct Main *bmain);
|
||||
void BKE_collections_child_remove_nulls(struct Main *bmain, struct Collection *old_collection);
|
||||
void BKE_collections_child_remove_nulls(struct Main *bmain,
|
||||
struct Collection *parent_collection,
|
||||
struct Collection *child_collection);
|
||||
|
||||
/* Dependencies. */
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ struct AttributeInitVArray : public AttributeInit {
|
|||
* Sometimes data is created before a geometry component is available. In that case, it's
|
||||
* preferable to move data directly to the created attribute to avoid a new allocation and a copy.
|
||||
*
|
||||
* Note that this will only have a benefit for attributes that are stored directly as contigious
|
||||
* Note that this will only have a benefit for attributes that are stored directly as contiguous
|
||||
* arrays, so not for some built-in attributes.
|
||||
*
|
||||
* The array must be allocated with MEM_*, since `attribute_try_create` will free the array if it
|
||||
|
@ -380,6 +380,8 @@ struct GeometrySet {
|
|||
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership = GeometryOwnershipType::Owned);
|
||||
void replace_pointcloud(PointCloud *pointcloud,
|
||||
GeometryOwnershipType ownership = GeometryOwnershipType::Owned);
|
||||
void replace_volume(Volume *volume,
|
||||
GeometryOwnershipType ownership = GeometryOwnershipType::Owned);
|
||||
};
|
||||
|
||||
/** A geometry component that can store a mesh. */
|
||||
|
|
|
@ -258,10 +258,6 @@ typedef struct ModifierTypeInfo {
|
|||
const struct ModifierEvalContext *ctx,
|
||||
struct GeometrySet *geometry_set);
|
||||
|
||||
struct Volume *(*modifyVolume)(struct ModifierData *md,
|
||||
const struct ModifierEvalContext *ctx,
|
||||
struct Volume *volume);
|
||||
|
||||
/********************* Optional functions *********************/
|
||||
|
||||
/**
|
||||
|
|
|
@ -1414,6 +1414,7 @@ int ntreeTexExecTree(struct bNodeTree *ntree,
|
|||
#define GEO_NODE_ATTRIBUTE_CLAMP 1041
|
||||
#define GEO_NODE_BOUNDING_BOX 1042
|
||||
#define GEO_NODE_SWITCH 1043
|
||||
#define GEO_NODE_ATTRIBUTE_TRANSFER 1044
|
||||
|
||||
/** \} */
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ set(SRC
|
|||
intern/customdata_file.c
|
||||
intern/data_transfer.c
|
||||
intern/deform.c
|
||||
intern/displist.c
|
||||
intern/displist.cc
|
||||
intern/displist_tangent.c
|
||||
intern/dynamicpaint.c
|
||||
intern/editlattice.c
|
||||
|
|
|
@ -184,6 +184,7 @@ AttributeDomain attribute_domain_highest_priority(Span<AttributeDomain> domains)
|
|||
|
||||
void OutputAttribute::save()
|
||||
{
|
||||
save_has_been_called_ = true;
|
||||
if (optional_span_varray_.has_value()) {
|
||||
optional_span_varray_->save();
|
||||
}
|
||||
|
@ -192,6 +193,15 @@ void OutputAttribute::save()
|
|||
}
|
||||
}
|
||||
|
||||
OutputAttribute::~OutputAttribute()
|
||||
{
|
||||
if (!save_has_been_called_) {
|
||||
if (varray_) {
|
||||
std::cout << "Warning: Call `save()` to make sure that changes persist in all cases.\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GVArrayPtr BuiltinCustomDataLayerProvider::try_get_for_read(
|
||||
const GeometryComponent &component) const
|
||||
{
|
||||
|
|
|
@ -1150,6 +1150,8 @@ bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
|
|||
BKE_main_collection_sync(bmain);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&collection->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1201,6 +1203,8 @@ bool BKE_collection_object_remove(Main *bmain,
|
|||
BKE_main_collection_sync(bmain);
|
||||
}
|
||||
|
||||
DEG_id_tag_update(&collection->id, ID_RECALC_GEOMETRY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1302,41 +1306,50 @@ static void collection_missing_parents_remove(Collection *collection)
|
|||
*
|
||||
* \note caller must ensure #BKE_main_collection_sync_remap() is called afterwards!
|
||||
*
|
||||
* \param collection: may be \a NULL,
|
||||
* \param parent_collection: The collection owning the pointers that were remapped. May be \a NULL,
|
||||
* in which case whole \a bmain database of collections is checked.
|
||||
* \param child_collection: The collection that was remapped to another pointer. May be \a NULL,
|
||||
* in which case whole \a bmain database of collections is checked.
|
||||
*/
|
||||
void BKE_collections_child_remove_nulls(Main *bmain, Collection *collection)
|
||||
void BKE_collections_child_remove_nulls(Main *bmain,
|
||||
Collection *parent_collection,
|
||||
Collection *child_collection)
|
||||
{
|
||||
if (collection == NULL) {
|
||||
/* We need to do the checks in two steps when more than one collection may be involved,
|
||||
* otherwise we can miss some cases...
|
||||
* Also, master collections are not in bmain, so we also need to loop over scenes.
|
||||
*/
|
||||
for (collection = bmain->collections.first; collection != NULL;
|
||||
collection = collection->id.next) {
|
||||
collection_null_children_remove(collection);
|
||||
if (child_collection == NULL) {
|
||||
if (parent_collection != NULL) {
|
||||
collection_null_children_remove(parent_collection);
|
||||
}
|
||||
for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) {
|
||||
collection_null_children_remove(scene->master_collection);
|
||||
else {
|
||||
/* We need to do the checks in two steps when more than one collection may be involved,
|
||||
* otherwise we can miss some cases...
|
||||
* Also, master collections are not in bmain, so we also need to loop over scenes.
|
||||
*/
|
||||
for (child_collection = bmain->collections.first; child_collection != NULL;
|
||||
child_collection = child_collection->id.next) {
|
||||
collection_null_children_remove(child_collection);
|
||||
}
|
||||
for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) {
|
||||
collection_null_children_remove(scene->master_collection);
|
||||
}
|
||||
}
|
||||
|
||||
for (collection = bmain->collections.first; collection != NULL;
|
||||
collection = collection->id.next) {
|
||||
collection_missing_parents_remove(collection);
|
||||
for (child_collection = bmain->collections.first; child_collection != NULL;
|
||||
child_collection = child_collection->id.next) {
|
||||
collection_missing_parents_remove(child_collection);
|
||||
}
|
||||
for (Scene *scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) {
|
||||
collection_missing_parents_remove(scene->master_collection);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (CollectionParent *parent = collection->parents.first, *parent_next; parent;
|
||||
for (CollectionParent *parent = child_collection->parents.first, *parent_next; parent;
|
||||
parent = parent_next) {
|
||||
parent_next = parent->next;
|
||||
|
||||
collection_null_children_remove(parent->collection);
|
||||
|
||||
if (!collection_find_child(parent->collection, collection)) {
|
||||
BLI_freelinkN(&collection->parents, parent);
|
||||
if (!collection_find_child(parent->collection, child_collection)) {
|
||||
BLI_freelinkN(&child_collection->parents, parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
* \ingroup bke
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
@ -82,7 +82,7 @@ void BKE_displist_free(ListBase *lb)
|
|||
{
|
||||
DispList *dl;
|
||||
|
||||
while ((dl = BLI_pophead(lb))) {
|
||||
while ((dl = (DispList *)BLI_pophead(lb))) {
|
||||
BKE_displist_elem_free(dl);
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ DispList *BKE_displist_find_or_create(ListBase *lb, int type)
|
|||
}
|
||||
}
|
||||
|
||||
DispList *dl = MEM_callocN(sizeof(DispList), "find_disp");
|
||||
DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), "find_disp");
|
||||
dl->type = type;
|
||||
BLI_addtail(lb, dl);
|
||||
|
||||
|
@ -110,7 +110,7 @@ DispList *BKE_displist_find(ListBase *lb, int type)
|
|||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool BKE_displist_has_faces(const ListBase *lb)
|
||||
|
@ -129,11 +129,11 @@ void BKE_displist_copy(ListBase *lbn, const ListBase *lb)
|
|||
BKE_displist_free(lbn);
|
||||
|
||||
LISTBASE_FOREACH (const DispList *, dl, lb) {
|
||||
DispList *dln = MEM_dupallocN(dl);
|
||||
DispList *dln = (DispList *)MEM_dupallocN(dl);
|
||||
BLI_addtail(lbn, dln);
|
||||
dln->verts = MEM_dupallocN(dl->verts);
|
||||
dln->nors = MEM_dupallocN(dl->nors);
|
||||
dln->index = MEM_dupallocN(dl->index);
|
||||
dln->verts = (float *)MEM_dupallocN(dl->verts);
|
||||
dln->nors = (float *)MEM_dupallocN(dl->nors);
|
||||
dln->index = (int *)MEM_dupallocN(dl->index);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,8 +146,8 @@ void BKE_displist_normals_add(ListBase *lb)
|
|||
|
||||
LISTBASE_FOREACH (DispList *, dl, lb) {
|
||||
if (dl->type == DL_INDEX3) {
|
||||
if (dl->nors == NULL) {
|
||||
dl->nors = MEM_callocN(sizeof(float[3]), "dlnors");
|
||||
if (dl->nors == nullptr) {
|
||||
dl->nors = (float *)MEM_callocN(sizeof(float[3]), "dlnors");
|
||||
|
||||
if (dl->flag & DL_BACK_CURVE) {
|
||||
dl->nors[2] = -1.0f;
|
||||
|
@ -158,8 +158,8 @@ void BKE_displist_normals_add(ListBase *lb)
|
|||
}
|
||||
}
|
||||
else if (dl->type == DL_SURF) {
|
||||
if (dl->nors == NULL) {
|
||||
dl->nors = MEM_callocN(sizeof(float[3]) * dl->nr * dl->parts, "dlnors");
|
||||
if (dl->nors == nullptr) {
|
||||
dl->nors = (float *)MEM_callocN(sizeof(float[3]) * dl->nr * dl->parts, "dlnors");
|
||||
|
||||
vdata = dl->verts;
|
||||
ndata = dl->nors;
|
||||
|
@ -338,9 +338,9 @@ static void curve_to_displist(const Curve *cu,
|
|||
* and resolution > 1. */
|
||||
const bool use_cyclic_sample = is_cyclic && (samples_len != 2);
|
||||
|
||||
DispList *dl = MEM_callocN(sizeof(DispList), __func__);
|
||||
DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), __func__);
|
||||
/* Add one to the length because of 'BKE_curve_forward_diff_bezier'. */
|
||||
dl->verts = MEM_mallocN(sizeof(float[3]) * (samples_len + 1), "dlverts");
|
||||
dl->verts = (float *)MEM_mallocN(sizeof(float[3]) * (samples_len + 1), "dlverts");
|
||||
BLI_addtail(r_dispbase, dl);
|
||||
dl->parts = 1;
|
||||
dl->nr = samples_len;
|
||||
|
@ -393,8 +393,8 @@ static void curve_to_displist(const Curve *cu,
|
|||
}
|
||||
else if (nu->type == CU_NURBS) {
|
||||
const int len = (resolution * SEGMENTSU(nu));
|
||||
DispList *dl = MEM_callocN(sizeof(DispList), __func__);
|
||||
dl->verts = MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), __func__);
|
||||
dl->verts = (float *)MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
BLI_addtail(r_dispbase, dl);
|
||||
dl->parts = 1;
|
||||
dl->nr = len;
|
||||
|
@ -402,12 +402,12 @@ static void curve_to_displist(const Curve *cu,
|
|||
dl->charidx = nu->charidx;
|
||||
dl->type = is_cyclic ? DL_POLY : DL_SEGM;
|
||||
|
||||
BKE_nurb_makeCurve(nu, dl->verts, NULL, NULL, NULL, resolution, sizeof(float[3]));
|
||||
BKE_nurb_makeCurve(nu, dl->verts, nullptr, nullptr, nullptr, resolution, sizeof(float[3]));
|
||||
}
|
||||
else if (nu->type == CU_POLY) {
|
||||
const int len = nu->pntsu;
|
||||
DispList *dl = MEM_callocN(sizeof(DispList), __func__);
|
||||
dl->verts = MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), __func__);
|
||||
dl->verts = (float *)MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
BLI_addtail(r_dispbase, dl);
|
||||
dl->parts = 1;
|
||||
dl->nr = len;
|
||||
|
@ -435,7 +435,7 @@ void BKE_displist_fill(const ListBase *dispbase,
|
|||
const float normal_proj[3],
|
||||
const bool flip_normal)
|
||||
{
|
||||
if (dispbase == NULL) {
|
||||
if (dispbase == nullptr) {
|
||||
return;
|
||||
}
|
||||
if (BLI_listbase_is_empty(dispbase)) {
|
||||
|
@ -471,14 +471,14 @@ void BKE_displist_fill(const ListBase *dispbase,
|
|||
sf_ctx.poly_nr++;
|
||||
|
||||
/* Make verts and edges. */
|
||||
ScanFillVert *sf_vert = NULL;
|
||||
ScanFillVert *sf_vert_last = NULL;
|
||||
ScanFillVert *sf_vert_new = NULL;
|
||||
ScanFillVert *sf_vert = nullptr;
|
||||
ScanFillVert *sf_vert_last = nullptr;
|
||||
ScanFillVert *sf_vert_new = nullptr;
|
||||
for (int i = 0; i < dl->nr; i++) {
|
||||
sf_vert_last = sf_vert;
|
||||
sf_vert = BLI_scanfill_vert_add(&sf_ctx, &dl->verts[3 * i]);
|
||||
totvert++;
|
||||
if (sf_vert_last == NULL) {
|
||||
if (sf_vert_last == nullptr) {
|
||||
sf_vert_new = sf_vert;
|
||||
}
|
||||
else {
|
||||
|
@ -486,7 +486,7 @@ void BKE_displist_fill(const ListBase *dispbase,
|
|||
}
|
||||
}
|
||||
|
||||
if (sf_vert != NULL && sf_vert_new != NULL) {
|
||||
if (sf_vert != nullptr && sf_vert_new != nullptr) {
|
||||
BLI_scanfill_edge_add(&sf_ctx, sf_vert, sf_vert_new);
|
||||
}
|
||||
}
|
||||
|
@ -503,7 +503,7 @@ void BKE_displist_fill(const ListBase *dispbase,
|
|||
|
||||
const int triangles_len = BLI_scanfill_calc_ex(&sf_ctx, scanfill_flag, normal_proj);
|
||||
if (totvert != 0 && triangles_len != 0) {
|
||||
DispList *dlnew = MEM_callocN(sizeof(DispList), "filldisplist");
|
||||
DispList *dlnew = (DispList *)MEM_callocN(sizeof(DispList), "filldisplist");
|
||||
dlnew->type = DL_INDEX3;
|
||||
dlnew->flag = (dl_flag_accum & (DL_BACK_CURVE | DL_FRONT_CURVE));
|
||||
dlnew->rt = (dl_rt_accum & CU_SMOOTH);
|
||||
|
@ -511,8 +511,8 @@ void BKE_displist_fill(const ListBase *dispbase,
|
|||
dlnew->nr = totvert;
|
||||
dlnew->parts = triangles_len;
|
||||
|
||||
dlnew->index = MEM_mallocN(sizeof(int[3]) * triangles_len, "dlindex");
|
||||
dlnew->verts = MEM_mallocN(sizeof(float[3]) * totvert, "dlverts");
|
||||
dlnew->index = (int *)MEM_mallocN(sizeof(int[3]) * triangles_len, "dlindex");
|
||||
dlnew->verts = (float *)MEM_mallocN(sizeof(float[3]) * totvert, "dlverts");
|
||||
|
||||
/* vert data */
|
||||
int i;
|
||||
|
@ -551,16 +551,16 @@ void BKE_displist_fill(const ListBase *dispbase,
|
|||
|
||||
static void bevels_to_filledpoly(const Curve *cu, ListBase *dispbase)
|
||||
{
|
||||
ListBase front = {NULL, NULL};
|
||||
ListBase back = {NULL, NULL};
|
||||
ListBase front = {nullptr, nullptr};
|
||||
ListBase back = {nullptr, nullptr};
|
||||
|
||||
LISTBASE_FOREACH (const DispList *, dl, dispbase) {
|
||||
if (dl->type == DL_SURF) {
|
||||
if ((dl->flag & DL_CYCL_V) && (dl->flag & DL_CYCL_U) == 0) {
|
||||
if ((cu->flag & CU_BACK) && (dl->flag & DL_BACK_CURVE)) {
|
||||
DispList *dlnew = MEM_callocN(sizeof(DispList), __func__);
|
||||
DispList *dlnew = (DispList *)MEM_callocN(sizeof(DispList), __func__);
|
||||
BLI_addtail(&front, dlnew);
|
||||
dlnew->verts = MEM_mallocN(sizeof(float[3]) * dl->parts, __func__);
|
||||
dlnew->verts = (float *)MEM_mallocN(sizeof(float[3]) * dl->parts, __func__);
|
||||
dlnew->nr = dl->parts;
|
||||
dlnew->parts = 1;
|
||||
dlnew->type = DL_POLY;
|
||||
|
@ -577,9 +577,9 @@ static void bevels_to_filledpoly(const Curve *cu, ListBase *dispbase)
|
|||
}
|
||||
}
|
||||
if ((cu->flag & CU_FRONT) && (dl->flag & DL_FRONT_CURVE)) {
|
||||
DispList *dlnew = MEM_callocN(sizeof(DispList), __func__);
|
||||
DispList *dlnew = (DispList *)MEM_callocN(sizeof(DispList), __func__);
|
||||
BLI_addtail(&back, dlnew);
|
||||
dlnew->verts = MEM_mallocN(sizeof(float[3]) * dl->parts, __func__);
|
||||
dlnew->verts = (float *)MEM_mallocN(sizeof(float[3]) * dl->parts, __func__);
|
||||
dlnew->nr = dl->parts;
|
||||
dlnew->parts = 1;
|
||||
dlnew->type = DL_POLY;
|
||||
|
@ -634,16 +634,16 @@ static float displist_calc_taper(Depsgraph *depsgraph,
|
|||
Object *taperobj,
|
||||
float fac)
|
||||
{
|
||||
DispList *dl;
|
||||
|
||||
if (taperobj == NULL || taperobj->type != OB_CURVE) {
|
||||
if (taperobj == nullptr || taperobj->type != OB_CURVE) {
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
dl = taperobj->runtime.curve_cache ? taperobj->runtime.curve_cache->disp.first : NULL;
|
||||
if (dl == NULL) {
|
||||
DispList *dl = taperobj->runtime.curve_cache ?
|
||||
(DispList *)taperobj->runtime.curve_cache->disp.first :
|
||||
nullptr;
|
||||
if (dl == nullptr) {
|
||||
BKE_displist_make_curveTypes(depsgraph, scene, taperobj, false, false);
|
||||
dl = taperobj->runtime.curve_cache->disp.first;
|
||||
dl = (DispList *)taperobj->runtime.curve_cache->disp.first;
|
||||
}
|
||||
if (dl) {
|
||||
float minx, dx, *fp;
|
||||
|
@ -693,7 +693,8 @@ void BKE_displist_make_mball(Depsgraph *depsgraph, Scene *scene, Object *ob)
|
|||
BKE_displist_free(&(ob->runtime.curve_cache->disp));
|
||||
}
|
||||
else {
|
||||
ob->runtime.curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for MBall");
|
||||
ob->runtime.curve_cache = (CurveCache *)MEM_callocN(sizeof(CurveCache),
|
||||
"CurveCache for MBall");
|
||||
}
|
||||
|
||||
BKE_mball_polygonize(depsgraph, scene, ob, &ob->runtime.curve_cache->disp);
|
||||
|
@ -738,9 +739,9 @@ static ModifierData *curve_get_tessellate_point(const Scene *scene,
|
|||
required_mode |= eModifierMode_Editmode;
|
||||
}
|
||||
|
||||
pretessellatePoint = NULL;
|
||||
pretessellatePoint = nullptr;
|
||||
for (; md; md = md->next) {
|
||||
const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
|
||||
const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type);
|
||||
|
||||
if (!BKE_modifier_is_enabled(scene, md, required_mode)) {
|
||||
continue;
|
||||
|
@ -777,22 +778,22 @@ bool BKE_curve_calc_modifiers_pre(Depsgraph *depsgraph,
|
|||
VirtualModifierData virtualModifierData;
|
||||
ModifierData *md = BKE_modifiers_get_virtual_modifierlist(ob, &virtualModifierData);
|
||||
ModifierData *pretessellatePoint;
|
||||
Curve *cu = ob->data;
|
||||
Curve *cu = (Curve *)ob->data;
|
||||
int numElems = 0, numVerts = 0;
|
||||
const bool editmode = (!for_render && (cu->editnurb || cu->editfont));
|
||||
ModifierApplyFlag apply_flag = 0;
|
||||
float(*deformedVerts)[3] = NULL;
|
||||
float *keyVerts = NULL;
|
||||
ModifierApplyFlag apply_flag = (ModifierApplyFlag)0;
|
||||
float(*deformedVerts)[3] = nullptr;
|
||||
float *keyVerts = nullptr;
|
||||
int required_mode;
|
||||
bool modified = false;
|
||||
|
||||
BKE_modifiers_clear_errors(ob);
|
||||
|
||||
if (editmode) {
|
||||
apply_flag |= MOD_APPLY_USECACHE;
|
||||
apply_flag = MOD_APPLY_USECACHE;
|
||||
}
|
||||
if (for_render) {
|
||||
apply_flag |= MOD_APPLY_RENDER;
|
||||
apply_flag = MOD_APPLY_RENDER;
|
||||
required_mode = eModifierMode_Render;
|
||||
}
|
||||
else {
|
||||
|
@ -823,7 +824,7 @@ bool BKE_curve_calc_modifiers_pre(Depsgraph *depsgraph,
|
|||
|
||||
if (pretessellatePoint) {
|
||||
for (; md; md = md->next) {
|
||||
const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
|
||||
const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type);
|
||||
|
||||
if (!BKE_modifier_is_enabled(scene, md, required_mode)) {
|
||||
continue;
|
||||
|
@ -836,7 +837,7 @@ bool BKE_curve_calc_modifiers_pre(Depsgraph *depsgraph,
|
|||
deformedVerts = BKE_curve_nurbs_vert_coords_alloc(source_nurb, &numVerts);
|
||||
}
|
||||
|
||||
mti->deformVerts(md, &mectx, NULL, deformedVerts, numVerts);
|
||||
mti->deformVerts(md, &mectx, nullptr, deformedVerts, numVerts);
|
||||
modified = true;
|
||||
|
||||
if (md == pretessellatePoint) {
|
||||
|
@ -869,7 +870,7 @@ static float (*displist_vert_coords_alloc(ListBase *dispbase, int *r_vert_len))[
|
|||
*r_vert_len += (dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr;
|
||||
}
|
||||
|
||||
allverts = MEM_mallocN(sizeof(float[3]) * (*r_vert_len), "displist_vert_coords_alloc allverts");
|
||||
allverts = (float(*)[3])MEM_mallocN(sizeof(float[3]) * (*r_vert_len), __func__);
|
||||
fp = (float *)allverts;
|
||||
LISTBASE_FOREACH (DispList *, dl, dispbase) {
|
||||
int ofs = 3 * ((dl->type == DL_INDEX3) ? dl->nr : dl->parts * dl->nr);
|
||||
|
@ -903,16 +904,16 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
VirtualModifierData virtualModifierData;
|
||||
ModifierData *md = BKE_modifiers_get_virtual_modifierlist(ob, &virtualModifierData);
|
||||
ModifierData *pretessellatePoint;
|
||||
const Curve *cu = ob->data;
|
||||
const Curve *cu = (const Curve *)ob->data;
|
||||
int required_mode = 0, totvert = 0;
|
||||
const bool editmode = (!for_render && (cu->editnurb || cu->editfont));
|
||||
Mesh *modified = NULL, *mesh_applied;
|
||||
float(*vertCos)[3] = NULL;
|
||||
Mesh *modified = nullptr, *mesh_applied;
|
||||
float(*vertCos)[3] = nullptr;
|
||||
int useCache = !for_render;
|
||||
ModifierApplyFlag apply_flag = 0;
|
||||
ModifierApplyFlag apply_flag = (ModifierApplyFlag)0;
|
||||
|
||||
if (for_render) {
|
||||
apply_flag |= MOD_APPLY_RENDER;
|
||||
apply_flag = MOD_APPLY_RENDER;
|
||||
required_mode = eModifierMode_Render;
|
||||
}
|
||||
else {
|
||||
|
@ -920,9 +921,9 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
}
|
||||
|
||||
const ModifierEvalContext mectx_deform = {
|
||||
depsgraph, ob, editmode ? apply_flag | MOD_APPLY_USECACHE : apply_flag};
|
||||
depsgraph, ob, editmode ? (ModifierApplyFlag)(apply_flag | MOD_APPLY_USECACHE) : apply_flag};
|
||||
const ModifierEvalContext mectx_apply = {
|
||||
depsgraph, ob, useCache ? apply_flag | MOD_APPLY_USECACHE : apply_flag};
|
||||
depsgraph, ob, useCache ? (ModifierApplyFlag)(apply_flag | MOD_APPLY_USECACHE) : apply_flag};
|
||||
|
||||
pretessellatePoint = curve_get_tessellate_point(scene, ob, for_render, editmode);
|
||||
|
||||
|
@ -935,22 +936,22 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
}
|
||||
|
||||
if (r_final && *r_final) {
|
||||
BKE_id_free(NULL, *r_final);
|
||||
BKE_id_free(nullptr, *r_final);
|
||||
}
|
||||
|
||||
for (; md; md = md->next) {
|
||||
const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
|
||||
const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type);
|
||||
|
||||
if (!BKE_modifier_is_enabled(scene, md, required_mode)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* If we need normals, no choice, have to convert to mesh now. */
|
||||
bool need_normal = mti->dependsOnNormals != NULL && mti->dependsOnNormals(md);
|
||||
bool need_normal = mti->dependsOnNormals != nullptr && mti->dependsOnNormals(md);
|
||||
/* XXX 2.8 : now that batch cache is stored inside the ob->data
|
||||
* we need to create a Mesh for each curve that uses modifiers. */
|
||||
if (modified == NULL /* && need_normal */) {
|
||||
if (vertCos != NULL) {
|
||||
if (modified == nullptr /* && need_normal */) {
|
||||
if (vertCos != nullptr) {
|
||||
displist_vert_coords_apply(dispbase, vertCos);
|
||||
}
|
||||
|
||||
|
@ -976,7 +977,7 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
if (!vertCos) {
|
||||
vertCos = displist_vert_coords_alloc(dispbase, &totvert);
|
||||
}
|
||||
mti->deformVerts(md, &mectx_deform, NULL, vertCos, totvert);
|
||||
mti->deformVerts(md, &mectx_deform, nullptr, vertCos, totvert);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -991,8 +992,8 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
if (modified) {
|
||||
if (vertCos) {
|
||||
Mesh *temp_mesh = (Mesh *)BKE_id_copy_ex(
|
||||
NULL, &modified->id, NULL, LIB_ID_COPY_LOCALIZE);
|
||||
BKE_id_free(NULL, modified);
|
||||
nullptr, &modified->id, nullptr, LIB_ID_COPY_LOCALIZE);
|
||||
BKE_id_free(nullptr, modified);
|
||||
modified = temp_mesh;
|
||||
|
||||
BKE_mesh_vert_coords_apply(modified, vertCos);
|
||||
|
@ -1013,7 +1014,7 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
if (vertCos) {
|
||||
/* Vertex coordinates were applied to necessary data, could free it */
|
||||
MEM_freeN(vertCos);
|
||||
vertCos = NULL;
|
||||
vertCos = nullptr;
|
||||
}
|
||||
|
||||
if (need_normal) {
|
||||
|
@ -1025,7 +1026,7 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
/* Modifier returned a new derived mesh */
|
||||
|
||||
if (modified && modified != mesh_applied) { /* Modifier */
|
||||
BKE_id_free(NULL, modified);
|
||||
BKE_id_free(nullptr, modified);
|
||||
}
|
||||
modified = mesh_applied;
|
||||
}
|
||||
|
@ -1034,8 +1035,9 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
|
||||
if (vertCos) {
|
||||
if (modified) {
|
||||
Mesh *temp_mesh = (Mesh *)BKE_id_copy_ex(NULL, &modified->id, NULL, LIB_ID_COPY_LOCALIZE);
|
||||
BKE_id_free(NULL, modified);
|
||||
Mesh *temp_mesh = (Mesh *)BKE_id_copy_ex(
|
||||
nullptr, &modified->id, nullptr, LIB_ID_COPY_LOCALIZE);
|
||||
BKE_id_free(nullptr, modified);
|
||||
modified = temp_mesh;
|
||||
|
||||
BKE_mesh_vert_coords_apply(modified, vertCos);
|
||||
|
@ -1046,7 +1048,7 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
else {
|
||||
displist_vert_coords_apply(dispbase, vertCos);
|
||||
MEM_freeN(vertCos);
|
||||
vertCos = NULL;
|
||||
vertCos = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1081,18 +1083,18 @@ static void curve_calc_modifiers_post(Depsgraph *depsgraph,
|
|||
MEM_SAFE_FREE(modified->mat);
|
||||
/* Set flag which makes it easier to see what's going on in a debugger. */
|
||||
modified->id.tag |= LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT;
|
||||
modified->mat = MEM_dupallocN(cu->mat);
|
||||
modified->mat = (Material **)MEM_dupallocN(cu->mat);
|
||||
modified->totcol = cu->totcol;
|
||||
|
||||
(*r_final) = modified;
|
||||
}
|
||||
else {
|
||||
(*r_final) = NULL;
|
||||
(*r_final) = nullptr;
|
||||
}
|
||||
}
|
||||
else if (modified != NULL) {
|
||||
else if (modified != nullptr) {
|
||||
/* Pretty stupid to generate that whole mesh if it's unused, yet we have to free it. */
|
||||
BKE_id_free(NULL, modified);
|
||||
BKE_id_free(nullptr, modified);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1103,8 +1105,8 @@ static void displist_surf_indices(DispList *dl)
|
|||
|
||||
dl->totindex = 0;
|
||||
|
||||
index = dl->index = MEM_mallocN(sizeof(int[4]) * (dl->parts + 1) * (dl->nr + 1),
|
||||
"index array nurbs");
|
||||
index = dl->index = (int *)MEM_mallocN(sizeof(int[4]) * (dl->parts + 1) * (dl->nr + 1),
|
||||
"index array nurbs");
|
||||
|
||||
for (a = 0; a < dl->parts; a++) {
|
||||
|
||||
|
@ -1136,8 +1138,8 @@ void BKE_displist_make_surf(Depsgraph *depsgraph,
|
|||
const bool for_render,
|
||||
const bool for_orco)
|
||||
{
|
||||
ListBase nubase = {NULL, NULL};
|
||||
Curve *cu = ob->data;
|
||||
ListBase nubase = {nullptr, nullptr};
|
||||
Curve *cu = (Curve *)ob->data;
|
||||
DispList *dl;
|
||||
float *data;
|
||||
int len;
|
||||
|
@ -1174,8 +1176,8 @@ void BKE_displist_make_surf(Depsgraph *depsgraph,
|
|||
if (nu->pntsv == 1) {
|
||||
len = SEGMENTSU(nu) * resolu;
|
||||
|
||||
dl = MEM_callocN(sizeof(DispList), "makeDispListsurf");
|
||||
dl->verts = MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListsurf");
|
||||
dl->verts = (float *)MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
|
||||
BLI_addtail(dispbase, dl);
|
||||
dl->parts = 1;
|
||||
|
@ -1195,13 +1197,13 @@ void BKE_displist_make_surf(Depsgraph *depsgraph,
|
|||
dl->type = DL_SEGM;
|
||||
}
|
||||
|
||||
BKE_nurb_makeCurve(nu, data, NULL, NULL, NULL, resolu, sizeof(float[3]));
|
||||
BKE_nurb_makeCurve(nu, data, nullptr, nullptr, nullptr, resolu, sizeof(float[3]));
|
||||
}
|
||||
else {
|
||||
len = (nu->pntsu * resolu) * (nu->pntsv * resolv);
|
||||
|
||||
dl = MEM_callocN(sizeof(DispList), "makeDispListsurf");
|
||||
dl->verts = MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListsurf");
|
||||
dl->verts = (float *)MEM_mallocN(len * sizeof(float[3]), "dlverts");
|
||||
BLI_addtail(dispbase, dl);
|
||||
|
||||
dl->col = nu->mat_nr;
|
||||
|
@ -1258,7 +1260,7 @@ static void rotateBevelPiece(const Curve *cu,
|
|||
vec[1] = fp[2];
|
||||
vec[2] = 0.0;
|
||||
|
||||
if (nbevp == NULL) {
|
||||
if (nbevp == nullptr) {
|
||||
copy_v3_v3(data, bevp->vec);
|
||||
copy_qt_qt(quat, bevp->quat);
|
||||
}
|
||||
|
@ -1276,7 +1278,7 @@ static void rotateBevelPiece(const Curve *cu,
|
|||
else {
|
||||
float sina, cosa;
|
||||
|
||||
if (nbevp == NULL) {
|
||||
if (nbevp == nullptr) {
|
||||
copy_v3_v3(data, bevp->vec);
|
||||
sina = bevp->sina;
|
||||
cosa = bevp->cosa;
|
||||
|
@ -1307,8 +1309,8 @@ static void fillBevelCap(const Nurb *nu,
|
|||
{
|
||||
DispList *dl;
|
||||
|
||||
dl = MEM_callocN(sizeof(DispList), "makeDispListbev2");
|
||||
dl->verts = MEM_mallocN(sizeof(float[3]) * dlb->nr, "dlverts");
|
||||
dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListbev2");
|
||||
dl->verts = (float *)MEM_mallocN(sizeof(float[3]) * dlb->nr, "dlverts");
|
||||
memcpy(dl->verts, prev_fp, sizeof(float[3]) * dlb->nr);
|
||||
|
||||
dl->type = DL_POLY;
|
||||
|
@ -1469,7 +1471,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
const bool for_orco,
|
||||
Mesh **r_final)
|
||||
{
|
||||
Curve *cu = ob->data;
|
||||
Curve *cu = (Curve *)ob->data;
|
||||
|
||||
/* we do allow duplis... this is only displist on curve level */
|
||||
if (!ELEM(ob->type, OB_SURF, OB_CURVE, OB_FONT)) {
|
||||
|
@ -1481,7 +1483,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
}
|
||||
else if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
|
||||
ListBase dlbev;
|
||||
ListBase nubase = {NULL, NULL};
|
||||
ListBase nubase = {nullptr, nullptr};
|
||||
bool force_mesh_conversion = false;
|
||||
|
||||
BKE_curve_bevelList_free(&ob->runtime.curve_cache->bev);
|
||||
|
@ -1494,7 +1496,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
if (ob->runtime.curve_cache->anim_path_accum_length) {
|
||||
MEM_freeN((void *)ob->runtime.curve_cache->anim_path_accum_length);
|
||||
}
|
||||
ob->runtime.curve_cache->anim_path_accum_length = NULL;
|
||||
ob->runtime.curve_cache->anim_path_accum_length = nullptr;
|
||||
}
|
||||
|
||||
if (ob->type == OB_FONT) {
|
||||
|
@ -1520,8 +1522,8 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
}
|
||||
else {
|
||||
const float widfac = cu->width - 1.0f;
|
||||
BevList *bl = ob->runtime.curve_cache->bev.first;
|
||||
Nurb *nu = nubase.first;
|
||||
BevList *bl = (BevList *)ob->runtime.curve_cache->bev.first;
|
||||
Nurb *nu = (Nurb *)nubase.first;
|
||||
|
||||
for (; bl && nu; bl = bl->next, nu = nu->next) {
|
||||
float *data;
|
||||
|
@ -1532,8 +1534,8 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
|
||||
/* exception handling; curve without bevel or extrude, with width correction */
|
||||
if (BLI_listbase_is_empty(&dlbev)) {
|
||||
DispList *dl = MEM_callocN(sizeof(DispList), "makeDispListbev");
|
||||
dl->verts = MEM_mallocN(sizeof(float[3]) * bl->nr, "dlverts");
|
||||
DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListbev");
|
||||
dl->verts = (float *)MEM_mallocN(sizeof(float[3]) * bl->nr, "dlverts");
|
||||
BLI_addtail(dispbase, dl);
|
||||
|
||||
if (bl->poly != -1) {
|
||||
|
@ -1565,8 +1567,8 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
}
|
||||
}
|
||||
else {
|
||||
ListBase bottom_capbase = {NULL, NULL};
|
||||
ListBase top_capbase = {NULL, NULL};
|
||||
ListBase bottom_capbase = {nullptr, nullptr};
|
||||
ListBase top_capbase = {nullptr, nullptr};
|
||||
float bottom_no[3] = {0.0f};
|
||||
float top_no[3] = {0.0f};
|
||||
float first_blend = 0.0f, last_blend = 0.0f;
|
||||
|
@ -1585,8 +1587,8 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
|
||||
LISTBASE_FOREACH (DispList *, dlb, &dlbev) {
|
||||
/* for each part of the bevel use a separate displblock */
|
||||
DispList *dl = MEM_callocN(sizeof(DispList), "makeDispListbev1");
|
||||
dl->verts = data = MEM_mallocN(sizeof(float[3]) * dlb->nr * steps, "dlverts");
|
||||
DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), "makeDispListbev1");
|
||||
dl->verts = data = (float *)MEM_mallocN(sizeof(float[3]) * dlb->nr * steps, "dlverts");
|
||||
BLI_addtail(dispbase, dl);
|
||||
|
||||
dl->type = DL_SURF;
|
||||
|
@ -1616,7 +1618,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
float radius_factor = 1.0;
|
||||
float *cur_data = data;
|
||||
|
||||
if (cu->taperobj == NULL) {
|
||||
if (cu->taperobj == nullptr) {
|
||||
radius_factor = bevp->radius;
|
||||
}
|
||||
else {
|
||||
|
@ -1666,7 +1668,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
|
|||
cu, bevp, bevp - 1, dlb, 1.0f - last_blend, widfac, radius_factor, &data);
|
||||
}
|
||||
else {
|
||||
rotateBevelPiece(cu, bevp, NULL, dlb, 0.0f, widfac, radius_factor, &data);
|
||||
rotateBevelPiece(cu, bevp, nullptr, dlb, 0.0f, widfac, radius_factor, &data);
|
||||
}
|
||||
|
||||
if ((cu->flag & CU_FILL_CAPS) && !(nu->flagu & CU_NURB_CYCLIC)) {
|
||||
|
@ -1737,15 +1739,16 @@ void BKE_displist_make_curveTypes(Depsgraph *depsgraph,
|
|||
BKE_object_free_derived_caches(ob);
|
||||
|
||||
if (!ob->runtime.curve_cache) {
|
||||
ob->runtime.curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for curve types");
|
||||
ob->runtime.curve_cache = (CurveCache *)MEM_callocN(sizeof(CurveCache),
|
||||
"CurveCache for curve types");
|
||||
}
|
||||
|
||||
dispbase = &(ob->runtime.curve_cache->disp);
|
||||
|
||||
Mesh *mesh_eval = NULL;
|
||||
Mesh *mesh_eval = nullptr;
|
||||
do_makeDispListCurveTypes(depsgraph, scene, ob, dispbase, for_render, for_orco, &mesh_eval);
|
||||
|
||||
if (mesh_eval != NULL) {
|
||||
if (mesh_eval != nullptr) {
|
||||
BKE_object_eval_assign_data(ob, &mesh_eval->id, true);
|
||||
}
|
||||
|
||||
|
@ -1759,8 +1762,9 @@ void BKE_displist_make_curveTypes_forRender(Depsgraph *depsgraph,
|
|||
Mesh **r_final,
|
||||
const bool for_orco)
|
||||
{
|
||||
if (ob->runtime.curve_cache == NULL) {
|
||||
ob->runtime.curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for Curve");
|
||||
if (ob->runtime.curve_cache == nullptr) {
|
||||
ob->runtime.curve_cache = (CurveCache *)MEM_callocN(sizeof(CurveCache),
|
||||
"CurveCache for Curve");
|
||||
}
|
||||
|
||||
do_makeDispListCurveTypes(depsgraph, scene, ob, dispbase, true, for_orco, r_final);
|
||||
|
@ -1797,8 +1801,8 @@ static void boundbox_displist_object(Object *ob)
|
|||
*/
|
||||
|
||||
/* object's BB is calculated from final displist */
|
||||
if (ob->runtime.bb == NULL) {
|
||||
ob->runtime.bb = MEM_callocN(sizeof(BoundBox), "boundbox");
|
||||
if (ob->runtime.bb == nullptr) {
|
||||
ob->runtime.bb = (BoundBox *)MEM_callocN(sizeof(BoundBox), "boundbox");
|
||||
}
|
||||
|
||||
Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob);
|
|
@ -44,6 +44,7 @@ GeometryComponent *InstancesComponent::copy() const
|
|||
InstancesComponent *new_component = new InstancesComponent();
|
||||
new_component->transforms_ = transforms_;
|
||||
new_component->instanced_data_ = instanced_data_;
|
||||
new_component->ids_ = ids_;
|
||||
return new_component;
|
||||
}
|
||||
|
||||
|
@ -51,6 +52,7 @@ void InstancesComponent::clear()
|
|||
{
|
||||
instanced_data_.clear();
|
||||
transforms_.clear();
|
||||
ids_.clear();
|
||||
}
|
||||
|
||||
void InstancesComponent::add_instance(Object *object, float4x4 transform, const int id)
|
||||
|
|
|
@ -529,7 +529,7 @@ void adapt_mesh_domain_edge_to_corner_impl(const Mesh &mesh,
|
|||
|
||||
/* For every corner, mix the values from the adjacent edges on the face. */
|
||||
for (const int loop_index : IndexRange(poly.loopstart, poly.totloop)) {
|
||||
const int loop_index_prev = (loop_index - 1) % poly.totloop;
|
||||
const int loop_index_prev = loop_index - 1 + (loop_index == poly.loopstart) * poly.totloop;
|
||||
const MLoop &loop = mesh.mloop[loop_index];
|
||||
const MLoop &loop_prev = mesh.mloop[loop_index_prev];
|
||||
mixer.mix_in(loop_index, old_values[loop.e]);
|
||||
|
|
|
@ -306,6 +306,13 @@ void GeometrySet::replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipTy
|
|||
pointcloud_component.replace(pointcloud, ownership);
|
||||
}
|
||||
|
||||
/* Clear the existing volume and replace with the given one. */
|
||||
void GeometrySet::replace_volume(Volume *volume, GeometryOwnershipType ownership)
|
||||
{
|
||||
VolumeComponent &volume_component = this->get_component_for_write<VolumeComponent>();
|
||||
volume_component.replace(volume, ownership);
|
||||
}
|
||||
|
||||
/* Returns a mutable mesh or null. No ownership is transferred. */
|
||||
Mesh *GeometrySet::get_mesh_for_write()
|
||||
{
|
||||
|
|
|
@ -2433,7 +2433,7 @@ bool BKE_gpencil_convert_mesh(Main *bmain,
|
|||
Material *ma = BKE_object_material_get(ob_mesh, mp->mat_nr + 1);
|
||||
make_element_name(
|
||||
ob_mesh->id.name + 2, (ma != NULL) ? ma->id.name + 2 : "Fill", 64, element_name);
|
||||
mat_idx = gpencil_material_find_index_by_name(ob_gp, element_name);
|
||||
mat_idx = BKE_gpencil_material_find_index_by_name_prefix(ob_gp, element_name);
|
||||
if (mat_idx == -1) {
|
||||
float color[4];
|
||||
if (ma != NULL) {
|
||||
|
|
|
@ -303,6 +303,7 @@ static void libblock_remap_data_postprocess_object_update(Main *bmain,
|
|||
/* Can be called with both old_collection and new_collection being NULL,
|
||||
* this means we have to check whole Main database then. */
|
||||
static void libblock_remap_data_postprocess_collection_update(Main *bmain,
|
||||
Collection *owner_collection,
|
||||
Collection *UNUSED(old_collection),
|
||||
Collection *new_collection)
|
||||
{
|
||||
|
@ -311,7 +312,7 @@ static void libblock_remap_data_postprocess_collection_update(Main *bmain,
|
|||
* and BKE_main_collection_sync_remap() does not tolerate any of those, so for now always check
|
||||
* whole existing collections for NULL pointers.
|
||||
* I'd consider optimizing that whole collection remapping process a TODO for later. */
|
||||
BKE_collections_child_remove_nulls(bmain, NULL /*old_collection*/);
|
||||
BKE_collections_child_remove_nulls(bmain, owner_collection, NULL /*old_collection*/);
|
||||
}
|
||||
else {
|
||||
/* Temp safe fix, but a "tad" brute force... We should probably be able to use parents from
|
||||
|
@ -523,7 +524,7 @@ void BKE_libblock_remap_locked(Main *bmain, void *old_idv, void *new_idv, const
|
|||
break;
|
||||
case ID_GR:
|
||||
libblock_remap_data_postprocess_collection_update(
|
||||
bmain, (Collection *)old_id, (Collection *)new_id);
|
||||
bmain, NULL, (Collection *)old_id, (Collection *)new_id);
|
||||
break;
|
||||
case ID_ME:
|
||||
case ID_CU:
|
||||
|
@ -628,6 +629,12 @@ void BKE_libblock_relink_ex(
|
|||
switch (GS(id->name)) {
|
||||
case ID_SCE:
|
||||
case ID_GR: {
|
||||
/* Note: here we know which collection we have affected, so at lest for NULL children
|
||||
* detection we can only process that one.
|
||||
* This is also a required fix in case `id` would not be in Main anymore, which can happen
|
||||
* e.g. when called from `id_delete`. */
|
||||
Collection *owner_collection = (GS(id->name) == ID_GR) ? (Collection *)id :
|
||||
((Scene *)id)->master_collection;
|
||||
if (old_id) {
|
||||
switch (GS(old_id->name)) {
|
||||
case ID_OB:
|
||||
|
@ -636,7 +643,7 @@ void BKE_libblock_relink_ex(
|
|||
break;
|
||||
case ID_GR:
|
||||
libblock_remap_data_postprocess_collection_update(
|
||||
bmain, (Collection *)old_id, (Collection *)new_id);
|
||||
bmain, owner_collection, (Collection *)old_id, (Collection *)new_id);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -644,7 +651,7 @@ void BKE_libblock_relink_ex(
|
|||
}
|
||||
else {
|
||||
/* No choice but to check whole objects/collections. */
|
||||
libblock_remap_data_postprocess_collection_update(bmain, NULL, NULL);
|
||||
libblock_remap_data_postprocess_collection_update(bmain, owner_collection, NULL, NULL);
|
||||
libblock_remap_data_postprocess_object_update(bmain, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -4941,6 +4941,7 @@ static void registerGeometryNodes()
|
|||
register_node_type_geo_attribute_proximity();
|
||||
register_node_type_geo_attribute_randomize();
|
||||
register_node_type_geo_attribute_separate_xyz();
|
||||
register_node_type_geo_attribute_transfer();
|
||||
register_node_type_geo_attribute_vector_math();
|
||||
register_node_type_geo_attribute_remove();
|
||||
register_node_type_geo_boolean();
|
||||
|
|
|
@ -1332,12 +1332,9 @@ bool BKE_object_support_modifier_type_check(const Object *ob, int modifier_type)
|
|||
if (ob->type == OB_HAIR) {
|
||||
return (mti->modifyHair != NULL) || (mti->flags & eModifierTypeFlag_AcceptsVertexCosOnly);
|
||||
}
|
||||
if (ob->type == OB_POINTCLOUD) {
|
||||
if (ELEM(ob->type, OB_POINTCLOUD, OB_VOLUME)) {
|
||||
return (mti->modifyGeometrySet != NULL);
|
||||
}
|
||||
if (ob->type == OB_VOLUME) {
|
||||
return (mti->modifyVolume != NULL) || (mti->modifyGeometrySet != NULL);
|
||||
}
|
||||
if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE)) {
|
||||
if (ob->type == OB_LATTICE && (mti->flags & eModifierTypeFlag_AcceptsVertexCosOnly) == 0) {
|
||||
return false;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "BLI_math.h"
|
||||
#include "BLI_rand.h"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_collection_types.h"
|
||||
|
@ -73,6 +74,7 @@ using blender::Array;
|
|||
using blender::float3;
|
||||
using blender::float4x4;
|
||||
using blender::Span;
|
||||
using blender::Vector;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Internal Duplicate Context
|
||||
|
@ -90,6 +92,13 @@ struct DupliContext {
|
|||
Object *object;
|
||||
float space_mat[4][4];
|
||||
|
||||
/**
|
||||
* A stack that contains all the "parent" objects of a particular instance when recursive
|
||||
* instancing is used. This is used to prevent objects from instancing themselves accidentally.
|
||||
* Use a vector instead of a stack because we want to use the #contains method.
|
||||
*/
|
||||
Vector<Object *> *instance_stack;
|
||||
|
||||
int persistent_id[MAX_DUPLI_RECUR];
|
||||
int level;
|
||||
|
||||
|
@ -113,7 +122,8 @@ static void init_context(DupliContext *r_ctx,
|
|||
Depsgraph *depsgraph,
|
||||
Scene *scene,
|
||||
Object *ob,
|
||||
const float space_mat[4][4])
|
||||
const float space_mat[4][4],
|
||||
Vector<Object *> &instance_stack)
|
||||
{
|
||||
r_ctx->depsgraph = depsgraph;
|
||||
r_ctx->scene = scene;
|
||||
|
@ -122,6 +132,7 @@ static void init_context(DupliContext *r_ctx,
|
|||
|
||||
r_ctx->object = ob;
|
||||
r_ctx->obedit = OBEDIT_FROM_OBACT(ob);
|
||||
r_ctx->instance_stack = &instance_stack;
|
||||
if (space_mat) {
|
||||
copy_m4_m4(r_ctx->space_mat, space_mat);
|
||||
}
|
||||
|
@ -150,6 +161,7 @@ static void copy_dupli_context(
|
|||
}
|
||||
|
||||
r_ctx->object = ob;
|
||||
r_ctx->instance_stack = ctx->instance_stack;
|
||||
if (mat) {
|
||||
mul_m4_m4m4(r_ctx->space_mat, (float(*)[4])ctx->space_mat, mat);
|
||||
}
|
||||
|
@ -235,12 +247,19 @@ static void make_recursive_duplis(const DupliContext *ctx,
|
|||
const float space_mat[4][4],
|
||||
int index)
|
||||
{
|
||||
if (ctx->instance_stack->contains(ob)) {
|
||||
/* Avoid recursive instances. */
|
||||
printf("Warning: '%s' object is trying to instance itself.\n", ob->id.name + 2);
|
||||
return;
|
||||
}
|
||||
/* Simple preventing of too deep nested collections with #MAX_DUPLI_RECUR. */
|
||||
if (ctx->level < MAX_DUPLI_RECUR) {
|
||||
DupliContext rctx;
|
||||
copy_dupli_context(&rctx, ctx, ob, space_mat, index);
|
||||
if (rctx.gen) {
|
||||
ctx->instance_stack->append(ob);
|
||||
rctx.gen->make_duplis(&rctx);
|
||||
ctx->instance_stack->remove_last();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1588,7 +1607,9 @@ ListBase *object_duplilist(Depsgraph *depsgraph, Scene *sce, Object *ob)
|
|||
{
|
||||
ListBase *duplilist = (ListBase *)MEM_callocN(sizeof(ListBase), "duplilist");
|
||||
DupliContext ctx;
|
||||
init_context(&ctx, depsgraph, sce, ob, nullptr);
|
||||
Vector<Object *> instance_stack;
|
||||
instance_stack.append(ob);
|
||||
init_context(&ctx, depsgraph, sce, ob, nullptr, instance_stack);
|
||||
if (ctx.gen) {
|
||||
ctx.duplilist = duplilist;
|
||||
ctx.gen->make_duplis(&ctx);
|
||||
|
|
|
@ -1007,7 +1007,6 @@ static void volume_update_simplify_level(Volume *volume, const Depsgraph *depsgr
|
|||
static void volume_evaluate_modifiers(struct Depsgraph *depsgraph,
|
||||
struct Scene *scene,
|
||||
Object *object,
|
||||
Volume *volume_input,
|
||||
GeometrySet &geometry_set)
|
||||
{
|
||||
/* Modifier evaluation modes. */
|
||||
|
@ -1033,18 +1032,6 @@ static void volume_evaluate_modifiers(struct Depsgraph *depsgraph,
|
|||
if (mti->modifyGeometrySet) {
|
||||
mti->modifyGeometrySet(md, &mectx, &geometry_set);
|
||||
}
|
||||
else if (mti->modifyVolume) {
|
||||
VolumeComponent &volume_component = geometry_set.get_component_for_write<VolumeComponent>();
|
||||
Volume *volume_old = volume_component.get_for_write();
|
||||
if (volume_old == nullptr) {
|
||||
volume_old = BKE_volume_new_for_eval(volume_input);
|
||||
volume_component.replace(volume_old);
|
||||
}
|
||||
Volume *volume_new = mti->modifyVolume(md, &mectx, volume_old);
|
||||
if (volume_new != volume_old) {
|
||||
volume_component.replace(volume_new);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1095,9 +1082,8 @@ void BKE_volume_data_update(struct Depsgraph *depsgraph, struct Scene *scene, Ob
|
|||
/* Evaluate modifiers. */
|
||||
Volume *volume = (Volume *)object->data;
|
||||
GeometrySet geometry_set;
|
||||
VolumeComponent &volume_component = geometry_set.get_component_for_write<VolumeComponent>();
|
||||
volume_component.replace(volume, GeometryOwnershipType::ReadOnly);
|
||||
volume_evaluate_modifiers(depsgraph, scene, object, volume, geometry_set);
|
||||
geometry_set.replace_volume(volume, GeometryOwnershipType::ReadOnly);
|
||||
volume_evaluate_modifiers(depsgraph, scene, object, geometry_set);
|
||||
|
||||
Volume *volume_eval = take_volume_ownership_from_geometry_set(geometry_set);
|
||||
|
||||
|
|
|
@ -98,3 +98,10 @@
|
|||
#else
|
||||
# define ATTR_ALIGN(x) __attribute__((aligned(x)))
|
||||
#endif
|
||||
|
||||
/* Alignment directive */
|
||||
#ifdef _WIN64
|
||||
# define ALIGN_STRUCT __declspec(align(64))
|
||||
#else
|
||||
# define ALIGN_STRUCT
|
||||
#endif
|
||||
|
|
|
@ -661,6 +661,16 @@ template<typename T> class MutableSpan {
|
|||
return IndexRange(size_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a reference to the first element in the array. This invokes undefined behavior when the
|
||||
* array is empty.
|
||||
*/
|
||||
constexpr T &first() const
|
||||
{
|
||||
BLI_assert(size_ > 0);
|
||||
return data_[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to the last element. This invokes undefined behavior when the array is
|
||||
* empty.
|
||||
|
|
|
@ -668,6 +668,21 @@ class Vector {
|
|||
return *(end_ - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a reference to the first element in the vector.
|
||||
* This invokes undefined behavior when the vector is empty.
|
||||
*/
|
||||
const T &first() const
|
||||
{
|
||||
BLI_assert(this->size() > 0);
|
||||
return *begin_;
|
||||
}
|
||||
T &first()
|
||||
{
|
||||
BLI_assert(this->size() > 0);
|
||||
return *begin_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return how many values are currently stored in the vector.
|
||||
*/
|
||||
|
|
|
@ -2684,12 +2684,6 @@ static IMesh raycast_patches_boolean(const IMesh &tm,
|
|||
return ans;
|
||||
}
|
||||
|
||||
# ifdef fast_triangulate
|
||||
/* This code uses Blenlib's BLI_polyfill_calc to do triangulation, and is therefore quite fast.
|
||||
* Unfortunately, it can product degenerate triangles that mesh_intersect will remove, leaving
|
||||
* the mesh non-PWN.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tessellate face f into triangles and return an array of `const Face *`
|
||||
* giving that triangulation. Intended to be used when f has > 4 vertices.
|
||||
|
@ -2697,8 +2691,12 @@ static IMesh raycast_patches_boolean(const IMesh &tm,
|
|||
* each edge in the output triangles either matches the original edge
|
||||
* for the (identical) edge of f, or else is -1. So diagonals added
|
||||
* for triangulation can later be identified by having #NO_INDEX for original.
|
||||
*
|
||||
* This code uses Blenlib's BLI_polyfill_calc to do triangulation, and is therefore quite fast.
|
||||
* Unfortunately, it can product degenerate triangles that mesh_intersect will remove, leaving
|
||||
* the mesh non-PWN.
|
||||
*/
|
||||
static Array<Face *> triangulate_poly(Face *f, IMeshArena *arena)
|
||||
static Array<Face *> polyfill_triangulate_poly(Face *f, IMeshArena *arena)
|
||||
{
|
||||
/* Similar to loop body in BM_mesh_calc_tesselation. */
|
||||
int flen = f->size();
|
||||
|
@ -2751,7 +2749,7 @@ static Array<Face *> triangulate_poly(Face *f, IMeshArena *arena)
|
|||
|
||||
return ans;
|
||||
}
|
||||
# else
|
||||
|
||||
/**
|
||||
* Which CDT output edge index is for an edge between output verts
|
||||
* v1 and v2 (in either order)?
|
||||
|
@ -2775,6 +2773,13 @@ static int find_cdt_edge(const CDT_result<mpq_class> &cdt_out, int v1, int v2)
|
|||
* each edge in the output triangles either matches the original edge
|
||||
* for the (identical) edge of f, or else is -1. So diagonals added
|
||||
* for triangulation can later be identified by having #NO_INDEX for original.
|
||||
*
|
||||
* The method used is to use the CDT triangulation. Usually that triangulation
|
||||
* will only use the existing vertices. However, if the face self-intersects
|
||||
* then the CDT triangulation will include the intersection points.
|
||||
* If this happens, we use the polyfill triangulator instead. We don't
|
||||
* use the polyfill triangulator by default because it can create degenerate
|
||||
* triangles (which we can handle but they'll create non-manifold meshes).
|
||||
*/
|
||||
static Array<Face *> triangulate_poly(Face *f, IMeshArena *arena)
|
||||
{
|
||||
|
@ -2816,10 +2821,19 @@ static Array<Face *> triangulate_poly(Face *f, IMeshArena *arena)
|
|||
int i_v_out[3];
|
||||
const Vert *v[3];
|
||||
int eo[3];
|
||||
bool needs_steiner = false;
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
i_v_out[i] = cdt_out.face[t][i];
|
||||
if (cdt_out.vert_orig[i_v_out[i]].size() == 0) {
|
||||
needs_steiner = true;
|
||||
break;
|
||||
}
|
||||
v[i] = (*f)[cdt_out.vert_orig[i_v_out[i]][0]];
|
||||
}
|
||||
if (needs_steiner) {
|
||||
/* Fall back on the polyfill triangulator. */
|
||||
return polyfill_triangulate_poly(f, arena);
|
||||
}
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
int e_out = find_cdt_edge(cdt_out, i_v_out[i], i_v_out[(i + 1) % 3]);
|
||||
BLI_assert(e_out != -1);
|
||||
|
@ -2842,7 +2856,6 @@ static Array<Face *> triangulate_poly(Face *f, IMeshArena *arena)
|
|||
}
|
||||
return ans;
|
||||
}
|
||||
# endif
|
||||
|
||||
/**
|
||||
* Return an #IMesh that is a triangulation of a mesh with general
|
||||
|
|
|
@ -608,7 +608,7 @@ endif()
|
|||
|
||||
blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(CXX_WARN_NO_SUGGEST_OVERRIDE)
|
||||
target_compile_options(bf_compositor PRIVATE "-Wsuggest-override")
|
||||
endif()
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ struct Object;
|
|||
struct Scene;
|
||||
struct Simulation;
|
||||
struct bNodeTree;
|
||||
struct Collection;
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
|
@ -137,6 +138,12 @@ void DEG_add_object_relation(struct DepsNodeHandle *node_handle,
|
|||
struct Object *object,
|
||||
eDepsObjectComponentType component,
|
||||
const char *description);
|
||||
void DEG_add_collection_geometry_relation(struct DepsNodeHandle *node_handle,
|
||||
struct Collection *collection,
|
||||
const char *description);
|
||||
void DEG_add_collection_geometry_customdata_mask(struct DepsNodeHandle *node_handle,
|
||||
struct Collection *collection,
|
||||
const struct CustomData_MeshMasks *masks);
|
||||
void DEG_add_simulation_relation(struct DepsNodeHandle *node_handle,
|
||||
struct Simulation *simulation,
|
||||
const char *description);
|
||||
|
|
|
@ -554,6 +554,7 @@ void DepsgraphNodeBuilder::build_collection(LayerCollection *from_layer_collecti
|
|||
id_node->is_directly_visible = is_collection_visible;
|
||||
|
||||
build_idproperties(collection->id.properties);
|
||||
add_operation_node(&collection->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL_DONE);
|
||||
}
|
||||
if (from_layer_collection != nullptr) {
|
||||
/* If we came from layer collection we don't go deeper, view layer
|
||||
|
|
|
@ -635,11 +635,38 @@ void DepsgraphRelationBuilder::build_collection(LayerCollection *from_layer_coll
|
|||
ComponentKey duplicator_key(object != nullptr ? &object->id : nullptr, NodeType::DUPLI);
|
||||
if (!group_done) {
|
||||
build_idproperties(collection->id.properties);
|
||||
OperationKey collection_geometry_key{
|
||||
&collection->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL_DONE};
|
||||
LISTBASE_FOREACH (CollectionObject *, cob, &collection->gobject) {
|
||||
build_object(cob->ob);
|
||||
|
||||
/* The geometry of a collection depends on the positions of the elements in it. */
|
||||
OperationKey object_transform_key{
|
||||
&cob->ob->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_FINAL};
|
||||
add_relation(object_transform_key, collection_geometry_key, "Collection Geometry");
|
||||
|
||||
/* Only create geometry relations to child objects, if they have a geometry component. */
|
||||
OperationKey object_geometry_key{
|
||||
&cob->ob->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL};
|
||||
if (find_node(object_geometry_key) != nullptr) {
|
||||
add_relation(object_geometry_key, collection_geometry_key, "Collection Geometry");
|
||||
}
|
||||
|
||||
/* An instance is part of the geometry of the collection. */
|
||||
if (cob->ob->type == OB_EMPTY) {
|
||||
Collection *collection_instance = cob->ob->instance_collection;
|
||||
if (collection_instance != nullptr) {
|
||||
OperationKey collection_instance_key{
|
||||
&collection_instance->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL_DONE};
|
||||
add_relation(collection_instance_key, collection_geometry_key, "Collection Geometry");
|
||||
}
|
||||
}
|
||||
}
|
||||
LISTBASE_FOREACH (CollectionChild *, child, &collection->children) {
|
||||
build_collection(nullptr, nullptr, child->collection);
|
||||
OperationKey child_collection_geometry_key{
|
||||
&child->collection->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL_DONE};
|
||||
add_relation(child_collection_geometry_key, collection_geometry_key, "Collection Geometry");
|
||||
}
|
||||
}
|
||||
if (object != nullptr) {
|
||||
|
|
|
@ -32,11 +32,13 @@
|
|||
#include "PIL_time_utildefines.h"
|
||||
|
||||
#include "DNA_cachefile_types.h"
|
||||
#include "DNA_collection_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_simulation_types.h"
|
||||
|
||||
#include "BKE_collection.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_scene.h"
|
||||
|
||||
|
@ -107,6 +109,29 @@ void DEG_add_object_relation(DepsNodeHandle *node_handle,
|
|||
deg_node_handle->builder->add_node_handle_relation(comp_key, deg_node_handle, description);
|
||||
}
|
||||
|
||||
void DEG_add_collection_geometry_relation(DepsNodeHandle *node_handle,
|
||||
Collection *collection,
|
||||
const char *description)
|
||||
{
|
||||
deg::OperationKey operation_key{
|
||||
&collection->id, deg::NodeType::GEOMETRY, deg::OperationCode::GEOMETRY_EVAL_DONE};
|
||||
deg::DepsNodeHandle *deg_node_handle = get_node_handle(node_handle);
|
||||
deg_node_handle->builder->add_node_handle_relation(operation_key, deg_node_handle, description);
|
||||
}
|
||||
|
||||
void DEG_add_collection_geometry_customdata_mask(DepsNodeHandle *node_handle,
|
||||
Collection *collection,
|
||||
const CustomData_MeshMasks *masks)
|
||||
{
|
||||
FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN (collection, ob) {
|
||||
DEG_add_customdata_mask(node_handle, ob, masks);
|
||||
if (ob->type == OB_EMPTY && ob->instance_collection != nullptr) {
|
||||
DEG_add_collection_geometry_customdata_mask(node_handle, ob->instance_collection, masks);
|
||||
}
|
||||
}
|
||||
FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
|
||||
}
|
||||
|
||||
void DEG_add_simulation_relation(DepsNodeHandle *node_handle,
|
||||
Simulation *simulation,
|
||||
const char *description)
|
||||
|
|
|
@ -594,6 +594,7 @@ NodeType geometry_tag_to_component(const ID *id)
|
|||
case ID_HA:
|
||||
case ID_PT:
|
||||
case ID_VO:
|
||||
case ID_GR:
|
||||
return NodeType::GEOMETRY;
|
||||
case ID_PA: /* Particles */
|
||||
return NodeType::UNDEFINED;
|
||||
|
|
|
@ -33,6 +33,7 @@ namespace blender::deg {
|
|||
|
||||
RuntimeBackup::RuntimeBackup(const Depsgraph *depsgraph)
|
||||
: have_backup(false),
|
||||
id_data({nullptr}),
|
||||
animation_backup(depsgraph),
|
||||
scene_backup(depsgraph),
|
||||
sound_backup(depsgraph),
|
||||
|
@ -51,6 +52,8 @@ void RuntimeBackup::init_from_id(ID *id)
|
|||
}
|
||||
have_backup = true;
|
||||
|
||||
id_data.py_instance = id->py_instance;
|
||||
|
||||
animation_backup.init_from_id(id);
|
||||
|
||||
const ID_Type id_type = GS(id->name);
|
||||
|
@ -89,6 +92,8 @@ void RuntimeBackup::restore_to_id(ID *id)
|
|||
return;
|
||||
}
|
||||
|
||||
id->py_instance = id_data.py_instance;
|
||||
|
||||
animation_backup.restore_to_id(id);
|
||||
|
||||
const ID_Type id_type = GS(id->name);
|
||||
|
|
|
@ -58,6 +58,11 @@ class RuntimeBackup {
|
|||
* copy-on-write mechanism. */
|
||||
bool have_backup;
|
||||
|
||||
/* Struct members of the ID pointer. */
|
||||
struct {
|
||||
void *py_instance;
|
||||
} id_data;
|
||||
|
||||
AnimationBackup animation_backup;
|
||||
SceneBackup scene_backup;
|
||||
SoundBackup sound_backup;
|
||||
|
|
|
@ -765,12 +765,15 @@ static void eevee_hair_cache_populate(EEVEE_Data *vedata,
|
|||
|
||||
if (matcache.depth_grp) {
|
||||
*matcache.depth_grp_p = DRW_shgroup_hair_create_sub(ob, psys, md, matcache.depth_grp);
|
||||
DRW_shgroup_add_material_resources(*matcache.depth_grp_p, matcache.shading_gpumat);
|
||||
}
|
||||
if (matcache.shading_grp) {
|
||||
*matcache.shading_grp_p = DRW_shgroup_hair_create_sub(ob, psys, md, matcache.shading_grp);
|
||||
DRW_shgroup_add_material_resources(*matcache.shading_grp_p, matcache.shading_gpumat);
|
||||
}
|
||||
if (matcache.shadow_grp) {
|
||||
*matcache.shadow_grp_p = DRW_shgroup_hair_create_sub(ob, psys, md, matcache.shadow_grp);
|
||||
DRW_shgroup_add_material_resources(*matcache.shadow_grp_p, matcache.shading_gpumat);
|
||||
*cast_shadow = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1818,18 +1818,13 @@ static int gpencil_move_to_layer_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
bGPdata *gpd = (bGPdata *)ob->data;
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
bGPDlayer *target_layer = NULL;
|
||||
ListBase strokes = {NULL, NULL};
|
||||
int layer_num = RNA_int_get(op->ptr, "layer");
|
||||
const bool use_autolock = (bool)(gpd->flag & GP_DATA_AUTOLOCK_LAYERS);
|
||||
const bool is_multiedit = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gpd);
|
||||
|
||||
if (GPENCIL_MULTIEDIT_SESSIONS_ON(gpd)) {
|
||||
BKE_report(op->reports, RPT_ERROR, "Operator not supported in multiframe edition");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
/* if autolock enabled, disabled now */
|
||||
/* If autolock enabled, disabled now. */
|
||||
if (use_autolock) {
|
||||
gpd->flag &= ~GP_DATA_AUTOLOCK_LAYERS;
|
||||
}
|
||||
|
@ -1852,53 +1847,59 @@ static int gpencil_move_to_layer_exec(bContext *C, wmOperator *op)
|
|||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
/* Extract all strokes to move to this layer
|
||||
* NOTE: We need to do this in a two-pass system to avoid conflicts with strokes
|
||||
* getting repeatedly moved
|
||||
*/
|
||||
CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) {
|
||||
bGPDframe *gpf = gpl->actframe;
|
||||
|
||||
/* skip if no frame with strokes, or if this is the layer we're moving strokes to */
|
||||
if ((gpl == target_layer) || (gpf == NULL)) {
|
||||
/* Extract all strokes to move to this layer. */
|
||||
CTX_DATA_BEGIN (C, bGPDlayer *, gpl_src, editable_gpencil_layers) {
|
||||
/* Skip if this is the layer we're moving strokes to. */
|
||||
if (gpl_src == target_layer) {
|
||||
continue;
|
||||
}
|
||||
bGPDframe *init_gpf = (is_multiedit) ? gpl_src->frames.first : gpl_src->actframe;
|
||||
for (bGPDframe *gpf_src = init_gpf; gpf_src; gpf_src = gpf_src->next) {
|
||||
if ((gpf_src == gpl_src->actframe) ||
|
||||
((gpf_src->flag & GP_FRAME_SELECT) && (is_multiedit))) {
|
||||
if (gpf_src == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* make copies of selected strokes, and deselect these once we're done */
|
||||
LISTBASE_FOREACH_MUTABLE (bGPDstroke *, gps, &gpf->strokes) {
|
||||
bGPDstroke *gpsn = NULL;
|
||||
BLI_listbase_clear(&strokes);
|
||||
for (bGPDstroke *gps = gpf_src->strokes.first; gps; gps = gpsn) {
|
||||
gpsn = gps->next;
|
||||
/* Skip strokes that are invalid for current view. */
|
||||
if (ED_gpencil_stroke_can_use(C, gps) == false) {
|
||||
continue;
|
||||
}
|
||||
/* Check if the color is editable. */
|
||||
if (ED_gpencil_stroke_material_editable(ob, gpl_src, gps) == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* skip strokes that are invalid for current view */
|
||||
if (ED_gpencil_stroke_can_use(C, gps) == false) {
|
||||
continue;
|
||||
if (gps->flag & GP_STROKE_SELECT) {
|
||||
BLI_remlink(&gpf_src->strokes, gps);
|
||||
BLI_addtail(&strokes, gps);
|
||||
}
|
||||
}
|
||||
/* Paste them all in one go. */
|
||||
if (strokes.first) {
|
||||
bGPDframe *gpf_dst = BKE_gpencil_layer_frame_get(
|
||||
target_layer, gpf_src->framenum, GP_GETFRAME_ADD_NEW);
|
||||
|
||||
BLI_movelisttolist(&gpf_dst->strokes, &strokes);
|
||||
BLI_assert((strokes.first == strokes.last) && (strokes.first == NULL));
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if the color is editable. */
|
||||
if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* TODO: Don't just move entire strokes - instead, only copy the selected portions... */
|
||||
if (gps->flag & GP_STROKE_SELECT) {
|
||||
BLI_remlink(&gpf->strokes, gps);
|
||||
BLI_addtail(&strokes, gps);
|
||||
/* If not multi-edit, exit loop. */
|
||||
if (!is_multiedit) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* if new layer and autolock, lock old layer */
|
||||
/* If new layer and autolock, lock old layer. */
|
||||
if ((layer_num == -1) && (use_autolock)) {
|
||||
gpl->flag |= GP_LAYER_LOCKED;
|
||||
gpl_src->flag |= GP_LAYER_LOCKED;
|
||||
}
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
/* Paste them all in one go */
|
||||
if (strokes.first) {
|
||||
bGPDframe *gpf = BKE_gpencil_layer_frame_get(target_layer, CFRA, GP_GETFRAME_ADD_NEW);
|
||||
|
||||
BLI_movelisttolist(&gpf->strokes, &strokes);
|
||||
BLI_assert((strokes.first == strokes.last) && (strokes.first == NULL));
|
||||
}
|
||||
|
||||
/* back autolock status */
|
||||
if (use_autolock) {
|
||||
gpd->flag |= GP_DATA_AUTOLOCK_LAYERS;
|
||||
|
@ -3814,13 +3815,13 @@ static int gpencil_strokes_reproject_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
|
||||
changed = true;
|
||||
/* If not multi-edit, exit loop. */
|
||||
if (!is_multiedit) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* If not multi-edit, exit loop. */
|
||||
if (!is_multiedit) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
|
|
@ -200,7 +200,7 @@ ScrArea *ED_screen_areas_iter_next(const bScreen *screen, const ScrArea *area);
|
|||
/* screens */
|
||||
void ED_screens_init(struct Main *bmain, struct wmWindowManager *wm);
|
||||
void ED_screen_draw_edges(struct wmWindow *win);
|
||||
void ED_screen_draw_join_shape(struct ScrArea *sa1, struct ScrArea *sa2);
|
||||
void ED_screen_draw_join_highlight(struct ScrArea *sa1, struct ScrArea *sa2);
|
||||
void ED_screen_draw_split_preview(struct ScrArea *area, const int dir, const float fac);
|
||||
void ED_screen_refresh(struct wmWindowManager *wm, struct wmWindow *win);
|
||||
void ED_screen_ensure_updated(struct wmWindowManager *wm,
|
||||
|
|
|
@ -1120,7 +1120,7 @@ static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data)
|
|||
data->cancel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (ui_but_string_set(C, but, data->str)) {
|
||||
data->value = ui_but_value_get(but);
|
||||
}
|
||||
|
|
|
@ -1380,7 +1380,9 @@ static int editsource_exec(bContext *C, wmOperator *op)
|
|||
|
||||
/* redraw and get active button python info */
|
||||
ED_region_do_layout(C, region);
|
||||
WM_draw_region_viewport_bind(region);
|
||||
ED_region_do_draw(C, region);
|
||||
WM_draw_region_viewport_unbind(region);
|
||||
region->do_draw = false;
|
||||
|
||||
for (BLI_ghashIterator_init(&ghi, ui_editsource_info->hash);
|
||||
|
|
|
@ -2416,11 +2416,12 @@ static void widget_draw_text_icon(const uiFontStyle *fstyle,
|
|||
but->block->aspect = aspect_orig;
|
||||
#endif
|
||||
|
||||
rect->xmin += icon_size + icon_padding;
|
||||
rect->xmin += round_fl_to_int(icon_size + icon_padding);
|
||||
}
|
||||
|
||||
if (!no_text_padding) {
|
||||
const int text_padding = (UI_TEXT_MARGIN_X * U.widget_unit) / but->block->aspect;
|
||||
const int text_padding = round_fl_to_int((UI_TEXT_MARGIN_X * U.widget_unit) /
|
||||
but->block->aspect);
|
||||
if (but->editstr) {
|
||||
rect->xmin += text_padding;
|
||||
}
|
||||
|
|
|
@ -220,8 +220,8 @@ void MASK_OT_shape_key_feather_reset(wmOperatorType *ot)
|
|||
}
|
||||
|
||||
/*
|
||||
* - loop over selected shapekeys.
|
||||
* - find firstsel/lastsel pairs.
|
||||
* - loop over selected shape-keys.
|
||||
* - find first-selected/last-selected pairs.
|
||||
* - move these into a temp list.
|
||||
* - re-key all the original shapes.
|
||||
* - copy unselected values back from the original.
|
||||
|
|
|
@ -157,10 +157,6 @@ bool edit_modifier_poll_generic(struct bContext *C,
|
|||
const bool is_liboverride_allowed);
|
||||
void edit_modifier_properties(struct wmOperatorType *ot);
|
||||
bool edit_modifier_invoke_properties(struct bContext *C, struct wmOperator *op);
|
||||
bool edit_modifier_invoke_properties_with_hover_no_active(struct bContext *C,
|
||||
struct wmOperator *op,
|
||||
const struct wmEvent *event,
|
||||
int *r_retval);
|
||||
|
||||
struct ModifierData *edit_modifier_property_get(struct wmOperator *op,
|
||||
struct Object *ob,
|
||||
|
|
|
@ -1116,20 +1116,27 @@ bool edit_modifier_invoke_properties(bContext *C, wmOperator *op)
|
|||
}
|
||||
|
||||
/**
|
||||
* If the "modifier" property is not set,fill the modifier property with the name of the modifier
|
||||
* with a UI panel below the mouse cursor, without checking the context pointer. Used in order to
|
||||
* apply modifier operators on hover over their panels. If this checked the context pointer then it
|
||||
* would always use the active modifier, which isn't desired.
|
||||
* If the "modifier" property is not set, fill the modifier property with the name of the modifier
|
||||
* with a UI panel below the mouse cursor, unless a specific modifier is set with a context
|
||||
* pointer. Used in order to apply modifier operators on hover over their panels.
|
||||
*/
|
||||
bool edit_modifier_invoke_properties_with_hover_no_active(bContext *C,
|
||||
wmOperator *op,
|
||||
const wmEvent *event,
|
||||
int *r_retval)
|
||||
static bool edit_modifier_invoke_properties_with_hover(bContext *C,
|
||||
wmOperator *op,
|
||||
const wmEvent *event,
|
||||
int *r_retval)
|
||||
{
|
||||
if (RNA_struct_property_is_set(op->ptr, "modifier")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Note that the context pointer is *not* the active modifier, it is set in UI layouts. */
|
||||
PointerRNA ctx_ptr = CTX_data_pointer_get_type(C, "modifier", &RNA_Modifier);
|
||||
if (ctx_ptr.data != NULL) {
|
||||
ModifierData *md = ctx_ptr.data;
|
||||
RNA_string_set(op->ptr, "modifier", md->name);
|
||||
return true;
|
||||
}
|
||||
|
||||
PointerRNA *panel_ptr = UI_region_panel_custom_data_under_cursor(C, event);
|
||||
if (panel_ptr == NULL || RNA_pointer_is_null(panel_ptr)) {
|
||||
*r_retval = OPERATOR_CANCELLED;
|
||||
|
@ -1211,7 +1218,7 @@ static int modifier_remove_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_remove_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_remove_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1257,7 +1264,7 @@ static int modifier_move_up_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_move_up_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_move_up_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1302,7 +1309,7 @@ static int modifier_move_down_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_move_down_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_move_down_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1345,7 +1352,7 @@ static int modifier_move_to_index_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_move_to_index_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_move_to_index_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1458,7 +1465,7 @@ static int modifier_apply_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_apply_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_apply_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1502,7 +1509,7 @@ static int modifier_apply_as_shapekey_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_apply_as_shapekey_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_apply_as_shapekey_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1614,7 +1621,7 @@ static int modifier_copy_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_copy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_copy_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1657,7 +1664,7 @@ static int modifier_set_active_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_set_active_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_set_active_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
@ -1749,7 +1756,7 @@ static int modifier_copy_to_selected_exec(bContext *C, wmOperator *op)
|
|||
static int modifier_copy_to_selected_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
int retval;
|
||||
if (edit_modifier_invoke_properties_with_hover_no_active(C, op, event, &retval)) {
|
||||
if (edit_modifier_invoke_properties_with_hover(C, op, event, &retval)) {
|
||||
return modifier_copy_to_selected_exec(C, op);
|
||||
}
|
||||
return retval;
|
||||
|
|
|
@ -33,184 +33,11 @@
|
|||
|
||||
#include "WM_api.h"
|
||||
|
||||
#include "UI_interface.h"
|
||||
#include "UI_resources.h"
|
||||
|
||||
#include "screen_intern.h"
|
||||
|
||||
/**
|
||||
* Draw horizontal shape visualizing future joining
|
||||
* (left as well right direction of future joining).
|
||||
*/
|
||||
static void draw_horizontal_join_shape(ScrArea *area, char dir, uint pos)
|
||||
{
|
||||
const float width = screen_geom_area_width(area) - 1;
|
||||
const float height = screen_geom_area_height(area) - 1;
|
||||
|
||||
float w, h;
|
||||
if (height < width) {
|
||||
h = height / 8;
|
||||
w = height / 4;
|
||||
}
|
||||
else {
|
||||
h = width / 8;
|
||||
w = width / 4;
|
||||
}
|
||||
|
||||
vec2f points[10];
|
||||
points[0].x = area->v1->vec.x;
|
||||
points[0].y = area->v1->vec.y + height / 2;
|
||||
|
||||
points[1].x = area->v1->vec.x;
|
||||
points[1].y = area->v1->vec.y;
|
||||
|
||||
points[2].x = area->v4->vec.x - w;
|
||||
points[2].y = area->v4->vec.y;
|
||||
|
||||
points[3].x = area->v4->vec.x - w;
|
||||
points[3].y = area->v4->vec.y + height / 2 - 2 * h;
|
||||
|
||||
points[4].x = area->v4->vec.x - 2 * w;
|
||||
points[4].y = area->v4->vec.y + height / 2;
|
||||
|
||||
points[5].x = area->v4->vec.x - w;
|
||||
points[5].y = area->v4->vec.y + height / 2 + 2 * h;
|
||||
|
||||
points[6].x = area->v3->vec.x - w;
|
||||
points[6].y = area->v3->vec.y;
|
||||
|
||||
points[7].x = area->v2->vec.x;
|
||||
points[7].y = area->v2->vec.y;
|
||||
|
||||
points[8].x = area->v4->vec.x;
|
||||
points[8].y = area->v4->vec.y + height / 2 - h;
|
||||
|
||||
points[9].x = area->v4->vec.x;
|
||||
points[9].y = area->v4->vec.y + height / 2 + h;
|
||||
|
||||
if (dir == 'l') {
|
||||
/* when direction is left, then we flip direction of arrow */
|
||||
float cx = area->v1->vec.x + width;
|
||||
for (int i = 0; i < 10; i++) {
|
||||
points[i].x -= cx;
|
||||
points[i].x = -points[i].x;
|
||||
points[i].x += area->v1->vec.x;
|
||||
}
|
||||
}
|
||||
|
||||
immBegin(GPU_PRIM_TRI_FAN, 5);
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
immVertex2f(pos, points[i].x, points[i].y);
|
||||
}
|
||||
|
||||
immEnd();
|
||||
|
||||
immBegin(GPU_PRIM_TRI_FAN, 5);
|
||||
|
||||
for (int i = 4; i < 8; i++) {
|
||||
immVertex2f(pos, points[i].x, points[i].y);
|
||||
}
|
||||
|
||||
immVertex2f(pos, points[0].x, points[0].y);
|
||||
immEnd();
|
||||
|
||||
immRectf(pos, points[2].x, points[2].y, points[8].x, points[8].y);
|
||||
immRectf(pos, points[6].x, points[6].y, points[9].x, points[9].y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw vertical shape visualizing future joining (up/down direction).
|
||||
*/
|
||||
static void draw_vertical_join_shape(ScrArea *area, char dir, uint pos)
|
||||
{
|
||||
const float width = screen_geom_area_width(area) - 1;
|
||||
const float height = screen_geom_area_height(area) - 1;
|
||||
|
||||
float w, h;
|
||||
if (height < width) {
|
||||
h = height / 4;
|
||||
w = height / 8;
|
||||
}
|
||||
else {
|
||||
h = width / 4;
|
||||
w = width / 8;
|
||||
}
|
||||
|
||||
vec2f points[10];
|
||||
points[0].x = area->v1->vec.x + width / 2;
|
||||
points[0].y = area->v3->vec.y;
|
||||
|
||||
points[1].x = area->v2->vec.x;
|
||||
points[1].y = area->v2->vec.y;
|
||||
|
||||
points[2].x = area->v1->vec.x;
|
||||
points[2].y = area->v1->vec.y + h;
|
||||
|
||||
points[3].x = area->v1->vec.x + width / 2 - 2 * w;
|
||||
points[3].y = area->v1->vec.y + h;
|
||||
|
||||
points[4].x = area->v1->vec.x + width / 2;
|
||||
points[4].y = area->v1->vec.y + 2 * h;
|
||||
|
||||
points[5].x = area->v1->vec.x + width / 2 + 2 * w;
|
||||
points[5].y = area->v1->vec.y + h;
|
||||
|
||||
points[6].x = area->v4->vec.x;
|
||||
points[6].y = area->v4->vec.y + h;
|
||||
|
||||
points[7].x = area->v3->vec.x;
|
||||
points[7].y = area->v3->vec.y;
|
||||
|
||||
points[8].x = area->v1->vec.x + width / 2 - w;
|
||||
points[8].y = area->v1->vec.y;
|
||||
|
||||
points[9].x = area->v1->vec.x + width / 2 + w;
|
||||
points[9].y = area->v1->vec.y;
|
||||
|
||||
if (dir == 'u') {
|
||||
/* when direction is up, then we flip direction of arrow */
|
||||
float cy = area->v1->vec.y + height;
|
||||
for (int i = 0; i < 10; i++) {
|
||||
points[i].y -= cy;
|
||||
points[i].y = -points[i].y;
|
||||
points[i].y += area->v1->vec.y;
|
||||
}
|
||||
}
|
||||
|
||||
immBegin(GPU_PRIM_TRI_FAN, 5);
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
immVertex2f(pos, points[i].x, points[i].y);
|
||||
}
|
||||
|
||||
immEnd();
|
||||
|
||||
immBegin(GPU_PRIM_TRI_FAN, 5);
|
||||
|
||||
for (int i = 4; i < 8; i++) {
|
||||
immVertex2f(pos, points[i].x, points[i].y);
|
||||
}
|
||||
|
||||
immVertex2f(pos, points[0].x, points[0].y);
|
||||
immEnd();
|
||||
|
||||
immRectf(pos, points[2].x, points[2].y, points[8].x, points[8].y);
|
||||
immRectf(pos, points[6].x, points[6].y, points[9].x, points[9].y);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw join shape due to direction of joining.
|
||||
*/
|
||||
static void draw_join_shape(ScrArea *area, char dir, uint pos)
|
||||
{
|
||||
if (ELEM(dir, 'u', 'd')) {
|
||||
draw_vertical_join_shape(area, dir, pos);
|
||||
}
|
||||
else {
|
||||
draw_horizontal_join_shape(area, dir, pos);
|
||||
}
|
||||
}
|
||||
|
||||
#define CORNER_RESOLUTION 3
|
||||
|
||||
static void do_vert_pair(GPUVertBuf *vbo, uint pos, uint *vidx, int corner, int i)
|
||||
|
@ -290,28 +117,6 @@ static GPUBatch *batch_screen_edges_get(int *corner_len)
|
|||
|
||||
#undef CORNER_RESOLUTION
|
||||
|
||||
/**
|
||||
* Draw screen area darker with arrow (visualization of future joining).
|
||||
*/
|
||||
static void scrarea_draw_shape_dark(ScrArea *area, char dir, uint pos)
|
||||
{
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
immUniformColor4ub(0, 0, 0, 50);
|
||||
|
||||
draw_join_shape(area, dir, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw screen area lighter with arrow shape ("eraser" of previous dark shape).
|
||||
*/
|
||||
static void scrarea_draw_shape_light(ScrArea *area, char UNUSED(dir), uint pos)
|
||||
{
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
immUniformColor4ub(255, 255, 255, 25);
|
||||
|
||||
immRectf(pos, area->v1->vec.x, area->v1->vec.y, area->v3->vec.x, area->v3->vec.y);
|
||||
}
|
||||
|
||||
static void drawscredge_area_draw(
|
||||
int sizex, int sizey, short x1, short y1, short x2, short y2, float edge_thickness)
|
||||
{
|
||||
|
@ -427,50 +232,92 @@ void ED_screen_draw_edges(wmWindow *win)
|
|||
}
|
||||
|
||||
/**
|
||||
* The blended join arrows.
|
||||
* Visual indication of the two areas involved in a proposed join.
|
||||
*
|
||||
* \param sa1: Area from which the resultant originates.
|
||||
* \param sa2: Target area that will be replaced.
|
||||
*/
|
||||
void ED_screen_draw_join_shape(ScrArea *sa1, ScrArea *sa2)
|
||||
void ED_screen_draw_join_highlight(ScrArea *sa1, ScrArea *sa2)
|
||||
{
|
||||
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
|
||||
|
||||
GPU_line_width(1);
|
||||
|
||||
/* blended join arrow */
|
||||
int dir = area_getorientation(sa1, sa2);
|
||||
int dira = -1;
|
||||
if (dir != -1) {
|
||||
switch (dir) {
|
||||
case 0: /* W */
|
||||
dir = 'r';
|
||||
dira = 'l';
|
||||
break;
|
||||
case 1: /* N */
|
||||
dir = 'd';
|
||||
dira = 'u';
|
||||
break;
|
||||
case 2: /* E */
|
||||
dir = 'l';
|
||||
dira = 'r';
|
||||
break;
|
||||
case 3: /* S */
|
||||
dir = 'u';
|
||||
dira = 'd';
|
||||
break;
|
||||
if (dir == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Rect of the combined areas.*/
|
||||
bool vertical = ELEM(dir, 1, 3);
|
||||
rctf combined = {.xmin = vertical ? MAX2(sa1->totrct.xmin, sa2->totrct.xmin) :
|
||||
MIN2(sa1->totrct.xmin, sa2->totrct.xmin),
|
||||
.xmax = vertical ? MIN2(sa1->totrct.xmax, sa2->totrct.xmax) :
|
||||
MAX2(sa1->totrct.xmax, sa2->totrct.xmax),
|
||||
.ymin = vertical ? MIN2(sa1->totrct.ymin, sa2->totrct.ymin) :
|
||||
MAX2(sa1->totrct.ymin, sa2->totrct.ymin),
|
||||
.ymax = vertical ? MAX2(sa1->totrct.ymax, sa2->totrct.ymax) :
|
||||
MIN2(sa1->totrct.ymax, sa2->totrct.ymax)};
|
||||
|
||||
uint pos_id = GPU_vertformat_attr_add(
|
||||
immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
|
||||
/* Highlight source (sa1) within combined area. */
|
||||
immUniformColor4fv((const float[4]){1.0f, 1.0f, 1.0f, 0.10f});
|
||||
immRectf(pos_id,
|
||||
MAX2(sa1->totrct.xmin, combined.xmin),
|
||||
MAX2(sa1->totrct.ymin, combined.ymin),
|
||||
MIN2(sa1->totrct.xmax, combined.xmax),
|
||||
MIN2(sa1->totrct.ymax, combined.ymax));
|
||||
|
||||
/* Highlight destination (sa2) within combined area. */
|
||||
immUniformColor4fv((const float[4]){0.0f, 0.0f, 0.0f, 0.25f});
|
||||
immRectf(pos_id,
|
||||
MAX2(sa2->totrct.xmin, combined.xmin),
|
||||
MAX2(sa2->totrct.ymin, combined.ymin),
|
||||
MIN2(sa2->totrct.xmax, combined.xmax),
|
||||
MIN2(sa2->totrct.ymax, combined.ymax));
|
||||
|
||||
int offset1;
|
||||
int offset2;
|
||||
area_getoffsets(sa1, sa2, dir, &offset1, &offset2);
|
||||
if (offset1 < 0 || offset2 > 0) {
|
||||
/* Show partial areas that will be closed. */
|
||||
immUniformColor4fv((const float[4]){0.0f, 0.0f, 0.0f, 0.8f});
|
||||
if (vertical) {
|
||||
if (sa1->totrct.xmin < combined.xmin) {
|
||||
immRectf(pos_id, sa1->totrct.xmin, sa1->totrct.ymin, combined.xmin, sa1->totrct.ymax);
|
||||
}
|
||||
if (sa2->totrct.xmin < combined.xmin) {
|
||||
immRectf(pos_id, sa2->totrct.xmin, sa2->totrct.ymin, combined.xmin, sa2->totrct.ymax);
|
||||
}
|
||||
if (sa1->totrct.xmax > combined.xmax) {
|
||||
immRectf(pos_id, combined.xmax, sa1->totrct.ymin, sa1->totrct.xmax, sa1->totrct.ymax);
|
||||
}
|
||||
if (sa2->totrct.xmax > combined.xmax) {
|
||||
immRectf(pos_id, combined.xmax, sa2->totrct.ymin, sa2->totrct.xmax, sa2->totrct.ymax);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (sa1->totrct.ymin < combined.ymin) {
|
||||
immRectf(pos_id, sa1->totrct.xmin, combined.ymin, sa1->totrct.xmax, sa1->totrct.ymin);
|
||||
}
|
||||
if (sa2->totrct.ymin < combined.ymin) {
|
||||
immRectf(pos_id, sa2->totrct.xmin, combined.ymin, sa2->totrct.xmax, sa2->totrct.ymin);
|
||||
}
|
||||
if (sa1->totrct.ymax > combined.ymax) {
|
||||
immRectf(pos_id, sa1->totrct.xmin, sa1->totrct.ymax, sa1->totrct.xmax, combined.ymax);
|
||||
}
|
||||
if (sa2->totrct.ymax > combined.ymax) {
|
||||
immRectf(pos_id, sa2->totrct.xmin, sa2->totrct.ymax, sa2->totrct.xmax, combined.ymax);
|
||||
}
|
||||
}
|
||||
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
|
||||
scrarea_draw_shape_dark(sa2, dir, pos);
|
||||
scrarea_draw_shape_light(sa1, dira, pos);
|
||||
|
||||
GPU_blend(GPU_BLEND_NONE);
|
||||
}
|
||||
|
||||
immUnbindProgram();
|
||||
GPU_blend(GPU_BLEND_NONE);
|
||||
|
||||
/* Outline the combined area. */
|
||||
UI_draw_roundbox_corner_set(UI_CNR_ALL);
|
||||
UI_draw_roundbox_4fv(&combined, false, 7 * U.pixelsize, (float[4]){1.0f, 1.0f, 1.0f, 0.8f});
|
||||
}
|
||||
|
||||
void ED_screen_draw_split_preview(ScrArea *area, const int dir, const float fac)
|
||||
|
|
|
@ -279,47 +279,44 @@ void screen_new_activate_prepare(const wmWindow *win, bScreen *screen_new)
|
|||
screen_new->do_draw = true;
|
||||
}
|
||||
|
||||
/* with area as center, sb is located at: 0=W, 1=N, 2=E, 3=S */
|
||||
/* -1 = not valid check */
|
||||
/* used with join operator */
|
||||
int area_getorientation(ScrArea *area, ScrArea *sb)
|
||||
/**
|
||||
* with `sa_a` as center, `sa_b` is located at: 0=W, 1=N, 2=E, 3=S
|
||||
* -1 = not valid check.
|
||||
* used with join operator.
|
||||
*/
|
||||
int area_getorientation(ScrArea *sa_a, ScrArea *sa_b)
|
||||
{
|
||||
if (area == NULL || sb == NULL) {
|
||||
if (sa_a == NULL || sa_b == NULL || sa_a == sa_b) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
ScrVert *saBL = area->v1;
|
||||
ScrVert *saTL = area->v2;
|
||||
ScrVert *saTR = area->v3;
|
||||
ScrVert *saBR = area->v4;
|
||||
const vec2s *sa_bl = &sa_a->v1->vec;
|
||||
const vec2s *sa_tl = &sa_a->v2->vec;
|
||||
const vec2s *sa_tr = &sa_a->v3->vec;
|
||||
const vec2s *sa_br = &sa_a->v4->vec;
|
||||
|
||||
ScrVert *sbBL = sb->v1;
|
||||
ScrVert *sbTL = sb->v2;
|
||||
ScrVert *sbTR = sb->v3;
|
||||
ScrVert *sbBR = sb->v4;
|
||||
const vec2s *sb_bl = &sa_b->v1->vec;
|
||||
const vec2s *sb_tl = &sa_b->v2->vec;
|
||||
const vec2s *sb_tr = &sa_b->v3->vec;
|
||||
const vec2s *sb_br = &sa_b->v4->vec;
|
||||
|
||||
if (saBL->vec.x == sbBR->vec.x && saTL->vec.x == sbTR->vec.x) { /* area to right of sb = W */
|
||||
if ((abs(saBL->vec.y - sbBR->vec.y) <= AREAJOINTOLERANCE) &&
|
||||
(abs(saTL->vec.y - sbTR->vec.y) <= AREAJOINTOLERANCE)) {
|
||||
if (sa_bl->x == sb_br->x && sa_tl->x == sb_tr->x) { /* sa_a to right of sa_b = W */
|
||||
if ((MIN2(sa_tl->y, sb_tr->y) - MAX2(sa_bl->y, sb_br->y)) > AREAJOINTOLERANCEY) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else if (saTL->vec.y == sbBL->vec.y &&
|
||||
saTR->vec.y == sbBR->vec.y) { /* area to bottom of sb = N */
|
||||
if ((abs(saTL->vec.x - sbBL->vec.x) <= AREAJOINTOLERANCE) &&
|
||||
(abs(saTR->vec.x - sbBR->vec.x) <= AREAJOINTOLERANCE)) {
|
||||
else if (sa_tl->y == sb_bl->y && sa_tr->y == sb_br->y) { /* sa_a to bottom of sa_b = N */
|
||||
if ((MIN2(sa_tr->x, sb_br->x) - MAX2(sa_tl->x, sb_bl->x)) > AREAJOINTOLERANCEX) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (saTR->vec.x == sbTL->vec.x && saBR->vec.x == sbBL->vec.x) { /* area to left of sb = E */
|
||||
if ((abs(saTR->vec.y - sbTL->vec.y) <= AREAJOINTOLERANCE) &&
|
||||
(abs(saBR->vec.y - sbBL->vec.y) <= AREAJOINTOLERANCE)) {
|
||||
else if (sa_tr->x == sb_tl->x && sa_br->x == sb_bl->x) { /* sa_a to left of sa_b = E */
|
||||
if ((MIN2(sa_tr->y, sb_tl->y) - MAX2(sa_br->y, sb_bl->y)) > AREAJOINTOLERANCEY) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
else if (saBL->vec.y == sbTL->vec.y && saBR->vec.y == sbTR->vec.y) { /* area on top of sb = S*/
|
||||
if ((abs(saBL->vec.x - sbTL->vec.x) <= AREAJOINTOLERANCE) &&
|
||||
(abs(saBR->vec.x - sbTR->vec.x) <= AREAJOINTOLERANCE)) {
|
||||
else if (sa_bl->y == sb_tl->y && sa_br->y == sb_tr->y) { /* sa_a on top of sa_b = S */
|
||||
if ((MIN2(sa_br->x, sb_tr->x) - MAX2(sa_bl->x, sb_tl->x)) > AREAJOINTOLERANCEX) {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
@ -327,6 +324,37 @@ int area_getorientation(ScrArea *area, ScrArea *sb)
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get alignment offset of adjacent areas. 'dir' value is like #area_getorientation().
|
||||
*/
|
||||
void area_getoffsets(ScrArea *sa_a, ScrArea *sa_b, const int dir, int *r_offset1, int *r_offset2)
|
||||
{
|
||||
if (sa_a == NULL || sa_b == NULL) {
|
||||
*r_offset1 = INT_MAX;
|
||||
*r_offset2 = INT_MAX;
|
||||
}
|
||||
else if (dir == 0) { /* West: sa on right and sa_b to the left. */
|
||||
*r_offset1 = sa_b->v3->vec.y - sa_a->v2->vec.y;
|
||||
*r_offset2 = sa_b->v4->vec.y - sa_a->v1->vec.y;
|
||||
}
|
||||
else if (dir == 1) { /* North: sa below and sa_b above. */
|
||||
*r_offset1 = sa_a->v2->vec.x - sa_b->v1->vec.x;
|
||||
*r_offset2 = sa_a->v3->vec.x - sa_b->v4->vec.x;
|
||||
}
|
||||
else if (dir == 2) { /* East: sa on left and sa_b to the right. */
|
||||
*r_offset1 = sa_b->v2->vec.y - sa_a->v3->vec.y;
|
||||
*r_offset2 = sa_b->v1->vec.y - sa_a->v4->vec.y;
|
||||
}
|
||||
else if (dir == 3) { /* South: sa above and sa_b below. */
|
||||
*r_offset1 = sa_a->v1->vec.x - sa_b->v2->vec.x;
|
||||
*r_offset2 = sa_a->v4->vec.x - sa_b->v3->vec.x;
|
||||
}
|
||||
else {
|
||||
*r_offset1 = INT_MAX;
|
||||
*r_offset2 = INT_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
/* Screen verts with horizontal position equal to from_x are moved to to_x. */
|
||||
static void screen_verts_halign(const wmWindow *win,
|
||||
const bScreen *screen,
|
||||
|
@ -390,18 +418,24 @@ static void screen_areas_align(
|
|||
}
|
||||
}
|
||||
|
||||
/* Helper function to join 2 areas, it has a return value, 0=failed 1=success
|
||||
* used by the split, join operators
|
||||
*/
|
||||
int screen_area_join(bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2)
|
||||
/* Simple join of two areas without any splitting. Will return false if not possible. */
|
||||
static bool screen_area_join_aligned(bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2)
|
||||
{
|
||||
int dir = area_getorientation(sa1, sa2);
|
||||
|
||||
if (dir == -1) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Align areas if they are not. Do sanity checking before getting here. */
|
||||
int offset1;
|
||||
int offset2;
|
||||
area_getoffsets(sa1, sa2, dir, &offset1, &offset2);
|
||||
|
||||
int tolerance = ELEM(dir, 0, 2) ? AREAJOINTOLERANCEY : AREAJOINTOLERANCEX;
|
||||
if ((abs(offset1) >= tolerance) || (abs(offset2) >= tolerance)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Align areas if they are not. */
|
||||
screen_areas_align(C, screen, sa1, sa2, dir);
|
||||
|
||||
if (dir == 0) { /* sa1 to right of sa2 = W */
|
||||
|
@ -434,7 +468,107 @@ int screen_area_join(bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2)
|
|||
/* Update preview thumbnail */
|
||||
BKE_icon_changed(screen->id.icon_id);
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Slice off and return new area. "Reverse" gives right/bottom, rather than left/top. */
|
||||
static ScrArea *screen_area_trim(
|
||||
bContext *C, bScreen *screen, ScrArea **area, int size, int dir, bool reverse)
|
||||
{
|
||||
bool vertical = ELEM(dir, 1, 3);
|
||||
if (abs(size) < (vertical ? AREAJOINTOLERANCEX : AREAJOINTOLERANCEY)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Measurement with ScrVerts because winx and winy might not be correct at this time. */
|
||||
float fac = abs(size) / (float)(vertical ? ((*area)->v3->vec.x - (*area)->v1->vec.x) :
|
||||
((*area)->v3->vec.y - (*area)->v1->vec.y));
|
||||
fac = (reverse == vertical) ? 1.0f - fac : fac;
|
||||
ScrArea *newsa = area_split(CTX_wm_window(C), screen, *area, vertical ? 'v' : 'h', fac, 1);
|
||||
|
||||
/* area_split always returns smallest of the two areas, so might have to swap. */
|
||||
if (((fac > 0.5f) == vertical) != reverse) {
|
||||
ScrArea *temp = *area;
|
||||
*area = newsa;
|
||||
newsa = temp;
|
||||
}
|
||||
|
||||
return newsa;
|
||||
}
|
||||
|
||||
/* Join any two neighboring areas. Might create new areas, kept if over min_remainder. */
|
||||
static bool screen_area_join_ex(
|
||||
bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2, bool close_all_remainders)
|
||||
{
|
||||
int dir = area_getorientation(sa1, sa2);
|
||||
if (dir == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int offset1;
|
||||
int offset2;
|
||||
area_getoffsets(sa1, sa2, dir, &offset1, &offset2);
|
||||
|
||||
/* Split Left/Top into new area if overhanging. */
|
||||
ScrArea *side1 = screen_area_trim(C, screen, (offset1 > 0) ? &sa2 : &sa1, offset1, dir, false);
|
||||
|
||||
/* Split Right/Bottom into new area if overhanging. */
|
||||
ScrArea *side2 = screen_area_trim(C, screen, (offset2 > 0) ? &sa1 : &sa2, offset2, dir, true);
|
||||
|
||||
/* The two areas now line up, so join them. */
|
||||
screen_area_join_aligned(C, screen, sa1, sa2);
|
||||
|
||||
if (close_all_remainders || offset1 < 0 || offset2 > 0) {
|
||||
/* Close both if trimming `sa1`. */
|
||||
screen_area_close(C, screen, side1);
|
||||
screen_area_close(C, screen, side2);
|
||||
}
|
||||
|
||||
BKE_icon_changed(screen->id.icon_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Join any two neighboring areas. Might involve complex changes. */
|
||||
int screen_area_join(bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2)
|
||||
{
|
||||
return screen_area_join_ex(C, screen, sa1, sa2, false);
|
||||
}
|
||||
|
||||
/* Close a screen area, allowing any neighbor to take its place. */
|
||||
bool screen_area_close(struct bContext *C, bScreen *screen, ScrArea *area)
|
||||
{
|
||||
if (area == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScrArea *sa2 = NULL;
|
||||
|
||||
/* Find the most-aligned joinable area. Larger size breaks ties. */
|
||||
int min_alignment = INT_MAX;
|
||||
int max_size = 0;
|
||||
LISTBASE_FOREACH (ScrArea *, ar, &screen->areabase) {
|
||||
int dir = area_getorientation(area, ar);
|
||||
if (dir != -1) {
|
||||
int offset1;
|
||||
int offset2;
|
||||
area_getoffsets(area, ar, dir, &offset1, &offset2);
|
||||
int area_alignment = abs(offset1) + abs(offset2);
|
||||
if (area_alignment < min_alignment) {
|
||||
min_alignment = area_alignment;
|
||||
max_size = ar->winx * ar->winy;
|
||||
sa2 = ar;
|
||||
}
|
||||
else if (area_alignment == min_alignment) {
|
||||
int area_size = ar->winx * ar->winy;
|
||||
if (area_size > max_size) {
|
||||
max_size = area_size;
|
||||
sa2 = ar;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return screen_area_join_ex(C, screen, sa2, area, true);
|
||||
}
|
||||
|
||||
/* ****************** EXPORTED API TO OTHER MODULES *************************** */
|
||||
|
|
|
@ -34,7 +34,9 @@ struct bContextDataResult;
|
|||
#define AZONEFADEIN (5.0f * U.widget_unit) /* when #AZone is totally visible */
|
||||
#define AZONEFADEOUT (6.5f * U.widget_unit) /* when we start seeing the #AZone */
|
||||
|
||||
#define AREAJOINTOLERANCE (1.0f * U.widget_unit) /* Edges must be close to allow joining. */
|
||||
/* Edges must be within these to allow joining. */
|
||||
#define AREAJOINTOLERANCEX (AREAMINX * U.dpi_fac)
|
||||
#define AREAJOINTOLERANCEY (HEADERY * U.dpi_fac)
|
||||
|
||||
/* Expanded interaction influence of area borders. */
|
||||
#define BORDERPADDING (U.dpi_fac + U.pixelsize)
|
||||
|
@ -57,8 +59,9 @@ void screen_change_prepare(bScreen *screen_old,
|
|||
ScrArea *area_split(
|
||||
const wmWindow *win, bScreen *screen, ScrArea *area, char dir, float fac, int merge);
|
||||
int screen_area_join(struct bContext *C, bScreen *screen, ScrArea *sa1, ScrArea *sa2);
|
||||
int area_getorientation(ScrArea *area, ScrArea *sb);
|
||||
|
||||
int area_getorientation(ScrArea *sa_a, ScrArea *sa_b);
|
||||
void area_getoffsets(ScrArea *sa_a, ScrArea *sa_b, const int dir, int *r_offset1, int *r_offset2);
|
||||
bool screen_area_close(struct bContext *C, bScreen *screen, ScrArea *area);
|
||||
struct AZone *ED_area_actionzone_find_xy(ScrArea *area, const int xy[2]);
|
||||
|
||||
/* screen_geometry.c */
|
||||
|
|
|
@ -1386,6 +1386,58 @@ static void SCREEN_OT_area_dupli(wmOperatorType *ot)
|
|||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Area Close Operator
|
||||
*
|
||||
* Close selected area, replace by expanding a neighbor
|
||||
* \{ */
|
||||
|
||||
/* operator callback */
|
||||
static int area_close_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))
|
||||
{
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
if ((area != NULL) && screen_area_close(C, CTX_wm_screen(C), area)) {
|
||||
WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL);
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
static bool area_close_poll(bContext *C)
|
||||
{
|
||||
if (!ED_operator_areaactive(C)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
|
||||
if (ED_area_is_global(area)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bScreen *screen = CTX_wm_screen(C);
|
||||
|
||||
/* Can this area join with ANY other area? */
|
||||
LISTBASE_FOREACH (ScrArea *, ar, &screen->areabase) {
|
||||
if (area_getorientation(ar, area) != -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void SCREEN_OT_area_close(wmOperatorType *ot)
|
||||
{
|
||||
ot->name = "Close Area";
|
||||
ot->description = "Close selected area";
|
||||
ot->idname = "SCREEN_OT_area_close";
|
||||
ot->invoke = area_close_invoke;
|
||||
ot->poll = area_close_poll;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Move Area Edge Operator
|
||||
* \{ */
|
||||
|
@ -3210,9 +3262,10 @@ static void SCREEN_OT_screen_full_area(wmOperatorType *ot)
|
|||
*/
|
||||
|
||||
typedef struct sAreaJoinData {
|
||||
ScrArea *sa1; /* first area to be considered */
|
||||
ScrArea *sa2; /* second area to be considered */
|
||||
void *draw_callback; /* call `ED_screen_draw_join_shape` */
|
||||
ScrArea *sa1; /* Potential source area (kept). */
|
||||
ScrArea *sa2; /* Potential target area (removed or reduced). */
|
||||
int dir; /* Direction of potential join. */
|
||||
void *draw_callback; /* call 'ED_screen_draw_join_highlight' */
|
||||
|
||||
} sAreaJoinData;
|
||||
|
||||
|
@ -3221,8 +3274,8 @@ static void area_join_draw_cb(const struct wmWindow *UNUSED(win), void *userdata
|
|||
const wmOperator *op = userdata;
|
||||
|
||||
sAreaJoinData *sd = op->customdata;
|
||||
if (sd->sa1 && sd->sa2) {
|
||||
ED_screen_draw_join_shape(sd->sa1, sd->sa2);
|
||||
if (sd->sa1 && sd->sa2 && (sd->dir != -1)) {
|
||||
ED_screen_draw_join_highlight(sd->sa1, sd->sa2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3244,6 +3297,7 @@ static bool area_join_init(bContext *C, wmOperator *op, ScrArea *sa1, ScrArea *s
|
|||
|
||||
jd->sa1 = sa1;
|
||||
jd->sa2 = sa2;
|
||||
jd->dir = -1;
|
||||
|
||||
op->customdata = jd;
|
||||
|
||||
|
@ -3256,7 +3310,7 @@ static bool area_join_init(bContext *C, wmOperator *op, ScrArea *sa1, ScrArea *s
|
|||
static bool area_join_apply(bContext *C, wmOperator *op)
|
||||
{
|
||||
sAreaJoinData *jd = (sAreaJoinData *)op->customdata;
|
||||
if (!jd) {
|
||||
if (!jd || (jd->dir == -1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3358,61 +3412,30 @@ static int area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
|||
|
||||
case MOUSEMOVE: {
|
||||
ScrArea *area = BKE_screen_find_area_xy(screen, SPACE_TYPE_ANY, event->x, event->y);
|
||||
int dir = -1;
|
||||
jd->dir = area_getorientation(jd->sa1, jd->sa2);
|
||||
|
||||
if (area) {
|
||||
if (jd->sa1 != area) {
|
||||
dir = area_getorientation(jd->sa1, area);
|
||||
if (dir != -1) {
|
||||
jd->sa2 = area;
|
||||
}
|
||||
else {
|
||||
/* we are not bordering on the previously selected area
|
||||
* we check if area has common border with the one marked for removal
|
||||
* in this case we can swap areas.
|
||||
*/
|
||||
dir = area_getorientation(area, jd->sa2);
|
||||
if (dir != -1) {
|
||||
jd->sa1 = jd->sa2;
|
||||
jd->sa2 = area;
|
||||
}
|
||||
else {
|
||||
jd->sa2 = NULL;
|
||||
}
|
||||
}
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
}
|
||||
else {
|
||||
/* we are back in the area previously selected for keeping
|
||||
* we swap the areas if possible to allow user to choose */
|
||||
if (jd->sa2 != NULL) {
|
||||
jd->sa1 = jd->sa2;
|
||||
jd->sa2 = area;
|
||||
dir = area_getorientation(jd->sa1, jd->sa2);
|
||||
if (dir == -1) {
|
||||
printf("oops, didn't expect that!\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
dir = area_getorientation(jd->sa1, area);
|
||||
if (dir != -1) {
|
||||
jd->sa2 = area;
|
||||
}
|
||||
}
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
}
|
||||
if (area == jd->sa1) {
|
||||
/* Hovering current source, so change direction. */
|
||||
jd->sa1 = jd->sa2;
|
||||
jd->sa2 = area;
|
||||
jd->dir = area_getorientation(jd->sa1, jd->sa2);
|
||||
}
|
||||
else if (area != jd->sa2) {
|
||||
jd->dir = -1;
|
||||
}
|
||||
|
||||
if (dir == 1) {
|
||||
WM_event_add_notifier(C, NC_WINDOW, NULL);
|
||||
|
||||
if (jd->dir == 1) {
|
||||
WM_cursor_set(win, WM_CURSOR_N_ARROW);
|
||||
}
|
||||
else if (dir == 3) {
|
||||
else if (jd->dir == 3) {
|
||||
WM_cursor_set(win, WM_CURSOR_S_ARROW);
|
||||
}
|
||||
else if (dir == 2) {
|
||||
else if (jd->dir == 2) {
|
||||
WM_cursor_set(win, WM_CURSOR_E_ARROW);
|
||||
}
|
||||
else if (dir == 0) {
|
||||
else if (jd->dir == 0) {
|
||||
WM_cursor_set(win, WM_CURSOR_W_ARROW);
|
||||
}
|
||||
else {
|
||||
|
@ -3423,6 +3446,10 @@ static int area_join_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
|||
}
|
||||
case LEFTMOUSE:
|
||||
if (event->val == KM_RELEASE) {
|
||||
if (jd->dir == -1) {
|
||||
area_join_cancel(C, op);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
ED_area_tag_redraw(jd->sa1);
|
||||
ED_area_tag_redraw(jd->sa2);
|
||||
|
||||
|
@ -4069,6 +4096,69 @@ static void SCREEN_OT_header_toggle_menus(wmOperatorType *ot)
|
|||
/** \name Region Context Menu Operator (Header/Footer/Navbar)
|
||||
* \{ */
|
||||
|
||||
static void screen_area_menu_items(ScrArea *area, uiLayout *layout)
|
||||
{
|
||||
if (ED_area_is_global(area)) {
|
||||
return;
|
||||
}
|
||||
|
||||
PointerRNA ptr;
|
||||
|
||||
/* Mouse position as if in middle of area. */
|
||||
const int loc[2] = {BLI_rcti_cent_x(&area->totrct), BLI_rcti_cent_y(&area->totrct)};
|
||||
|
||||
/* Vertical Split */
|
||||
uiItemFullO(layout,
|
||||
"SCREEN_OT_area_split",
|
||||
IFACE_("Vertical Split"),
|
||||
ICON_NONE,
|
||||
NULL,
|
||||
WM_OP_INVOKE_DEFAULT,
|
||||
0,
|
||||
&ptr);
|
||||
|
||||
RNA_int_set_array(&ptr, "cursor", loc);
|
||||
RNA_enum_set(&ptr, "direction", 'v');
|
||||
|
||||
/* Horizontal Split */
|
||||
uiItemFullO(layout,
|
||||
"SCREEN_OT_area_split",
|
||||
IFACE_("Horizontal Split"),
|
||||
ICON_NONE,
|
||||
NULL,
|
||||
WM_OP_INVOKE_DEFAULT,
|
||||
0,
|
||||
&ptr);
|
||||
|
||||
RNA_int_set_array(&ptr, "cursor", &loc[0]);
|
||||
RNA_enum_set(&ptr, "direction", 'h');
|
||||
|
||||
uiItemS(layout);
|
||||
|
||||
if (area->spacetype != SPACE_FILE) {
|
||||
uiItemO(layout,
|
||||
area->full ? IFACE_("Restore Areas") : IFACE_("Maximize Area"),
|
||||
ICON_NONE,
|
||||
"SCREEN_OT_screen_full_area");
|
||||
|
||||
if (!area->full) {
|
||||
uiItemFullO(layout,
|
||||
"SCREEN_OT_screen_full_area",
|
||||
IFACE_("Full Screen Area"),
|
||||
ICON_NONE,
|
||||
NULL,
|
||||
WM_OP_INVOKE_DEFAULT,
|
||||
0,
|
||||
&ptr);
|
||||
RNA_boolean_set(&ptr, "use_hide_panels", true);
|
||||
}
|
||||
}
|
||||
|
||||
uiItemO(layout, NULL, ICON_NONE, "SCREEN_OT_area_dupli");
|
||||
uiItemS(layout);
|
||||
uiItemO(layout, NULL, ICON_NONE, "SCREEN_OT_area_close");
|
||||
}
|
||||
|
||||
void ED_screens_header_tools_menu_create(bContext *C, uiLayout *layout, void *UNUSED(arg))
|
||||
{
|
||||
ScrArea *area = CTX_wm_area(C);
|
||||
|
@ -4102,17 +4192,9 @@ void ED_screens_header_tools_menu_create(bContext *C, uiLayout *layout, void *UN
|
|||
|
||||
if (!ELEM(area->spacetype, SPACE_TOPBAR)) {
|
||||
uiItemS(layout);
|
||||
|
||||
uiItemO(layout, but_flip_str, ICON_NONE, "SCREEN_OT_region_flip");
|
||||
}
|
||||
|
||||
/* File browser should be fullscreen all the time, top-bar should
|
||||
* never be. But other regions can be maximized/restored. */
|
||||
if (!ELEM(area->spacetype, SPACE_FILE, SPACE_TOPBAR)) {
|
||||
uiItemS(layout);
|
||||
|
||||
const char *but_str = area->full ? IFACE_("Tile Area") : IFACE_("Maximize Area");
|
||||
uiItemO(layout, but_str, ICON_NONE, "SCREEN_OT_screen_full_area");
|
||||
screen_area_menu_items(area, layout);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4134,14 +4216,8 @@ void ED_screens_footer_tools_menu_create(bContext *C, uiLayout *layout, void *UN
|
|||
|
||||
uiItemO(layout, but_flip_str, ICON_NONE, "SCREEN_OT_region_flip");
|
||||
|
||||
/* File browser should be fullscreen all the time, top-bar should
|
||||
* never be. But other regions can be maximized/restored... */
|
||||
if (!ELEM(area->spacetype, SPACE_FILE, SPACE_TOPBAR)) {
|
||||
uiItemS(layout);
|
||||
|
||||
const char *but_str = area->full ? IFACE_("Tile Area") : IFACE_("Maximize Area");
|
||||
uiItemO(layout, but_str, ICON_NONE, "SCREEN_OT_screen_full_area");
|
||||
}
|
||||
uiItemS(layout);
|
||||
screen_area_menu_items(area, layout);
|
||||
}
|
||||
|
||||
void ED_screens_navigation_bar_tools_menu_create(bContext *C, uiLayout *layout, void *UNUSED(arg))
|
||||
|
@ -5461,6 +5537,7 @@ void ED_operatortypes_screen(void)
|
|||
WM_operatortype_append(SCREEN_OT_area_move);
|
||||
WM_operatortype_append(SCREEN_OT_area_split);
|
||||
WM_operatortype_append(SCREEN_OT_area_join);
|
||||
WM_operatortype_append(SCREEN_OT_area_close);
|
||||
WM_operatortype_append(SCREEN_OT_area_options);
|
||||
WM_operatortype_append(SCREEN_OT_area_dupli);
|
||||
WM_operatortype_append(SCREEN_OT_area_swap);
|
||||
|
|
|
@ -981,17 +981,6 @@ int /*eContextResult*/ buttons_context(const bContext *C,
|
|||
|
||||
return CTX_RESULT_OK;
|
||||
}
|
||||
if (CTX_data_equals(member, "modifier")) {
|
||||
PointerRNA *ptr = get_pointer_type(path, &RNA_Modifier);
|
||||
|
||||
if (ptr != NULL && !RNA_pointer_is_null(ptr)) {
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
ModifierData *md = ptr->data;
|
||||
CTX_data_pointer_set(result, &ob->id, &RNA_Modifier, md);
|
||||
return CTX_RESULT_OK;
|
||||
}
|
||||
return CTX_RESULT_NO_DATA;
|
||||
}
|
||||
if (CTX_data_equals(member, "texture_user")) {
|
||||
ButsContextTexture *ct = sbuts->texuser;
|
||||
|
||||
|
|
|
@ -697,7 +697,8 @@ void ED_info_draw_stats(
|
|||
|
||||
UI_FontThemeColor(font_id, TH_TEXT_HI);
|
||||
BLF_enable(font_id, BLF_SHADOW);
|
||||
BLF_shadow(font_id, 5, (const float[4]){0.0f, 0.0f, 0.0f, 1.0f});
|
||||
const float shadow_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
BLF_shadow(font_id, 5, shadow_color);
|
||||
BLF_shadow_offset(font_id, 1, -1);
|
||||
|
||||
/* Translated labels for each stat row. */
|
||||
|
|
|
@ -255,11 +255,10 @@ static void info_header_region_message_subscribe(const wmRegionMessageSubscribeP
|
|||
struct wmMsgBus *mbus = params->message_bus;
|
||||
ARegion *region = params->region;
|
||||
|
||||
wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
|
||||
.owner = region,
|
||||
.user_data = region,
|
||||
.notify = ED_region_do_msg_notify_tag_redraw,
|
||||
};
|
||||
wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {NULL};
|
||||
msg_sub_value_region_tag_redraw.owner = region;
|
||||
msg_sub_value_region_tag_redraw.user_data = region;
|
||||
msg_sub_value_region_tag_redraw.notify = ED_region_do_msg_notify_tag_redraw;
|
||||
|
||||
WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
|
||||
WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw);
|
||||
|
|
|
@ -1136,8 +1136,8 @@ static bool cursor_isect_multi_input_socket(const float cursor[2], const bNodeSo
|
|||
* But keep it smaller because for multi-input socket you
|
||||
* sometimes want to drag the link to the other side, if you may
|
||||
* accidentally pick the wrong link otherwise. */
|
||||
.ymin = socket->locy - node_socket_height * 0.5 - NODE_SOCKSIZE,
|
||||
.ymax = socket->locy + node_socket_height * 0.5 + NODE_SOCKSIZE,
|
||||
.ymin = socket->locy - node_socket_height,
|
||||
.ymax = socket->locy + node_socket_height,
|
||||
};
|
||||
if (BLI_rctf_isect_pt(&multi_socket_rect, cursor[0], cursor[1])) {
|
||||
return true;
|
||||
|
|
|
@ -155,6 +155,8 @@ static void outliner_main_region_listener(const wmRegionListenerParams *params)
|
|||
case NC_OBJECT:
|
||||
switch (wmn->data) {
|
||||
case ND_TRANSFORM:
|
||||
ED_region_tag_redraw_no_rebuild(region);
|
||||
break;
|
||||
case ND_BONE_ACTIVE:
|
||||
case ND_BONE_SELECT:
|
||||
case ND_DRAW:
|
||||
|
|
|
@ -2274,43 +2274,45 @@ void SEQUENCER_OT_swap(wmOperatorType *ot)
|
|||
|
||||
static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
int retval = OPERATOR_CANCELLED;
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
Sequence *active_seq = SEQ_select_active_get(scene);
|
||||
StripElem *se = NULL;
|
||||
|
||||
if (active_seq == NULL) {
|
||||
if (active_seq == NULL || active_seq->strip == NULL) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (active_seq->strip) {
|
||||
switch (active_seq->type) {
|
||||
case SEQ_TYPE_IMAGE:
|
||||
se = SEQ_render_give_stripelem(active_seq, scene->r.cfra);
|
||||
break;
|
||||
case SEQ_TYPE_MOVIE:
|
||||
se = active_seq->strip->stripdata;
|
||||
break;
|
||||
case SEQ_TYPE_SCENE:
|
||||
case SEQ_TYPE_META:
|
||||
case SEQ_TYPE_SOUND_RAM:
|
||||
case SEQ_TYPE_SOUND_HD:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (active_seq->type) {
|
||||
case SEQ_TYPE_IMAGE:
|
||||
se = SEQ_render_give_stripelem(active_seq, scene->r.cfra);
|
||||
break;
|
||||
case SEQ_TYPE_MOVIE:
|
||||
se = active_seq->strip->stripdata;
|
||||
break;
|
||||
default:
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (se) {
|
||||
/* Prevent setting the render size if sequence values aren't initialized. */
|
||||
if ((se->orig_width > 0) && (se->orig_height > 0)) {
|
||||
scene->r.xsch = se->orig_width;
|
||||
scene->r.ysch = se->orig_height;
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
retval = OPERATOR_FINISHED;
|
||||
}
|
||||
if (se == NULL) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
return retval;
|
||||
/* Prevent setting the render size if sequence values aren't initialized. */
|
||||
if (se->orig_width <= 0 || se->orig_height <= 0) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
scene->r.xsch = se->orig_width;
|
||||
scene->r.ysch = se->orig_height;
|
||||
|
||||
active_seq->strip->transform->scale_x = active_seq->strip->transform->scale_y = 1.0f;
|
||||
active_seq->strip->transform->xofs = active_seq->strip->transform->yofs = 0.0f;
|
||||
|
||||
SEQ_relations_invalidate_cache_preprocessed(scene, active_seq);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene);
|
||||
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
void SEQUENCER_OT_rendersize(wmOperatorType *ot)
|
||||
|
|
|
@ -304,7 +304,12 @@ static void update_visible_columns(ListBase &columns, DataSource &data_source)
|
|||
continue;
|
||||
}
|
||||
|
||||
used_ids.add(*column->id);
|
||||
if (!used_ids.add(*column->id)) {
|
||||
/* Remove duplicate columns for now. */
|
||||
BLI_remlink(&columns, column);
|
||||
spreadsheet_column_free(column);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
data_source.foreach_default_column_ids([&](const SpreadsheetColumnID &column_id) {
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
|
||||
#include <optional>
|
||||
|
||||
#include "BLI_color.hh"
|
||||
#include "BLI_float2.hh"
|
||||
#include "BLI_float3.hh"
|
||||
|
||||
struct Object;
|
||||
struct Collection;
|
||||
|
||||
|
@ -44,6 +48,9 @@ class CellValue {
|
|||
std::optional<int> value_int;
|
||||
std::optional<float> value_float;
|
||||
std::optional<bool> value_bool;
|
||||
std::optional<float2> value_float2;
|
||||
std::optional<float3> value_float3;
|
||||
std::optional<Color4f> value_color;
|
||||
std::optional<ObjectCellValue> value_object;
|
||||
std::optional<CollectionCellValue> value_collection;
|
||||
};
|
||||
|
|
|
@ -37,7 +37,6 @@ SpreadsheetColumnID *spreadsheet_column_id_copy(const SpreadsheetColumnID *src_c
|
|||
{
|
||||
SpreadsheetColumnID *new_column_id = spreadsheet_column_id_new();
|
||||
new_column_id->name = BLI_strdup(src_column_id->name);
|
||||
new_column_id->index = src_column_id->index;
|
||||
return new_column_id;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace blender {
|
|||
template<> struct DefaultHash<SpreadsheetColumnID> {
|
||||
uint64_t operator()(const SpreadsheetColumnID &column_id) const
|
||||
{
|
||||
return get_default_hash_2(StringRef(column_id.name), column_id.index);
|
||||
return get_default_hash(StringRef(column_id.name));
|
||||
}
|
||||
};
|
||||
} // namespace blender
|
||||
|
@ -32,7 +32,7 @@ template<> struct DefaultHash<SpreadsheetColumnID> {
|
|||
inline bool operator==(const SpreadsheetColumnID &a, const SpreadsheetColumnID &b)
|
||||
{
|
||||
using blender::StringRef;
|
||||
return StringRef(a.name) == StringRef(b.name) && a.index == b.index;
|
||||
return StringRef(a.name) == StringRef(b.name);
|
||||
}
|
||||
|
||||
namespace blender::ed::spreadsheet {
|
||||
|
|
|
@ -74,11 +74,19 @@ template<typename GetValueF> class LambdaColumnValues : public ColumnValues {
|
|||
/* Utility function that simplifies creating a spreadsheet column from a lambda function. */
|
||||
template<typename GetValueF>
|
||||
std::unique_ptr<ColumnValues> column_values_from_function(std::string name,
|
||||
int size,
|
||||
GetValueF get_value)
|
||||
const int size,
|
||||
GetValueF get_value,
|
||||
const float default_width = 0.0f)
|
||||
{
|
||||
return std::make_unique<LambdaColumnValues<GetValueF>>(
|
||||
std::unique_ptr<ColumnValues> column_values = std::make_unique<LambdaColumnValues<GetValueF>>(
|
||||
std::move(name), size, std::move(get_value));
|
||||
column_values->default_width = default_width;
|
||||
return column_values;
|
||||
}
|
||||
|
||||
static constexpr float default_float_column_width = 3;
|
||||
static constexpr float default_float2_column_width = 2 * default_float_column_width;
|
||||
static constexpr float default_float3_column_width = 3 * default_float_column_width;
|
||||
static constexpr float default_color_column_width = 4 * default_float_column_width;
|
||||
|
||||
} // namespace blender::ed::spreadsheet
|
||||
|
|
|
@ -47,28 +47,7 @@ void GeometryDataSource::foreach_default_column_ids(
|
|||
}
|
||||
SpreadsheetColumnID column_id;
|
||||
column_id.name = (char *)name.c_str();
|
||||
if (meta_data.data_type == CD_PROP_FLOAT3) {
|
||||
for (const int i : {0, 1, 2}) {
|
||||
column_id.index = i;
|
||||
fn(column_id);
|
||||
}
|
||||
}
|
||||
else if (meta_data.data_type == CD_PROP_FLOAT2) {
|
||||
for (const int i : {0, 1}) {
|
||||
column_id.index = i;
|
||||
fn(column_id);
|
||||
}
|
||||
}
|
||||
else if (meta_data.data_type == CD_PROP_COLOR) {
|
||||
for (const int i : {0, 1, 2, 3}) {
|
||||
column_id.index = i;
|
||||
fn(column_id);
|
||||
}
|
||||
}
|
||||
else {
|
||||
column_id.index = -1;
|
||||
fn(column_id);
|
||||
}
|
||||
fn(column_id);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
@ -90,9 +69,6 @@ std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values(
|
|||
const CustomDataType type = bke::cpp_type_to_custom_data_type(varray->type());
|
||||
switch (type) {
|
||||
case CD_PROP_FLOAT:
|
||||
if (column_id.index != -1) {
|
||||
return {};
|
||||
}
|
||||
return column_values_from_function(
|
||||
column_id.name, domain_size, [varray](int index, CellValue &r_cell_value) {
|
||||
float value;
|
||||
|
@ -100,9 +76,6 @@ std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values(
|
|||
r_cell_value.value_float = value;
|
||||
});
|
||||
case CD_PROP_INT32:
|
||||
if (column_id.index != -1) {
|
||||
return {};
|
||||
}
|
||||
return column_values_from_function(
|
||||
column_id.name, domain_size, [varray](int index, CellValue &r_cell_value) {
|
||||
int value;
|
||||
|
@ -110,9 +83,6 @@ std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values(
|
|||
r_cell_value.value_int = value;
|
||||
});
|
||||
case CD_PROP_BOOL:
|
||||
if (column_id.index != -1) {
|
||||
return {};
|
||||
}
|
||||
return column_values_from_function(
|
||||
column_id.name, domain_size, [varray](int index, CellValue &r_cell_value) {
|
||||
bool value;
|
||||
|
@ -120,43 +90,37 @@ std::unique_ptr<ColumnValues> GeometryDataSource::get_column_values(
|
|||
r_cell_value.value_bool = value;
|
||||
});
|
||||
case CD_PROP_FLOAT2: {
|
||||
if (column_id.index < 0 || column_id.index > 1) {
|
||||
return {};
|
||||
}
|
||||
const std::array<const char *, 2> suffixes = {" X", " Y"};
|
||||
const std::string name = StringRef(column_id.name) + suffixes[column_id.index];
|
||||
return column_values_from_function(
|
||||
name, domain_size, [varray, axis = column_id.index](int index, CellValue &r_cell_value) {
|
||||
column_id.name,
|
||||
domain_size,
|
||||
[varray](int index, CellValue &r_cell_value) {
|
||||
float2 value;
|
||||
varray->get(index, &value);
|
||||
r_cell_value.value_float = value[axis];
|
||||
});
|
||||
r_cell_value.value_float2 = value;
|
||||
},
|
||||
default_float2_column_width);
|
||||
}
|
||||
case CD_PROP_FLOAT3: {
|
||||
if (column_id.index < 0 || column_id.index > 2) {
|
||||
return {};
|
||||
}
|
||||
const std::array<const char *, 3> suffixes = {" X", " Y", " Z"};
|
||||
const std::string name = StringRef(column_id.name) + suffixes[column_id.index];
|
||||
return column_values_from_function(
|
||||
name, domain_size, [varray, axis = column_id.index](int index, CellValue &r_cell_value) {
|
||||
column_id.name,
|
||||
domain_size,
|
||||
[varray](int index, CellValue &r_cell_value) {
|
||||
float3 value;
|
||||
varray->get(index, &value);
|
||||
r_cell_value.value_float = value[axis];
|
||||
});
|
||||
r_cell_value.value_float3 = value;
|
||||
},
|
||||
default_float3_column_width);
|
||||
}
|
||||
case CD_PROP_COLOR: {
|
||||
if (column_id.index < 0 || column_id.index > 3) {
|
||||
return {};
|
||||
}
|
||||
const std::array<const char *, 4> suffixes = {" R", " G", " B", " A"};
|
||||
const std::string name = StringRef(column_id.name) + suffixes[column_id.index];
|
||||
return column_values_from_function(
|
||||
name, domain_size, [varray, axis = column_id.index](int index, CellValue &r_cell_value) {
|
||||
column_id.name,
|
||||
domain_size,
|
||||
[varray](int index, CellValue &r_cell_value) {
|
||||
Color4f value;
|
||||
varray->get(index, &value);
|
||||
r_cell_value.value_float = value[axis];
|
||||
});
|
||||
r_cell_value.value_color = value;
|
||||
},
|
||||
default_color_column_width);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
@ -295,15 +259,11 @@ void InstancesDataSource::foreach_default_column_ids(
|
|||
}
|
||||
|
||||
SpreadsheetColumnID column_id;
|
||||
column_id.index = -1;
|
||||
column_id.name = (char *)"Name";
|
||||
fn(column_id);
|
||||
for (const char *name : {"Position", "Rotation", "Scale"}) {
|
||||
for (const int i : {0, 1, 2}) {
|
||||
column_id.name = (char *)name;
|
||||
column_id.index = i;
|
||||
fn(column_id);
|
||||
}
|
||||
column_id.name = (char *)name;
|
||||
fn(column_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -314,7 +274,6 @@ std::unique_ptr<ColumnValues> InstancesDataSource::get_column_values(
|
|||
return {};
|
||||
}
|
||||
|
||||
const std::array<const char *, 3> suffixes = {" X", " Y", " Z"};
|
||||
const int size = this->tot_rows();
|
||||
if (STREQ(column_id.name, "Name")) {
|
||||
Span<InstancedData> instance_data = component_->instanced_data();
|
||||
|
@ -335,30 +294,33 @@ std::unique_ptr<ColumnValues> InstancesDataSource::get_column_values(
|
|||
values->default_width = 8.0f;
|
||||
return values;
|
||||
}
|
||||
if (column_id.index < 0 || column_id.index > 2) {
|
||||
return {};
|
||||
}
|
||||
Span<float4x4> transforms = component_->transforms();
|
||||
if (STREQ(column_id.name, "Position")) {
|
||||
std::string name = StringRef("Position") + suffixes[column_id.index];
|
||||
return column_values_from_function(
|
||||
name, size, [transforms, axis = column_id.index](int index, CellValue &r_cell_value) {
|
||||
r_cell_value.value_float = transforms[index].translation()[axis];
|
||||
});
|
||||
column_id.name,
|
||||
size,
|
||||
[transforms](int index, CellValue &r_cell_value) {
|
||||
r_cell_value.value_float3 = transforms[index].translation();
|
||||
},
|
||||
default_float3_column_width);
|
||||
}
|
||||
if (STREQ(column_id.name, "Rotation")) {
|
||||
std::string name = StringRef("Rotation") + suffixes[column_id.index];
|
||||
return column_values_from_function(
|
||||
name, size, [transforms, axis = column_id.index](int index, CellValue &r_cell_value) {
|
||||
r_cell_value.value_float = transforms[index].to_euler()[axis];
|
||||
});
|
||||
column_id.name,
|
||||
size,
|
||||
[transforms](int index, CellValue &r_cell_value) {
|
||||
r_cell_value.value_float3 = transforms[index].to_euler();
|
||||
},
|
||||
default_float3_column_width);
|
||||
}
|
||||
if (STREQ(column_id.name, "Scale")) {
|
||||
std::string name = StringRef("Scale") + suffixes[column_id.index];
|
||||
return column_values_from_function(
|
||||
name, size, [transforms, axis = column_id.index](int index, CellValue &r_cell_value) {
|
||||
r_cell_value.value_float = transforms[index].scale()[axis];
|
||||
});
|
||||
column_id.name,
|
||||
size,
|
||||
[transforms](int index, CellValue &r_cell_value) {
|
||||
r_cell_value.value_float3 = transforms[index].scale();
|
||||
},
|
||||
default_float3_column_width);
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
|
|
@ -161,6 +161,18 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
|||
nullptr);
|
||||
UI_but_drawflag_disable(but, UI_BUT_ICON_LEFT);
|
||||
}
|
||||
else if (cell_value.value_float2.has_value()) {
|
||||
const float2 value = *cell_value.value_float2;
|
||||
this->draw_float_vector(params, Span(&value.x, 2));
|
||||
}
|
||||
else if (cell_value.value_float3.has_value()) {
|
||||
const float3 value = *cell_value.value_float3;
|
||||
this->draw_float_vector(params, Span(&value.x, 3));
|
||||
}
|
||||
else if (cell_value.value_color.has_value()) {
|
||||
const Color4f value = *cell_value.value_color;
|
||||
this->draw_float_vector(params, Span(&value.r, 4));
|
||||
}
|
||||
else if (cell_value.value_object.has_value()) {
|
||||
const ObjectCellValue value = *cell_value.value_object;
|
||||
uiDefIconTextBut(params.block,
|
||||
|
@ -199,6 +211,36 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer {
|
|||
}
|
||||
}
|
||||
|
||||
void draw_float_vector(const CellDrawParams ¶ms, const Span<float> values) const
|
||||
{
|
||||
BLI_assert(!values.is_empty());
|
||||
const float segment_width = (float)params.width / values.size();
|
||||
for (const int i : values.index_range()) {
|
||||
std::stringstream ss;
|
||||
const float value = values[i];
|
||||
ss << std::fixed << std::setprecision(3) << value;
|
||||
const std::string value_str = ss.str();
|
||||
uiBut *but = uiDefIconTextBut(params.block,
|
||||
UI_BTYPE_LABEL,
|
||||
0,
|
||||
ICON_NONE,
|
||||
value_str.c_str(),
|
||||
params.xmin + i * segment_width,
|
||||
params.ymin,
|
||||
segment_width,
|
||||
params.height,
|
||||
nullptr,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
nullptr);
|
||||
/* Right-align Floats. */
|
||||
UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
|
||||
UI_but_drawflag_enable(but, UI_BUT_TEXT_RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
int column_width(int column_index) const final
|
||||
{
|
||||
return spreadsheet_layout_.columns[column_index].width;
|
||||
|
|
|
@ -88,12 +88,11 @@ typedef enum {
|
|||
CTX_TEXTURE_SPACE = (1 << 9),
|
||||
|
||||
CTX_NO_PET = (1 << 10),
|
||||
CTX_NO_MIRROR = (1 << 11),
|
||||
CTX_AUTOCONFIRM = (1 << 12),
|
||||
CTX_AUTOCONFIRM = (1 << 11),
|
||||
/** When transforming object's, adjust the object data so it stays in the same place. */
|
||||
CTX_OBMODE_XFORM_OBDATA = (1 << 13),
|
||||
CTX_OBMODE_XFORM_OBDATA = (1 << 12),
|
||||
/** Transform object parents without moving their children. */
|
||||
CTX_OBMODE_XFORM_SKIP_CHILDREN = (1 << 14),
|
||||
CTX_OBMODE_XFORM_SKIP_CHILDREN = (1 << 13),
|
||||
} eTContext;
|
||||
|
||||
/** #TransInfo.flag */
|
||||
|
@ -105,51 +104,50 @@ typedef enum {
|
|||
/** restrictions flags */
|
||||
T_NO_CONSTRAINT = 1 << 2,
|
||||
T_NULL_ONE = 1 << 3,
|
||||
T_NO_ZERO = 1 << 4,
|
||||
T_ALL_RESTRICTIONS = T_NO_CONSTRAINT | T_NULL_ONE | T_NO_ZERO,
|
||||
T_ALL_RESTRICTIONS = T_NO_CONSTRAINT | T_NULL_ONE,
|
||||
|
||||
T_PROP_EDIT = 1 << 5,
|
||||
T_PROP_CONNECTED = 1 << 6,
|
||||
T_PROP_PROJECTED = 1 << 7,
|
||||
T_PROP_EDIT = 1 << 4,
|
||||
T_PROP_CONNECTED = 1 << 5,
|
||||
T_PROP_PROJECTED = 1 << 6,
|
||||
T_PROP_EDIT_ALL = T_PROP_EDIT | T_PROP_CONNECTED | T_PROP_PROJECTED,
|
||||
|
||||
T_V3D_ALIGN = 1 << 8,
|
||||
T_V3D_ALIGN = 1 << 7,
|
||||
/** For 2D views such as UV or f-curve. */
|
||||
T_2D_EDIT = 1 << 9,
|
||||
T_CLIP_UV = 1 << 10,
|
||||
T_2D_EDIT = 1 << 8,
|
||||
T_CLIP_UV = 1 << 9,
|
||||
|
||||
/** Auto-IK is on. */
|
||||
T_AUTOIK = 1 << 11,
|
||||
T_AUTOIK = 1 << 10,
|
||||
|
||||
/** Don't use mirror even if the data-block option is set. */
|
||||
T_NO_MIRROR = 1 << 12,
|
||||
T_NO_MIRROR = 1 << 11,
|
||||
|
||||
/** To indicate that the value set in the `value` parameter is the final
|
||||
* value of the transformation, modified only by the constrain. */
|
||||
T_INPUT_IS_VALUES_FINAL = 1 << 13,
|
||||
T_INPUT_IS_VALUES_FINAL = 1 << 12,
|
||||
|
||||
/** To specify if we save back settings at the end. */
|
||||
T_MODAL = 1 << 14,
|
||||
T_MODAL = 1 << 13,
|
||||
|
||||
/** No re-topology (projection). */
|
||||
T_NO_PROJECT = 1 << 15,
|
||||
T_NO_PROJECT = 1 << 14,
|
||||
|
||||
T_RELEASE_CONFIRM = 1 << 16,
|
||||
T_RELEASE_CONFIRM = 1 << 15,
|
||||
|
||||
/** Alternative transformation. used to add offset to tracking markers. */
|
||||
T_ALT_TRANSFORM = 1 << 17,
|
||||
T_ALT_TRANSFORM = 1 << 16,
|
||||
|
||||
/** #TransInfo.center has been set, don't change it. */
|
||||
T_OVERRIDE_CENTER = 1 << 18,
|
||||
T_OVERRIDE_CENTER = 1 << 17,
|
||||
|
||||
T_MODAL_CURSOR_SET = 1 << 19,
|
||||
T_MODAL_CURSOR_SET = 1 << 18,
|
||||
|
||||
T_CLNOR_REBUILD = 1 << 20,
|
||||
T_CLNOR_REBUILD = 1 << 19,
|
||||
|
||||
/** Merges unselected into selected after transforming (runs after transforming). */
|
||||
T_AUTOMERGE = 1 << 21,
|
||||
T_AUTOMERGE = 1 << 20,
|
||||
/** Runs auto-merge & splits. */
|
||||
T_AUTOSPLIT = 1 << 22,
|
||||
T_AUTOSPLIT = 1 << 21,
|
||||
} eTFlag;
|
||||
|
||||
/** #TransInfo.modifiers */
|
||||
|
|
|
@ -1122,8 +1122,7 @@ static void init_TransDataContainers(TransInfo *t,
|
|||
|
||||
for (int i = 0; i < objects_len; i++) {
|
||||
TransDataContainer *tc = &t->data_container[i];
|
||||
if (((t->flag & T_NO_MIRROR) == 0) && ((t->options & CTX_NO_MIRROR) == 0) &&
|
||||
(objects[i]->type == OB_MESH)) {
|
||||
if (!(t->flag & T_NO_MIRROR) && (objects[i]->type == OB_MESH)) {
|
||||
tc->use_mirror_axis_x = (((Mesh *)objects[i]->data)->symmetry & ME_SYMMETRY_X) != 0;
|
||||
tc->use_mirror_axis_y = (((Mesh *)objects[i]->data)->symmetry & ME_SYMMETRY_Y) != 0;
|
||||
tc->use_mirror_axis_z = (((Mesh *)objects[i]->data)->symmetry & ME_SYMMETRY_Z) != 0;
|
||||
|
@ -1472,91 +1471,89 @@ void createTransData(bContext *C, TransInfo *t)
|
|||
/** \name Transform Data Recalc/Flush
|
||||
* \{ */
|
||||
|
||||
void clipMirrorModifier(TransInfo *t)
|
||||
void transform_convert_clip_mirror_modifier_apply(TransDataContainer *tc)
|
||||
{
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
Object *ob = tc->obedit;
|
||||
ModifierData *md = ob->modifiers.first;
|
||||
float tolerance[3] = {0.0f, 0.0f, 0.0f};
|
||||
int axis = 0;
|
||||
Object *ob = tc->obedit;
|
||||
ModifierData *md = ob->modifiers.first;
|
||||
float tolerance[3] = {0.0f, 0.0f, 0.0f};
|
||||
int axis = 0;
|
||||
|
||||
for (; md; md = md->next) {
|
||||
if ((md->type == eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
|
||||
MirrorModifierData *mmd = (MirrorModifierData *)md;
|
||||
for (; md; md = md->next) {
|
||||
if ((md->type == eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
|
||||
MirrorModifierData *mmd = (MirrorModifierData *)md;
|
||||
|
||||
if (mmd->flag & MOD_MIR_CLIPPING) {
|
||||
axis = 0;
|
||||
if (mmd->flag & MOD_MIR_AXIS_X) {
|
||||
axis |= 1;
|
||||
tolerance[0] = mmd->tolerance;
|
||||
if (mmd->flag & MOD_MIR_CLIPPING) {
|
||||
axis = 0;
|
||||
if (mmd->flag & MOD_MIR_AXIS_X) {
|
||||
axis |= 1;
|
||||
tolerance[0] = mmd->tolerance;
|
||||
}
|
||||
if (mmd->flag & MOD_MIR_AXIS_Y) {
|
||||
axis |= 2;
|
||||
tolerance[1] = mmd->tolerance;
|
||||
}
|
||||
if (mmd->flag & MOD_MIR_AXIS_Z) {
|
||||
axis |= 4;
|
||||
tolerance[2] = mmd->tolerance;
|
||||
}
|
||||
if (axis) {
|
||||
float mtx[4][4], imtx[4][4];
|
||||
int i;
|
||||
|
||||
if (mmd->mirror_ob) {
|
||||
float obinv[4][4];
|
||||
|
||||
invert_m4_m4(obinv, mmd->mirror_ob->obmat);
|
||||
mul_m4_m4m4(mtx, obinv, ob->obmat);
|
||||
invert_m4_m4(imtx, mtx);
|
||||
}
|
||||
if (mmd->flag & MOD_MIR_AXIS_Y) {
|
||||
axis |= 2;
|
||||
tolerance[1] = mmd->tolerance;
|
||||
}
|
||||
if (mmd->flag & MOD_MIR_AXIS_Z) {
|
||||
axis |= 4;
|
||||
tolerance[2] = mmd->tolerance;
|
||||
}
|
||||
if (axis) {
|
||||
float mtx[4][4], imtx[4][4];
|
||||
int i;
|
||||
|
||||
if (mmd->mirror_ob) {
|
||||
float obinv[4][4];
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
int clip;
|
||||
float loc[3], iloc[3];
|
||||
|
||||
invert_m4_m4(obinv, mmd->mirror_ob->obmat);
|
||||
mul_m4_m4m4(mtx, obinv, ob->obmat);
|
||||
invert_m4_m4(imtx, mtx);
|
||||
if (td->loc == NULL) {
|
||||
break;
|
||||
}
|
||||
|
||||
TransData *td = tc->data;
|
||||
for (i = 0; i < tc->data_len; i++, td++) {
|
||||
int clip;
|
||||
float loc[3], iloc[3];
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (td->loc == NULL) {
|
||||
break;
|
||||
copy_v3_v3(loc, td->loc);
|
||||
copy_v3_v3(iloc, td->iloc);
|
||||
|
||||
if (mmd->mirror_ob) {
|
||||
mul_m4_v3(mtx, loc);
|
||||
mul_m4_v3(mtx, iloc);
|
||||
}
|
||||
|
||||
clip = 0;
|
||||
if (axis & 1) {
|
||||
if (fabsf(iloc[0]) <= tolerance[0] || loc[0] * iloc[0] < 0.0f) {
|
||||
loc[0] = 0.0f;
|
||||
clip = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (td->flag & TD_SKIP) {
|
||||
continue;
|
||||
if (axis & 2) {
|
||||
if (fabsf(iloc[1]) <= tolerance[1] || loc[1] * iloc[1] < 0.0f) {
|
||||
loc[1] = 0.0f;
|
||||
clip = 1;
|
||||
}
|
||||
|
||||
copy_v3_v3(loc, td->loc);
|
||||
copy_v3_v3(iloc, td->iloc);
|
||||
|
||||
}
|
||||
if (axis & 4) {
|
||||
if (fabsf(iloc[2]) <= tolerance[2] || loc[2] * iloc[2] < 0.0f) {
|
||||
loc[2] = 0.0f;
|
||||
clip = 1;
|
||||
}
|
||||
}
|
||||
if (clip) {
|
||||
if (mmd->mirror_ob) {
|
||||
mul_m4_v3(mtx, loc);
|
||||
mul_m4_v3(mtx, iloc);
|
||||
}
|
||||
|
||||
clip = 0;
|
||||
if (axis & 1) {
|
||||
if (fabsf(iloc[0]) <= tolerance[0] || loc[0] * iloc[0] < 0.0f) {
|
||||
loc[0] = 0.0f;
|
||||
clip = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (axis & 2) {
|
||||
if (fabsf(iloc[1]) <= tolerance[1] || loc[1] * iloc[1] < 0.0f) {
|
||||
loc[1] = 0.0f;
|
||||
clip = 1;
|
||||
}
|
||||
}
|
||||
if (axis & 4) {
|
||||
if (fabsf(iloc[2]) <= tolerance[2] || loc[2] * iloc[2] < 0.0f) {
|
||||
loc[2] = 0.0f;
|
||||
clip = 1;
|
||||
}
|
||||
}
|
||||
if (clip) {
|
||||
if (mmd->mirror_ob) {
|
||||
mul_m4_v3(imtx, loc);
|
||||
}
|
||||
copy_v3_v3(td->loc, loc);
|
||||
mul_m4_v3(imtx, loc);
|
||||
}
|
||||
copy_v3_v3(td->loc, loc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1644,38 +1641,6 @@ void animrecord_check_state(TransInfo *t, struct Object *ob)
|
|||
}
|
||||
}
|
||||
|
||||
static void recalcData_cursor_image(TransInfo *t)
|
||||
{
|
||||
TransDataContainer *tc = t->data_container;
|
||||
TransData *td = tc->data;
|
||||
float aspect_inv[2];
|
||||
|
||||
aspect_inv[0] = 1.0f / t->aspect[0];
|
||||
aspect_inv[1] = 1.0f / t->aspect[1];
|
||||
|
||||
td->loc[0] = td->loc[0] * aspect_inv[0];
|
||||
td->loc[1] = td->loc[1] * aspect_inv[1];
|
||||
|
||||
DEG_id_tag_update(&t->scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
static void recalcData_cursor(TransInfo *t)
|
||||
{
|
||||
DEG_id_tag_update(&t->scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
static void recalcData_obedit(TransInfo *t)
|
||||
{
|
||||
if (t->state != TRANS_CANCEL) {
|
||||
applyProject(t);
|
||||
}
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
if (tc->data_len) {
|
||||
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* called for updating while transform acts, once per redraw */
|
||||
void recalcData(TransInfo *t)
|
||||
{
|
||||
|
@ -1742,7 +1707,7 @@ void recalcData(TransInfo *t)
|
|||
recalcData_tracking(t);
|
||||
break;
|
||||
case TC_MBALL_VERTS:
|
||||
recalcData_obedit(t);
|
||||
recalcData_mball(t);
|
||||
break;
|
||||
case TC_LATTICE_VERTS:
|
||||
recalcData_lattice(t);
|
||||
|
|
|
@ -45,7 +45,7 @@ bool clipUVTransform(TransInfo *t, float vec[2], const bool resize);
|
|||
void clipUVData(TransInfo *t);
|
||||
|
||||
/* transform_convert_mesh.c */
|
||||
void mesh_customdatacorrect_init(TransInfo *t);
|
||||
void transform_convert_mesh_customdatacorrect_init(TransInfo *t);
|
||||
|
||||
/* transform_convert_sequencer.c */
|
||||
int transform_convert_sequencer_get_snap_bound(TransInfo *t);
|
||||
|
@ -62,7 +62,7 @@ void calc_distanceCurveVerts(TransData *head, TransData *tail, bool cyclic);
|
|||
struct TransDataCurveHandleFlags *initTransDataCurveHandles(TransData *td, struct BezTriple *bezt);
|
||||
char transform_convert_frame_side_dir_get(TransInfo *t, float cframe);
|
||||
bool FrameOnMouseSide(char side, float frame, float cframe);
|
||||
void clipMirrorModifier(TransInfo *t);
|
||||
void transform_convert_clip_mirror_modifier_apply(TransDataContainer *tc);
|
||||
void animrecord_check_state(TransInfo *t, struct Object *ob);
|
||||
|
||||
/* transform_convert_action.c */
|
||||
|
@ -84,6 +84,8 @@ void special_aftertrans_update__pose(bContext *C, TransInfo *t);
|
|||
/* transform_convert_cursor.c */
|
||||
void createTransCursor_image(TransInfo *t);
|
||||
void createTransCursor_view3d(TransInfo *t);
|
||||
void recalcData_cursor_image(TransInfo *t);
|
||||
void recalcData_cursor(TransInfo *t);
|
||||
|
||||
/* transform_convert_curve.c */
|
||||
void createTransCurveVerts(TransInfo *t);
|
||||
|
@ -109,6 +111,7 @@ void special_aftertrans_update__mask(bContext *C, TransInfo *t);
|
|||
|
||||
/* transform_convert_mball.c */
|
||||
void createTransMBallVerts(TransInfo *t);
|
||||
void recalcData_mball(TransInfo *t);
|
||||
|
||||
/* transform_convert_mesh.c */
|
||||
struct TransIslandData {
|
||||
|
|
|
@ -134,3 +134,29 @@ void createTransCursor_view3d(TransInfo *t)
|
|||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Recalc Cursor
|
||||
* \{ */
|
||||
|
||||
void recalcData_cursor_image(TransInfo *t)
|
||||
{
|
||||
TransDataContainer *tc = t->data_container;
|
||||
TransData *td = tc->data;
|
||||
float aspect_inv[2];
|
||||
|
||||
aspect_inv[0] = 1.0f / t->aspect[0];
|
||||
aspect_inv[1] = 1.0f / t->aspect[1];
|
||||
|
||||
td->loc[0] = td->loc[0] * aspect_inv[0];
|
||||
td->loc[1] = td->loc[1] * aspect_inv[1];
|
||||
|
||||
DEG_id_tag_update(&t->scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
void recalcData_cursor(TransInfo *t)
|
||||
{
|
||||
DEG_id_tag_update(&t->scene->id, ID_RECALC_COPY_ON_WRITE);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -441,7 +441,6 @@ void createTransCurveVerts(TransInfo *t)
|
|||
void recalcData_curve(TransInfo *t)
|
||||
{
|
||||
if (t->state != TRANS_CANCEL) {
|
||||
clipMirrorModifier(t);
|
||||
applyProject(t);
|
||||
}
|
||||
|
||||
|
@ -460,7 +459,10 @@ void recalcData_curve(TransInfo *t)
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* Normal updating */
|
||||
/* Apply clipping after so we never project past the clip plane T25423. */
|
||||
transform_convert_clip_mirror_modifier_apply(tc);
|
||||
|
||||
/* Normal updating. */
|
||||
BKE_curve_dimension_update(cu);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include "BKE_context.h"
|
||||
|
||||
#include "transform.h"
|
||||
#include "transform_snap.h"
|
||||
|
||||
#include "transform_convert.h"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
@ -128,3 +130,21 @@ void createTransMBallVerts(TransInfo *t)
|
|||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Recalc Meta Ball
|
||||
* \{ */
|
||||
|
||||
void recalcData_mball(TransInfo *t)
|
||||
{
|
||||
if (t->state != TRANS_CANCEL) {
|
||||
applyProject(t);
|
||||
}
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
if (tc->data_len) {
|
||||
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -47,9 +47,9 @@
|
|||
/** \name Edit Mesh #CD_MVERT_SKIN Transform Creation
|
||||
* \{ */
|
||||
|
||||
static float *mesh_skin_transdata_center(const struct TransIslandData *island_data,
|
||||
const int island_index,
|
||||
BMVert *eve)
|
||||
static float *tc_mesh_skin_transdata_center(const struct TransIslandData *island_data,
|
||||
const int island_index,
|
||||
BMVert *eve)
|
||||
{
|
||||
if (island_data->center && island_index != -1) {
|
||||
return island_data->center[island_index];
|
||||
|
@ -57,11 +57,11 @@ static float *mesh_skin_transdata_center(const struct TransIslandData *island_da
|
|||
return eve->co;
|
||||
}
|
||||
|
||||
static void mesh_skin_transdata_create(TransDataBasic *td,
|
||||
BMEditMesh *em,
|
||||
BMVert *eve,
|
||||
const struct TransIslandData *island_data,
|
||||
const int island_index)
|
||||
static void tc_mesh_skin_transdata_create(TransDataBasic *td,
|
||||
BMEditMesh *em,
|
||||
BMVert *eve,
|
||||
const struct TransIslandData *island_data,
|
||||
const int island_index)
|
||||
{
|
||||
BLI_assert(BM_elem_flag_test(eve, BM_ELEM_HIDDEN) == 0);
|
||||
MVertSkin *vs = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MVERT_SKIN);
|
||||
|
@ -78,7 +78,7 @@ static void mesh_skin_transdata_create(TransDataBasic *td,
|
|||
td->flag |= TD_SELECTED;
|
||||
}
|
||||
|
||||
copy_v3_v3(td->center, mesh_skin_transdata_center(island_data, island_index, eve));
|
||||
copy_v3_v3(td->center, tc_mesh_skin_transdata_center(island_data, island_index, eve));
|
||||
td->extra = eve;
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ void createTransMeshSkin(TransInfo *t)
|
|||
}
|
||||
|
||||
if (mirror_data.vert_map && mirror_data.vert_map[a].index != -1) {
|
||||
mesh_skin_transdata_create(
|
||||
tc_mesh_skin_transdata_create(
|
||||
(TransDataBasic *)td_mirror, em, eve, &island_data, island_index);
|
||||
|
||||
int elem_index = mirror_data.vert_map[a].index;
|
||||
|
@ -221,7 +221,7 @@ void createTransMeshSkin(TransInfo *t)
|
|||
td_mirror++;
|
||||
}
|
||||
else if (prop_mode || BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
|
||||
mesh_skin_transdata_create((TransDataBasic *)td, em, eve, &island_data, island_index);
|
||||
tc_mesh_skin_transdata_create((TransDataBasic *)td, em, eve, &island_data, island_index);
|
||||
|
||||
if (t->around == V3D_AROUND_LOCAL_ORIGINS) {
|
||||
createSpaceNormal(td->axismtx, eve->no);
|
||||
|
@ -275,7 +275,7 @@ void createTransMeshSkin(TransInfo *t)
|
|||
/** \name Recalc Mesh Data
|
||||
* \{ */
|
||||
|
||||
static void mesh_skin_apply_to_mirror(TransInfo *t)
|
||||
static void tc_mesh_skin_apply_to_mirror(TransInfo *t)
|
||||
{
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
if (tc->use_mirror_axis_any) {
|
||||
|
@ -292,8 +292,8 @@ void recalcData_mesh_skin(TransInfo *t)
|
|||
bool is_canceling = t->state == TRANS_CANCEL;
|
||||
/* mirror modifier clipping? */
|
||||
if (!is_canceling) {
|
||||
if ((t->flag & T_NO_MIRROR) == 0 && (t->options & CTX_NO_MIRROR) == 0) {
|
||||
mesh_skin_apply_to_mirror(t);
|
||||
if (!(t->flag & T_NO_MIRROR)) {
|
||||
tc_mesh_skin_apply_to_mirror(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -538,7 +538,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
|||
}
|
||||
else {
|
||||
/* Avoid mirroring for unsupported contexts. */
|
||||
t->options |= CTX_NO_MIRROR;
|
||||
t->flag |= T_NO_MIRROR;
|
||||
}
|
||||
|
||||
/* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */
|
||||
|
|
|
@ -1263,7 +1263,7 @@ void transform_mode_init(TransInfo *t, wmOperator *op, const int mode)
|
|||
if (t->data_type == TC_MESH_VERTS) {
|
||||
/* Init Custom Data correction.
|
||||
* Ideally this should be called when creating the TransData. */
|
||||
mesh_customdatacorrect_init(t);
|
||||
transform_convert_mesh_customdatacorrect_init(t);
|
||||
}
|
||||
|
||||
/* TODO(germano): Some of these operations change the `t->mode`.
|
||||
|
|
|
@ -107,7 +107,6 @@ void initCurveShrinkFatten(TransInfo *t)
|
|||
t->num.unit_sys = t->scene->unit.system;
|
||||
t->num.unit_type[0] = B_UNIT_NONE;
|
||||
|
||||
t->flag |= T_NO_ZERO;
|
||||
#ifdef USE_NUM_NO_ZERO
|
||||
t->num.val_flag[0] |= NUM_NO_ZERO;
|
||||
#endif
|
||||
|
|
|
@ -117,7 +117,6 @@ void initGPOpacity(TransInfo *t)
|
|||
t->num.unit_sys = t->scene->unit.system;
|
||||
t->num.unit_type[0] = B_UNIT_NONE;
|
||||
|
||||
t->flag |= T_NO_ZERO;
|
||||
#ifdef USE_NUM_NO_ZERO
|
||||
t->num.val_flag[0] |= NUM_NO_ZERO;
|
||||
#endif
|
||||
|
|
|
@ -119,7 +119,6 @@ void initGPShrinkFatten(TransInfo *t)
|
|||
t->num.unit_sys = t->scene->unit.system;
|
||||
t->num.unit_type[0] = B_UNIT_NONE;
|
||||
|
||||
t->flag |= T_NO_ZERO;
|
||||
#ifdef USE_NUM_NO_ZERO
|
||||
t->num.val_flag[0] |= NUM_NO_ZERO;
|
||||
#endif
|
||||
|
|
|
@ -133,7 +133,6 @@ void initMaskShrinkFatten(TransInfo *t)
|
|||
t->num.unit_sys = t->scene->unit.system;
|
||||
t->num.unit_type[0] = B_UNIT_NONE;
|
||||
|
||||
t->flag |= T_NO_ZERO;
|
||||
#ifdef USE_NUM_NO_ZERO
|
||||
t->num.val_flag[0] |= NUM_NO_ZERO;
|
||||
#endif
|
||||
|
|
|
@ -235,8 +235,5 @@ void initMirror(TransInfo *t)
|
|||
initMouseInputMode(t, &t->mouse, INPUT_NONE);
|
||||
|
||||
t->flag |= T_NULL_ONE;
|
||||
if ((t->flag & T_EDIT) == 0) {
|
||||
t->flag |= T_NO_ZERO;
|
||||
}
|
||||
}
|
||||
/** \} */
|
||||
|
|
|
@ -176,7 +176,6 @@ void initResize(TransInfo *t)
|
|||
t->num.val_flag[2] |= NUM_NULL_ONE;
|
||||
t->num.flag |= NUM_AFFECT_ALL;
|
||||
if ((t->flag & T_EDIT) == 0) {
|
||||
t->flag |= T_NO_ZERO;
|
||||
#ifdef USE_NUM_NO_ZERO
|
||||
t->num.val_flag[0] |= NUM_NO_ZERO;
|
||||
t->num.val_flag[1] |= NUM_NO_ZERO;
|
||||
|
|
|
@ -111,7 +111,6 @@ void initSkinResize(TransInfo *t)
|
|||
t->num.val_flag[2] |= NUM_NULL_ONE;
|
||||
t->num.flag |= NUM_AFFECT_ALL;
|
||||
if ((t->flag & T_EDIT) == 0) {
|
||||
t->flag |= T_NO_ZERO;
|
||||
#ifdef USE_NUM_NO_ZERO
|
||||
t->num.val_flag[0] |= NUM_NO_ZERO;
|
||||
t->num.val_flag[1] |= NUM_NO_ZERO;
|
||||
|
|
|
@ -666,7 +666,7 @@ class CPPType : NonCopyable, NonMovable {
|
|||
|
||||
template<typename T> bool is() const
|
||||
{
|
||||
return this == &CPPType::get<T>();
|
||||
return this == &CPPType::get<std::decay_t<T>>();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -66,6 +66,16 @@ class GMutablePointer {
|
|||
return type_ != nullptr && type_->is<T>();
|
||||
}
|
||||
|
||||
template<typename T> T relocate_out()
|
||||
{
|
||||
BLI_assert(this->is_type<T>());
|
||||
T value;
|
||||
type_->relocate_to_initialized(data_, &value);
|
||||
data_ = nullptr;
|
||||
type_ = nullptr;
|
||||
return value;
|
||||
}
|
||||
|
||||
void destruct()
|
||||
{
|
||||
BLI_assert(data_ != nullptr);
|
||||
|
|
|
@ -93,6 +93,11 @@ template<typename Key> class GValueMap {
|
|||
return values_.pop_as(key);
|
||||
}
|
||||
|
||||
template<typename ForwardKey> GPointer lookup(const ForwardKey &key) const
|
||||
{
|
||||
return values_.lookup_as(key);
|
||||
}
|
||||
|
||||
/* Remove the value for the given name from the container and remove it. */
|
||||
template<typename T, typename ForwardKey> T extract(const ForwardKey &key)
|
||||
{
|
||||
|
|
|
@ -335,7 +335,7 @@ static void occlusion_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
|||
if (use_multiple_levels) {
|
||||
uiLayout *col = uiLayoutColumn(layout, true);
|
||||
uiItemR(col, ptr, "level_start", 0, NULL, ICON_NONE);
|
||||
uiItemR(col, ptr, "level_end", 0, NULL, ICON_NONE);
|
||||
uiItemR(col, ptr, "level_end", 0, IFACE_("End"), ICON_NONE);
|
||||
}
|
||||
else {
|
||||
uiItemR(layout, ptr, "level_start", 0, IFACE_("Level"), ICON_NONE);
|
||||
|
@ -367,7 +367,7 @@ static void transparency_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
|||
|
||||
uiLayout *row = uiLayoutRow(layout, true);
|
||||
uiLayoutSetPropDecorate(row, false);
|
||||
uiLayout *sub = uiLayoutRow(row, true);
|
||||
uiLayout *sub = uiLayoutRowWithHeading(row, true, IFACE_("Masks"));
|
||||
char text[2] = "0";
|
||||
|
||||
PropertyRNA *prop = RNA_struct_find_property(ptr, "use_transparency_mask");
|
||||
|
|
|
@ -1817,8 +1817,23 @@ static void lineart_main_load_geometries(
|
|||
double asp = ((double)rb->w / (double)rb->h);
|
||||
|
||||
if (cam->type == CAM_PERSP) {
|
||||
if (asp < 1) {
|
||||
fov /= asp;
|
||||
if (cam->sensor_fit == CAMERA_SENSOR_FIT_AUTO) {
|
||||
if (asp < 1) {
|
||||
fov /= asp;
|
||||
}
|
||||
else {
|
||||
fov *= asp;
|
||||
}
|
||||
}
|
||||
else if (cam->sensor_fit == CAMERA_SENSOR_FIT_HOR) {
|
||||
if (asp < 1) {
|
||||
fov /= asp;
|
||||
}
|
||||
}
|
||||
else if (cam->sensor_fit == CAMERA_SENSOR_FIT_VERT) {
|
||||
if (asp > 1) {
|
||||
fov *= asp;
|
||||
}
|
||||
}
|
||||
lineart_matrix_perspective_44d(proj, fov, asp, cam->clip_start, cam->clip_end);
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ endif()
|
|||
|
||||
blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(CXX_WARN_NO_SUGGEST_OVERRIDE)
|
||||
target_compile_options(bf_gpu PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ static void scanline_separate_32bit(float *rectf, const float *fbuf, int scanlin
|
|||
|
||||
static void imb_read_tiff_resolution(ImBuf *ibuf, TIFF *image)
|
||||
{
|
||||
uint16 unit;
|
||||
uint16_t unit;
|
||||
float xres;
|
||||
float yres;
|
||||
|
||||
|
@ -569,7 +569,7 @@ ImBuf *imb_loadtiff(const unsigned char *mem,
|
|||
TIFF *image = NULL;
|
||||
ImBuf *ibuf = NULL, *hbuf;
|
||||
ImbTIFFMemFile memFile;
|
||||
uint32 width, height;
|
||||
uint32_t width, height;
|
||||
char *format = NULL;
|
||||
int level;
|
||||
short spp;
|
||||
|
@ -690,7 +690,7 @@ void imb_loadtiletiff(
|
|||
ImBuf *ibuf, const unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect)
|
||||
{
|
||||
TIFF *image = NULL;
|
||||
uint32 width, height;
|
||||
uint32_t width, height;
|
||||
ImbTIFFMemFile memFile;
|
||||
|
||||
image = imb_tiff_client_open(&memFile, mem, size);
|
||||
|
@ -761,7 +761,7 @@ void imb_loadtiletiff(
|
|||
bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags)
|
||||
{
|
||||
TIFF *image = NULL;
|
||||
uint16 samplesperpixel, bitspersample;
|
||||
uint16_t samplesperpixel, bitspersample;
|
||||
size_t npixels;
|
||||
unsigned char *pixels = NULL;
|
||||
unsigned char *from = NULL, *to = NULL;
|
||||
|
@ -774,7 +774,7 @@ bool imb_savetiff(ImBuf *ibuf, const char *filepath, int flags)
|
|||
/* check for a valid number of bytes per pixel. Like the PNG writer,
|
||||
* the TIFF writer supports 1, 3 or 4 bytes per pixel, corresponding
|
||||
* to gray, RGB, RGBA respectively. */
|
||||
samplesperpixel = (uint16)((ibuf->planes + 7) >> 3);
|
||||
samplesperpixel = (uint16_t)((ibuf->planes + 7) >> 3);
|
||||
if ((samplesperpixel > 4) || (samplesperpixel == 2)) {
|
||||
fprintf(stderr,
|
||||
"imb_savetiff: unsupported number of bytes per "
|
||||
|
|
|
@ -591,14 +591,16 @@ typedef enum IDRecalcFlag {
|
|||
/* ** Object transformation changed. ** */
|
||||
ID_RECALC_TRANSFORM = (1 << 0),
|
||||
|
||||
/* ** Object geometry changed. **
|
||||
/* ** Geometry changed. **
|
||||
*
|
||||
* When object of armature type gets tagged with this flag, its pose is
|
||||
* re-evaluated.
|
||||
* When object of other type is tagged with this flag it makes the modifier
|
||||
* stack to be re-evaluated.
|
||||
* When object data type (mesh, curve, ...) gets tagged with this flag it
|
||||
* makes all objects which shares this data-block to be updated. */
|
||||
* makes all objects which shares this data-block to be updated.
|
||||
* When a collection gets tagged with this flag, all objects depending on the geometry and
|
||||
* transforms on any of the objects in the collection are updated. */
|
||||
ID_RECALC_GEOMETRY = (1 << 1),
|
||||
|
||||
/* ** Animation or time changed and animation is to be re-evaluated. ** */
|
||||
|
|
|
@ -47,7 +47,7 @@ struct Curve;
|
|||
#define GP_DEFAULT_CURVE_EDIT_CORNER_ANGLE M_PI_2
|
||||
|
||||
#define GPENCIL_MIN_FILL_FAC 0.05f
|
||||
#define GPENCIL_MAX_FILL_FAC 5.0f
|
||||
#define GPENCIL_MAX_FILL_FAC 8.0f
|
||||
|
||||
/* ***************************************** */
|
||||
/* GP Stroke Points */
|
||||
|
|
|
@ -1313,6 +1313,13 @@ typedef struct NodeSwitch {
|
|||
uint8_t input_type;
|
||||
} NodeSwitch;
|
||||
|
||||
typedef struct NodeGeometryAttributeTransfer {
|
||||
/* AttributeDomain. */
|
||||
int8_t domain;
|
||||
/* GeometryNodeAttributeTransferMapMode. */
|
||||
uint8_t mapping;
|
||||
} NodeGeometryAttributeTransfer;
|
||||
|
||||
/* script node mode */
|
||||
#define NODE_SCRIPT_INTERNAL 0
|
||||
#define NODE_SCRIPT_EXTERNAL 1
|
||||
|
@ -1807,6 +1814,11 @@ typedef enum GeometryNodeMeshLineCountMode {
|
|||
GEO_NODE_MESH_LINE_COUNT_RESOLUTION = 1,
|
||||
} GeometryNodeMeshLineCountMode;
|
||||
|
||||
typedef enum GeometryNodeAttributeTransferMapMode {
|
||||
GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED = 0,
|
||||
GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST = 1,
|
||||
} GeometryNodeAttributeTransferMapMode;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1856,8 +1856,6 @@ typedef struct SpaceStatusBar {
|
|||
|
||||
typedef struct SpreadsheetColumnID {
|
||||
char *name;
|
||||
int index;
|
||||
char _pad[4];
|
||||
} SpreadsheetColumnID;
|
||||
|
||||
typedef struct SpreadsheetColumn {
|
||||
|
|
|
@ -9680,6 +9680,40 @@ static void def_geo_switch(StructRNA *srna)
|
|||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_socket_update");
|
||||
}
|
||||
|
||||
static void def_geo_attribute_transfer(StructRNA *srna)
|
||||
{
|
||||
static EnumPropertyItem mapping_items[] = {
|
||||
{GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST_FACE_INTERPOLATED,
|
||||
"NEAREST_FACE_INTERPOLATED",
|
||||
0,
|
||||
"Nearest Face Interpolated",
|
||||
"Transfer the attribute from the nearest face on a surface (loose points and edges are "
|
||||
"ignored)"},
|
||||
{GEO_NODE_ATTRIBUTE_TRANSFER_NEAREST,
|
||||
"NEAREST",
|
||||
0,
|
||||
"Nearest",
|
||||
"Transfer the element from the nearest element (using face and edge centers for the "
|
||||
"distance computation)"},
|
||||
{0, NULL, 0, NULL, NULL},
|
||||
};
|
||||
|
||||
PropertyRNA *prop;
|
||||
|
||||
RNA_def_struct_sdna_from(srna, "NodeGeometryAttributeTransfer", "storage");
|
||||
|
||||
prop = RNA_def_property(srna, "domain", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, rna_enum_attribute_domain_with_auto_items);
|
||||
RNA_def_property_enum_default(prop, ATTR_DOMAIN_AUTO);
|
||||
RNA_def_property_ui_text(prop, "Domain", "The geometry domain to save the result attribute in");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
|
||||
prop = RNA_def_property(srna, "mapping", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, mapping_items);
|
||||
RNA_def_property_ui_text(prop, "Mapping", "Mapping between geometries");
|
||||
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
static void rna_def_shader_node(BlenderRNA *brna)
|
||||
|
|
|
@ -6160,7 +6160,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
|
|||
prop,
|
||||
"Python Scripts Directory",
|
||||
"Alternate script path, matching the default layout with subdirectories: "
|
||||
"startup, add-ons and modules (requires restart)");
|
||||
"startup, addons, modules, and presets (requires restart)");
|
||||
/* TODO, editing should reset sys.path! */
|
||||
|
||||
prop = RNA_def_property(srna, "i18n_branches_directory", PROP_STRING, PROP_DIRPATH);
|
||||
|
|
|
@ -534,12 +534,16 @@ static void rna_Gizmo_unregister(struct Main *bmain, StructRNA *type)
|
|||
return;
|
||||
}
|
||||
|
||||
WM_gizmotype_remove_ptr(NULL, bmain, gzt);
|
||||
|
||||
/* Free extension after removing instances so `__del__` doesn't crash, see: T85567. */
|
||||
RNA_struct_free_extension(type, &gzt->rna_ext);
|
||||
RNA_struct_free(&BLENDER_RNA, type);
|
||||
|
||||
WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL);
|
||||
/* Free gizmo group after the extension as it owns the identifier memory. */
|
||||
WM_gizmotype_free_ptr(gzt);
|
||||
|
||||
WM_gizmotype_remove_ptr(NULL, bmain, gzt);
|
||||
WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
static void **rna_Gizmo_instance(PointerRNA *ptr)
|
||||
|
@ -934,12 +938,16 @@ static void rna_GizmoGroup_unregister(struct Main *bmain, StructRNA *type)
|
|||
return;
|
||||
}
|
||||
|
||||
WM_gizmo_group_type_remove_ptr(bmain, gzgt);
|
||||
|
||||
/* Free extension after removing instances so `__del__` doesn't crash, see: T85567. */
|
||||
RNA_struct_free_extension(type, &gzgt->rna_ext);
|
||||
RNA_struct_free(&BLENDER_RNA, type);
|
||||
|
||||
WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL);
|
||||
/* Free gizmo group after the extension as it owns the identifier memory. */
|
||||
WM_gizmo_group_type_free_ptr(gzgt);
|
||||
|
||||
WM_gizmo_group_type_remove_ptr(bmain, gzgt);
|
||||
WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
static void **rna_GizmoGroup_instance(PointerRNA *ptr)
|
||||
|
|
|
@ -79,6 +79,7 @@ set(SRC
|
|||
intern/MOD_mirror.c
|
||||
intern/MOD_multires.c
|
||||
intern/MOD_nodes.cc
|
||||
intern/MOD_nodes_evaluator.cc
|
||||
intern/MOD_none.c
|
||||
intern/MOD_normal_edit.c
|
||||
intern/MOD_ocean.c
|
||||
|
@ -118,6 +119,7 @@ set(SRC
|
|||
MOD_modifiertypes.h
|
||||
MOD_nodes.h
|
||||
intern/MOD_meshcache_util.h
|
||||
intern/MOD_nodes_evaluator.hh
|
||||
intern/MOD_solidify_util.h
|
||||
intern/MOD_ui_common.h
|
||||
intern/MOD_util.h
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue