GetContour() issues
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/12/2011 at 03:31, xxxxxxxx wrote:
Is there a way to return more than one Spline?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/12/2011 at 03:56, xxxxxxxx wrote:
If you're using GetVirtualObjects to return your splines, just create a null object and make the generated splines child objects of the null. Then return the null.
If you have to use GetContour, you can't do that because then you have to return a pointer to a SplineObject, not a BaseObject. So what I do is create a Connect object, make the splines children of that, do a SendModelingCommand with MCOMMAND_JOIN on the Connect object, cast the result to a *SplineObject and return that.
The whole issue with GVO and GC is a mess, it should have been fixed years ago. We shouldn't need both, just the generic GVO function.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/12/2011 at 04:18, xxxxxxxx wrote:
Yeah. I've got two other plugins I as working on that are spline-dependent (custom spline IK with rail spline option and one for poly deformation).
Another issue I have is that there is no way for me to adjust the execution point of Splines I'm using. (Splines are always set to Generator priority, which heavily limits their use for tags that need priority set to Experssion.)
I've yet to hear any news of either an overhaul or at the very least a hack to deal with SplineObjects... -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/12/2011 at 04:32, xxxxxxxx wrote:
I don't know if it will help your problem, but there's a hack on my site to deal with the issue of GetContour not being called except when the AM is updated. It might be of some use, you can find it at http://www.microbion.co.uk/graphics/c4d/cookbook-3.htm.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/12/2011 at 04:51, xxxxxxxx wrote:
Yeah, that would work great! My original setup was to manually add in keyframes in C4D using a dummy Description to force the update. Your solution's much more elegant. I can probably get UberTracer finally running with that one.
I'll start working on it again this week.
Thanks Spedler. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/04/2012 at 07:28, xxxxxxxx wrote:
See solution posted here.
-
On 29/08/2014 at 03:33, xxxxxxxx wrote:
Getting back to updating my plugin after all these years...
It seems that if I call the GetContour() method within the GetVirtualObjects() method, the spline finally updates as expected. The splines also redraw for Sketch & Toon.
BaseObject *UberTracer::GetVirtualObjects(BaseObject*op, HierarchyHelp*hh){ return UberTracer::GetContour(op, op->GetDocument(), op->GetDocument->GetLOD(), hh->GetThread()); } SplineObject *UberTracer::GetContour(BaseObject* op, BaseDocument* doc, Float lod, BaseThread* bt){ /*code for spline generation in here*/ }
...is it safe to code an object this way, or will there be side-effects?
I've tried the CheckDirty workaround and it doesn't really work as I need it to. -
On 25/10/2014 at 03:13, xxxxxxxx wrote:
Welp... answering my question, running GetContour() inside GetVirtualObjects() seems to work almost perfectly.
Update calls are regular, and Generators and Sketch & Toon will recognize the spline.
BUT the Hair Renderer will not recognize the spline if GetContour is called in GetVirtualObjects.
I just have to figure out a way to do a CompareDependenceList() call inside GetContour to optimize the redraw calls...
-
On 25/10/2014 at 08:53, xxxxxxxx wrote:
I think this happens because the Hair engine expects to be fed a SplineObject (as returned by GetContour), but what GVO returns is a BaseObject. As far as I know, and I spent a lot of time on this a couple of years ago, there is no way to make this work because GVO will not return a SplineObject. I mean, obviously it can return a spline but not as a SplineObject, which is a subclass of BaseObject.
Steve
-
On 27/10/2014 at 01:30, xxxxxxxx wrote:
I guess that does make sense.
Anyways, I'm overhauling my ubertracer code from scratch for R16 and Yannick's CheckDirty() suggestion seems to work so far. I'll just have to do several more case tests to make sure it doesn't break.