Found the issue. So it seems even though the MPxDrawOverride has it's own boundingBox method, the boundingBox that's actually being used by vp 2.0 is the boundingBox returned by the MPxLocator class. Found this issue when I returned the objPath.node()->boundingBox in the MPxDrawOverride boundingBox method. It would never update. So, reorganized the code a bit to force the update as needed, and works fine now. Just and FYI for anyone else that may hit this issue
On Friday, January 29, 2016 at 12:01:06 PM UTC-8, Daniel Lindsey wrote: > > I did implement the boundingbox in both the custom MPxLocatorNode class > and the custom MPxDrawOverride class. They're both being generated the > same. I'm using an MMatrix to transform the boundingBox. I've even gone > as far as manually calling the boundingBox method from within the > prepareToDraw method in custom MPxDrawOverride class still with no luck. > It's very odd that internally, Maya will print the proper scale of the > boundingBox, but the selection marque doesn't realize that's the actual > size. > > On Friday, January 29, 2016 at 11:45:24 AM UTC-8, Janos Hunyadi wrote: >> >> *addon:* >> I made a few locators in VP2.0 and it should work if you draw the* same >> geo* in VP1.0 as in VP2.0, than you can select it. >> >> On Friday, January 29, 2016 at 8:43:45 PM UTC+1, Janos Hunyadi wrote: >>> >>> Did you implement the BB, and selection on the legacy VP 1.0 part >>> too (selection still happens there), not just the VP 2.0 override? >>> >>> On Friday, January 29, 2016 at 1:49:43 AM UTC+1, Daniel Lindsey wrote: >>>> >>>> Has anyone else had this issue? I have a custom locator, that has >>>> attributes on it to define scale, orientation, and translation offsets. >>>> It draws properly in vp 2.0, and even reports back the proper >>>> boundingbox size from the boundingbox method. >>>> However, the locator is only selectable in the region of -1,1 in the >>>> scene. Once selected like that, then the boundingBox seems to be updated >>>> properly, >>>> and you can select the locator from the correct bounding space. >>>> >>>> Has anyone had this issue? Has anyone found a workaround for this if >>>> they have had this issue? >>>> >>>> Thanks, >>>> -D >>>> >>> -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1acff813-6b62-4715-a920-9c340a4b1ce0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
