CoDEmanX / blender-cod

Blender Add-On for Call of Duty® modding
83 stars 26 forks source link

Exportable Model Resolution is Too Strict #16

Closed BrutalMcLegend closed 5 years ago

BrutalMcLegend commented 5 years ago

Everytime I try to export a Model from blender, it errors saying "There are no objects to export", this happens regardless of if the object is selected and I hit 'Selected Objects Only' or not. screenshot_5

CoDEmanX commented 5 years ago

What version of the plug-in do you use?

IIRC, you need a mesh with at least one triangle, bound to an object in the current scene, with at least one material, UV-unwrapped.

Not fully sure about the latest (unreleased) version, but there are some similar filters plus a bit more logic for armatures. You might need to parent the mesh to a single bone armature at the root point (world 0,0,0 I suppose), see https://github.com/CoDEmanX/blender-cod/issues/12#issuecomment-383205956

BrutalMcLegend commented 5 years ago

I used the latest "Release" build -- Blender-CoD v0.5.1 -- unsure of what caused the problem, as I downloaded the old - v0.3.5 - version and exported the model without issue, Possibly due to armature missing? It was just a Model prop for a map (no bones should be needed right?) anyhow, reverting the release to the old one exported it just fine

SE2Dev commented 5 years ago

I knew I was forgetting something... yeah, it's because I forgot to fix the model detection code for the exporter (see #15 and #12).

IIRC, CoD always requires at-least one bone (tag_origin) on all models. It defines where the origin of the model is. Both the new version and old version of the tool automatically inserted that bone for static models, but the new version has much stricter restrictions on what is considered a valid exportable content. As for the old versions, so much stuff was broken I really can't recommend using them.

I'll tweak the model restrictions when I get the chance and release an update.

BrutalMcLegend commented 5 years ago

Awesome @SE2Dev thanks for the swift reply and yeah I really didn't want to revert to using an older release, but given that I was used to not 'adding' that bone, I guess it never crossed my mind to do so, we have the model in WaW now and I'm passing it over to the guy that wanted it, so it's all clear, I'll keep my eyes open for the update and grab it when you've released it!

SE2Dev commented 5 years ago

This should be fixed as of v0.5.2