Problem with GetModelingAxis() [CLOSED]
-
On 06/07/2015 at 07:29, xxxxxxxx wrote:
I can't reproduce any problems here.
My simple test code used on a button:BaseDocument* doc = GetActiveDocument(); if (!doc) return false; AutoAlloc<AtomArray> selection; if (!selection) return false; doc->GetActiveObjects(*selection, GETACTIVEOBJECTFLAGS_0); for (Int32 x = 0; x < selection->GetCount(); x++) { GePrint(static_cast<BaseObject*>(selection->GetIndex(x))->GetName()); }
It print's just fine every selected object. Regardless, if I do a select all, use mouse drag selection or simply select a few with Shift-/Ctrl-Click. So I doubt this is a bug in Cinema.
Makes it also a bit difficult to help you.
Did you use a debugger to step through the code, in cases it doesn't work? -
On 06/07/2015 at 07:54, xxxxxxxx wrote:
Hi,
Well, that problem seems to only occur when I'm in point, edge or polygon mode.
That's probably why you couldn't reproduce it.And the problem is, my code ALWAYS works, it just sometimes doesn't work correctly (update the position to the wrong way). So debugging wouldn't help me, I guess.
Pff, this is really weird.
Should I make a video about how it behaves in C4D?
Thanks in advance for your help and time!
Cheers,
Casimir Smets -
On 06/07/2015 at 08:11, xxxxxxxx wrote:
Honestly, with "my code ALWAYS works, it just sometimes doesn't work correctly" you made my day
In my opinion, debugging always helps. Even if a program is producing results as expected, a debugger can generate great insights.
I tried it again, switching between point, edge and polygon modes. It didn't change, I still can't reproduce any irregularities with selecting objects. The code posted above still prints all selected objects.
I'm not sure, if a video will help. If you have the feeling, I did not understand the issue correctly, maybe a video can get us on the same page. On the other hand, the time might be better spent debugging your plugin. One strategy could be to consecutively deactivate more parts of your code, until either you found a part being responsible or you end up with a piece of code like mine above and you still see the issue. In the later case, we would probably need to file a bug report...
-
On 06/07/2015 at 10:18, xxxxxxxx wrote:
Hi Andreas,
Originally posted by xxxxxxxx
Honestly, with "my code ALWAYS works, it just sometimes doesn't work correctly" you made my day
Well, I'm glad I did
And it gives no problem with printing the objects.
The problem is when setting points, edges or polygons locally from a multi-objectselection.Maybe it's best if you try it with my code after all...
And I will debug my plugin straight away, and check if it helps something.
Greetings,
Casimir Smets -
On 06/07/2015 at 11:14, xxxxxxxx wrote:
Hi,
After debugging I found the line where the problem occurs, but I totally don't understand it!
Matrix modelingAxis = opPoint->GetModelingAxis(doc);
I have tested this with 2 cubes with point-mode on.
I first tested the select all method, and after that the shift-select method.In my first test, for my second cube, modelingAxis was just (0, 0, 0).
In my second test, for my second cube, modelingAxis was the proper value (84.250, 202.844, -32.124).
This happened with exactly the same code, so I am quite sure shift-select differs from select all. I definately can't see another reason right now.
Yeah, it's a thing!Is this enough information to file a bug report, or do you guys also need to do some testing?
If needed, I could provide my whole project to MAXON.
With kind regards,
Casimir Smets -
On 09/07/2015 at 09:00, xxxxxxxx wrote:
Hi Casimir,
unfortunately I still can't reproduce your issue.
I added code to print the offset of the modelling axis to my above code. No matter what method of selection (Ctrl-a, drag selection, shift or ctrl click) I tried and in which editing mode (points, edges, polys, object) I'm in, I always get all selected objects with correct modelling axis. -
On 09/07/2015 at 09:41, xxxxxxxx wrote:
Hi Andreas,
Currently I'm working with other code that doesn't give that problem, due to not using the modeling axis anymore, but I'll change my code back for a moment, to make the movie which shows the problem, and change my code back. Because I still think this is sort of a bug.
-
On 26/08/2015 at 09:24, xxxxxxxx wrote:
After quite some research, I think, there is an issue with GetModelingAxis(). I filed a bug report for this.
I mark this thread as closed, but will post an update, when it is fixed.Renamed thread from "Does select all differ from shift selecting??" to "Does select all differ from shift selecting??"
-
On 26/08/2015 at 09:46, xxxxxxxx wrote:
Hi Andreas,
Thanks for your answer!
I have to add that I had some problems recently with the protection tag, and also with the object-node with a rotation port combined with the universal node.
I think this could have something to do with the axises.Maybe those are related to each other?
The support team is currently busy with that, so if you want information about that, you can get it there. Or you could ask me to send the information via Mail, whatever you prefer.
It's just a thought here, I can be completely wrong about this one.
-
On 27/08/2015 at 11:16, xxxxxxxx wrote:
Hi Casimir,
it's pretty hard to tell, if there may be something related. Instead of getting several teams in parallel to work, I'd like to wait until you get response from support. And then it's probably a good thing to open a new thread, if any problem remains.