Member crudodev Posted March 22 Member Share Posted March 22 Hello, I'm just wondering—how can I skip the "Save As" dialog menu when saving a layer to .obj, .fbx, etc.? I just want to programmatically pass the path for the 3D model without dealing with dialog menus. Also, is it necessary to switch to the Retopo room for model decimation, or can we avoid that as well and just set the decimation level as an argument? Same goes for importing into the current level—how can I programmatically use an object path as an argument and avoid the dialog menu? Thanks Quote Link to comment Share on other sites More sharing options...
Member crudodev Posted March 23 Author Member Share Posted March 23 This post was recognized by Carlosan! crudodev was awarded the badge 'Great Content' and 1 points. Okay, I found a solution in the documentation. To prevent the pop-up dialog menu and pass the file path, we can use the following method: coat.ui.setFileForFileDialog(se.exportMesh) 1 Quote Link to comment Share on other sites More sharing options...
Member crudodev Posted March 23 Author Member Share Posted March 23 Just playing around with the Python API—Is it possible to create one Python add-on that has its own submenu with different buttons? Or do I have to create a separate "script" for each action? Also, I found that only with C++ we can create custom sculpt tools integrated into the UI, similar to the tree generator C++ add-on from the examples. Correct me if I'm wrong. Quote Link to comment Share on other sites More sharing options...
Carlosan Posted March 23 Share Posted March 23 You mean this ? Scripts Menu > CreatePythonScript > Basic... > Dialogs.py 1 Quote Link to comment Share on other sites More sharing options...
Member crudodev Posted March 23 Author Member Share Posted March 23 I meant more like this: I made a workaround where each button is an independent script (Python package) in the context of 3DCoat. But ideally, it would be great to create a custom menu—one add-on with multiple modules and subpackages. Edit: Ah, I see! There are examples showing how to insert into the Tools panel and menus. Thanks! 1 Quote Link to comment Share on other sites More sharing options...
carrots Posted March 24 Share Posted March 24 On 3/22/2025 at 8:14 AM, crudodev said: Hello, I'm just wondering—how can I skip the "Save As" dialog menu when saving a layer to .obj, .fbx, etc.? I just want to programmatically pass the path for the 3D model without dealing with dialog menus. Also, is it necessary to switch to the Retopo room for model decimation, or can we avoid that as well and just set the decimation level as an argument? Same goes for importing into the current level—how can I programmatically use an object path as an argument and avoid the dialog menu? Thanks You can use low-level APIs, as it is done in the Reality Capture module. 3DCoat_install_folder\UserPrefs\Scripts\Modules\RealityCapture\PhotosTo3DExt.pyhttps://pilgway.com/files/3dcoat/PythonAPI/classcoat_1_1_paint_room.html if you need additional low-level API functionality - let me know 2 Quote Link to comment Share on other sites More sharing options...
Member MJonathan Posted March 24 Member Share Posted March 24 (edited) How can I import extra modules? For example PySide6? My goal is to create an integration with ShotGrid (Flow Production Tracking) and the toolkit for Pipeline flows.https://help.autodesk.com/view/SGSUB/ENU/?guid=SG_Automotive_am_getting_started_am_integrations_intro_html Community Integrations: https://help.autodesk.com/view/SGDEV/ENU/?guid=SGD_si_integrations_community_shared_integrations_html Edited March 24 by MJonathan 1 Quote Link to comment Share on other sites More sharing options...
Member crudodev Posted March 24 Author Member Share Posted March 24 16 hours ago, carrots said: You can use low-level APIs, as it is done in the Reality Capture module. 3DCoat_install_folder\UserPrefs\Scripts\Modules\RealityCapture\PhotosTo3DExt.pyhttps://pilgway.com/files/3dcoat/PythonAPI/classcoat_1_1_paint_room.html if you need additional low-level API functionality - let me know Thanks. This is useful. I just found your add-on system quite similar to something I built for Autodesk Maya, which helps manage scripts in a more simplified way. If you're interested, I have an article about it link Also, I’m wondering if it’s possible to create a custom context menu with submenus, separators, etc.? I saw that it's possible to insert menu items, but I couldn’t find how to manage submenus, separators etc. 1 Quote Link to comment Share on other sites More sharing options...
carrots Posted March 25 Share Posted March 25 Ok, I'll make some examples of custom extensions based on PySide6, custom menu and post them here. 2 Quote Link to comment Share on other sites More sharing options...
Member crudodev Posted March 25 Author Member Share Posted March 25 (edited) 9 hours ago, carrots said: Ok, I'll make some examples of custom extensions based on PySide6, custom menu and post them here. Just quick question: - I found that on macOS, the Addon context menu doesn't parse the standard Examples scripts, so they don't show up in the Addon menu. - The command coat.ui.toRoom(f"{ROOM_NAME}") doesn't work on macOS — I have to use coat.ui.cmd("$SETPAGE_Sculpt") instead. - I also noticed that in the examples, we use coat.ui.toRoom("Sculpt") for the SCULPT room, but it doesn't work — I have to use "Voxels" instead. What’s the difference between them? Is this an undocumented change?3D Coat 2024.31 Edited March 25 by crudodev Quote Link to comment Share on other sites More sharing options...
carrots Posted Sunday at 05:43 AM Share Posted Sunday at 05:43 AM Sorry for the delay, I was rewriting the entire interface in python. Please check if it works.https://drive.google.com/file/d/1GyKa_GNaeN97igoWnI03ue8-MwRIPnhc/view?usp=sharing Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.