GPv3: Show Line Art options in object add menu #118833
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118833
Loading…
Reference in New Issue
No description provided.
Delete Branch "ChengduLittleA/blender:llineart-menu"
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?
Now Add->Grease Pencil menu will show Scene/Collection/Object line art
options.
Added some comments
@ -1289,4 +1289,18 @@ void create_suzanne(Main &bmain, Object &object, const float4x4 &matrix, const i
drawing_fills.tag_topology_changed();
}
void create_blank_for_lineart(Main &bmain, Object &object, const int frame_number)
Isn't this the same as
create_blank
?Ah I thought it didn't create material. I'll remove this.
@ -1669,0 +1678,4 @@
const int stroke_depth_order = RNA_enum_get(op->ptr, "stroke_depth_order");
const float stroke_depth_offset = RNA_float_get(op->ptr, "stroke_depth_offset");
float radius = RNA_float_get(op->ptr, "radius");
const float radius
@ -1669,0 +1679,4 @@
const float stroke_depth_offset = RNA_float_get(op->ptr, "stroke_depth_offset");
float radius = RNA_float_get(op->ptr, "radius");
float scale[3];
const float3 scale(radius);
@ -1669,0 +1683,4 @@
copy_v3_fl(scale, radius);
float mat[4][4];
ED_object_new_primitive_matrix(C, object, loc, rot, scale, mat);
Does this call even do something? The returned matrix seems to be unused.
Indeed, it doesn't seem to do anything.
Some more comments
@ -1669,0 +1702,4 @@
md->source_type = LINEART_SOURCE_SCENE;
}
/* Only created one layer and one material. */
STRNCPY(md->target_layer, grease_pencil->layers()[0]->name().c_str());
I'd prefer if this either used
grease_pencil->find_node_by_name
or (maybe better)grease_pencil->get_active_layer()
@ -1669,0 +1703,4 @@
}
/* Only created one layer and one material. */
STRNCPY(md->target_layer, grease_pencil->layers()[0]->name().c_str());
md->target_material = grease_pencil->material_array[0];
This should use
BKE_object_material_get
@ -1669,0 +1721,4 @@
}
else {
if (stroke_depth_order == GP_DRAWMODE_3D) {
/* gpd->draw_mode = GP_DRAWMODE_3D; */
I guess this needs a flag in
GreasePencilFlag
.You can call it
GREASE_PENCIL_STROKE_ORDER_3D
.You meant that I add this flag directly into
enum GreasePencilFlag
? But at the moment we don't really know if that's gonna be used.Or we remove this?
This will be used, since I'm rolling back to the current renderer which will use it. You can add the flag since it's needed for the PR. It will be initialized to 0.
Thanks looks good.
@blender-bot build