I am making a basic custom attribute and assigning it to an object, everything seems to work fine until i make multiple copies of the object.
- Create object
- Add the custom attribute (custAttributes.add $ MCCA #unique)
- Shift+Move to create several copies
- First and second copied objects, the ca works, all others don’t
Below is the test code for the custom attribute
global MCCA
MCCA = attributes MCCAData attribID:#(0x370df988, 0x6f6f0b01)
(
local buttonWidth = 135fn Check_fn =
(
MessageBox “Test”
)parameters test_params rollout:test_ro
(
get_btn type:#boolean animatable:false ui:get_btn default:false
first_sp type:#integer animatable:false ui:first_sp default:0
last_sp type:#integer animatable:false ui:last_sp default:0on get_btn set val do ( if val == true then ( Check_fn() get_btn = false ) ))
rollout test_ro “test”
(
spinner first_sp "First: " type:#integer range:[-1000000,1000000,0] pos:[38,7] fieldWidth:60 width:(buttonWidth - 24)
spinner last_sp "Last : " type:#integer range:[-1000000,1000000,0] pos:[38,28] fieldWidth:60 width:(buttonWidth - 24)
checkbutton get_btn “Get” width:buttonWidth pos:[14,49]
)
)