GPv3: Mirror modifier #117637
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#117637
Loading…
Reference in New Issue
No description provided.
Delete Branch "LukasTonne/blender:gp3-mirror-modifier"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the mirror modifier from GPv2.
@ -822,6 +822,7 @@ class NodeTreeMainUpdater {
bNodeSocket &input = *node->input_sockets()[0];
BLI_assert(input.is_available() && input.type == SOCK_MENU);
this->set_enum_ptr(*input.default_value_typed<bNodeSocketValueMenu>(), enum_items);
enum_items->remove_user_and_delete_if_last();
Looks like this slipped in by accident
oops, fixed.
Really nice now, thanks for looking into using the realize instances function.
@ -151,6 +151,8 @@ class OBJECT_MT_modifier_add_generate(ModifierAddMenu, Menu):
self.operator_modifier_add(layout, 'WIREFRAME')
if ob_type == 'GREASEPENCIL':
self.operator_modifier_add(layout, 'GREASE_PENCIL_SUBDIV')
if ob_type == 'GREASEPENCIL':
Could put this inside the previous if statement
@ -2670,0 +2672,4 @@
ModifierData modifier;
GreasePencilModifierInfluenceData influence;
struct Object *object;
/** Flags. */
Flags
->#GreasePencilMirrorModifierFlag
@ -0,0 +6,4 @@
* \ingroup modifiers
*/
#include "BLI_array_utils.hh"
Some unused includes here now I think
@ -0,0 +178,4 @@
}
else {
/* Create masked geometry, then mirror it. */
bke::AnonymousAttributePropagationInfo propagation_info;
I think just passing
{}
to the function directly is a simpler way to do the same thing. Same above IMO@ -179,3 +179,3 @@
IDPropertyUIDataEnumItem *idprop_items = nullptr;
if (value->enum_items) {
if (value->enum_items && !value->enum_items->items.is_empty()) {
Unrelated change
@ -2670,0 +2678,4 @@
} GreasePencilMirrorModifierData;
typedef enum GreasePencilMirrorModifierFlag {
MOD_GREASE_PENCIL_MIRROR_CLIPPING = (1 << 0),
I copied this from the original GP2 modifier, but it doesn't appear to actually be used for anything. There is a
use_clip
RNA property for it, but neither does the modifier display that property nor does it use the flag. Should probably remove.Just one comment
@ -151,6 +151,8 @@ class OBJECT_MT_modifier_add_generate(ModifierAddMenu, Menu):
self.operator_modifier_add(layout, 'WIREFRAME')
if ob_type == 'GREASEPENCIL':
self.operator_modifier_add(layout, 'GREASE_PENCIL_SUBDIV')
if ob_type == 'GREASEPENCIL':
I guess this line is not necessary.
@ -0,0 +162,4 @@
const IndexMask curves_mask = modifier::greasepencil::get_filtered_stroke_mask(
ctx.object, src_curves, mmd.influence, curve_mask_memory);
bke::CurvesGeometry result;
To avoid the
operator=
assigment, I'd write it like this:I just moved the assignment into each branch, no need for a local variable.
@blender-bot build