Comments (7)
FWIW every little change generates an Undo record. In the Group editing window there are two sliders that generate Undo records in real-time as the sliders are dragged. Either A) it should be possible to opt out of Undo records. Or B) if the record on the back of the list matches the new record's type they should be merged. Merging seems best...
It might be naive in some instances. But maybe those should be fixed by manually overriding the automatic merging behavior on a case by case basis.
It's a problem that changing the model is so tightly coupled to undo/redo. So it needs attention. It might even such that dragging vertices is generating hundreds of undo records, just based on this one example. If the vertices are subjected to the same criteria, then probably so.
from mm3d.
P.S. I think there's actually a lot of logic problems in GroupWin's case. I can't begin to list them, but for one groupSelectedEvent and textureSelectedEvent use modelAnimate that is strictly of use to AnimWin as near as I can tell. I think groupSelectedEvent has no business using it. And the other should use the more common modelUpdated. EDITED: Removed second observation, realizing it was off base. There are minor issues too, but I can't bring myself to write them down. I think my audit/rewrite will shake out a lot of these issues. There are issues everywhere.
FWIW DecalManager::getInstance()->modelUpdated(model);
lines appear all over the place. I'm sure it's something that shouldn't be implemented that way. I think it amounts to repainting the scene. I still have no clue what a "decal" means no matter how many times I see that.
(I just happened to be working on this Group window today. I finished the sidebar yesterday. It was well more than 20 files. Now it's 2 compact, medium sized files. Probably 70 to 90% less code.)
from mm3d.
This may be related. I might be wrong, but I believe these "events" are not hooked up correctly, and so m_canEdit = false;
never occurs. That bool
is passed as a pointer to all of the "Command" objects, meaning that they will always edit.
It's related to the animation system, but I think it never emits that "signal" or something. Whether it's a cause of the problem or not, it's the same situation I believe, as it pertains to the "tools".
EDITED: I'm not in a position (yet) to trace these. I'm just going by how things appear to me, looking over the code.
/*UNUSED
void MainWin::editDisableEvent()
{
m_canEdit = false;
view_panel.setEnabled(m_canEdit);
}*/
/*UNUSED? (I think if editDisableEvent is UNUSED this is meaningless, though used.)
void MainWin::editEnableEvent()
{
m_canEdit = true;
view_panel.setEnabled(m_canEdit);
}*/
from mm3d.
Follow-up:
Sorry to pile on...
Actually it seems like "view_panel.setEnabled" would be more dramatic than just opening/starting the animation mode subwindow. I may be wrong, or my code may be newer than the newest release's.
if(!*m_canEdit) { model_status(model,StatusError,STATUSTIME_LONG, ::tr("You are in animation mode, but there are no animations")); return; }
It seems this is limited to "animation mode, but there are no animations" but that seems like such an odd case to single out. I can make the current release enter this mode. It disables the zoom feature and view selection menus. I can't see a benefit myself.
from mm3d.
FWIW every little change generates an Undo record. In the Group editing window there are two sliders that generate Undo records in real-time as the sliders are dragged. Either A) it should be possible to opt out of Undo records. Or B) if the record on the back of the list matches the new record's type they should be merged. Merging seems best...
It might be naive in some instances. But maybe those should be fixed by manually overriding the automatic merging behavior on a case by case basis.
It's a problem that changing the model is so tightly coupled to undo/redo. So it needs attention. It might even such that dragging vertices is generating hundreds of undo records, just based on this one example. If the vertices are subjected to the same criteria, then probably so.
For the record, there is some after-the-fact Undo combination logic built into the Undo class. See Undo::combine
.
Off-topic: MU_SubdivideTriangle::redo
isn't implemented. Don't know why, or if that is common. EDITED: As an afterthought, it might invoke operationComplete("Doomed operation");
. But that's not documented if so.
I've found myself removing std::list from the bulk of the code. Kevin (one assumes) favored list and front
and pop_front
where inappropriate. I think if deleting geometry is slow it's because of pathological use of list. Like the various s_recycle objects probably have more overhead than if the memory was not recycled. That is, the solution to memory management overhead entails more memory management than the memory itself would.
from mm3d.
EDITED: The combine functionality is done at addUndo. Unfortunately the Model API uses Model::sendUndo, usually disabling the feature. That isn't completely bad, except I believe the caller should be controlling this, and "operationComplete" should always try to combine, because an "operation" is a single Ctrl+Z, and therefor stands nothing to lose from consolidation.
from mm3d.
For the record I've removed all of this blocking code from the core API (although I should try to double-check) in my working code I should publish before too long. That includes the ability to add/delete geometry. (I worked on that last week since I couldn't add joints in skeletal mode, and realized that the restriction shouldn't apply to any of the Tools.)
That just leaves #87 which I'm thinking about a quick fix for now.
from mm3d.
Related Issues (20)
- Material/light parameters are backward, should be swapped HOT 2
- 1.3.13 Minor Animation Issue When Starting New Animation HOT 2
- md3filter.cc DBL_MIN should probably be -DBL_MAX HOT 1
- Groupwin (Clean up) doesn't remove materials (as advertised)
- Zero divide is missing from normalize/normalize3 (glmath.h/glmath.cc) functions HOT 2
- edgedivcmd.cc reverses addTriangleToGroup's args HOT 1
- glmath.h operator-= and += don't return & reference
- Model>Edit Model Meta Data... does not save changes HOT 1
- Request to not antialias the Paint Texture image HOT 6
- Opening and Immediately Closing
- knuckleheaded code in bsptree.cc HOT 2
- After creating triangle using "Make face from vertices", allow "Invert normals" to operate on this newly added triangle HOT 2
- Adjustable radius and strength options for attract tools.
- Support spacemice HOT 3
- two years passed without release HOT 3
- Grid snapping? HOT 1
- I want to report one issue and one question HOT 8
- Add Pixelated Texture view HOT 1
- Animation mode won't allow moving verticies on Linux HOT 3
- Export to WRML/WRL (for Kicad models)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mm3d.