On 20/10/2015 at 08:09, xxxxxxxx wrote:
Hi Guys!
How can I show a folder with file names in side a AddCombobox , like with the FS SDK for 3ds Max and Bender Plug-in, to add effects to the object, its a drop down list of all the files effects names and it attach to the object on which one you select in the list.
So like what I want is how can i make it find effects Folder in Fsx folder and show them in the AddComboBox list :
C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\Effects
Then Tag with the model or a null, so I guess I make a Command Plug-in generate a Tag or just make a Tag Plug-in for it.
Example:
So how Can i Get File C4d Find the Folder and AddComboBox read it
self.format_list = self.AddComboBox(Exporter_Button, c4d.BFH_SCALEFIT, 46, 0, False)
self.AddChild(Exporter_Button, thee_Ds, '3D Studio (*.3ds)')
self.AddChild(Exporter_Button, Alembic_abc, 'Alembic (*.abc)')
self.AddChild(Exporter_Button, DAE_1_4, 'COLLADA 1.4 (*.dae)')
self.AddChild(Exporter_Button, Direct_3D, 'Direct 3D (*.x)')
self.AddChild(Exporter_Button, FBX_ALL, 'FBX (*.fbx)')
#-------------------------------------------------------------------------------------------------------------#
Now this is i saw from the Guys how made the Blender Python Plugin code :
if yo want Download to see the whole thing:
http://www.fsdeveloper.com/wiki/index.php?title=Blender2FSX_Toolset_manual
(Reason Why i only post a little of the code cause its a lot and he have it broken up in to multi py files for blender, So its best you Download and take a look at it)
CODE:
import bpy
import xml.etree.ElementTree as etree
from mathutils import Vector
from os import urandom
from winreg import OpenKey, QueryValueEx, HKEY_LOCAL_MACHINE, REG_SZ, REG_EXPAND_SZ
#-----------------------------------------------------------#
Help or Tips,
Ashton