We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

derekwang0605

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 33 total)
  • Author
    Posts
  • in reply to: How to generate and assign new material? #33448
    derekwang0605
    Customer

    I have already generated a new material but did not work. And I have to add a new color in Blender and then it can work in runCode().
    var color = new v3d.Color(‘#0000FF’);
    color.convertSRGBToLinear();
    var mymat = new v3d.MeshStandardMaterial({ color: color, emissive: color, emissiveIntensity: 0.4, toneMapped: false });

    assignMat([‘GROUP’, ‘L100’], mymat);

    derekwang0605
    Customer

    Thanks! Indeed helpful!

    in reply to: How to generate and assign new material? #33406
    derekwang0605
    Customer

    No errors and no color has been changed to new color.
    setMaterialColor(‘Verge3D_Environment_World’, ‘Principled Color’, 0.1, 0.5, 0.05, ”);
    assignMat([‘GROUP’, ‘L100’], ‘Verge3D_Environment_World’);
    Instead if I use ‘Verge3D_Environment_World’, it works and color will be changed.

    in reply to: puzzle vs. runcode() #32817
    derekwang0605
    Customer

    Thanks it works but get group name retrieved by objects and then removed the repeated groups in the group list. It is a bit time consuming and if there is a better way to retrieve the group list from scene, will be better.

    in reply to: puzzle vs. runcode() #32708
    derekwang0605
    Customer

    // utility function envoked by almost all V3D-specific puzzles
    // retrieve all objects on the scene
    function getAllObjectNames() {
    var objNameList = [];
    appInstance.scene.traverse(function(obj) {
    if (notIgnoredObj(obj))
    objNameList.push(obj.name)
    });
    return objNameList;
    }
    This is the code script for getAllObjectNames().
    Is there a function which can getAllGroups() in puzzle?

    in reply to: puzzle vs. runcode() #32655
    derekwang0605
    Customer

    Thanks for that! Also how to add button and listener in runCode(). Any examples available?

    in reply to: VRML coordinate XZY vs. Blender XYZ #32647
    derekwang0605
    Customer

    bpy.ops.object.origin_set(type=’ORIGIN_CENTER_OF_VOLUME’, center=’BOUNDS’)
    bpy.ops.transform.rotate(value=3.14/2, orient_axis=’X’, orient_type=’GLOBAL’, orient_matrix=((1, 0.0, 0.0), (0.0, 1, 0.0), (0.0, 0.0, 1)), orient_matrix_type=’GLOBAL’, constraint_axis=(True, False, False), mirror=True, use_proportional_edit=False, proportional_edit_falloff=’SMOOTH’, proportional_size=1.0, use_proportional_connected=False, use_proportional_projected=False, snap=False, snap_target=’CLOSEST’, snap_point=(0.0, 0.0, 0.0), snap_align=False, snap_normal=(0.0, 0.0, 0.0), gpencil_strokes=False, center_override=(0.0, 0.0, 0.0), release_confirm=False, use_accurate=False)

    I tried different ways and finally those two line worked it out!

    in reply to: puzzle vs. runcode() #32644
    derekwang0605
    Customer

    Thanks! Where to add ‘exec script’ after setting variables and procedures? Can not find this option in puzzles.
    It is a big house and I have 120 collections whose names categorized with ‘AXXX’,’DXXX’,’FXXX’,’TXXX’. I want to add four buttons ‘A’/’D’/’F’/’T’ to show or hide the corresponding collections. Can this be done by puzzle?

    in reply to: VRML coordinate XZY vs. Blender XYZ #32619
    derekwang0605
    Customer

    I am using Blender’s importx3d to import VRML model but after importing in Blender the imported object rotation_euler turns into XZY.

    in reply to: Scripting with conda + blender (bpy) + verge3D #32526
    derekwang0605
    Customer

    Indeed helpful! Thanks! :good:

    derekwang0605
    Customer

    I tried to convert the text object into mesh and then it works. All characters are in correct formats now.
    just add below:
    bpy.ops.object.convert(target=’MESH’)

    in reply to: First Person Camera vs. Flying Camera #32458
    derekwang0605
    Customer

    Hi Kai Liu,
    Are you using python script in Blender?

    derekwang0605
    Customer

    Thank you for the help! :good:

    derekwang0605
    Customer

    Sorry , my bad, please ignore the post. I forgot to solidify the bmesh.
    my2ndprofile=bm.verts[:] + bm.edges[:] + bm.faces[:]
    bmesh.ops.solidify(bm, geom=my2ndprofile, thickness=0.081/myparalen)
    After adding these two lines, it worked well.

    in reply to: Scripting with conda + blender (bpy) + verge3D #32345
    derekwang0605
    Customer

    Hi,
    Greatest post!
    I can not find this directory
    C:/Users/jacks(admin name)/Anaconda3/envs/blender_env/2.79/scripts/addons

    I add a directory in C:\ProgramData\Anaconda3\envs\blender_envs
    mod = __import__(module_name)
    ModuleNotFoundError: No module named ‘verge3d’

Viewing 15 posts - 16 through 30 (of 33 total)