forked from LeenkxTeam/LNXSDK
Repe [T3DU] and Moises Jpelaez updates
This commit is contained in:
@ -16,8 +16,7 @@ PROP_TYPE_ICONS = {
|
||||
"CameraObject": "CAMERA_DATA",
|
||||
"LightObject": "LIGHT_DATA",
|
||||
"MeshObject": "MESH_DATA",
|
||||
"SpeakerObject": "OUTLINER_DATA_SPEAKER",
|
||||
"TSceneFormat": "SCENE_DATA"
|
||||
"SpeakerObject": "OUTLINER_DATA_SPEAKER"
|
||||
}
|
||||
|
||||
|
||||
@ -61,8 +60,7 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup):
|
||||
("CameraObject", "Camera Object", "Camera Object Type"),
|
||||
("LightObject", "Light Object", "Light Object Type"),
|
||||
("MeshObject", "Mesh Object", "Mesh Object Type"),
|
||||
("SpeakerObject", "Speaker Object", "Speaker Object Type"),
|
||||
("TSceneFormat", "Scene", "Scene Type")),
|
||||
("SpeakerObject", "Speaker Object", "Speaker Object Type")),
|
||||
name="Type",
|
||||
description="The type of this property",
|
||||
default="String")
|
||||
@ -74,7 +72,6 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup):
|
||||
value_vec3: FloatVectorProperty(name="Value", size=3)
|
||||
value_vec4: FloatVectorProperty(name="Value", size=4)
|
||||
value_object: PointerProperty(name="Value", type=bpy.types.Object, poll=filter_objects)
|
||||
value_scene: PointerProperty(name="Value", type=bpy.types.Scene)
|
||||
else:
|
||||
type: EnumProperty(
|
||||
items=(
|
||||
@ -90,8 +87,7 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup):
|
||||
("CameraObject", "Camera Object", "Camera Object Type"),
|
||||
("LightObject", "Light Object", "Light Object Type"),
|
||||
("MeshObject", "Mesh Object", "Mesh Object Type"),
|
||||
("SpeakerObject", "Speaker Object", "Speaker Object Type"),
|
||||
("TSceneFormat", "Scene", "Scene Type")),
|
||||
("SpeakerObject", "Speaker Object", "Speaker Object Type")),
|
||||
name="Type",
|
||||
description="The type of this property",
|
||||
default="String",
|
||||
@ -104,7 +100,6 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup):
|
||||
value_vec3: FloatVectorProperty(name="Value", size=3, override={"LIBRARY_OVERRIDABLE"})
|
||||
value_vec4: FloatVectorProperty(name="Value", size=4, override={"LIBRARY_OVERRIDABLE"})
|
||||
value_object: PointerProperty(name="Value", type=bpy.types.Object, poll=filter_objects, override={"LIBRARY_OVERRIDABLE"})
|
||||
value_scene: PointerProperty(name="Value", type=bpy.types.Scene, override={"LIBRARY_OVERRIDABLE"})
|
||||
|
||||
def set_value(self, val):
|
||||
# Would require way too much effort, so it's out of scope here.
|
||||
@ -153,10 +148,6 @@ class LnxTraitPropListItem(bpy.types.PropertyGroup):
|
||||
if self.value_object is not None:
|
||||
return self.value_object.name
|
||||
return ""
|
||||
if self.type == "TSceneFormat":
|
||||
if self.value_scene is not None:
|
||||
return self.value_scene.name
|
||||
return ""
|
||||
|
||||
|
||||
return self.value_string
|
||||
@ -176,8 +167,6 @@ class LNX_UL_PropList(bpy.types.UIList):
|
||||
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
||||
if item.type.endswith("Object"):
|
||||
sp.prop_search(item, "value_object", context.scene, "objects", text="", icon=custom_icon)
|
||||
elif item.type.endswith("TSceneFormat"):
|
||||
sp.prop_search(item, "value_scene", bpy.data, "scenes", text="", icon=custom_icon)
|
||||
else:
|
||||
use_emboss = item.type in ("Bool", "String")
|
||||
sp.prop(item, item_value_ref, text="", emboss=use_emboss)
|
||||
|
||||
Reference in New Issue
Block a user