1
\$\begingroup\$

I downloaded the official tutorial from:CustomModelAnimationSample It works fine but when I try to replicate it in my project, it fails to load the Tag property in my model.

Is found that the probelm is in the line:

skinnedModel = Content.Load<Model>("DudeWalk");

This line loads the model from the DudeWalk.fbx file and with the custom SkinnedModelProcessor. It loads the animations data in the model. After the line the Tag property is full. I stepped into the method and it went to the custom ModelData class.

I copied everything from the projects CustomModelAnimationWindows and CustomModelAnimationPipeline to my solution and set all the references. I tried the same line of code and couldn't step in the method. It called the default method or model constructor and after the line the model's Tag propetry was null.

I have to load the model through my custom SkinnedModelProcessor class, but how I tell the game to use this class? In the tutroail CustomModelClass the line is changed to:

model = Content.Load<CustomModel>("tank");

So I assumed that I have to set the generic type to a custom model class, but the first example works without it.

If anyone has some useful advice or some other helpful link, I'll be happy to try it.

EDIT :

I tried this tutorial Creating a Custom Importer and Processor but it didn't work either.

I understand now that the binding of the custom pipeline processor is done at build-time and not a run-time. But my custom processor never gets bound nor called.

\$\endgroup\$
2
  • \$\begingroup\$ Are your changing the Content Processor of your model in the content project? \$\endgroup\$
    – r2d2rigo
    Commented Nov 17, 2011 at 14:00
  • \$\begingroup\$ @r2d2rigo: are you saying that this is a problem with the model and not with the application? How do I set up the model for my processor to work? \$\endgroup\$ Commented Nov 17, 2011 at 15:31

1 Answer 1

2
\$\begingroup\$

In order to do custom processing, you also have to set the importer/processor for the model in question. Go to the Content, click the model and select the desired importer/processor from the properties window.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .