STL Import Geometry Node #122418
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#122418
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Devashish-Lal/blender:gsoc/stl-import"
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?
Google Summer Of Code Proposal
This PR
For error messages,
import_params.reports
should probably be used. That will fill theReportList
with potential errors. The items in thatReportList
will need to be translated to geometry nodes error messages.@ -447,6 +448,14 @@ class NODE_MT_category_PRIMITIVES_MESH(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeMeshUVSphere")
node_add_menu.draw_assets_for_catalog(layout, "Mesh/Primitives")
class NODE_MT_category_IMPORT_MESH(Menu):
Since import nodes won't just create curves, they may not fit well in the "Mesh" menu. How about
Input/Import/
?Isn't nodes under Input all red color nodes? now that I think about it the Import nodes could also be a red color node. not sure how to make it red tough. I am taking a look at
node_fn_input_bool.cc
Yeah that could make sense. The red color is done with
NODE_CLASS_INPUT
.Also, I'd call the menu
NODE_MT_category_IMPORT
, without "MESH" for the same reason.Done
@ -0,0 +24,4 @@
const std::string path = params.extract_input<std::string>("Path");
if (path.empty()) {
params.error_message_add(NodeWarningType::Error, TIP_("File path can't be empty"));
Usually we don't add warnings for empty inputs, since they often occur in expected situations. When the path is empty, the user would just expect the node to not import anything.
Makes sense
@ -0,0 +14,4 @@
static void node_declare(NodeDeclarationBuilder &b)
{
b.add_input<decl::String>("Path").default_value("");
Will mention here the thing i wrote in dock for proposal:
/
and\
+ root nameC:\
and even custom extensions (if user want to open stl file with namef.geg
) can not be handled in geometry nodes (and i do not like idea of added path processing nodes at least without discussion).Before solution for all of this points will be here, i think it is better to have the generally accepted file selector property.
Yeah that’s the plant to change this to a file selector. String input for now is just for testing. I need to look at some existing nodes to see how a file selector input is setup
Just as example you can take a look at
Outout File
node in compositor.The idea is that the file path can be a "subtype" of the string socket type, just like "Percentage" is for float sockets. That would affect how the socket value is displayed in the UI.
This also might requers propagation of this fact on connected sockets (and we do not do the same thing for attribute names currently...) and have tooltips/errors/other tips related with path validation/check about file/... . But before solving of this, this can be just property\
WIP: STL Import Geometry Nodeto STL Import Geometry Node@ -0,0 +31,4 @@
return;
}
STLImportParams p;
p
->import_params
@ -0,0 +46,4 @@
BKE_reports_init(&reports, RPT_STORE);
p.reports = &reports;
No need for that extra spaces\
@ -0,0 +62,4 @@
break;
}
params.error_message_add(type, TIP_(report->message));
error_message_add
takes string by reference. You need to pass or static string or use some long life allocator\ (idk ifmessage
is ovned by report or no)Nevermind, string will be copy by function itself\
@ -0,0 +68,4 @@
BKE_reports_free(&reports);
if (mesh != nullptr) {
params.set_output("Mesh", GeometrySet::from_mesh(mesh));
Plus, in case
STL_import_mesh
can return mesh even if there is error report (idk), should this mesh still be used?Not sure, maybe we should check for reports->list->first to be null
LGTM. Obviously needs some more work before it can be moved out of experimental (caching, path, options?), but that can be done in
main
too.