Notifications
Clear all

[Closed] CA's with animated dropdown's error

I have dropdowns linked to some #integer parameters in my custom attributes inside my material. I have the accommodating code to make the attributes unique, as well as correctly set the UI to its corresponding value everytime my material opens/created/clone.

The problem occurs when I animate the dropdownlist.

If i just work in the current scene, everything works/appears as expected. However, if you load up the ‘Curve Editor’, you will see that the value be something crazy like key[1] = 0, key[2] = 2143289344, key[3] = 0…etc.

but if you do this
$.material.dropDownName, at keyframe 2 it will return an expected index, like 1.

The problem is, when i reload the scene…any of my animated dropdowns go to their default state because now my ca parameter has that ’ 2143289344 ’ number as its value. Even though it had the ‘1’ value before i reloaded my scene.

Again, if its not animated, I am not seeing this problem.

Has anyone seen anything like this before?

I can try to get an example file if need be.

Thanks

3 Replies

It appears its pointing to a memory location, as the number is different every time. No one has seen this?

I’m on 3dsmax 2012


ca = attributes ca 
(
	parameters main rollout:main
	(
		names type:#integer animatable:on default:1 ui:ui_names
	)
	rollout main "Parameters" 
	(
		dropdownlist ui_names items:#("Ann", "Peter", "Jack", "Kat")
	)
)
delete objects 
p = point name:"ca" isselected:on
custattributes.add p ca baseoject:on
p.ca.names.controller = linear_float()

do you have any problem with this sample? and… when you ask a question about your code please show the code. it will help you to get an answer.

Thanks for the reply Denis.

I understand the part about posting code. I was also planning on making a working sample to show the problem, but as the current code was in a 800 line material, i wanted to see if anyone had seen it before I started ripping out a test case.

Your example actually shed some light on what it was. I had set calls I was using that were still implemented when we were passing data differently. I removed that, and went with the straight link and it worked as expected.

Thanks for your help.