Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render: Skeletal mesh doesn't render on the screen #752 #754

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion engine/includes/components/skinnedmeshrender.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Material;
class MaterialInstance;

class ENGINE_EXPORT SkinnedMeshRender : public MeshRender {
A_REGISTER(SkinnedMeshRender, Renderable, Components/3D);
A_REGISTER(SkinnedMeshRender, MeshRender, Components/3D);

A_PROPERTIES(
A_PROPERTYEX(Armature *, armature, SkinnedMeshRender::armature, SkinnedMeshRender::setArmature, "editor=Component"),
Expand Down
2 changes: 1 addition & 1 deletion engine/includes/editor/assetmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ENGINE_EXPORT AssetManager : public QObject {

AssetConverterSettings *fetchSettings(const QFileInfo &source);

AssetConverter *getConverter(AssetConverterSettings *settings);
AssetConverter *getConverter(const QFileInfo &source);

bool isOutdated() const;

Expand Down
9 changes: 4 additions & 5 deletions engine/src/editor/assetmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void AssetManager::renameResource(const QFileInfo &oldName, const QFileInfo &new

AssetConverterSettings *settings = fetchSettings(dst);
if(settings) {
AssetConverter *converter = getConverter(settings);
AssetConverter *converter = getConverter(dst);
converter->renameAsset(settings, oldName.baseName(), newName.baseName());
}
}
Expand Down Expand Up @@ -610,7 +610,7 @@ Actor *AssetManager::createActor(const QString &source) {
QFileInfo info(path);
AssetConverterSettings *settings = fetchSettings(info);
if(settings) {
AssetConverter *converter = getConverter(settings);
AssetConverter *converter = getConverter(info);
if(converter) {
return converter->createActor(settings, guid);
}
Expand Down Expand Up @@ -808,9 +808,8 @@ QImage AssetManager::renderDocumentIcon(QFileInfo path, QString color) {
return QImage();
}

AssetConverter *AssetManager::getConverter(AssetConverterSettings *settings) {
QFileInfo info(settings->source());
QString format = info.completeSuffix().toLower();
AssetConverter *AssetManager::getConverter(const QFileInfo &source) {
QString format = source.completeSuffix().toLower();

auto it = m_converters.find(format);
if(it != m_converters.end()) {
Expand Down
1 change: 1 addition & 0 deletions worldeditor/src/screens/scenecomposer/objectcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ void ObjectController::onDragEnter(QDragEnterEvent *event) {
AssetManager *mgr = AssetManager::instance();
foreach(QString str, list) {
if(!str.isEmpty()) {
str = ProjectSettings::instance()->contentPath() + "/" + str;
QFileInfo info(str);
QString type = mgr->assetTypeName(info);
if(type != "Map") {
Expand Down
Loading