Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2021-05-21 19:08:51 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-08-10 17:04:45 +0300
commit45997489622869b206b8fdacba0586e14f402722 (patch)
treeeec2bec9d235d1d2865c682ce897c7ba6d2d326c /release
parente38de11f05710e08bab39019a9a1c28c24c703a8 (diff)
UI: hide object instancing panel for object types that dont support instancing
Basically, only meshes, empties and pointclouds support direct instancing atm., no need to have the panel for other types. note: prior to rB2eca054e14b1, collection instancing was possible on all types (but that was removed in said commit) note2: for empties, rna_Object_instance_type_itemf should also be tweaked so we dont get "Vertices" and "Faces" options, but that can be done in a separate commit Maniphest Tasks: T88443 Differential Revision: https://developer.blender.org/D11348
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 46a16a70dca..e93b0b0d0a1 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -262,6 +262,11 @@ class OBJECT_PT_instancing(ObjectButtonsPanel, Panel):
bl_label = "Instancing"
bl_options = {'DEFAULT_CLOSED'}
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return (ob.type in {'MESH', 'EMPTY', 'POINTCLOUD'})
+
def draw(self, context):
layout = self.layout