Sep 2011
1 / 5
Sep 2011
Nov 2011

Hi there,

I have a node that has an input MFnNumericAttribute attribute of MFnNumericData::k3Double type. I need to get the value of this attribute in the range [currentTime - x, currentTime + y]. I'm not sure how to do this.

Hope someone can help!

Thanks :slight_smile:

As I initially thought this would work:

	for(t=s_t.value(); t<=e_t.value(); t++)
	{
		time.setValue(t);
		MAnimControl::setCurrentTime(time);
		p = block.inputValue(position).asVector();
		//...
	}

 And it does work, I just discovered a bug.

My bad! 

MAnimControl::setCurrentTime(time);

Ugh, you probably dont want to do that inside a node, seriously, because you now diry all nodes, update glopbal time and screw up the entire maya dependcy graph. Yeah it works, maya allows you to do suicide too.

2 months later

Hey sorry didn't see this post. Ah ok, what do you suggest? Perhaps plugging into another node that updates time?

Thanks 

Well that could be a natural solution.

Thing is mayas missing one very central utility node. A looper node, that would take x inputs and give x outputs and then cycle a inside loop node network based on those inputs. Ita trivial to make and would solve a LOT fo porblems.

On other nodes mayas missing that would be appreciated are, anim curve derivative node, anim curve integrate node. Would solve the 2 most common frustrations.

Now then if we could get the possibility to actually physically rename slots form nodes to others and redirect selection effects better youd have all mayas baseline problems solved.

Suggested Topics

Want to read more? Browse other topics in Maya or view latest topics.