bugs
This commit is contained in:
@@ -43,6 +43,7 @@ void Map::setBitmapPath(const QString & p) {
|
|||||||
void Map::load(TextureManager * tm) {
|
void Map::load(TextureManager * tm) {
|
||||||
_bitmap_hash = 0;
|
_bitmap_hash = 0;
|
||||||
if (!bitmap_path.isEmpty()) tm->loadTextureImage(bitmap_path, _type == mtNormal, bake_options, &_bitmap_hash);
|
if (!bitmap_path.isEmpty()) tm->loadTextureImage(bitmap_path, _type == mtNormal, bake_options, &_bitmap_hash);
|
||||||
|
_changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -440,6 +440,7 @@ void Scene::prepareTree(ObjectBase * o) {
|
|||||||
case ObjectBase::glLight: {
|
case ObjectBase::glLight: {
|
||||||
Light * l = globject_cast<Light *>(co);
|
Light * l = globject_cast<Light *>(co);
|
||||||
lights_used[l->light_type] << l;
|
lights_used[l->light_type] << l;
|
||||||
|
if (l->light_map._changed) need_reload_materials = true;
|
||||||
} break;
|
} break;
|
||||||
case ObjectBase::glMesh:
|
case ObjectBase::glMesh:
|
||||||
if (co->mesh()) {
|
if (co->mesh()) {
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ public:
|
|||||||
void destroy(QOpenGLExtraFunctions * f);
|
void destroy(QOpenGLExtraFunctions * f);
|
||||||
void destroyUnused(QOpenGLExtraFunctions * f);
|
void destroyUnused(QOpenGLExtraFunctions * f);
|
||||||
|
|
||||||
|
void setLightsChanged() { lights_changed = tree_changed = true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void prepareTree(ObjectBase * o);
|
void prepareTree(ObjectBase * o);
|
||||||
void gatherSelection();
|
void gatherSelection();
|
||||||
@@ -107,7 +109,6 @@ protected:
|
|||||||
void setTreeChanged();
|
void setTreeChanged();
|
||||||
void setTreeStructChanged();
|
void setTreeStructChanged();
|
||||||
void setMaterialsChanged() { mat_changed = true; }
|
void setMaterialsChanged() { mat_changed = true; }
|
||||||
void setLightsChanged() { lights_changed = tree_changed = true; }
|
|
||||||
void setObjectMeshChanged(ObjectBase * o);
|
void setObjectMeshChanged(ObjectBase * o);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,13 @@ QList<Camera *> QGLView::selectedCameras() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void QGLView::reloadTextures() {
|
||||||
|
renderer_.markReloadMaterials();
|
||||||
|
renderer_.recreateMaterialThumbnails(true);
|
||||||
|
scene_->setLightsChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void QGLView::resizeEvent(QResizeEvent * e) {
|
void QGLView::resizeEvent(QResizeEvent * e) {
|
||||||
renderLater();
|
renderLater();
|
||||||
mouse.resize();
|
mouse.resize();
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public:
|
|||||||
ObjectBase * selectedObject() const { return scene_->selectedObject(); }
|
ObjectBase * selectedObject() const { return scene_->selectedObject(); }
|
||||||
|
|
||||||
TextureManager * textureManager() { return renderer_.textures_manager; }
|
TextureManager * textureManager() { return renderer_.textures_manager; }
|
||||||
void reloadTextures() { renderer_.markReloadTextures(); }
|
void reloadTextures();
|
||||||
|
|
||||||
Scene * scene() { return scene_; }
|
Scene * scene() { return scene_; }
|
||||||
void focusOn(const Box3D & bb);
|
void focusOn(const Box3D & bb);
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
TexturesEditor::TexturesEditor(QWidget * parent): QWidget(parent) {
|
TexturesEditor::TexturesEditor(QWidget * parent): QWidget(parent) {
|
||||||
ui = new Ui::TexturesEditor();
|
ui = new Ui::TexturesEditor();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->scrollArea->viewport()->setAutoFillBackground(false);
|
||||||
|
ui->scrollAreaWidgetContents->setAutoFillBackground(false);
|
||||||
ui->labelMissed->hide();
|
ui->labelMissed->hide();
|
||||||
view = 0;
|
view = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,8 +147,65 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QScrollArea" name="scrollArea">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>1</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalScrollBarPolicy">
|
||||||
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>435</width>
|
||||||
|
<height>84</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelMissed">
|
<widget class="QLabel" name="labelMissed">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Missed files:</string>
|
<string>Missed files:</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -159,6 +216,10 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../../../qad/libs/application/qad_application.qrc"/>
|
<include location="../../../qad/libs/application/qad_application.qrc"/>
|
||||||
<include location="../../../qad/libs/blockview/qad_blockview.qrc"/>
|
<include location="../../../qad/libs/blockview/qad_blockview.qrc"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user