Forum Replies Created
-
AuthorPosts
-
derekwang0605Customer
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);
derekwang0605CustomerThanks! Indeed helpful!
derekwang0605CustomerNo 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.derekwang0605CustomerThanks 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.
derekwang0605Customer// 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?derekwang0605CustomerThanks for that! Also how to add button and listener in runCode(). Any examples available?
derekwang0605Customerbpy.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!
derekwang0605CustomerThanks! 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?derekwang0605CustomerI am using Blender’s importx3d to import VRML model but after importing in Blender the imported object rotation_euler turns into XZY.
derekwang0605CustomerIndeed helpful! Thanks!
2020-09-06 at 10:12 am in reply to: Text encoding got wrong for Chinese characters after converting into gltf. #32459derekwang0605CustomerI 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’)derekwang0605CustomerHi Kai Liu,
Are you using python script in Blender?derekwang0605CustomerThank you for the help!
derekwang0605CustomerSorry , 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.derekwang0605CustomerHi,
Greatest post!
I can not find this directory
C:/Users/jacks(admin name)/Anaconda3/envs/blender_env/2.79/scripts/addonsI add a directory in C:\ProgramData\Anaconda3\envs\blender_envs
mod = __import__(module_name)
ModuleNotFoundError: No module named ‘verge3d’ -
AuthorPosts